Skip to content

Commit fb2fbd3

Browse files
committed
clean up e2e
1 parent fd618e9 commit fb2fbd3

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

dev-packages/e2e-tests/test-applications/node-profiling/build.mjs renamed to dev-packages/e2e-tests/test-applications/node-profiling/build-cjs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ console.log('Running build using esbuild version', esbuild.version);
1111
esbuild.buildSync({
1212
platform: 'node',
1313
entryPoints: ['./index.ts'],
14-
outdir: './dist',
14+
outfile: './dist/cjs/index.js',
1515
target: 'esnext',
1616
format: 'cjs',
1717
bundle: true,

dev-packages/e2e-tests/test-applications/node-profiling/build.shimmed.mjs renamed to dev-packages/e2e-tests/test-applications/node-profiling/build-esm.mjs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,9 @@ console.log('Running build using esbuild version', esbuild.version);
1111
esbuild.buildSync({
1212
platform: 'node',
1313
entryPoints: ['./index.ts'],
14-
outfile: './dist/index.shimmed.mjs',
14+
outfile: './dist/esm/index.mjs',
1515
target: 'esnext',
1616
format: 'esm',
1717
bundle: true,
1818
loader: { '.node': 'copy' },
19-
banner: {
20-
js: `
21-
import { dirname } from 'node:path';
22-
import { fileURLToPath } from 'node:url';
23-
import { createRequire } from 'node:module';
24-
const require = createRequire(import.meta.url);
25-
const __filename = fileURLToPath(import.meta.url);
26-
const __dirname = dirname(__filename);
27-
`,
28-
},
2919
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ console.log('🧵 Starting ESM test');
88

99
const wait = ms => new Promise(resolve => setTimeout(resolve, ms));
1010

11-
function assertUnpatechedRequire() {
11+
function assertUnpatchedRequire() {
1212
if (typeof require !== 'undefined') {
1313
// Test that globalThis.require is not defined by any side effects of the profiling
1414
// https://github.com/getsentry/sentry-javascript/issues/13662
@@ -30,5 +30,5 @@ Sentry.startSpan({ name: 'Precompile test' }, async () => {
3030
await wait(500);
3131
});
3232

33-
assertUnpatechedRequire();
33+
assertUnpatchedRequire();
3434
console.log('✅ Require is not patched');

dev-packages/e2e-tests/test-applications/node-profiling/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": true,
55
"scripts": {
66
"typecheck": "tsc --noEmit",
7-
"build": "node build.mjs && node build.shimmed.mjs",
8-
"test": "node dist/index.js && node --experimental-require-module dist/index.js && node dist/index.shimmed.mjs",
7+
"build": "node build-cjs.mjs && node build-esm.mjs",
8+
"test": "node dist/index.js && node --experimental-require-module dist/cjs/index.js && node dist/esm/index.mjs",
99
"clean": "npx rimraf node_modules dist",
1010
"test:electron": "$(pnpm bin)/electron-rebuild && playwright test",
1111
"test:build": "pnpm run typecheck && pnpm run build",

0 commit comments

Comments
 (0)