Skip to content

Commit de1a11f

Browse files
committed
define main and module
1 parent 083594e commit de1a11f

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.github/workflows/build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,10 @@ jobs:
14111411
key: ${{ needs.job_build.outputs.dependency_cache_key }}
14121412
enableCrossOsArchive: true
14131413

1414+
- name: Increase yarn network timeout on Windows
1415+
if: contains(matrix.os, 'windows')
1416+
run: yarn config set network-timeout 600000 -g
1417+
14141418
- name: Install dependencies
14151419
env:
14161420
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
@@ -1421,10 +1425,6 @@ jobs:
14211425
run: |
14221426
git config --global --add safe.directory "*"
14231427
1424-
- name: Increase yarn network timeout on Windows
1425-
if: contains(matrix.os, 'windows')
1426-
run: yarn config set network-timeout 600000 -g
1427-
14281428
- name: Setup python
14291429
uses: actions/setup-python@v5
14301430
if: ${{ !contains(matrix.container, 'alpine') }}

dev-packages/e2e-tests/test-applications/node-profiling/index.mjs

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
// This tests asserts that @sentr/profiling-node is not patching globalThis values, which
22
// breaks our runtime detection and can break instrumentation
33
// https://github.com/getsentry/sentry-javascript/issues/14525#issuecomment-2511208064
4+
import * as Sentry from '@sentry/node';
5+
import { nodeProfilingIntegration } from '@sentry/profiling-node';
6+
7+
console.log('🧵 Starting ESM test');
8+
9+
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
410

511
function assertUnpatechedRequire() {
6-
if (typeof globalThis.require !== 'undefined') {
12+
if (typeof require !== 'undefined') {
713
// Test that globalThis.require is not defined by any side effects of the profiling
814
// https://github.com/getsentry/sentry-javascript/issues/13662
915
throw new Error(
1016
`globalThis.require should not be defined, check that profiling integration is not defining it, received: ` +
11-
typeof globalThis.require,
17+
typeof require,
1218
);
1319
}
1420
}
1521

16-
import * as Sentry from '@sentry/node';
17-
import { nodeProfilingIntegration } from '@sentry/profiling-node';
18-
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
1922

2023
Sentry.init({
2124
dsn: 'https://7fa19397baaf433f919fbe02228d5470@o1137848.ingest.sentry.io/6625302',

packages/profiling-node/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"author": "Sentry",
88
"license": "MIT",
99
"main": "lib/cjs/index.js",
10+
"module": "lib/esm/index.js",
1011
"types": "lib/types/index.d.ts",
1112
"exports": {
1213
"./package.json": "./package.json",

0 commit comments

Comments
 (0)