|
| 1 | +--- |
| 2 | +name: bump-conventions |
| 3 | +description: Bump the @sentry/conventions dependency to a new version across every package in the monorepo. Use when upgrading, bumping, or aligning @sentry/conventions, or when a new @sentry/conventions release needs to be pulled into all workspaces. |
| 4 | +argument-hint: '[version] # e.g. 0.16.0; defaults to latest on npm' |
| 5 | +--- |
| 6 | + |
| 7 | +# Bump `@sentry/conventions` |
| 8 | + |
| 9 | +Bump `@sentry/conventions` across every `package.json` at once, keeping the two pin styles consistent, then refresh `yarn.lock`. |
| 10 | + |
| 11 | +## 1. Determine the target version |
| 12 | + |
| 13 | +If the user gave a version, use it. Otherwise get the latest: |
| 14 | + |
| 15 | +```bash |
| 16 | +npm view @sentry/conventions version |
| 17 | +``` |
| 18 | + |
| 19 | +## 2. Update every declared version |
| 20 | + |
| 21 | +Find every `package.json` that declares `@sentry/conventions` (use the Grep tool so `node_modules` and build output are skipped automatically) and bump each to the new version. There are two pin styles, and **each must keep its style**: |
| 22 | + |
| 23 | +- `packages/*` declare a caret range in `dependencies`, e.g. `"^0.15.1"` → `"^0.16.0"` |
| 24 | +- `dev-packages/*` test suites declare an exact pin in `devDependencies`, e.g. `"0.15.1"` → `"0.16.0"` |
| 25 | + |
| 26 | +Edit only the version string; leave the caret alone. If a file declares a version that matches neither the current caret nor the exact pin, list it and confirm with the user before touching it. Preserve each file's trailing newline. |
| 27 | + |
| 28 | +## 3. Refresh the lockfile and build |
| 29 | + |
| 30 | +```bash |
| 31 | +yarn install |
| 32 | +yarn dedupe-deps:fix |
| 33 | +yarn build:dev |
| 34 | +``` |
| 35 | + |
| 36 | +`yarn install` collapses the combined `yarn.lock` entry (`"@sentry/conventions@<OLD>", "@sentry/conventions@^<OLD>":`) onto the new version. Confirm no stale `<OLD>` resolution remains: |
| 37 | + |
| 38 | +```bash |
| 39 | +grep -n '@sentry/conventions@' yarn.lock |
| 40 | +``` |
| 41 | + |
| 42 | +## 4. Check for breaking API changes |
| 43 | + |
| 44 | +A `conventions` bump can rename or remove exported attribute constants. If `yarn build:dev` fails, inspect the type errors and update usages in `src/` **and** `test/`. Heaviest consumers: `packages/core`, `packages/opentelemetry`, `packages/aws-serverless`. |
| 45 | + |
| 46 | +Use LSP `findReferences` on the changed export to catch every call site. Do not paper over a rename with a cast. |
| 47 | + |
| 48 | +## 5. Final verification |
| 49 | + |
| 50 | +```bash |
| 51 | +yarn circularDepCheck |
| 52 | +yarn fix |
| 53 | +yarn test |
| 54 | +``` |
| 55 | + |
| 56 | +## Commit |
| 57 | + |
| 58 | +Use the `feat(deps):` prefix the repo uses for dependency bumps: |
| 59 | + |
| 60 | +``` |
| 61 | +feat(deps): Bump `@sentry/conventions` to <NEW> |
| 62 | +``` |
| 63 | + |
| 64 | +Follow the repo's commit and PR conventions (target `develop`, draft PR, `## What` / `## Why`). Do **not** create the commit yourself unless the user invokes `/commit-push-pr`. |
0 commit comments