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 yarn are required.
sentry-javascript
is a monorepo containing several packages, and we use lerna
to manage them. To get started, install all dependencies, use lerna
to bootstrap the workspace, and then perform an initial build, so TypeScript can read all of the linked type definitions.
$ yarn
$ yarn lerna bootstrap
$ yarn build
With that, the repo is fully set up and you are ready to run all commands.
Since we are using TypeScript
, you need to transpile the code to JavaScript to be
able to use it. Every package has a build
script which takes care of everything. You can also run build
on all of the
packages at once by calling yarn build
in the project root.
Any nontrivial fixes/features should include tests. You'll find a test
folder in each package.
Note that for the browser
package only, if you add a new file to the integration test suite, you also need to add it to the list in shell.js
as well. Adding tests to existing files will work out of the box in all packages.
Running tests works the same way as building - running yarn test
at the project root will run tests for all packages, and running yarn test
in a specific package will run tests for that package. There are also commands to run subsets of the tests in each location. Check out the scripts
entry of the corresponding package.json
for details.
Note: you must run yarn build
before yarn test
will work.
Similar to building and testing, linting can be done in the project root or in individual packages by calling yarn lint
.
Note: you must run yarn build
before yarn lint
will work.
When contributing to the codebase, please note:
- Non-trivial PRs will not be accepted without tests (see above).
- Please do not bump version numbers yourself.
raven-js
andraven-node
are deprecated, and only bug and security fix PRs will be accepted targeting the 3.x branch. Any new features and improvements should be to our new SDKs (browser
andnode
) and the packages (core
,hub
,integrations
, and the like) which support them.
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 to the next release number and a list of changes since the last release. - 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.