Skip to content

Commit ab12a06

Browse files
authored
Merge branch 'develop' into routing-to-different-dsn
2 parents 97bafa8 + 1727485 commit ab12a06

548 files changed

Lines changed: 22399 additions & 7328 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: add-cdn-bundle
3+
description: Create a new CDN bundle for the browser package with specified features
4+
argument-hint: <feature-combo> (e.g., replay.logs.metrics, tracing.logs, tracing.replay.feedback.logs.metrics)
5+
---
6+
7+
# Add CDN Bundle Skill
8+
9+
This skill creates a new CDN bundle for the browser package that includes a specific combination of features.
10+
11+
## Input
12+
13+
The user provides a feature combination using dot notation:
14+
15+
- `logs.metrics` - Bundle with logs and metrics
16+
- `replay.logs.metrics` - Bundle with replay, logs, and metrics
17+
- `tracing.replay.logs` - Bundle with tracing, replay, and logs
18+
- `tracing.replay.feedback.logs.metrics` - Full featured bundle
19+
20+
**Feature order in bundle names:** `tracing``replay``feedback``logs``metrics`
21+
22+
## Instructions
23+
24+
Follow the detailed guide at [docs/adding-cdn-bundle.md](../../../docs/adding-cdn-bundle.md) to create the bundle.
25+
26+
### Quick Reference - Naming Conventions
27+
28+
Given a feature combination, derive these variants:
29+
30+
| Placeholder | Example (`replay.logs.metrics`) |
31+
| ------------------------------- | ------------------------------- |
32+
| `{FEATURE_COMBO}` | `replay.logs.metrics` |
33+
| `{feature_combo}` | `replay_logs_metrics` |
34+
| `{featureCombo}` | `replayLogsMetrics` |
35+
| `{Human Readable Features}` | `Replay, Logs, Metrics` |
36+
| `{Human Readable Feature List}` | `Replay, Logs, and Metrics` |
37+
38+
### Quick Reference - Files to Create/Modify
39+
40+
1. **Create** `packages/browser/src/index.bundle.{FEATURE_COMBO}.ts`
41+
2. **Create** `packages/browser/test/index.bundle.{FEATURE_COMBO}.test.ts`
42+
3. **Modify** `packages/browser/rollup.bundle.config.mjs`
43+
4. **Modify** `.size-limit.js`
44+
5. **Modify** `dev-packages/browser-integration-tests/package.json`
45+
6. **Modify** `dev-packages/browser-integration-tests/utils/generatePlugin.ts`
46+
7. **Modify** `.github/workflows/build.yml`
47+
48+
### Verification Steps
49+
50+
After making changes:
51+
52+
```bash
53+
yarn lint
54+
cd packages/browser && yarn build:dev
55+
cd packages/browser && yarn test
56+
```

.claude/skills/e2e/SKILL.md

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
name: e2e
3+
description: Run E2E tests for Sentry JavaScript SDK test applications
4+
argument-hint: <test-app-name> [--variant <variant-name>]
5+
---
6+
7+
# E2E Test Runner Skill
8+
9+
This skill runs end-to-end tests for Sentry JavaScript SDK test applications. It ensures SDK packages are built before running tests.
10+
11+
## Input
12+
13+
The user provides a test application name and optionally a variant:
14+
15+
- `e2e-tests/test-applications/nextjs-app-dir` (full path)
16+
- `nextjs-app-dir` (just the app name)
17+
- `nextjs-app-dir --variant nextjs-15` (with variant)
18+
19+
## Workflow
20+
21+
### Step 1: Parse the Test Application Name
22+
23+
Extract the test app name from user input:
24+
25+
- Strip `e2e-tests/test-applications/` prefix if present
26+
- Extract variant flag if provided (e.g., `--variant nextjs-15`)
27+
- Store the clean app name (e.g., `nextjs-app-dir`)
28+
29+
### Step 2: Determine Which Packages Need Rebuilding
30+
31+
If the user recently edited files in `packages/*`, identify which packages were modified:
32+
33+
```bash
34+
# Check which packages have uncommitted changes (including untracked files)
35+
git status --porcelain | grep "^[ MARC?][ MD?] packages/" | cut -d'/' -f2 | sort -u
36+
```
37+
38+
For each modified package, rebuild its tarball:
39+
40+
```bash
41+
cd packages/<package-name>
42+
yarn build && yarn build:tarball
43+
cd ../..
44+
```
45+
46+
**Option C: User Specifies Packages**
47+
48+
If the user says "I changed @sentry/node" or similar, rebuild just that package:
49+
50+
```bash
51+
cd packages/node
52+
yarn build && yarn build:tarball
53+
cd ../..
54+
```
55+
56+
### Step 3: Verify Test Application Exists
57+
58+
Check that the test app exists:
59+
60+
```bash
61+
ls -d dev-packages/e2e-tests/test-applications/<app-name>
62+
```
63+
64+
If it doesn't exist, list available test apps:
65+
66+
```bash
67+
ls dev-packages/e2e-tests/test-applications/
68+
```
69+
70+
Ask the user which one they meant.
71+
72+
### Step 4: Run the E2E Test
73+
74+
Navigate to the e2e-tests directory and run the test:
75+
76+
```bash
77+
cd dev-packages/e2e-tests
78+
yarn test:run <app-name>
79+
```
80+
81+
If a variant was specified:
82+
83+
```bash
84+
cd dev-packages/e2e-tests
85+
yarn test:run <app-name> --variant <variant-name>
86+
```
87+
88+
### Step 5: Report Results
89+
90+
After the test completes, provide a summary:
91+
92+
**If tests passed:**
93+
94+
```
95+
✅ E2E tests passed for <app-name>
96+
97+
All tests completed successfully. Your SDK changes work correctly with this test application.
98+
```
99+
100+
**If tests failed:**
101+
102+
```
103+
❌ E2E tests failed for <app-name>
104+
105+
[Include relevant error output]
106+
```
107+
108+
**If package rebuild was needed:**
109+
110+
```
111+
📦 Rebuilt SDK packages: <list of packages>
112+
🧪 Running E2E tests for <app-name>...
113+
```
114+
115+
## Error Handling
116+
117+
- **No tarballs found**: Run `yarn build && yarn build:tarball` at repository root
118+
- **Test app not found**: List available apps and ask user to clarify
119+
- **Verdaccio not running**: Tests should start Verdaccio automatically, but if issues occur, check Docker
120+
- **Build failures**: Fix build errors before running tests
121+
122+
## Common Test Applications
123+
124+
Here are frequently tested applications:
125+
126+
- `nextjs-app-dir` - Next.js App Router
127+
- `nextjs-15` - Next.js 15.x
128+
- `react-create-hash-router` - React with React Router
129+
- `node-express-esm-loader` - Node.js Express with ESM
130+
- `sveltekit-2` - SvelteKit 2.x
131+
- `remix-2` - Remix 2.x
132+
- `nuxt-3` - Nuxt 3.x
133+
134+
To see all available test apps:
135+
136+
```bash
137+
ls dev-packages/e2e-tests/test-applications/
138+
```
139+
140+
## Example Workflows
141+
142+
### Example 1: After modifying @sentry/node
143+
144+
```bash
145+
# User: "Run e2e tests for node-express-esm-loader"
146+
147+
# Step 1: Detect recent changes to packages/node
148+
# Step 2: Rebuild the modified package
149+
cd packages/node
150+
yarn build && yarn build:tarball
151+
cd ../..
152+
153+
# Step 3: Run the test
154+
cd dev-packages/e2e-tests
155+
yarn test:run node-express-esm-loader
156+
```
157+
158+
### Example 2: First-time test run
159+
160+
```bash
161+
# User: "Run e2e tests for nextjs-app-dir"
162+
163+
# Step 1: Check for existing tarballs
164+
# Step 2: None found, build all packages
165+
yarn build && yarn build:tarball
166+
167+
# Step 3: Run the test
168+
cd dev-packages/e2e-tests
169+
yarn test:run nextjs-app-dir
170+
```
171+
172+
### Example 3: With variant
173+
174+
```bash
175+
# User: "Run e2e tests for nextjs-app-dir with nextjs-15 variant"
176+
177+
# Step 1: Rebuild if needed
178+
# Step 2: Run with variant
179+
cd dev-packages/e2e-tests
180+
yarn test:run nextjs-app-dir --variant nextjs-15
181+
```
182+
183+
## Tips
184+
185+
- **Always rebuild after SDK changes**: Tarballs contain the compiled SDK code
186+
- **Watch build output**: Build errors must be fixed before testing
187+
188+
## Integration with Development Workflow
189+
190+
This skill integrates with the standard SDK development workflow:
191+
192+
1. Make changes to SDK code in `packages/*`
193+
2. Run `/e2e <app-name>` to test your changes
194+
3. Fix any test failures
195+
196+
The skill automates the tedious parts of:
197+
198+
- Remembering to rebuild tarballs
199+
- Navigating to the correct directory
200+
- Running tests with the right flags

.cursor/commands/add_cdn_bundle.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Add CDN Bundle for `{FEATURE_COMBO}`
2+
3+
Create a new CDN bundle for the browser package that includes `{FEATURE_COMBO}` (e.g., `replay.logs.metrics`, `tracing.logs`, etc.).
4+
5+
## Instructions
6+
7+
Follow the detailed guide at [docs/adding-cdn-bundle.md](../../docs/adding-cdn-bundle.md) to create the bundle.
8+
9+
## Quick Reference - Naming Conventions
10+
11+
| Placeholder | Example (`replay.logs.metrics`) |
12+
| ------------------------------- | ------------------------------- |
13+
| `{FEATURE_COMBO}` | `replay.logs.metrics` |
14+
| `{feature_combo}` | `replay_logs_metrics` |
15+
| `{featureCombo}` | `replayLogsMetrics` |
16+
| `{Human Readable Features}` | `Replay, Logs, Metrics` |
17+
| `{Human Readable Feature List}` | `Replay, Logs, and Metrics` |
18+
19+
## Quick Reference - Files to Create/Modify
20+
21+
1. **Create** `packages/browser/src/index.bundle.{FEATURE_COMBO}.ts`
22+
2. **Create** `packages/browser/test/index.bundle.{FEATURE_COMBO}.test.ts`
23+
3. **Modify** `packages/browser/rollup.bundle.config.mjs`
24+
4. **Modify** `.size-limit.js`
25+
5. **Modify** `dev-packages/browser-integration-tests/package.json`
26+
6. **Modify** `dev-packages/browser-integration-tests/utils/generatePlugin.ts`
27+
7. **Modify** `.github/workflows/build.yml`
28+
29+
## Verification Steps
30+
31+
After making changes:
32+
33+
1. Run `yarn lint` to check for linting issues
34+
2. Run `cd packages/browser && yarn build:dev` to verify TypeScript compilation
35+
3. Run `cd packages/browser && yarn test` to run the unit tests

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ updates:
1212
directory: '/'
1313
schedule:
1414
interval: 'weekly'
15-
allow:
16-
- dependency-name: '@sentry/*'
17-
- dependency-name: '@playwright/test'
18-
- dependency-name: '@opentelemetry/*'
1915
ignore:
2016
- dependency-name: '@opentelemetry/instrumentation'
2117
- dependency-name: '@opentelemetry/instrumentation-*'
18+
- dependency-name: 'typescript'
2219
groups:
2320
opentelemetry:
2421
patterns:
2522
- '@opentelemetry/*'
23+
remix:
24+
patterns:
25+
- '@remix-run/*'
2626
versioning-strategy: increase
2727
commit-message:
2828
prefix: feat
29-
prefix-development: feat
29+
prefix-development: chore
3030
include: scope
3131
exclude-paths:
32-
- 'dev-packages/e2e-tests/test-applications/'
32+
- 'dev-packages/e2e-tests/test-applications/**'

0 commit comments

Comments
 (0)