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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: 'dev-packages/e2e-tests/package.json'
- name: Set up Bun
if: matrix.test-application == 'node-exports-test-app'
uses: oven-sh/setup-bun@v1
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"build": "tsc",
"start": "pnpm build && node dist/consistentExports.js",
"test": " node dist/consistentExports.js",
"start": "pnpm build && bun run ./dist/consistentExports.js",
"test": " bun run ./dist/consistentExports.js",
"clean": "npx rimraf node_modules,pnpm-lock.yaml,dist",
"test:build": "pnpm install && pnpm build",
"test:assert": "pnpm test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as SentryAstro from '@sentry/astro';
// import * as SentryBun from '@sentry/bun';
import * as SentryBun from '@sentry/bun';
import * as SentryNextJs from '@sentry/nextjs';
import * as SentryNode from '@sentry/node';
import * as SentryRemix from '@sentry/remix';
Expand Down Expand Up @@ -38,6 +38,17 @@ const DEPENDENTS: Dependent[] = [
package: '@sentry/astro',
exports: Object.keys(SentryAstro),
},
{
package: '@sentry/bun',
exports: Object.keys(SentryBun),
ignoreExports: [
// not supported in bun:
'Handlers',
'NodeClient',
'hapiErrorPlugin',
'makeNodeTransport',
],
},
{
package: '@sentry/nextjs',
// Next.js doesn't require explicit exports, so we can just merge top level and `default` exports:
Expand Down
17 changes: 16 additions & 1 deletion packages/bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,22 @@ export {
parameterize,
} from '@sentry/core';
export type { SpanStatusType } from '@sentry/core';
export { autoDiscoverNodePerformanceMonitoringIntegrations, cron } from '@sentry/node';
export {
// eslint-disable-next-line deprecation/deprecation
deepReadDirSync,
// eslint-disable-next-line deprecation/deprecation
enableAnrDetection,
// eslint-disable-next-line deprecation/deprecation
getModuleFromFilename,
DEFAULT_USER_INCLUDES,
autoDiscoverNodePerformanceMonitoringIntegrations,
cron,
createGetModuleFromFilename,
defaultStackParser,
extractRequestData,
getSentryRelease,
addRequestDataToEvent,
} from '@sentry/node';

export { BunClient } from './client';
export {
Expand Down