From 4ac2dc2e0ed6edc7162cd1f16c2388a2888939a0 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 10:44:14 +0200 Subject: [PATCH 01/23] Revert "feat(core): Explicitly allow `undefined` as value for `authToken` option (#805)" This reverts commit 73787df4521e747b5665c4d9ae7bd00fc3db72b4. --- packages/bundler-plugin-core/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bundler-plugin-core/src/types.ts b/packages/bundler-plugin-core/src/types.ts index 064cd89b..accceee5 100644 --- a/packages/bundler-plugin-core/src/types.ts +++ b/packages/bundler-plugin-core/src/types.ts @@ -21,7 +21,7 @@ export interface Options { * * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens */ - authToken?: string | undefined; + authToken?: string; /** * The base URL of your Sentry instance. Use this if you are using a self-hosted From a17c2e70997dd4876e4aabef04d830c19591e3bf Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 10:55:33 +0200 Subject: [PATCH 02/23] Revert "Revert "feat(core): Explicitly allow `undefined` as value for `authToken` option (#805)"" This reverts commit 4ac2dc2e0ed6edc7162cd1f16c2388a2888939a0. --- packages/bundler-plugin-core/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bundler-plugin-core/src/types.ts b/packages/bundler-plugin-core/src/types.ts index accceee5..064cd89b 100644 --- a/packages/bundler-plugin-core/src/types.ts +++ b/packages/bundler-plugin-core/src/types.ts @@ -21,7 +21,7 @@ export interface Options { * * @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens */ - authToken?: string; + authToken?: string | undefined; /** * The base URL of your Sentry instance. Use this if you are using a self-hosted From bed70a8f1a4afb9685feea249eefced9bd4bd040 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 11:03:10 +0200 Subject: [PATCH 03/23] some debug logging --- .../input/webpack5/webpack.config.js | 8 +++++++- packages/integration-tests/utils/testIf.ts | 7 +++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index fa294910..46e30691 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,8 +1,14 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; -import { join } from "path"; +import { join, posix } from "path"; const __dirname = new URL(".", import.meta.url).pathname; +console.log({ + __dirname, + posixInput: posix.join(__dirname, "..", "bundle.js"), + input: join(__dirname, "..", "bundle.js"), +}); + export default { devtool: "source-map-debugids", cache: false, diff --git a/packages/integration-tests/utils/testIf.ts b/packages/integration-tests/utils/testIf.ts index 8f47bc78..c6e51cef 100644 --- a/packages/integration-tests/utils/testIf.ts +++ b/packages/integration-tests/utils/testIf.ts @@ -22,6 +22,9 @@ export const testIfNodeMajorVersionIsLessThan18: jest.It = function () { } as any; // eslint-disable-next-line no-undef -export const describeNode18Plus: jest.Describe = +export function describeNode18Plus(): jest.Describe { // eslint-disable-next-line no-undef - NODE_MAJOR_VERSION >= 18 ? describe : describe.skip; + console.log({ NODE_MAJOR_VERSION, describe, describeSkip: describe.skip }); + // eslint-disable-next-line no-undef + return NODE_MAJOR_VERSION >= 18 ? describe : describe.skip; +} From 68c80d65424f00f2823c84f2a9ec4bee5389e87c Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 11:17:15 +0200 Subject: [PATCH 04/23] . --- packages/integration-tests/utils/testIf.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/utils/testIf.ts b/packages/integration-tests/utils/testIf.ts index c6e51cef..74ec7ce5 100644 --- a/packages/integration-tests/utils/testIf.ts +++ b/packages/integration-tests/utils/testIf.ts @@ -22,9 +22,9 @@ export const testIfNodeMajorVersionIsLessThan18: jest.It = function () { } as any; // eslint-disable-next-line no-undef -export function describeNode18Plus(): jest.Describe { +export const describeNode18Plus: jest.Describe = function () { // eslint-disable-next-line no-undef console.log({ NODE_MAJOR_VERSION, describe, describeSkip: describe.skip }); // eslint-disable-next-line no-undef return NODE_MAJOR_VERSION >= 18 ? describe : describe.skip; -} +}; From 61dc829a21e2dc1c615d3a796f172d4662871691 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 12:00:02 +0200 Subject: [PATCH 05/23] .. --- packages/integration-tests/utils/testIf.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/integration-tests/utils/testIf.ts b/packages/integration-tests/utils/testIf.ts index 74ec7ce5..8f47bc78 100644 --- a/packages/integration-tests/utils/testIf.ts +++ b/packages/integration-tests/utils/testIf.ts @@ -22,9 +22,6 @@ export const testIfNodeMajorVersionIsLessThan18: jest.It = function () { } as any; // eslint-disable-next-line no-undef -export const describeNode18Plus: jest.Describe = function () { +export const describeNode18Plus: jest.Describe = // eslint-disable-next-line no-undef - console.log({ NODE_MAJOR_VERSION, describe, describeSkip: describe.skip }); - // eslint-disable-next-line no-undef - return NODE_MAJOR_VERSION >= 18 ? describe : describe.skip; -}; + NODE_MAJOR_VERSION >= 18 ? describe : describe.skip; From c6dbbde721d2568b66bc22893dcaf759cba12b09 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 12:00:53 +0200 Subject: [PATCH 06/23] ... --- packages/integration-tests/utils/testIf.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/integration-tests/utils/testIf.ts b/packages/integration-tests/utils/testIf.ts index 8f47bc78..2bd5d297 100644 --- a/packages/integration-tests/utils/testIf.ts +++ b/packages/integration-tests/utils/testIf.ts @@ -21,6 +21,8 @@ export const testIfNodeMajorVersionIsLessThan18: jest.It = function () { // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; +console.log("xx NODE_MAJOR_VERSION", NODE_MAJOR_VERSION); + // eslint-disable-next-line no-undef export const describeNode18Plus: jest.Describe = // eslint-disable-next-line no-undef From 2da54d428425454a6f042287216d931e785cc458 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 12:18:05 +0200 Subject: [PATCH 07/23] .... --- .../debug-ids-already-injected.test.ts | 12 ++++++------ .../input/rollup4/rollup.config.js | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts b/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts index f0c77f67..8d6feca8 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/debug-ids-already-injected.test.ts @@ -56,13 +56,13 @@ describeNode18Plus("vite 6 bundle", () => { }); describeNode18Plus("webpack 5 bundle", () => { - const viteRoot = path.join(__dirname, "input", "webpack5"); + const webpackRoot = path.join(__dirname, "input", "webpack5"); const tempDir = createTempDir(); beforeEach(() => { - execSync("yarn install", { cwd: viteRoot, stdio: "inherit" }); + execSync("yarn install", { cwd: webpackRoot, stdio: "inherit" }); execSync("yarn webpack build", { - cwd: viteRoot, + cwd: webpackRoot, stdio: "inherit", env: { ...process.env, SENTRY_TEST_OVERRIDE_TEMP_DIR: tempDir }, }); @@ -81,13 +81,13 @@ describeNode18Plus("webpack 5 bundle", () => { }); describeNode18Plus("rollup bundle", () => { - const viteRoot = path.join(__dirname, "input", "rollup4"); + const rollupRoot = path.join(__dirname, "input", "rollup4"); const tempDir = createTempDir(); beforeEach(() => { - execSync("yarn install", { cwd: viteRoot, stdio: "inherit" }); + execSync("yarn install", { cwd: rollupRoot, stdio: "inherit" }); execSync("yarn rollup --config rollup.config.js", { - cwd: viteRoot, + cwd: rollupRoot, stdio: "inherit", env: { ...process.env, SENTRY_TEST_OVERRIDE_TEMP_DIR: tempDir }, }); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index 2a43368b..b90b7d6b 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -1,9 +1,15 @@ import { defineConfig } from "rollup"; import { sentryRollupPlugin } from "@sentry/rollup-plugin"; -import { join } from "path"; +import { join, posix } from "path"; const __dirname = new URL(".", import.meta.url).pathname; +console.log({ + __dirname, + posixInput: posix.join(__dirname, "..", "bundle.js"), + input: join(__dirname, "..", "bundle.js"), +}); + export default defineConfig({ input: { index: join(__dirname, "..", "bundle.js") }, output: { From 1495201acad05cbf165eac7c282a29167f78ef33 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 12:24:51 +0200 Subject: [PATCH 08/23] use posix? --- .../input/webpack5/webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index 46e30691..8d170e1e 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -12,9 +12,9 @@ console.log({ export default { devtool: "source-map-debugids", cache: false, - entry: { index: join(__dirname, "..", "bundle.js") }, + entry: { index: posix.join(__dirname, "..", "bundle.js") }, output: { - path: join(__dirname, "..", "..", "out", "webpack5"), + path: posix.join(__dirname, "..", "..", "out", "webpack5"), library: { type: "commonjs", }, From 5e23fc0072989f44f03dd0cea39e3b7cd5ceb123 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 12:45:03 +0200 Subject: [PATCH 09/23] try rollup w/ posix --- .../input/rollup4/rollup.config.js | 6 ++++-- .../input/webpack5/webpack.config.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index b90b7d6b..5d17c0d6 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -8,12 +8,14 @@ console.log({ __dirname, posixInput: posix.join(__dirname, "..", "bundle.js"), input: join(__dirname, "..", "bundle.js"), + outputPath: join(__dirname, "..", "..", "out", "rollup4"), + posixOutputPath: posix.join(__dirname, "..", "..", "out", "rollup4"), }); export default defineConfig({ - input: { index: join(__dirname, "..", "bundle.js") }, + input: { index: posix.join(__dirname, "..", "bundle.js") }, output: { - dir: join(__dirname, "..", "..", "out", "rollup4"), + dir: posix.join(__dirname, "..", "..", "out", "rollup4"), sourcemap: true, sourcemapDebugIds: true, }, diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index 8d170e1e..2b55bcb3 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -7,6 +7,7 @@ console.log({ __dirname, posixInput: posix.join(__dirname, "..", "bundle.js"), input: join(__dirname, "..", "bundle.js"), + outputPath: posix.join(__dirname, "..", "..", "out", "webpack5"), }); export default { From e645bbf308c7bbdc53974bc14a31fed62420a100 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 13:01:36 +0200 Subject: [PATCH 10/23] move input file into rollup dir --- .../debug-ids-already-injected/input/rollup4/rollup.config.js | 4 ++-- packages/integration-tests/utils/testIf.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index 5d17c0d6..f3223bf1 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -6,14 +6,14 @@ const __dirname = new URL(".", import.meta.url).pathname; console.log({ __dirname, - posixInput: posix.join(__dirname, "..", "bundle.js"), + posixInput: posix.join(__dirname, "bundle.js"), input: join(__dirname, "..", "bundle.js"), outputPath: join(__dirname, "..", "..", "out", "rollup4"), posixOutputPath: posix.join(__dirname, "..", "..", "out", "rollup4"), }); export default defineConfig({ - input: { index: posix.join(__dirname, "..", "bundle.js") }, + input: { index: posix.join(__dirname, "bundle.js") }, output: { dir: posix.join(__dirname, "..", "..", "out", "rollup4"), sourcemap: true, diff --git a/packages/integration-tests/utils/testIf.ts b/packages/integration-tests/utils/testIf.ts index 2bd5d297..8f47bc78 100644 --- a/packages/integration-tests/utils/testIf.ts +++ b/packages/integration-tests/utils/testIf.ts @@ -21,8 +21,6 @@ export const testIfNodeMajorVersionIsLessThan18: jest.It = function () { // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; -console.log("xx NODE_MAJOR_VERSION", NODE_MAJOR_VERSION); - // eslint-disable-next-line no-undef export const describeNode18Plus: jest.Describe = // eslint-disable-next-line no-undef From bcd33410c8e4de1ed231bcdd74f1cf907a3dc197 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 13:09:08 +0200 Subject: [PATCH 11/23] check and add --- .../input/rollup4/bundle.js | 2 ++ .../input/rollup4/rollup.config.js | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js new file mode 100644 index 00000000..74cb2663 --- /dev/null +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line no-console +console.log("Hello world"); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index f3223bf1..7b053b47 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -1,21 +1,21 @@ import { defineConfig } from "rollup"; import { sentryRollupPlugin } from "@sentry/rollup-plugin"; -import { join, posix } from "path"; +import { join } from "path"; +import { existsSync } from "fs"; const __dirname = new URL(".", import.meta.url).pathname; console.log({ __dirname, - posixInput: posix.join(__dirname, "bundle.js"), - input: join(__dirname, "..", "bundle.js"), + input: join(__dirname, "bundle.js"), + existsInput: existsSync(join(__dirname, "bundle.js")), outputPath: join(__dirname, "..", "..", "out", "rollup4"), - posixOutputPath: posix.join(__dirname, "..", "..", "out", "rollup4"), }); export default defineConfig({ - input: { index: posix.join(__dirname, "bundle.js") }, + input: { index: join(__dirname, "bundle.js") }, output: { - dir: posix.join(__dirname, "..", "..", "out", "rollup4"), + dir: join(__dirname, "..", "..", "out", "rollup4"), sourcemap: true, sourcemapDebugIds: true, }, From 9a0cb11a2363d951f1ca03b8a8414da0b9b9d851 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 13:17:28 +0200 Subject: [PATCH 12/23] wtf --- .../input/rollup4/rollup.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index 7b053b47..a92d35c0 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -1,6 +1,6 @@ import { defineConfig } from "rollup"; import { sentryRollupPlugin } from "@sentry/rollup-plugin"; -import { join } from "path"; +import { join, posix } from "path"; import { existsSync } from "fs"; const __dirname = new URL(".", import.meta.url).pathname; @@ -9,11 +9,13 @@ console.log({ __dirname, input: join(__dirname, "bundle.js"), existsInput: existsSync(join(__dirname, "bundle.js")), + existsInputPosix: existsSync(posix.join(__dirname, "bundle.js")), + existsInputDumb: existsSync(`${__dirname}/bundle.js`), outputPath: join(__dirname, "..", "..", "out", "rollup4"), }); export default defineConfig({ - input: { index: join(__dirname, "bundle.js") }, + input: { index: `${__dirname}/bundle.js` }, output: { dir: join(__dirname, "..", "..", "out", "rollup4"), sourcemap: true, From 7ec598a0aebad5189e83768d7977f6413d13c720 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 13:24:43 +0200 Subject: [PATCH 13/23] more logging --- .../debug-ids-already-injected/input/rollup4/inputFile.js | 2 ++ .../debug-ids-already-injected/input/rollup4/rollup.config.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js new file mode 100644 index 00000000..74cb2663 --- /dev/null +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line no-console +console.log("Hello world"); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index a92d35c0..4bdd9b4a 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -1,7 +1,7 @@ import { defineConfig } from "rollup"; import { sentryRollupPlugin } from "@sentry/rollup-plugin"; import { join, posix } from "path"; -import { existsSync } from "fs"; +import { existsSync, readdirSync } from "fs"; const __dirname = new URL(".", import.meta.url).pathname; @@ -12,6 +12,7 @@ console.log({ existsInputPosix: existsSync(posix.join(__dirname, "bundle.js")), existsInputDumb: existsSync(`${__dirname}/bundle.js`), outputPath: join(__dirname, "..", "..", "out", "rollup4"), + allFilesInDirname: readdirSync(__dirname), }); export default defineConfig({ From 6f202773f98785d03c853b4e3b90e72ae4dc47e9 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 13:30:21 +0200 Subject: [PATCH 14/23] so __dirname is the problem? --- .../debug-ids-already-injected/input/rollup4/rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index 4bdd9b4a..42927ed0 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -12,7 +12,7 @@ console.log({ existsInputPosix: existsSync(posix.join(__dirname, "bundle.js")), existsInputDumb: existsSync(`${__dirname}/bundle.js`), outputPath: join(__dirname, "..", "..", "out", "rollup4"), - allFilesInDirname: readdirSync(__dirname), + allFilesInDirname: readdirSync(join(__dirname, ".")), }); export default defineConfig({ From a181caf6760e1b47bcd028813381120ba523e6e4 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 13:35:35 +0200 Subject: [PATCH 15/23] try w/o __dirname --- .../input/rollup4/rollup.config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index 42927ed0..fae55104 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -7,18 +7,18 @@ const __dirname = new URL(".", import.meta.url).pathname; console.log({ __dirname, - input: join(__dirname, "bundle.js"), + input: "./bundle.js", existsInput: existsSync(join(__dirname, "bundle.js")), existsInputPosix: existsSync(posix.join(__dirname, "bundle.js")), existsInputDumb: existsSync(`${__dirname}/bundle.js`), outputPath: join(__dirname, "..", "..", "out", "rollup4"), - allFilesInDirname: readdirSync(join(__dirname, ".")), + // allFilesInDirname: readdirSync(join(__dirname, ".")), }); export default defineConfig({ - input: { index: `${__dirname}/bundle.js` }, + input: { index: "./bundle.js" }, output: { - dir: join(__dirname, "..", "..", "out", "rollup4"), + dir: join("..", "..", "out", "rollup4"), sourcemap: true, sourcemapDebugIds: true, }, From a36492bef15bf3b76665d2a5fc033b1f36206e51 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 14:42:50 +0200 Subject: [PATCH 16/23] fileURLToPath --- .../input/webpack5/webpack.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index 2b55bcb3..5bb1fd23 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,7 +1,8 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; import { join, posix } from "path"; +import { fileURLToPath } from "url"; -const __dirname = new URL(".", import.meta.url).pathname; +const __dirname = fileURLToPath(new URL(".", import.meta.url)); console.log({ __dirname, From 86d08a512dcdd1a8bee59ae37adfbfbdce120088 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 14:43:15 +0200 Subject: [PATCH 17/23] simplify --- .../debug-ids-already-injected/input/webpack5/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index 5bb1fd23..a4b49c01 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -2,7 +2,7 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; import { join, posix } from "path"; import { fileURLToPath } from "url"; -const __dirname = fileURLToPath(new URL(".", import.meta.url)); +const __dirname = fileURLToPath(import.meta.url); console.log({ __dirname, From 72fe442002ffd66ee34d1b6bbc2463f0821667ab Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 14:51:01 +0200 Subject: [PATCH 18/23] avoid posix --- .../input/webpack5/webpack.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index a4b49c01..68f39880 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,11 +1,13 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; import { join, posix } from "path"; import { fileURLToPath } from "url"; +import { existsSync } from "fs"; const __dirname = fileURLToPath(import.meta.url); console.log({ __dirname, + existsDirname: existsSync(__dirname), posixInput: posix.join(__dirname, "..", "bundle.js"), input: join(__dirname, "..", "bundle.js"), outputPath: posix.join(__dirname, "..", "..", "out", "webpack5"), @@ -14,9 +16,9 @@ console.log({ export default { devtool: "source-map-debugids", cache: false, - entry: { index: posix.join(__dirname, "..", "bundle.js") }, + entry: { index: join(__dirname, "..", "bundle.js") }, output: { - path: posix.join(__dirname, "..", "..", "out", "webpack5"), + path: join(__dirname, "..", "..", "out", "webpack5"), library: { type: "commonjs", }, From 178a3a1d3eb7e72b16c03bb3c75600e9185a029e Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 15:41:39 +0200 Subject: [PATCH 19/23] use move bundle.js into webpack dir --- .../debug-ids-already-injected/input/webpack5/bundle.js | 2 ++ .../input/webpack5/webpack.config.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js new file mode 100644 index 00000000..74cb2663 --- /dev/null +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line no-console +console.log("Hello world"); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index 68f39880..36977208 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -8,15 +8,15 @@ const __dirname = fileURLToPath(import.meta.url); console.log({ __dirname, existsDirname: existsSync(__dirname), - posixInput: posix.join(__dirname, "..", "bundle.js"), - input: join(__dirname, "..", "bundle.js"), - outputPath: posix.join(__dirname, "..", "..", "out", "webpack5"), + posixInput: posix.join(__dirname, "bundle.js"), + input: join(__dirname, "bundle.js"), + outputPath: posix.join(__dirname, "..", "out", "webpack5"), }); export default { devtool: "source-map-debugids", cache: false, - entry: { index: join(__dirname, "..", "bundle.js") }, + entry: { index: join(__dirname, "bundle.js") }, output: { path: join(__dirname, "..", "..", "out", "webpack5"), library: { From 8ea60fa614a8c63e55bd5c118d00554baf5a5be5 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 15:43:09 +0200 Subject: [PATCH 20/23] use basename --- .../input/webpack5/webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index 36977208..bd12b2c3 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,9 +1,9 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; -import { join, posix } from "path"; +import { join, posix, basename } from "path"; import { fileURLToPath } from "url"; import { existsSync } from "fs"; -const __dirname = fileURLToPath(import.meta.url); +const __dirname = basename(fileURLToPath(import.meta.url)); console.log({ __dirname, From a8e1ac3cb6800718a0a591bbc7a8cbe02ad0670c Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 17:17:55 +0200 Subject: [PATCH 21/23] dirname, not basename --- .../input/webpack5/webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index bd12b2c3..e8112636 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,9 +1,9 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; -import { join, posix, basename } from "path"; +import { join, posix, dirname } from "path"; import { fileURLToPath } from "url"; import { existsSync } from "fs"; -const __dirname = basename(fileURLToPath(import.meta.url)); +const __dirname = dirname(fileURLToPath(import.meta.url)); console.log({ __dirname, From cd53aaab08b077d1d07d959bf229a5585b47f27c Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 17:21:50 +0200 Subject: [PATCH 22/23] start ci? From 6c72029a6bfe5087fc1652dfd6a57d97f4bf599f Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Oct 2025 18:59:32 +0200 Subject: [PATCH 23/23] delete per-dir bundle.js, use fileUrlToPath everywhere --- .../input/rollup4/bundle.js | 2 -- .../input/rollup4/inputFile.js | 2 -- .../input/rollup4/rollup.config.js | 20 +++++-------------- .../input/vite6/vite.config.js | 5 ++++- .../input/webpack5/bundle.js | 2 -- .../input/webpack5/webpack.config.js | 13 ++---------- 6 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js delete mode 100644 packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js delete mode 100644 packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js deleted file mode 100644 index 74cb2663..00000000 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line no-console -console.log("Hello world"); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js deleted file mode 100644 index 74cb2663..00000000 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/inputFile.js +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line no-console -console.log("Hello world"); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js index fae55104..1a528566 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/rollup4/rollup.config.js @@ -1,24 +1,14 @@ import { defineConfig } from "rollup"; import { sentryRollupPlugin } from "@sentry/rollup-plugin"; -import { join, posix } from "path"; -import { existsSync, readdirSync } from "fs"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; -const __dirname = new URL(".", import.meta.url).pathname; - -console.log({ - __dirname, - input: "./bundle.js", - existsInput: existsSync(join(__dirname, "bundle.js")), - existsInputPosix: existsSync(posix.join(__dirname, "bundle.js")), - existsInputDumb: existsSync(`${__dirname}/bundle.js`), - outputPath: join(__dirname, "..", "..", "out", "rollup4"), - // allFilesInDirname: readdirSync(join(__dirname, ".")), -}); +const __dirname = dirname(fileURLToPath(import.meta.url)); export default defineConfig({ - input: { index: "./bundle.js" }, + input: { index: join(__dirname, "..", "bundle.js") }, output: { - dir: join("..", "..", "out", "rollup4"), + dir: join(__dirname, "..", "..", "out", "rollup4"), sourcemap: true, sourcemapDebugIds: true, }, diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js index 0d763cdb..bb319442 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/vite6/vite.config.js @@ -1,6 +1,9 @@ import { defineConfig } from "vite"; import { sentryVitePlugin } from "@sentry/vite-plugin"; -import { join } from "path"; +import { join, dirname } from "path"; +import { fileURLToPath } from "url"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); export default defineConfig({ clearScreen: false, diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js deleted file mode 100644 index 74cb2663..00000000 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line no-console -console.log("Hello world"); diff --git a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js index e8112636..ae1d0882 100644 --- a/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js +++ b/packages/integration-tests/fixtures/debug-ids-already-injected/input/webpack5/webpack.config.js @@ -1,22 +1,13 @@ import { sentryWebpackPlugin } from "@sentry/webpack-plugin"; -import { join, posix, dirname } from "path"; +import { join, dirname } from "path"; import { fileURLToPath } from "url"; -import { existsSync } from "fs"; const __dirname = dirname(fileURLToPath(import.meta.url)); -console.log({ - __dirname, - existsDirname: existsSync(__dirname), - posixInput: posix.join(__dirname, "bundle.js"), - input: join(__dirname, "bundle.js"), - outputPath: posix.join(__dirname, "..", "out", "webpack5"), -}); - export default { devtool: "source-map-debugids", cache: false, - entry: { index: join(__dirname, "bundle.js") }, + entry: { index: join(__dirname, "..", "bundle.js") }, output: { path: join(__dirname, "..", "..", "out", "webpack5"), library: {