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.
To run the test suite and our code linter, node.js and npm are required.
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.
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 filesyarn build:bindings
will compile c++ bindings
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.
Similar to building and testing, linting can be done via yarn lint
command.
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.
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.
These steps are only relevant to Sentry employees when preparing and publishing a new SDK release.
- Determine what version will be released (we use semver).
- Update
CHANGELOG.md
to add an entry for the next release number and a list of changes since the last release. (See details below.) - Run the Prepare Release workflow.
- A new issue should appear in https://github.com/getsentry/publish/issues.
- Ask a member of the @getsentry/releases team to approve the release.