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
Copy file name to clipboardExpand all lines: .cursor/rules/sdk_dependency_upgrades.mdc
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ description: Use this rule if you are looking to upgrade a dependency in the Sen
3
3
globs:
4
4
alwaysApply: false
5
5
---
6
+
6
7
# Yarn v1 Dependency Upgrades
7
8
8
9
## Upgrade Process
@@ -45,10 +46,12 @@ Avoid upgrading top-level dependencies (defined in `package.json`), especially i
45
46
**STOP UPGRADE IMMEDIATELY** if upgrading any dependency with `opentelemetry` in the name and the new version or any of its dependencies uses forbidden OpenTelemetry versions.
46
47
47
48
**FORBIDDEN VERSION PATTERNS:**
49
+
48
50
- `2.x.x` versions (e.g., `2.0.0`, `2.1.0`)
49
51
- `0.2xx.x` versions (e.g., `0.200.0`, `0.201.0`)
50
52
51
53
When upgrading OpenTelemetry dependencies:
54
+
52
55
1. Check the dependency's `package.json` after upgrade
53
56
2. Verify the package itself doesn't use forbidden version patterns
54
57
3. Verify none of its dependencies use `@opentelemetry/*` packages with forbidden version patterns
@@ -153,6 +156,7 @@ yarn info <package-name> versions
153
156
```
154
157
155
158
The `yarn info` command provides detailed dependency information without requiring installation, making it particularly useful for:
159
+
156
160
- Verifying OpenTelemetry packages don't introduce forbidden version patterns (`2.x.x` or `0.2xx.x`)
157
161
- Checking what dependencies a package will bring in before upgrading
158
162
- Understanding package version history and compatibility
- Never merge directly into `master` (except emergency fixes)
@@ -47,6 +51,7 @@ This repository uses **Git Flow**. See [docs/gitflow.md](docs/gitflow.md) for de
47
51
- Unless explicitly asked for, make sure to cover all files, including files in `src/` and `test/` directories.
48
52
49
53
### Branch Naming
54
+
50
55
- Features: `feat/descriptive-name`
51
56
- Releases: `release/X.Y.Z`
52
57
@@ -55,28 +60,33 @@ This repository uses **Git Flow**. See [docs/gitflow.md](docs/gitflow.md) for de
55
60
This is a Lerna monorepo with 40+ packages in the `@sentry/*` namespace.
56
61
57
62
### Core Packages
63
+
58
64
- `packages/core/` - Base SDK with interfaces, type definitions, core functionality
59
65
- `packages/types/` - Shared TypeScript type definitions - this is deprecated, never modify this package
60
66
- `packages/browser-utils/` - Browser-specific utilities and instrumentation
61
67
- `packages/node-core/` - Node Core SDK which contains most of the node-specific logic, excluding OpenTelemetry instrumentation.
62
68
63
69
### Platform SDKs
70
+
64
71
- `packages/browser/` - Browser SDK with bundled variants
65
72
- `packages/node/` - Node.js SDK. All general Node code should go into node-core, the node package itself only contains OpenTelemetry instrumentation on top of that.
- Requires initial `yarn build` after `yarn install` for TypeScript linking
107
121
- Integration tests use Playwright extensively
108
122
- Never change the volta, yarn, or package manager setup in general unless explicitly asked for
109
123
110
124
### Notes for Background Tasks
125
+
111
126
- Make sure to use [volta](https://volta.sh/) for development. Volta is used to manage the node, yarn and pnpm version used.
112
127
- Make sure that [PNPM support is enabled in volta](https://docs.volta.sh/advanced/pnpm). This means that the `VOLTA_FEATURE_PNPM` environment variable has to be set to `1`.
113
128
- Yarn, Node and PNPM have to be used through volta, in the versions defined by the volta config. NEVER change any versions unless explicitly asked to.
114
129
115
130
## Testing Single Packages
131
+
116
132
- Test specific package: `cd packages/{package-name} && yarn test`
117
133
- Build specific package: `yarn build:dev:filter @sentry/{package-name}`
118
134
119
135
## Code Style Rules
136
+
120
137
- Follow existing code conventions in each package
121
138
- Check imports and dependencies - only use libraries already in the codebase
122
139
- Look at neighboring files for patterns and style
123
140
- Never introduce code that exposes secrets or keys
124
141
- Follow security best practices
125
142
126
143
## Before Every Commit Checklist
144
+
127
145
1. ✅ `yarn lint` (fix all issues)
128
146
2. ✅ `yarn test` (all tests pass)
129
147
3. ✅ `yarn build:dev` (builds successfully)
130
148
4. ✅ Target `develop` branch for PRs (not `master`)
131
149
132
150
## Documentation Sync
151
+
133
152
**IMPORTANT**: When editing CLAUDE.md, also update .cursor/rules/sdk_development.mdc and vice versa to keep both files in sync.
- Never merge directly into `master` (except emergency fixes)
@@ -46,6 +50,7 @@ This repository uses **Git Flow**. See [docs/gitflow.md](docs/gitflow.md) for de
46
50
- Unless explicitly asked for, make sure to cover all files, including files in `src/` and `test/` directories.
47
51
48
52
### Branch Naming
53
+
49
54
- Features: `feat/descriptive-name`
50
55
- Releases: `release/X.Y.Z`
51
56
@@ -54,28 +59,33 @@ This repository uses **Git Flow**. See [docs/gitflow.md](docs/gitflow.md) for de
54
59
This is a Lerna monorepo with 40+ packages in the `@sentry/*` namespace.
55
60
56
61
### Core Packages
62
+
57
63
-`packages/core/` - Base SDK with interfaces, type definitions, core functionality
58
64
-`packages/types/` - Shared TypeScript type definitions - this is deprecated, never modify this package
59
65
-`packages/browser-utils/` - Browser-specific utilities and instrumentation
60
66
-`packages/node-core/` - Node Core SDK which contains most of the node-specific logic, excluding OpenTelemetry instrumentation.
61
67
62
68
### Platform SDKs
69
+
63
70
-`packages/browser/` - Browser SDK with bundled variants
64
71
-`packages/node/` - Node.js SDK. All general Node code should go into node-core, the node package itself only contains OpenTelemetry instrumentation on top of that.
- Requires initial `yarn build` after `yarn install` for TypeScript linking
106
120
- Integration tests use Playwright extensively
107
121
- Never change the volta, yarn, or package manager setup in general unless explicitly asked for
108
122
109
123
### Notes for Background Tasks
124
+
110
125
- Make sure to use [volta](https://volta.sh/) for development. Volta is used to manage the node, yarn and pnpm version used.
111
126
- Make sure that [PNPM support is enabled in volta](https://docs.volta.sh/advanced/pnpm). This means that the `VOLTA_FEATURE_PNPM` environment variable has to be set to `1`.
112
127
- Yarn, Node and PNPM have to be used through volta, in the versions defined by the volta config. NEVER change any versions unless explicitly asked to.
113
128
114
129
## Testing Single Packages
130
+
115
131
- Test specific package: `cd packages/{package-name} && yarn test`
116
132
- Build specific package: `yarn build:dev:filter @sentry/{package-name}`
117
133
118
134
## Code Style Rules
135
+
119
136
- Follow existing code conventions in each package
120
137
- Check imports and dependencies - only use libraries already in the codebase
121
138
- Look at neighboring files for patterns and style
122
139
- Never introduce code that exposes secrets or keys
123
140
- Follow security best practices
124
141
125
142
## Before Every Commit Checklist
143
+
126
144
1. ✅ `yarn lint` (fix all issues)
127
145
2. ✅ `yarn test` (all tests pass)
128
146
3. ✅ `yarn build:dev` (builds successfully)
129
147
4. ✅ Target `develop` branch for PRs (not `master`)
130
148
131
149
## Documentation Sync
150
+
132
151
**IMPORTANT**: When editing CLAUDE.md, also update .cursor/rules/sdk_development.mdc and vice versa to keep both files in sync.
0 commit comments