Skip to content

Commit 7a60aa3

Browse files
committed
Merge branch 'develop' into sig/strictTraceContinuation
# Conflicts: # packages/core/src/index.ts # packages/core/src/tracing/dynamicSamplingContext.ts # packages/core/src/tracing/trace.ts # packages/core/src/utils/dsn.ts # packages/core/src/utils/tracing.ts # packages/core/test/lib/utils/tracing.test.ts
2 parents 484aedf + 726c868 commit 7a60aa3

File tree

1,859 files changed

+60218
-16183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,859 files changed

+60218
-16183
lines changed

.claude/settings.local.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(find:*)",
5+
"Bash(ls:*)",
6+
"Bash(git:*)",
7+
"Bash(yarn:*)",
8+
"WebFetch(domain:github.com)",
9+
"Bash(grep:*)",
10+
"Bash(mv:*)"
11+
],
12+
"deny": []
13+
}
14+
}

.craft.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ targets:
88
- name: npm
99
id: '@sentry/types'
1010
includeNames: /^sentry-types-\d.*\.tgz$/
11-
## 1.2 Core SDK
11+
## 1.2 Core SDKs
1212
- name: npm
1313
id: '@sentry/core'
1414
includeNames: /^sentry-core-\d.*\.tgz$/
15+
- name: npm
16+
id: '@sentry/node-core'
17+
includeNames: /^sentry-node-core-\d.*\.tgz$/
1518
## 1.3 Browser Utils package
1619
- name: npm
1720
id: '@sentry-internal/browser-utils'
@@ -43,6 +46,9 @@ targets:
4346
- name: npm
4447
id: '@sentry/profiling-node'
4548
includeNames: /^sentry-profiling-node-\d.*\.tgz$/
49+
- name: npm
50+
id: '@sentry/node-native'
51+
includeNames: /^sentry-node-native-\d.*\.tgz$/
4652

4753
## 3 Browser-based Packages
4854
- name: npm
@@ -140,16 +146,13 @@ targets:
140146
# AWS Lambda Layer target
141147
- name: aws-lambda-layer
142148
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
143-
layerName: SentryNodeServerlessSDKv9
149+
layerName: SentryNodeServerlessSDKv10
144150
compatibleRuntimes:
145151
- name: node
146152
versions:
147-
- nodejs10.x
148-
- nodejs12.x
149-
- nodejs14.x
150-
- nodejs16.x
151153
- nodejs18.x
152154
- nodejs20.x
155+
- nodejs22.x
153156
license: MIT
154157

155158
# CDN Bundle Target
@@ -201,6 +204,8 @@ targets:
201204
onlyIfPresent: /^sentry-nuxt-\d.*\.tgz$/
202205
'npm:@sentry/node':
203206
onlyIfPresent: /^sentry-node-\d.*\.tgz$/
207+
'npm:@sentry/node-core':
208+
onlyIfPresent: /^sentry-node-core-\d.*\.tgz$/
204209
'npm:@sentry/react':
205210
onlyIfPresent: /^sentry-react-\d.*\.tgz$/
206211
'npm:@sentry/react-router':

.cursor/environment.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Sentry JavaScript SDK Development",
3+
"install": "curl https://get.volta.sh | bash && export VOLTA_HOME=\"$HOME/.volta\" && export PATH=\"$VOLTA_HOME/bin:$PATH\" && export VOLTA_FEATURE_PNPM=1 && yarn install",
4+
"start": "export VOLTA_HOME=\"$HOME/.volta\" && export PATH=\"$VOLTA_HOME/bin:$PATH\" && export VOLTA_FEATURE_PNPM=1",
5+
"terminals": [
6+
{
7+
"name": "Development",
8+
"command": "export VOLTA_HOME=\"$HOME/.volta\" && export PATH=\"$VOLTA_HOME/bin:$PATH\" && export VOLTA_FEATURE_PNPM=1 && echo 'Volta setup complete. Node version:' && node --version && echo 'Yarn version:' && yarn --version",
9+
"description": "Main development terminal with Volta environment configured"
10+
}
11+
]
12+
}

.cursor/rules/publishing_release.mdc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
description: Use this rule if you are looking to publish a release for the Sentry JavaScript SDKs
3+
globs:
4+
alwaysApply: false
5+
---
6+
7+
# Publishing a Release
8+
9+
Use these guidelines when publishing a new Sentry JavaScript SDK release.
10+
11+
## Standard Release Process (from develop to master)
12+
13+
The release process is outlined in [publishing-a-release.md](mdc:docs/publishing-a-release.md).
14+
15+
1. Make sure you are on the latest version of the `develop` branch. To confirm this, run `git pull origin develop` to get the latest changes from the repo.
16+
2. Run `yarn changelog` on the `develop` branch and copy the output. You can use `yarn changelog | pbcopy` to copy the output of `yarn changelog` into your clipboard.
17+
3. Decide on a version for the release based on [semver](mdc:https://semver.org). The version should be decided based on what is in included in the release. For example, if the release includes a new feature, we should increment the minor version. If it includes only bug fixes, we should increment the patch version.
18+
4. Create a branch `prepare-release/VERSION`, eg. `prepare-release/8.1.0`, off `develop`.
19+
5. Update [CHANGELOG.md](mdc:CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release from the output of `yarn changelog`. See the `Updating the Changelog` section in [publishing-a-release.md](mdc:docs/publishing-a-release.md) for more details. If you remove changelog entries because they are not applicable, please let the user know.
20+
6. Commit the changes to [CHANGELOG.md](mdc:CHANGELOG.md) with `meta(changelog): Update changelog for VERSION` where `VERSION` is the version of the release, e.g. `meta(changelog): Update changelog for 8.1.0`
21+
7. Push the `prepare-release/VERSION` branch to origin and remind the user that the release PR needs to be opened from the `master` branch.
22+
23+
## Key Commands
24+
25+
- `yarn changelog` - Generate changelog entries
26+
- `yarn lint` - Ensure code quality
27+
- `yarn test` - Run test suite
28+
- `yarn build:dev` - Verify build
29+
30+
## Important Notes
31+
32+
- This repository uses **Git Flow** - target `develop` for feature PRs, not `master`. See [gitflow.md](mdc:docs/gitflow.md) for more details.
33+
- For first-time SDK releases, follow the New SDK Release Checklist [new-sdk-release-checklist.md](mdc:docs/new-sdk-release-checklist.md). If you notice there is something not following the new SDK release checklist, please remind the user.
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
description: Use this rule if you are looking to upgrade a dependency in the Sentry JavaScript SDKs
3+
globs:
4+
alwaysApply: false
5+
---
6+
7+
# Yarn v1 Dependency Upgrades
8+
9+
## Upgrade Process
10+
11+
### Dependency Analysis
12+
13+
```bash
14+
# Check dependency tree
15+
yarn list --depth=0
16+
17+
# Find why package is installed
18+
yarn why [package-name]
19+
```
20+
21+
### Root Workspace vs. Package Dependencies
22+
23+
**CRITICAL**: Understand the difference between dependency types:
24+
25+
- **Root Workspace dependencies**: Shared dev tools, build tools, testing frameworks
26+
- **Package dependencies**: Package-specific runtime and dev dependencies
27+
- Always check if dependency should be in root workspace or package level
28+
29+
### Upgrade Dependencies
30+
31+
**MANDATORY**: Only ever upgrade a single package at a time.
32+
33+
**CRITICAL RULE**: If a dependency is not defined in `package.json` anywhere, the upgrade must be run in the root workspace as the `yarn.lock` file is contained there.
34+
35+
```bash
36+
# Upgrade specific package to latest compatible version
37+
npx yarn-update-dependency@latest [package-name]
38+
```
39+
40+
Avoid upgrading top-level dependencies (defined in `package.json`), especially if they are used for tests. If you are going to upgrade them, ask the user before proceeding.
41+
42+
**REQUIREMENT**: If a `package.json` file is updated, make sure it has a new line at the end.
43+
44+
#### CRITICAL: OpenTelemetry Dependency Constraint
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.
47+
48+
**FORBIDDEN VERSION PATTERNS:**
49+
50+
- `2.x.x` versions (e.g., `2.0.0`, `2.1.0`)
51+
- `0.2xx.x` versions (e.g., `0.200.0`, `0.201.0`)
52+
53+
When upgrading OpenTelemetry dependencies:
54+
55+
1. Check the dependency's `package.json` after upgrade
56+
2. Verify the package itself doesn't use forbidden version patterns
57+
3. Verify none of its dependencies use `@opentelemetry/*` packages with forbidden version patterns
58+
4. **Example**: `@opentelemetry/[email protected]` is forbidden because it bumped to core `2.0.0` and instrumentation `0.200.0`
59+
5. If forbidden OpenTelemetry versions are detected, **ABORT the upgrade** and notify the user that this upgrade cannot proceed due to OpenTelemetry v2+ compatibility constraints
60+
61+
#### CRITICAL: E2E Test Dependencies
62+
63+
**DO NOT UPGRADE** the major version of dependencies in test applications where the test name explicitly mentions a dependency version.
64+
65+
**RULE**: For `dev-packages/e2e-tests/test-applications/*`, if the test directory name mentions a specific version (e.g., `nestjs-8`), do not upgrade that dependency beyond the mentioned major version.
66+
67+
**Example**: Do not upgrade the nestjs version of `dev-packages/e2e-tests/test-applications/nestjs-8` to nestjs 9 or above because the test name mentions nestjs 8.
68+
69+
## Safety Protocols
70+
71+
### Pre-Upgrade Checklist
72+
73+
**COMPLETE ALL STEPS** before proceeding with any upgrade:
74+
75+
1. **Backup**: Ensure clean git state or create backup branch
76+
2. **CI Status**: Verify all tests are passing
77+
3. **Lockfile works**: Confirm `yarn.lock` is in a good state (no merge conflicts)
78+
4. **OpenTelemetry Check**: For OpenTelemetry dependencies, verify no forbidden version patterns (`2.x.x` or `0.2xx.x`) will be introduced
79+
80+
### Post-Upgrade Verification
81+
82+
```bash
83+
# rebuild everything
84+
yarn install
85+
86+
# Build the project
87+
yarn build:dev
88+
89+
# Make sure dependencies are deduplicated
90+
yarn dedupe-deps:fix
91+
92+
# Fix any linting issues
93+
yarn fix
94+
95+
# Check circular dependencies
96+
yarn circularDepCheck
97+
```
98+
99+
## Version Management
100+
101+
### Pinning Strategies
102+
103+
- **Exact versions** (`1.2.3`): Use for critical dependencies
104+
- **Caret versions** (`^1.2.3`): Allow minor updates only
105+
- **Latest tag**: Avoid as much as possible other than in certain testing and development scenarios
106+
107+
## Troubleshooting
108+
109+
- **Yarn Version**: Run `yarn --version` - must be yarn v1 (not v2/v3/v4)
110+
- **Lockfile Issues**: Verify yarn.lock exists and is properly maintained. Fix merge conflicts by running `yarn install`
111+
112+
## Best Practices
113+
114+
### Security Audits
115+
116+
```bash
117+
# Check for security vulnerabilities
118+
yarn audit
119+
120+
# Fix automatically fixable vulnerabilities
121+
yarn audit fix
122+
123+
# Install security patches only
124+
yarn upgrade --security-only
125+
```
126+
127+
### Check for Outdated Dependencies
128+
129+
```bash
130+
# Check all outdated dependencies
131+
yarn outdated
132+
133+
# Check specific package
134+
yarn outdated [package-name]
135+
136+
# Check dependencies in specific workspace
137+
yarn workspace [workspace-name] outdated
138+
```
139+
140+
### Using yarn info for Dependency Inspection
141+
142+
Use `yarn info` to inspect package dependencies before and after upgrades:
143+
144+
```bash
145+
# Check current version and dependencies
146+
yarn info <package-name>
147+
148+
# Check specific version dependencies
149+
yarn info <package-name>@<version>
150+
151+
# Check dependencies field specifically
152+
yarn info <package-name>@<version> dependencies
153+
154+
# Check all available versions
155+
yarn info <package-name> versions
156+
```
157+
158+
The `yarn info` command provides detailed dependency information without requiring installation, making it particularly useful for:
159+
160+
- Verifying OpenTelemetry packages don't introduce forbidden version patterns (`2.x.x` or `0.2xx.x`)
161+
- Checking what dependencies a package will bring in before upgrading
162+
- Understanding package version history and compatibility
163+
164+
### Documentation
165+
166+
- Update README or code comments if dependency change affects usage of the SDK or its integrations
167+
- Notify team of significant changes

0 commit comments

Comments
 (0)