Skip to content

Commit e1f4f89

Browse files
authored
chore(dev): Add build:dev options to CONTRIBUTING.md (#4055)
This updates `CONTRIBUTING.md` to use the `build:dev` commands introduced in #4048. It also includes some very minor wordsmithing and a few changes made by the auto-formatter.
1 parent 150bc38 commit e1f4f89

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

CONTRIBUTING.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We welcome suggested improvements and bug fixes to the `@sentry/*` family of pac
1414

1515
To run the test suite and our code linter, node.js and yarn are required.
1616

17-
[`node` download](https://nodejs.org/download)
17+
[`node` download](https://nodejs.org/download)
1818
[`yarn` download](https://yarnpkg.com/en/docs/install)
1919

2020
`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.
@@ -29,13 +29,15 @@ With that, the repo is fully set up and you are ready to run all commands.
2929

3030
## Building Packages
3131

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.
32+
Since we are using [`TypeScript`](https://www.typescriptlang.org/), you need to transpile the code to JavaScript to be able to use it. From the top level of the repo, there are three commands available:
33+
34+
- `yarn build:dev`, which runs a one-time build of ES5 and ES6 versions of every package
35+
- `yarn build:dev:filter <name of npm package>`, which runs `yarn build:dev` only in projects relevant to the given package (so, for example, running `yarn build:dev:filter @sentry/react` will build the `react` package, all of its dependencies (`utils`, `core`, `browser`, etc), and all packages which depend on it (currently `gatsby` and `nextjs`))
36+
- `yarn build:dev:watch`, which runs `yarn build:dev` in watch mode (recommended)
3537

3638
## Adding Tests
3739

38-
**Any nontrivial fixes/features should include tests.** You'll find a `test` folder in each package.
40+
**Any nontrivial fixes/features should include tests.** You'll find a `test` folder in each package.
3941

4042
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.
4143

@@ -56,15 +58,15 @@ Note: you must run `yarn build` before `yarn lint` will work.
5658
When contributing to the codebase, please note:
5759

5860
- Non-trivial PRs will not be accepted without tests (see above).
59-
- Please do not bump version numbers yourself.
60-
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-js) and [`raven-node`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-node) are deprecated, and only bug and security fix PRs will be accepted targeting the [3.x branch](https://github.com/getsentry/sentry-javascript/tree/3.x). 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.
61+
- Please do not bump version numbers yourself.
62+
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-js) and [`raven-node`](https://github.com/getsentry/sentry-javascript/tree/3.x/packages/raven-node) are deprecated, and only bug and security fix PRs will be accepted targeting the [3.x branch](https://github.com/getsentry/sentry-javascript/tree/3.x). Any new features and improvements should be to our new SDKs (`browser`, `node`, and framework-specific packages like `react` and `nextjs`) and the packages which support them (`core`, `hub`, `integrations`, and the like).
6163

6264
## Publishing a Release
6365

6466
_These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._
6567

6668
1. Determine what version will be released (we use [semver](https://semver.org)).
67-
2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry to the next release number and a list of changes since the last release.
69+
2. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release.
6870
3. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) workflow.
6971
4. A new issue should appear in https://github.com/getsentry/publish/issues.
7072
5. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release.

0 commit comments

Comments
 (0)