Skip to content
Draft
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ runs:
# Bump the iteration when bumping runner images to use a new cache
key: playwright-${{ runner.os }}-iteration-1-${{ steps.playwright-version.outputs.version }}

# The npx steps run outside the repository. In the repository, npm finds this playwright version in
# node_modules/.pnpm and then runs node_modules/.bin/playwright, which the root folder does not have.
# We always install all browsers, if uncached
- name: Install Playwright dependencies (uncached)
env:
PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.version }}
run: npx -y "playwright@$PLAYWRIGHT_VERSION" install chromium webkit firefox --with-deps
if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
working-directory: ${{ runner.temp }}

- name: Install Playwright system dependencies only (cached)
env:
Expand All @@ -51,6 +54,7 @@ runs:
run: npx -y "playwright@$PLAYWRIGHT_VERSION" install-deps "$PLAYWRIGHT_BROWSERS"
if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit == 'true'
shell: bash
working-directory: ${{ runner.temp }}

# Only store cache on develop branch
- name: Store cached playwright binaries
Expand Down
5 changes: 5 additions & 0 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
"webpack": "^5.95.0"
},
"devDependencies": {
"@sentry/browser-utils": "11.8.0",
"@sentry/core": "11.8.0",
"@sentry/replay-canvas": "11.8.0",
"@sentry/rrweb-types": "^2.44.1",
"@sentry/wasm": "11.8.0",
"@types/node": "^18.19.1",
"eslint-plugin-regexp": "^3.1.0",
"glob": "^13.0.6"
Expand Down
3 changes: 3 additions & 0 deletions dev-packages/bun-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"devDependencies": {
"@sentry-internal/node-integration-tests": "11.8.0",
"@sentry-internal/test-utils": "11.8.0",
"@sentry/core": "11.8.0",
"@types/mysql": "^2.15.27",
"@types/pg": "^8.20.0",
"bun-types": "^1.2.9",
"vitest": "^4.1.11"
},
Expand Down
1 change: 1 addition & 0 deletions dev-packages/bundler-plugin-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"devDependencies": {
"premove": "^4.0.0",
"sentry": "^0.44.0",
"typescript": "~6.0.3",
"vitest": "^4.1.11"
},
Expand Down
1 change: 1 addition & 0 deletions dev-packages/cloudflare-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@cloudflare/vite-plugin": "1.34.0",
"@cloudflare/workers-types": "^4.20260426.0",
"@cloudflare/workers-types-v5": "npm:@cloudflare/workers-types@5.20260710.1",
"@opentelemetry/api": "^1.9.1",
"@sentry-internal/test-utils": "11.8.0",
"@sentry/conventions": "0.27.0",
"eslint-plugin-regexp": "^3.1.0",
Expand Down
1 change: 1 addition & 0 deletions dev-packages/deno-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"devDependencies": {
"@sentry-internal/node-integration-tests": "11.8.0",
"@sentry/conventions": "^0.27.0",
"vitest": "^4.1.11"
},
"volta": {
Expand Down
7 changes: 7 additions & 0 deletions dev-packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
"@sentry/core": "11.8.0",
"@sentry/hono": "11.8.0",
"@sentry/node": "11.8.0",
"@sentry/server-runtime-injection": "11.8.0",
"@sentry/server-utils": "11.8.0",
"@smithy/node-http-handler": "4.12.1",
"@types/mongodb": "^3.6.20",
"@types/mysql": "^2.15.21",
"@types/pg": "^8.6.5",
Expand Down Expand Up @@ -109,17 +111,22 @@
"yargs": "^16.2.0"
},
"devDependencies": {
"@hapi/boom": "^10.0.1",
"@neondatabase/serverless": "1.2.0",
"@opentelemetry/instrumentation-http": "0.220.0",
"@sentry-internal/rollup-utils": "11.8.0",
"@sentry/conventions": "0.27.0",
"@sentry-internal/test-utils": "11.8.0",
"@sentry/node-native": "11.8.0",
"@types/amqplib": "^0.10.5",
"@types/express": "^4.17.21",
"@types/node-cron": "^3.0.11",
"@types/node-schedule": "^2.1.7",
"esbuild": "0.28.1",
"eslint-plugin-regexp": "^3.1.0",
"globby": "11",
"react": "^18.3.1",
"winston-transport": "^4.9.0",
"zod": "^3.24.1"
},
"config": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { cp, mkdir, readFile, rm, writeFile } from 'fs/promises';
import { basename, join } from 'path';
import { promisify } from 'util';
import { afterAll, beforeAll, test, type TestAPI } from 'vitest';
import { CLEANUP_STEPS, createRunner } from './createRunner';
import { CLEANUP_STEPS, createRunner, PACKAGE_ROOT } from './createRunner';

const execPromise = promisify(exec);

Expand Down Expand Up @@ -267,7 +267,10 @@ function prepareTmpDir(
}

if (options?.afterSetupCommand) {
const env = { ...process.env, PATH: `${join(tmpDirPath, 'node_modules', '.bin')}:${process.env.PATH}` };
// The Bun and Deno packages run these suites with their own `PATH`, which does not have the bins of
// this package (e.g. `prisma`).
const binPaths = [join(tmpDirPath, 'node_modules', '.bin'), join(PACKAGE_ROOT, 'node_modules', '.bin')];
const env = { ...process.env, PATH: `${binPaths.join(':')}:${process.env.PATH}` };
await execPromise(options.afterSetupCommand, { cwd: tmpDirPath, env });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const COMPILE_CACHE_ENV: Record<string, string> =

// The Bun and Deno packages run these suites from their own folder. Scenarios read the working
// directory (e.g. `modulesIntegration` reads its `package.json`), so it is always this package.
const PACKAGE_ROOT = join(__dirname, '..', '..');
export const PACKAGE_ROOT = join(__dirname, '..', '..');

/** Node flags that preload a module before the entry point. */
const PRELOAD_FLAGS = ['--import', '--require', '-r'];
Expand Down
19 changes: 15 additions & 4 deletions dev-packages/rollup-utils/npmHelpers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,29 @@ function isSideEffectFreePackage(packageName) {

let sideEffectFree = false;
try {
const json = JSON.parse(
fs.readFileSync(path.resolve(repoRoot, 'node_modules', packageName, 'package.json'), { encoding: 'utf8' }),
);
const json = JSON.parse(fs.readFileSync(findPackageJson(packageName), { encoding: 'utf8' }));
sideEffectFree = json.sideEffects === false;
} catch {
// Not resolvable from the repo root - assume side effects.
// Not resolvable from the built package - assume side effects.
}

sideEffectsCache.set(packageName, sideEffectFree);
return sideEffectFree;
}

/**
* The `package.json` of a dependency of the built package (the working directory): the nearest
* `node_modules/<packageName>` from there up to the repo root, like Node resolves it.
*/
function findPackageJson(packageName) {
for (let dir = process.cwd(); ; dir = path.dirname(dir)) {
const candidate = path.join(dir, 'node_modules', packageName, 'package.json');
if (fs.existsSync(candidate) || dir === repoRoot || dir === path.dirname(dir)) {
return candidate;
}
}
}

function getPackageName(id) {
const segments = id.split('/');
return id.startsWith('@') ? segments.slice(0, 2).join('/') : segments[0];
Expand Down
2 changes: 2 additions & 0 deletions dev-packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
},
"devDependencies": {
"@playwright/test": "~1.63.0",
"@sentry-internal/rollup-utils": "11.8.0",
"@sentry/core": "11.8.0",
"@types/express": "^4.17.21",
"@types/ws": "^8.18.1",
"eslint-plugin-regexp": "^3.1.0"
},
Expand Down
3 changes: 1 addition & 2 deletions docs/new-sdk-release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ differ slightly for other SDKs depending on how they are structured and how they
- [ ] The package has a working unit testing environment
- [ ] The package builds correctly (inspect `<package>/build` directory)
- [ ] The package is in the `packages` list of `pnpm-workspace.yaml` and in the `workspaces` list of the root
`package.json` (in the same order), and it is in the root `devDependencies` with the version `workspace:*`.
`scripts/verify-packages-versions.js` checks this.
`package.json` (in the same order). `scripts/verify-packages-versions.js` checks this.

- [ ] Make sure that the `README.md` content is up to date and contains at least:
- [ ] The correct name + a brief description of the SDK
Expand Down
68 changes: 6 additions & 62 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,78 +122,19 @@
"dev-packages/bundler-tests"
],
"//_devDependencies_comment": [
"Every workspace package is listed with `workspace:*`, so that pnpm links it into the root node_modules.",
"Yarn workspaces did this for all packages, and some configs import workspace packages that they do not declare,",
"for example `@sentry-internal/rollup-utils` in the rollup configs."
"`@sentry-internal/node-integration-tests`: its suites import it by name, also from tmp folders with their own package.json.",
"`@sentry/eslint-plugin-sdk`: the root oxlint config loads it as a JS plugin.",
"`@sentry/sveltekit`: size-limit bundles its build output, which imports `@sentry/sveltekit/browser-tracing-variant`."
],
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@sentry-internal/browser-integration-tests": "workspace:*",
"@sentry-internal/bun-integration-tests": "workspace:*",
"@sentry-internal/bundler-plugin-integration-tests": "workspace:*",
"@sentry-internal/bundler-tests": "workspace:*",
"@sentry-internal/clear-cache-gh-action": "workspace:*",
"@sentry-internal/cloudflare-integration-tests": "workspace:*",
"@sentry-internal/deno-integration-tests": "workspace:*",
"@sentry-internal/e2e-tests": "workspace:*",
"@sentry-internal/external-contributor-gh-action": "workspace:*",
"@sentry-internal/integration-shims": "workspace:*",
"@sentry-internal/node-integration-tests": "workspace:*",
"@sentry-internal/replay-worker": "workspace:*",
"@sentry-internal/rollup-utils": "workspace:*",
"@sentry-internal/size-limit-gh-action": "workspace:*",
"@sentry-internal/test-utils": "workspace:*",
"@sentry/angular": "workspace:*",
"@sentry/astro": "workspace:*",
"@sentry/aws-serverless": "workspace:*",
"@sentry/browser": "workspace:*",
"@sentry/browser-utils": "workspace:*",
"@sentry/bun": "workspace:*",
"@sentry/bundler-plugins": "workspace:*",
"@sentry/cloudflare": "workspace:*",
"@sentry/core": "workspace:*",
"@sentry/deno": "workspace:*",
"@sentry/effect": "workspace:*",
"@sentry/elysia": "workspace:*",
"@sentry/ember": "workspace:*",
"@sentry/esbuild-plugin": "workspace:*",
"@sentry/eslint-config-sdk": "workspace:*",
"@sentry/eslint-plugin-sdk": "workspace:*",
"@sentry/feedback": "workspace:*",
"@sentry/gatsby": "workspace:*",
"@sentry/google-cloud-serverless": "workspace:*",
"@sentry/hono": "workspace:*",
"@sentry/nestjs": "workspace:*",
"@sentry/nextjs": "workspace:*",
"@sentry/nitro": "workspace:*",
"@sentry/node": "workspace:*",
"@sentry/node-native": "workspace:*",
"@sentry/nuxt": "workspace:*",
"@sentry/opentelemetry": "workspace:*",
"@sentry/profiling-node": "workspace:*",
"@sentry/react": "workspace:*",
"@sentry/react-router": "workspace:*",
"@sentry/remix": "workspace:*",
"@sentry/replay": "workspace:*",
"@sentry/replay-canvas": "workspace:*",
"@sentry/rollup-plugin": "workspace:*",
"@sentry/server-runtime-injection": "workspace:*",
"@sentry/server-utils": "workspace:*",
"@sentry/solid": "workspace:*",
"@sentry/solidstart": "workspace:*",
"@sentry/svelte": "workspace:*",
"@sentry/sveltekit": "workspace:*",
"@sentry/tanstackstart-react": "workspace:*",
"@sentry/typescript": "workspace:*",
"@sentry/vercel-edge": "workspace:*",
"@sentry/vite-plugin": "workspace:*",
"@sentry/vue": "workspace:*",
"@sentry/wasm": "workspace:*",
"@sentry/webpack-plugin": "workspace:*",
"@size-limit/esbuild": "~12.1.0",
"@size-limit/file": "~12.1.0",
"@size-limit/webpack": "~12.1.0",
Expand All @@ -203,6 +144,7 @@
"deepmerge": "^4.2.2",
"es-check": "^7.2.1",
"esbuild": "^0.28.1",
"glob": "^7.2.3",
"jsdom": "^21.1.2",
"madge": "8.0.0",
"nodemon": "^3.1.10",
Expand All @@ -216,9 +158,11 @@
"rollup-plugin-esbuild": "^6.2.1",
"rollup-plugin-license": "^3.7.1",
"size-limit": "~12.1.0",
"tslib": "^2.4.1",
"tsx": "^4.23.0",
"typescript": "~7.0.2",
"vitest": "^4.1.11",
"webpack": "^5.104.1",
"yalc": "^1.0.0-pre.53"
},
"version": "0.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@sentry/bundler-plugins": "11.8.0"
},
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0",
"astro": "^4.16.19",
"vite": "^8.3.1"
},
Expand Down
1 change: 1 addition & 0 deletions packages/aws-serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@types/aws-lambda": "^8.10.161"
},
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0",
"@types/node": "^18.19.1",
"@vercel/nft": "^1.11.0"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/browser-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"@sentry/conventions": "^0.27.0",
"web-vitals": "^6.2.3"
},
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "pnpm run build",
Expand Down
1 change: 1 addition & 0 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"devDependencies": {
"@sentry-internal/integration-shims": "11.8.0",
"@sentry-internal/rollup-utils": "11.8.0",
"fake-indexeddb": "^6.2.5"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@sentry/server-utils": "11.8.0"
},
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0",
"bun-types": "^1.2.9"
},
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions packages/bundler-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@
},
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/parser": "^7.29.8",
"@babel/preset-react": "^7.23.3",
"@sentry-internal/rollup-utils": "11.8.0",
"@sentry-internal/test-utils": "11.8.0",
"@types/babel__core": "^7.20.5",
"@types/node": "^20.19.0",
"premove": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('child compiler injection', () => {
fs.rmSync(tmpDir, { recursive: true, force: true });
});

it('injects release information into child-compiler bundles', async () => {
it('injects release information into child-compiler bundles', { timeout: 15_000 }, async () => {
const outDir = path.join(tmpDir, 'dist');

await build({
Expand Down
3 changes: 3 additions & 0 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@
},
"devDependencies": {
"@cloudflare/workers-types": "5.20260710.1",
"@sentry-internal/rollup-utils": "11.8.0",
"@types/node": "^18.19.1",
"acorn": "^8.14.0",
"vite": "^8.3.1",
"wrangler": "4.61.0"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
},
"sideEffects": false,
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0",
"zod": "^3.24.1"
},
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"@sentry/server-runtime-injection": "11.8.0",
"@sentry/server-utils": "11.8.0"
},
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0"
},
"scripts": {
"deno-types": "node ./scripts/download-deno-types.mjs",
"build": "run-s build:transpile build:types",
Expand Down
1 change: 1 addition & 0 deletions packages/effect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
},
"devDependencies": {
"@effect/vitest": "^4.0.0",
"@sentry-internal/rollup-utils": "11.8.0",
"effect": "^4.0.0"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions packages/elysia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"elysia": "^1.4.0"
},
"devDependencies": {
"@sentry-internal/rollup-utils": "11.8.0",
"bun-types": "^1.2.9",
"elysia": "^1.4.29"
},
Expand Down
Loading
Loading