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
{{ message }}
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 16, 2026. It is now read-only.
Move the build and tests off Bun onto pnpm and Node.js #125
@sentry/api is published for Node (and browser) consumers, but the repo builds and tests it with Bun. Its consumers (toolkit's CLI and MCP) use pnpm and Node. Bun-only tooling means we don't test the package on the runtime people actually run it on, and contributors need a second toolchain.
Raised in review of #122, which stays on Bun so the client move isn't blocked. This issue covers the switch.
Build:build.mjs shells out to bun build for 6 entries (index, valibot, zod, browser, operations, source-analysis).
Tests:bun test, with 18 files importing bun:test on main (48 once feat(client): Move the shared API client from toolkit into @sentry/api #122 lands, since it ports toolkit's client tests). test/package.test.ts uses Bun.file and Bun.build. Only test:node (node --test test/node-cancellation.mjs) runs on Node.
CI:.github/workflows/build.yml uses oven-sh/setup-bun and runs bun run build, bun run typecheck, bun test, bun run test:node.
Docs and generated headers:scripts/generate-*.mjs write "Re-run bun run build" into generated files.
Scope
Switch to pnpm (packageManager, pnpm-lock.yaml, drop bun.lock and @types/bun). Use the same pnpm major as toolkit.
Replace bun build with a Node bundler (esbuild or tsdown, whichever matches the current output best). Keep the dist/ layout, the externals, and the tree-shaking step (scripts/make-tree-shakeable.mjs) as they are.
Move the tests to a Node runner (vitest, like toolkit, or node:test). Replace Bun.file/Bun.build in package.test.ts with Node or bundler APIs. Fold test:node into the main suite.
Check that the Release workflow (Craft) still packs and publishes the same artifact.
Update AGENTS.md, README.md, and the generated-file headers.
Done when
No bun in package.json, CI, or scripts, and bun.lock is gone.
pnpm build, pnpm typecheck, and pnpm test pass on Node in CI.
npm pack output matches the Bun build's: same entry points and exports, with no new node: imports in the browser entry, checked by the existing browser and package tests.
Activity
feat(zod)!: Generate Zod 4 schemas (#127)