Skip to content

Commit 3d19778

Browse files
authored
docs: Update CONTRIBUTING.md and note about testing process (getsentry#2428)
1 parent 7c16d93 commit 3d19778

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,54 @@
77

88
# Contributing
99

10-
This part of the documentation gives you a basic overview of how to help with the development of our `@sentry/*`
11-
packages contained in this repo.
10+
We welcome suggested improvements and bug fixes to the `@sentry/*` family of packages, in the form of pull requests on [`GitHub`](https://github.com/getsentry/sentry-javascript). The guide below will help you get started, but if you have further questions, please feel free to reach out on [Discord](https://discord.gg/Ww9hbqr).
1211

13-
## Community
14-
15-
The public-facing channels for support and development of Sentry SDKs can be found on [Discord](https://discord.gg/Ww9hbqr).
1612

1713
## Setting up an Environment
1814

19-
To run the test suite and run our code linter, node.js and yarn are required.
20-
21-
[`node`](https://nodejs.org/download) [`yarn`](https://yarnpkg.com/en/docs/install)
15+
To run the test suite and our code linter, node.js and yarn are required.
2216

23-
Since this is a mono repo containing several packages, we use `lerna` to manage them.
17+
[`node` download](https://nodejs.org/download)
18+
[`yarn` download](https://yarnpkg.com/en/docs/install)
2419

25-
To get started, install all dependencies, bootstrap the workspace and perform initial build, so TypeScript can read all the linked type definitions from a monorepo.
20+
`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.
2621

2722
```
2823
$ yarn
2924
$ yarn lerna bootstrap
3025
$ yarn build
3126
```
3227

33-
With that, the repo is fully setup and you are ready to run all commands.
28+
With that, the repo is fully set up and you are ready to run all commands.
3429

35-
## Build
30+
## Building Packages
3631

37-
Since we are using [`TypeScript`](https://www.typescriptlang.org/) you need to transpile the code to JavaScript to be
38-
able to use it. Every package has a `build` script which takes care of everything. You can also run `build` on every
39-
package by calling
32+
Since we are using [`TypeScript`](https://www.typescriptlang.org/), you need to transpile the code to JavaScript to be
33+
able to use it. Every package has a `build` script which takes care of everything. You can also run `build` on all of the
34+
packages at once by calling `yarn build` in the project root.
4035

41-
```
42-
$ yarn build
43-
```
36+
## Adding Tests
37+
38+
**Any nontrivial fixes/features should include tests.** You'll find a `test` folder in each package.
39+
40+
Note that _for the `browser` package only_, if you add a new file to the [integration test suite](https://github.com/getsentry/sentry-javascript/tree/master/packages/browser/test/integration/suites), you also need to add it to [the list in `shell.js`](https://github.com/getsentry/sentry-javascript/blob/b74e199254147fd984e7bb1ea24193aee70afa74/packages/browser/test/integration/suites/shell.js#L25) as well. Adding tests to existing files will work out of the box in all packages.
41+
42+
## Running Tests
43+
44+
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.
4445

45-
in the project root.
46+
Note: you must run `yarn build` before `yarn test` will work.
4647

47-
## Running the Test Suite
48+
## Linting
4849

49-
You can run all test at once by calling `yarn test` in the project root or in individual sub packages. Note that you must run `yarn build` before the test command will work.
50+
Similar to building and testing, linting can be done in the project root or in individual packages by calling `yarn lint`.
5051

51-
## Lint
52+
Note: you must run `yarn build` before `yarn lint` will work.
5253

53-
You can run all test at once by calling `yarn lint` in the project root or in individual sub packages. Note that you must run `yarn build` before the lint command will work.
54+
## Final Notes
5455

55-
## Contributing Back Code
56+
When contributing to the codebase, please make note of the following:
5657

57-
Please, send over suggestions and bug fixes in the form of pull requests on
58-
[`GitHub`](https://github.com/getsentry/sentry-javascript). Any nontrivial fixes/features should include tests. Do not
59-
bump version numbers yourself. For new features and improvements consider contributing to our new SDKs instead,
60-
`raven-js` and `raven-node` will still be supported but are in maintenance mode and will only receive bug fixes.
58+
- Non-trivial PRs will not be accepted without tests (see above).
59+
- Please do not bump version numbers yourself.
60+
- `raven-js` and `raven-node` are deprecated, and only bug and security fix PRs will be accepted. Any new features and improvements should be to our new SDKs (`browser` and `node`) and the packages (`core`, `hub`, `integrations`, and the like) which support them.

0 commit comments

Comments
 (0)