You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
`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.
29
29
30
30
## Building Packages
31
31
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)
35
37
36
38
## Adding Tests
37
39
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.
39
41
40
42
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
43
@@ -56,15 +58,15 @@ Note: you must run `yarn build` before `yarn lint` will work.
56
58
When contributing to the codebase, please note:
57
59
58
60
- 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).
61
63
62
64
## Publishing a Release
63
65
64
66
_These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._
65
67
66
68
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.
68
70
3. Run the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) workflow.
69
71
4. A new issue should appear in https://github.com/getsentry/publish/issues.
70
72
5. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release.
0 commit comments