Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Latest commit

 

History

History
57 lines (35 loc) · 3.35 KB

CONTRIBUTING.md

File metadata and controls

57 lines (35 loc) · 3.35 KB

Sentry

Contributing

We welcome suggested improvements and bug fixes to the @sentry/* family of packages, in the form of pull requests on GitHub. The guide below will help you get started, but if you have further questions, please feel free to reach out on Discord.

Setting up an Environment

To run the test suite and our code linter, node.js and npm are required.

npm and node download

Because the repository requires you to compile the c++ bindings via node-gyp, we may require you to install dependencies like Python and GCC. See node-gyp for a full list of those requirements depending on the OS that you are running.

Building the package

Since we are using TypeScript and native node addons, you need to transpile the code to JavaScript and compile the c++ bindings in order to be able to run the addon.

  • yarn build will compile the c++ bindings and ts files.
  • yarn build:lib will compile ts files
  • yarn build:bindings will compile c++ bindings

Tests

Tests are colocated with source files and should have a .test.ts suffix. The entire test suite can be ran using the yarn test command.

Linting

Similar to building and testing, linting can be done via yarn lint command.

Considerations Before Sending Your First PR

When contributing to the codebase, please note:

  • Non-trivial PRs will not be accepted without tests (see above).
  • We encourage you to open issues and discuss the change you want to make before opening PR's. This is especially true if you are considering adding new functionality. Remember that your requirements may differ from the direction that we want this SDK to take.
  • Please do not bump version numbers yourself.

Benchmarks

The repository contains micro benchmarks. You can find all benchmarks at the benchmarks folder in project root directory. The benchmarks can either be ran directly through node via node benchmarks/cpu/benchmark.profiler.js or via yarn benchmark command. There are also individual yarn benchmark commands like yarn benchmark:server or yarn benchmark:methods which will only run individual benchmarks.

Remember that these are micro benchmarks and that results will vary across different OS and architectures.

Publishing a Release

These steps are only relevant to Sentry employees when preparing and publishing a new SDK release.

  1. Determine what version will be released (we use semver).
  2. Update CHANGELOG.md to add an entry for the next release number and a list of changes since the last release. (See details below.)
  3. Run the Prepare Release workflow.
  4. A new issue should appear in https://github.com/getsentry/publish/issues.
  5. Ask a member of the @getsentry/releases team to approve the release.