Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .agents/skills/bump-conventions/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
name: bump-conventions
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.
argument-hint: '[version] # e.g. 0.16.0; defaults to latest on npm'
---

# Bump `@sentry/conventions`

Bump `@sentry/conventions` across every `package.json` at once, keeping the two pin styles consistent, then refresh `yarn.lock`.

## 1. Determine the target version

If the user gave a version, use it. Otherwise get the latest:

```bash
npm view @sentry/conventions version
```

## 2. Update every declared version

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**:

- `packages/*` declare a caret range in `dependencies`, e.g. `"^0.15.1"` → `"^0.16.0"`
- `dev-packages/*` test suites declare an exact pin in `devDependencies`, e.g. `"0.15.1"` → `"0.16.0"`

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.

## 3. Refresh the lockfile and build

```bash
yarn install
yarn dedupe-deps:fix
yarn build:dev
```

`yarn install` collapses the combined `yarn.lock` entry (`"@sentry/conventions@<OLD>", "@sentry/conventions@^<OLD>":`) onto the new version. Confirm no stale `<OLD>` resolution remains:

```bash
grep -n '@sentry/conventions@' yarn.lock
```

## 4. Check for breaking API changes

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`.

Use LSP `findReferences` on the changed export to catch every call site. Do not paper over a rename with a cast.

After fixing, re-run `yarn build:dev` and confirm it passes before verifying, so the next step runs against fresh build output.

Comment on lines +47 to +49

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The SKILL.md guide is missing a yarn build:dev step after fixing code changes and before running yarn test, causing tests to run against stale build artifacts.
Severity: MEDIUM

Suggested Fix

Update the SKILL.md instructions to add a yarn build:dev command after Step 4 (fixing breaking changes) and before Step 5 (verification with yarn test). This will ensure that the code is re-compiled and tests are run against the latest changes.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: .agents/skills/bump-conventions/SKILL.md#L47-L49

Potential issue: The instructions in `SKILL.md` contain a logical sequencing error. Step
4 directs the user to fix breaking API changes in the source code, but Step 5 proceeds
directly to testing with `yarn test` without an intermediate build step. The `yarn test`
command runs against previously compiled JavaScript artifacts, which become stale after
the code is modified in Step 4. Consequently, the tests are not validating the recent
fixes but are instead running against outdated code. This issue is confirmed by a commit
message in the pull request, "Re-run build:dev after breaking-change fixes before
verification," which indicates the author's intent but was not reflected in the
documentation.

Did we get this right? 👍 / 👎 to inform future reviews.

## 5. Final verification

```bash
yarn circularDepCheck
yarn fix
yarn test

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skips integration test verification

Medium Severity

The skill’s API-fix and final verification steps rely on yarn build:dev and root yarn test, but several dev-packages/*-integration-tests suites import @sentry/conventions/attributes directly and are excluded from root yarn test. A conventions API break there can pass this checklist yet still fail CI integration jobs.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 11ce45a. Configure here.

```
Comment thread
cursor[bot] marked this conversation as resolved.

## Commit

Use the `chore(deps):` prefix the repo uses for dependency bumps:

```
chore(deps): Bump `@sentry/conventions` to <NEW>
```
Loading