Skip to content

Commit

Permalink
define main and module
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Dec 2, 2024
1 parent 083594e commit 32633bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,10 @@ jobs:
key: ${{ needs.job_build.outputs.dependency_cache_key }}
enableCrossOsArchive: true

- name: Increase yarn network timeout on Windows
if: contains(matrix.os, 'windows')
run: yarn config set network-timeout 600000 -g

- name: Install dependencies
env:
SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1"
Expand All @@ -1421,10 +1425,6 @@ jobs:
run: |
git config --global --add safe.directory "*"
- name: Increase yarn network timeout on Windows
if: contains(matrix.os, 'windows')
run: yarn config set network-timeout 600000 -g

- name: Setup python
uses: actions/setup-python@v5
if: ${{ !contains(matrix.container, 'alpine') }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// This tests asserts that @sentr/profiling-node is not patching globalThis values, which
// breaks our runtime detection and can break instrumentation
// https://github.com/getsentry/sentry-javascript/issues/14525#issuecomment-2511208064
console.log('🧵 Starting ESM test');

function assertUnpatechedRequire() {
if (typeof globalThis.require !== 'undefined') {
if (typeof require !== 'undefined') {
// Test that globalThis.require is not defined by any side effects of the profiling
// https://github.com/getsentry/sentry-javascript/issues/13662
throw new Error(
`globalThis.require should not be defined, check that profiling integration is not defining it, received: ` +
typeof globalThis.require,
typeof require,
);
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/profiling-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"author": "Sentry",
"license": "MIT",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"types": "lib/types/index.d.ts",
"exports": {
"./package.json": "./package.json",
Expand Down

0 comments on commit 32633bf

Please sign in to comment.