Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
getAssembleRequests,
findSourceMapFiles,
findSourceMappingUrlComments,
getRuntime,
} from '@sentry-internal/test-utils';

const requests = loadMockServerResults();
Expand All @@ -31,6 +32,12 @@ assert.ok(
'Expected at least one chunk upload with a non-empty body',
);

// The `sentry` CLI adds the runtime that runs it to its User-Agent, for example `bun/1.4.2`.
const runtime = getRuntime();
for (const req of chunkPosts) {
assert.match(req.requestHeaders['user-agent'] ?? '', new RegExp(` ${runtime}/`), `Expected ${runtime} to upload`);
}

// Release endpoint was called
assert.ok(
requests.some(r => r.url?.includes('/releases/')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"test:assert": "pnpm ts-node --script-mode assert-build.ts",
"test:build:delete": "pnpm install && E2E_DELETE_SOURCEMAPS=1 pnpm build",
"test:build:delete-webpack": "pnpm install && E2E_DELETE_SOURCEMAPS=1 E2E_NEXT_WEBPACK=1 pnpm build",
"test:build:delete-bun": "pnpm install && E2E_DELETE_SOURCEMAPS=1 bun --bun run build",
"test:build:delete-webpack-bun": "pnpm install && E2E_DELETE_SOURCEMAPS=1 E2E_NEXT_WEBPACK=1 bun --bun run build",
"test:assert:delete": "E2E_DELETE_SOURCEMAPS=1 pnpm test:assert"
},
"dependencies": {
Expand Down Expand Up @@ -37,6 +39,18 @@
"build-command": "pnpm test:build:delete-webpack",
"assert-command": "pnpm test:assert:delete",
"label": "nextjs-sourcemaps (delete, webpack)"
},
{
"runtime": "bun",
"build-command": "pnpm test:build:delete-bun",
"assert-command": "pnpm test:assert:delete",
"label": "nextjs-sourcemaps (delete, turbopack, bun)"
},
{
"runtime": "bun",
"build-command": "pnpm test:build:delete-webpack-bun",
"assert-command": "pnpm test:assert:delete",
"label": "nextjs-sourcemaps (delete, webpack, bun)"
}
]
}
Expand Down
Loading