diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/after-upload-deletion.test.ts index 3fd6de385093..e5f9f3718e3b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/after-upload-deletion.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/application-key.test.ts index b9c0ae9182b5..0a3d2a688566 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/application-key.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = (function(e2) { for (var n = 1; n < arguments.length; n++) { @@ -25,7 +25,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-cjs.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-cjs.test.ts index a890ebe720dd..e91fb5ed133b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-cjs.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-cjs.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-release-disabled.test.ts index 0668bd0305a0..a09dccbf6258 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-release-disabled.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-sourcemaps.test.ts index 5e9b45b60bc2..cfff9f374831 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic-sourcemaps.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -33,7 +33,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { })(); //# sourceMappingURL=basic-sourcemaps.js.map ", - "basic-sourcemaps.js.map": "{"version":3,"sources":["../../_sentry-injection-stub","sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000","../../src/basic.js","../../src/basic.js"],"sourcesContent":["!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof self?self:{};e.SENTRY_RELEASE={id:\\"CURRENT_SHA\\"};}catch(e){}}();","!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\\"00000000-0000-0000-0000-000000000000\\",e._sentryDebugIdIdentifier=\\"sentry-dbid-00000000-0000-0000-0000-000000000000\\");}catch(e){}}();","// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n","\\n import \\"_sentry-debug-id-injection-stub\\";\\n import * as OriginalModule from \\"./src/basic.js\\";\\n export default OriginalModule.default;\\n export * from \\"./src/basic.js\\";"],"mappings":";;AAAA,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,QAAE,iBAAe,EAAC,IAAG,2CAA0C;AAAA,IAAE,SAAOA,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACAnP,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,UAAI,IAAG,IAAI,EAAE,QAAO;AAAM,YAAI,EAAE,kBAAgB,EAAE,mBAAiB,CAAC,GAAE,EAAE,gBAAgB,CAAC,IAAE,wCAAuC,EAAE,2BAAyB;AAAA,IAAoD,SAAOC,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACCnY,UAAQ,IAAI,aAAa;;;ACEX,MAAO,gBAAuB;","names":["e","e"]}", + "basic-sourcemaps.js.map": "{"version":3,"sources":["../../_sentry-injection-stub","sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000","../../src/basic.js","../../src/basic.js"],"sourcesContent":["!function(){try{var e=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};e.SENTRY_RELEASE={id:\\"CURRENT_SHA\\"};}catch(e){}}();","!function(){try{var e=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\\"00000000-0000-0000-0000-000000000000\\",e._sentryDebugIdIdentifier=\\"sentry-dbid-00000000-0000-0000-0000-000000000000\\");}catch(e){}}();","// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n","\\n import \\"_sentry-debug-id-injection-stub\\";\\n import * as OriginalModule from \\"./src/basic.js\\";\\n export default OriginalModule.default;\\n export * from \\"./src/basic.js\\";"],"mappings":";;AAAA,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,QAAE,iBAAe,EAAC,IAAG,2CAA0C;AAAA,IAAE,SAAOA,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACAnP,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,UAAI,IAAG,IAAI,EAAE,QAAO;AAAM,YAAI,EAAE,kBAAgB,EAAE,mBAAiB,CAAC,GAAE,EAAE,gBAAgB,CAAC,IAAE,wCAAuC,EAAE,2BAAyB;AAAA,IAAoD,SAAOC,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACCnY,UAAQ,IAAI,aAAa;;;ACEX,MAAO,gBAAuB;","names":["e","e"]}", "sentry-cli-mock.json": "["release","create","CURRENT_SHA","--project","fake-project"], ["release","set-commits","CURRENT_SHA","--auto"], ["release","finalize","CURRENT_SHA"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic.test.ts index a890ebe720dd..e91fb5ed133b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/basic.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/build-info.test.ts index 2b62c1e20628..908270e902a8 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/build-info.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "build-information-injection-test" }; e.SENTRY_BUILD_INFO = { "deps": ["@sentry/bundler-plugins", "esbuild"], "depsVersions": {}, "nodeVersion":"NODE_VERSION" }; } catch (e2) { @@ -19,7 +19,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/bundle-size-optimizations.test.ts index 2f472a5a68af..eb43dcbad41b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/bundle-size-optimizations.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/dont-mess-up-user-code.test.ts index 571aad51c5a7..8ccee97ab90e 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/dont-mess-up-user-code.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "I am release!" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -36,7 +36,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { })(); //# sourceMappingURL=index.js.map ", - "index.js.map": "{"version":3,"sources":["../../_sentry-injection-stub","sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000","../../src/import.js","../../src/index.js","../../src/index.js"],"sourcesContent":["!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof self?self:{};e.SENTRY_RELEASE={id:\\"I am release!\\"};}catch(e){}}();","!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\\"00000000-0000-0000-0000-000000000000\\",e._sentryDebugIdIdentifier=\\"sentry-dbid-00000000-0000-0000-0000-000000000000\\");}catch(e){}}();","// eslint-disable-next-line no-console\\nconsole.log(\\"I am import!\\");\\n\\nexport {};\\n","import \\"./import\\";\\n\\n// eslint-disable-next-line no-console\\nconsole.log(\\"I am index!\\");\\n","\\n import \\"_sentry-debug-id-injection-stub\\";\\n import * as OriginalModule from \\"./src/index.js\\";\\n export default OriginalModule.default;\\n export * from \\"./src/index.js\\";"],"mappings":";;AAAA,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,QAAE,iBAAe,EAAC,IAAG,gBAAe;AAAA,IAAE,SAAOA,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACAxN,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,UAAI,IAAG,IAAI,EAAE,QAAO;AAAM,YAAI,EAAE,kBAAgB,EAAE,mBAAiB,CAAC,GAAE,EAAE,gBAAgB,CAAC,IAAE,wCAAuC,EAAE,2BAAyB;AAAA,IAAoD,SAAOC,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACCnY,UAAQ,IAAI,cAAc;;;ACE1B,UAAQ,IAAI,aAAa;;;ACAX,MAAO,gBAAuB;","names":["e","e"]}", + "index.js.map": "{"version":3,"sources":["../../_sentry-injection-stub","sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000","../../src/import.js","../../src/index.js","../../src/index.js"],"sourcesContent":["!function(){try{var e=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};e.SENTRY_RELEASE={id:\\"I am release!\\"};}catch(e){}}();","!function(){try{var e=\\"undefined\\"!=typeof globalThis?globalThis:\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeof global?global:\\"undefined\\"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\\"00000000-0000-0000-0000-000000000000\\",e._sentryDebugIdIdentifier=\\"sentry-dbid-00000000-0000-0000-0000-000000000000\\");}catch(e){}}();","// eslint-disable-next-line no-console\\nconsole.log(\\"I am import!\\");\\n\\nexport {};\\n","import \\"./import\\";\\n\\n// eslint-disable-next-line no-console\\nconsole.log(\\"I am index!\\");\\n","\\n import \\"_sentry-debug-id-injection-stub\\";\\n import * as OriginalModule from \\"./src/index.js\\";\\n export default OriginalModule.default;\\n export * from \\"./src/index.js\\";"],"mappings":";;AAAA,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,QAAE,iBAAe,EAAC,IAAG,gBAAe;AAAA,IAAE,SAAOA,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACAxN,IAAC,WAAU;AAAC,QAAG;AAAC,UAAI,IAAE,eAAa,OAAO,aAAW,aAAW,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,SAAO,SAAO,eAAa,OAAO,OAAK,OAAK,CAAC;AAAE,UAAI,IAAG,IAAI,EAAE,QAAO;AAAM,YAAI,EAAE,kBAAgB,EAAE,mBAAiB,CAAC,GAAE,EAAE,gBAAgB,CAAC,IAAE,wCAAuC,EAAE,2BAAyB;AAAA,IAAoD,SAAOC,IAAE;AAAA,IAAC;AAAA,EAAC,GAAE;;;ACCnY,UAAQ,IAAI,cAAc;;;ACE1B,UAAQ,IAAI,aAAa;;;ACAX,MAAO,gBAAuB;","names":["e","e"]}", } `); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/esbuild-inject-compat.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/esbuild-inject-compat.test.ts index dae1cb7b9289..f2a39ea1a085 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/esbuild-inject-compat.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/esbuild-inject-compat.test.ts @@ -17,7 +17,7 @@ test(import.meta.url, ({ readOutputFiles, runBundler, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -26,7 +26,7 @@ test(import.meta.url, ({ readOutputFiles, runBundler, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global2 ? global2 : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global2 ? global2 : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/module-metadata.test.ts index a09d56d23521..5d191c49311b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/module-metadata.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = (function(e2) { for (var n = 1; n < arguments.length; n++) { @@ -25,7 +25,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/multiple-entry-points.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/multiple-entry-points.test.ts index 6a73daad7b2e..7ebe122a2800 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/multiple-entry-points.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/multiple-entry-points.test.ts @@ -21,7 +21,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -44,7 +44,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/release-disabled.test.ts index 95daff0a5b95..64fdb039b963 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/release-disabled.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -18,7 +18,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/telemetry.test.ts index 972a967bbe09..fe5649ca57dc 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/esbuild/telemetry.test.ts @@ -13,7 +13,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // _sentry-injection-stub !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; } catch (e2) { } @@ -22,7 +22,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { // sentry-debug-id-stub:_sentry-debug-id-injection-stub?sentry-module-id=00000000-0000-0000-0000-000000000000 !(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/after-upload-deletion.test.ts index c0e84898b270..2849ff5ca2b3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/after-upload-deletion.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/application-key.test.ts index 88a7d0a92d9a..86c29f6a5df5 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/application-key.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e) { for (var n = 1; n < arguments.length; n++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-cjs.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-cjs.test.ts index 8c701cb5a456..b648cee7c415 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-cjs.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-cjs.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-release-disabled.test.ts index b39ba31eec49..8014ac3f251c 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-release-disabled.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-sourcemaps.test.ts index a3aa68fb6609..aaf7d23e48de 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic-sourcemaps.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic.test.ts index 8c701cb5a456..b648cee7c415 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/basic.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/build-info.test.ts index 1035e8759244..0c86c47cb41d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/build-info.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "build-information-injection-test" }; e.SENTRY_BUILD_INFO = { "deps": [ diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/bundle-size-optimizations.test.ts index eeb6bf284506..8009d4082d72 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/bundle-size-optimizations.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "bundle.js": "//#region src/bundle.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-disabled.test.ts index 3866198ed816..6217a3cb4830 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-next.test.ts index 4e6b7ba923f9..31d7ed3ca5e4 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation-next.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation.test.ts index 98cd6ee88fed..0f98cf30cbab 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/component-annotation.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/debugids-already-injected.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/debugids-already-injected.test.ts index 950873a28a70..921b41f7a8f2 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/debugids-already-injected.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/debugids-already-injected.test.ts @@ -22,7 +22,7 @@ test(import.meta.url, ({ runBundler, createTempDir }) => { "00000000-0000-0000-0000-000000000000-0.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/dont-mess-up-user-code.test.ts index 08a0afffca51..277765f052d8 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/dont-mess-up-user-code.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "index.js": "//#region src/import.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "I am release!" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/module-metadata.test.ts index 05c0653cd811..46e7c0beed7d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/module-metadata.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e) { for (var n = 1; n < arguments.length; n++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/multiple-entry-points.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/multiple-entry-points.test.ts index 63b5f353f8f4..39f61082bcf3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/multiple-entry-points.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/multiple-entry-points.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "common.js": "//#region src/common.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} @@ -21,7 +21,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry1.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} @@ -33,7 +33,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry2.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/query-param.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/query-param.test.ts index 96666e28df19..11cc8e9048f6 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/query-param.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/query-param.test.ts @@ -13,7 +13,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { "common.js?seP58q4g": "//#region src/common.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -27,7 +27,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry1.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -40,7 +40,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry2.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/release-disabled.test.ts index 468da9e55d09..cd5480b81387 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/release-disabled.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/telemetry.test.ts index f8004bc8ee3c..77ac826d8d70 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rolldown/telemetry.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/after-upload-deletion.test.ts index a4305945f767..46a7613089b9 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/after-upload-deletion.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); //# sourceMappingURL=basic.js.map ", } diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/application-key.test.ts index 893eb03cfbb1..d5a30af83b47 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/application-key.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-cli-mock.json": "["release","create","CURRENT_SHA","--project","fake-project"], ["release","set-commits","CURRENT_SHA","--auto"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-release-disabled.test.ts index ebf24e57ed36..b8af97ae373f 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-release-disabled.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", } `); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-sourcemaps.test.ts index 1973196d89aa..fe3c04df15ff 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic-sourcemaps.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); //# sourceMappingURL=basic.js.map ", "basic.js.map": "{"version":3,"file":"basic.js","sources":["../../src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,EAAA,CAAA;scACA,OAAO,CAAC,GAAG,CAAC,CAAA,KAAA,CAAA,KAAA,CAAa,CAAC"}", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic.test.ts index b160e72a864c..1a1d23690e7d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/basic.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-cli-mock.json": "["release","create","CURRENT_SHA","--project","fake-project"], ["release","set-commits","CURRENT_SHA","--auto"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/build-info.test.ts index e9b8e53ac2e3..0e531d74f180 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/build-info.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@rollup/plugin-babel","@rollup/plugin-node-resolve","@sentry/bundler-plugins","react","rollup"],"depsVersions":{"react":19,"rollup":3},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@rollup/plugin-babel","@rollup/plugin-node-resolve","@sentry/bundler-plugins","react","rollup"],"depsVersions":{"react":19,"rollup":3},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", } `); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/bundle-size-optimizations.test.ts index c685a2b794e2..e4d9b427991d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/bundle-size-optimizations.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "bundle.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log( + "bundle.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log( JSON.stringify({ debug: "b", trace: "b", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-disabled.test.ts index 054e90c0e827..d4494b6ffdf4 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-disabled.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; + "app.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; function ComponentA() { return /*#__PURE__*/jsx("span", { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-next.test.ts index 62cfe0816cc5..defc63d908f5 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation-next.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; + "app.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; function ComponentA() { return /*#__PURE__*/jsx("span", { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation.test.ts index 387beb7fda07..3e0fae56a4a0 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/component-annotation.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; + "app.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; function ComponentA() { return /*#__PURE__*/jsx("span", { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/dont-mess-up-user-code.test.ts index 42d6d3679b9c..85152e6a3850 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/dont-mess-up-user-code.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "index.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"I am release!"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("I am import!"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"I am release!"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("I am import!"); // eslint-disable-next-line no-console console.log("I am index!"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/module-metadata.test.ts index b4acc59902a5..7238adcf35e9 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/module-metadata.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "common.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { + "common.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { return a + b; } export { add as a }; ", - "entry1.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; + "entry1.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; console.log(add(1, 2)); ", - "entry2.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; + "entry2.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; console.log(add(2, 4)); ", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/query-param.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/query-param.test.ts index d65cb2e349da..f0894c8af5c3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/query-param.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/query-param.test.ts @@ -10,17 +10,17 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "common.js?seP58q4g": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { + "common.js?seP58q4g": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { return a + b; } export { add as a }; ", - "entry1.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; + "entry1.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; console.log(add(1, 2)); ", - "entry2.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; + "entry2.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; console.log(add(2, 4)); ", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/release-disabled.test.ts index 39c7da1959d9..85b1040db223 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/release-disabled.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-cli-mock.json": "["release","set-commits","CURRENT_SHA","--auto"], ["release","finalize","CURRENT_SHA"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/telemetry.test.ts index 648a01c4719b..329f3b6969ed 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup3/telemetry.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-telemetry.json": "[{"sent_at":"TIMESTAMP","sdk":{"name":"sentry.javascript.node","version":"SDK_VERSION"}},[[{"type":"session"},{"sid":"UUID","init":true,"started":"TIMESTAMP","timestamp":"TIMESTAMP","status":"ok","errors":0,"duration":DURATION,"attrs":{"release":"PLUGIN_VERSION","environment":"production"}}]]], [{"event_id":"UUID","sent_at":"TIMESTAMP","sdk":{"name":"sentry.javascript.node","version":"SDK_VERSION"},"trace":{"environment":"production","release":"PLUGIN_VERSION","public_key":"UUID","trace_id":"UUID","org_id":"1","transaction":"Sentry Bundler Plugin execution","sampled":"true","sample_rand":"SAMPLE_RAND","sample_rate":"0.3"}},[[{"type":"transaction"},{"contexts":{"trace":{"span_id":"SHORT_UUID","trace_id":"UUID","data":{"sentry.origin":"manual","sentry.segment.name.source":"custom","sentry.sample_rate":0.3},"status":"ok","origin":"manual"},"runtime":{"name":"node","version":"NODE_VERSION"}},"spans":[],"start_timestamp":START_TIMESTAMP,"timestamp":TIMESTAMP,"transaction":"Sentry Bundler Plugin execution","type":"transaction","transaction_info":{"source":"custom"},"platform":"PLATFORM","event_id":"UUID","environment":"production","release":"PLUGIN_VERSION","tags":{"upload-legacy-sourcemaps":false,"module-metadata":false,"inject-build-information":false,"set-commits":"auto","finalize-release":true,"deploy-options":false,"custom-error-handler":false,"sourcemaps-assets":false,"delete-after-upload":false,"sourcemaps-disabled":false,"react-annotate":false,"node":"NODE_VERSION","platform":"PLATFORM","meta-framework":"none","application-key-set":false,"ci":true,"project":"undefined","bundler":"rollup","bundler-major-version":"3"},"user":{},"sdk":{"name":"sentry.javascript.node","version":"SDK_VERSION","integrations":[],"packages":[{"name":"npm:@sentry/node","version":"SDK_VERSION"}]}}]]], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/after-upload-deletion.test.ts index a4305945f767..46a7613089b9 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/after-upload-deletion.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); //# sourceMappingURL=basic.js.map ", } diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/application-key.test.ts index 893eb03cfbb1..d5a30af83b47 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/application-key.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-cli-mock.json": "["release","create","CURRENT_SHA","--project","fake-project"], ["release","set-commits","CURRENT_SHA","--auto"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-release-disabled.test.ts index ebf24e57ed36..b8af97ae373f 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-release-disabled.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", } `); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-sourcemaps.test.ts index 1973196d89aa..fe3c04df15ff 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic-sourcemaps.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); //# sourceMappingURL=basic.js.map ", "basic.js.map": "{"version":3,"file":"basic.js","sources":["../../src/basic.js"],"sourcesContent":["// eslint-disable-next-line no-console\\nconsole.log(\\"hello world\\");\\n"],"names":[],"mappings":"AAAA,CAAA,CAAA,CAAA,MAAA,CAAA,OAAA,CAAA,IAAA,CAAA,IAAA,CAAA,EAAA,CAAA;scACA,OAAO,CAAC,GAAG,CAAC,CAAA,KAAA,CAAA,KAAA,CAAa,CAAC"}", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic.test.ts index b160e72a864c..1a1d23690e7d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/basic.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-cli-mock.json": "["release","create","CURRENT_SHA","--project","fake-project"], ["release","set-commits","CURRENT_SHA","--auto"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/build-info.test.ts index 3dca9559e716..d8749a5f2fc6 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/build-info.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@rollup/plugin-babel","@rollup/plugin-node-resolve","@sentry/bundler-plugins","react","rollup"],"depsVersions":{"react":19,"rollup":4},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@rollup/plugin-babel","@rollup/plugin-node-resolve","@sentry/bundler-plugins","react","rollup"],"depsVersions":{"react":19,"rollup":4},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", } `); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/bundle-size-optimizations.test.ts index c685a2b794e2..e4d9b427991d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/bundle-size-optimizations.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "bundle.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log( + "bundle.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log( JSON.stringify({ debug: "b", trace: "b", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-disabled.test.ts index 054e90c0e827..d4494b6ffdf4 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-disabled.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; + "app.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; function ComponentA() { return /*#__PURE__*/jsx("span", { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-next.test.ts index 62cfe0816cc5..defc63d908f5 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation-next.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; + "app.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; function ComponentA() { return /*#__PURE__*/jsx("span", { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation.test.ts index 387beb7fda07..3e0fae56a4a0 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/component-annotation.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; + "app.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { jsx, jsxs } from 'react/jsx-runtime'; function ComponentA() { return /*#__PURE__*/jsx("span", { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/debugids-already-injected.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/debugids-already-injected.test.ts index de92ed454402..1df276c7d503 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/debugids-already-injected.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/debugids-already-injected.test.ts @@ -10,7 +10,7 @@ test(import.meta.url, ({ runBundler, createTempDir }) => { expect(files).toMatchInlineSnapshot(` { "252e0338-8927-4f52-bd57-188131defd0f-0.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); //# debugId=00000000-0000-0000-0000-000000000000 //# sourceMappingURL=basic.js.map ", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/dont-mess-up-user-code.test.ts index 42d6d3679b9c..85152e6a3850 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/dont-mess-up-user-code.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "index.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"I am release!"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("I am import!"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"I am release!"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("I am import!"); // eslint-disable-next-line no-console console.log("I am index!"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/module-metadata.test.ts index b4acc59902a5..7238adcf35e9 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/module-metadata.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "common.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { + "common.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { return a + b; } export { add as a }; ", - "entry1.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; + "entry1.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; console.log(add(1, 2)); ", - "entry2.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; + "entry2.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js'; console.log(add(2, 4)); ", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/query-param.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/query-param.test.ts index d65cb2e349da..f0894c8af5c3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/query-param.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/query-param.test.ts @@ -10,17 +10,17 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "common.js?seP58q4g": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { + "common.js?seP58q4g": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();function add(a, b) { return a + b; } export { add as a }; ", - "entry1.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; + "entry1.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; console.log(add(1, 2)); ", - "entry2.js": "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; + "entry2.js": "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();import { a as add } from './common.js?seP58q4g'; console.log(add(2, 4)); ", diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/release-disabled.test.ts index 39c7da1959d9..85b1040db223 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/release-disabled.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-cli-mock.json": "["release","set-commits","CURRENT_SHA","--auto"], ["release","finalize","CURRENT_SHA"], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/telemetry.test.ts index 94c6834500fd..4e0c4d969660 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/rollup4/telemetry.test.ts @@ -6,7 +6,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { expect(readOutputFiles()).toMatchInlineSnapshot(` { "basic.js": "// eslint-disable-next-line no-console - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();console.log("hello world"); ", "sentry-telemetry.json": "[{"sent_at":"TIMESTAMP","sdk":{"name":"sentry.javascript.node","version":"SDK_VERSION"}},[[{"type":"session"},{"sid":"UUID","init":true,"started":"TIMESTAMP","timestamp":"TIMESTAMP","status":"ok","errors":0,"duration":DURATION,"attrs":{"release":"PLUGIN_VERSION","environment":"production"}}]]], [{"event_id":"UUID","sent_at":"TIMESTAMP","sdk":{"name":"sentry.javascript.node","version":"SDK_VERSION"},"trace":{"environment":"production","release":"PLUGIN_VERSION","public_key":"UUID","trace_id":"UUID","org_id":"1","transaction":"Sentry Bundler Plugin execution","sampled":"true","sample_rand":"SAMPLE_RAND","sample_rate":"0.3"}},[[{"type":"transaction"},{"contexts":{"trace":{"span_id":"SHORT_UUID","trace_id":"UUID","data":{"sentry.origin":"manual","sentry.segment.name.source":"custom","sentry.sample_rate":0.3},"status":"ok","origin":"manual"},"runtime":{"name":"node","version":"NODE_VERSION"}},"spans":[],"start_timestamp":START_TIMESTAMP,"timestamp":TIMESTAMP,"transaction":"Sentry Bundler Plugin execution","type":"transaction","transaction_info":{"source":"custom"},"platform":"PLATFORM","event_id":"UUID","environment":"production","release":"PLUGIN_VERSION","tags":{"upload-legacy-sourcemaps":false,"module-metadata":false,"inject-build-information":false,"set-commits":"auto","finalize-release":true,"deploy-options":false,"custom-error-handler":false,"sourcemaps-assets":false,"delete-after-upload":false,"sourcemaps-disabled":false,"react-annotate":false,"node":"NODE_VERSION","platform":"PLATFORM","meta-framework":"none","application-key-set":false,"ci":true,"project":"undefined","bundler":"rollup","bundler-major-version":"4"},"user":{},"sdk":{"name":"sentry.javascript.node","version":"SDK_VERSION","integrations":[],"packages":[{"name":"npm:@sentry/node","version":"SDK_VERSION"}]}}]]], diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/after-upload-deletion.test.ts index dcb7e717f69f..41f840eee9f8 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/after-upload-deletion.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/application-key.test.ts index 971a984e7e74..43d8c9204ef0 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/application-key.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e2) { for (var n2 = 1; n2 < arguments.length; n2++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-cjs.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-cjs.test.ts index ac28048e9cae..06d3ccb3dccd 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-cjs.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-cjs.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-release-disabled.test.ts index abe9dc12208a..7d36c39ce0c9 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-release-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-sourcemaps.test.ts index db6d5d8cdf62..1f312e380c35 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic-sourcemaps.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic.test.ts index ac28048e9cae..06d3ccb3dccd 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/basic.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/build-info.test.ts index 48616bec5281..121c1ed8284b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/build-info.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "build-information-injection-test" }; e.SENTRY_BUILD_INFO = { "deps": ["@sentry/bundler-plugins", "@vitejs/plugin-react", "react", "vite"], "depsVersions": { "react": 19, "vite": 4 }, "nodeVersion":"NODE_VERSION" }; var n = new e.Error().stack; diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/bundle-size-optimizations.test.ts index c0292d9d8264..eb883df51f30 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/bundle-size-optimizations.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "bundle.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-disabled.test.ts index d08e2db52ad4..319fea5b3c50 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-next.test.ts index 13f07b4f1490..4eb817f3d744 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation-next.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation.test.ts index d1ff5500914e..17520671ef15 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/component-annotation.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/dont-mess-up-user-code.test.ts index 014726a3a510..9dfaae81227f 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/dont-mess-up-user-code.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "index.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "I am release!" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/module-metadata.test.ts index 57bcc9864223..6550851e8241 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/module-metadata.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e2) { for (var n2 = 1; n2 < arguments.length; n2++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/multiple-entry-points.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/multiple-entry-points.test.ts index f2738df8a503..9b8af820880f 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/multiple-entry-points.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/multiple-entry-points.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "common.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -22,7 +22,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry1.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -33,7 +33,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry2.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/query-param.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/query-param.test.ts index f31483760d4b..747490eeae8e 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/query-param.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/query-param.test.ts @@ -12,7 +12,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { { "common.js?seP58q4g": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -28,7 +28,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry1.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -40,7 +40,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry2.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/release-disabled.test.ts index 31ebf5cc9d16..36d836956df6 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/release-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/telemetry.test.ts index 1f3f77b816df..d6ea3f3a91d5 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/telemetry.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/vite-mpa-extra-modules.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/vite-mpa-extra-modules.test.ts index 148ecbe301c0..c0a917fa2629 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/vite-mpa-extra-modules.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite4/vite-mpa-extra-modules.test.ts @@ -10,7 +10,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "page2.js.map": "{"version":3,"file":"page2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}", "shared-module.js": "!function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/after-upload-deletion.test.ts index 1345b6fb3e7b..e4e075ae4c7d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/after-upload-deletion.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/application-key.test.ts index 72768296ba91..c4cdac152fe7 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/application-key.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = (function(e2) { for (var n2 = 1; n2 < arguments.length; n2++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-cjs.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-cjs.test.ts index 3f465bb85f55..29e892eae928 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-cjs.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-cjs.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-release-disabled.test.ts index 3f31dcee5a9b..c5617438ce46 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-release-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-sourcemaps.test.ts index 637c67d0f88a..e6c080d8ec7d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic-sourcemaps.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic.test.ts index 3f465bb85f55..29e892eae928 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/basic.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/build-info.test.ts index 17bc8f672cb1..b605de88147f 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/build-info.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "build-information-injection-test" }; e.SENTRY_BUILD_INFO = { "deps": ["@sentry/bundler-plugins", "@vitejs/plugin-react", "react", "vite"], "depsVersions": { "react": 19, "vite": 7 }, "nodeVersion":"NODE_VERSION" }; var n = new e.Error().stack; diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/bundle-size-optimizations.test.ts index ee0a41658dad..24d4d647e1fe 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/bundle-size-optimizations.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "bundle.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-disabled.test.ts index 23f18a092d31..f87e6b1e98d4 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-next.test.ts index f27ee2946afa..f47ade073429 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation-next.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation.test.ts index 1331f9de1e68..afe22c312bcd 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/component-annotation.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/debugids-already-injected.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/debugids-already-injected.test.ts index 997b0c3e4b1e..1e3eab9ff0db 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/debugids-already-injected.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/debugids-already-injected.test.ts @@ -11,7 +11,7 @@ test(import.meta.url, ({ runBundler, createTempDir }) => { { "252e0338-8927-4f52-bd57-188131defd0f-0.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/dont-mess-up-user-code.test.ts index 90177fb7b5ba..d069f59f70b4 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/dont-mess-up-user-code.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "index.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "I am release!" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/module-metadata.test.ts index d807e3d04b30..e1dc5cbaf37d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/module-metadata.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = (function(e2) { for (var n2 = 1; n2 < arguments.length; n2++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/multiple-entry-points.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/multiple-entry-points.test.ts index e3ee93ed40a5..4abff680d51d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/multiple-entry-points.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/multiple-entry-points.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "common.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -22,7 +22,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry1.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { @@ -33,7 +33,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry2.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e2) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/query-param.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/query-param.test.ts index dbf701028f0c..dba179b37031 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/query-param.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/query-param.test.ts @@ -12,7 +12,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { { "common.js?seP58q4g": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -28,7 +28,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry1.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -40,7 +40,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry2.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/release-disabled.test.ts index adc4f30dbebe..a6e4dfac1179 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/release-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/telemetry.test.ts index ac0e8b7b217f..3b5c50c6a113 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/telemetry.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { { "basic.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/vite-mpa-extra-modules.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/vite-mpa-extra-modules.test.ts index 0d9b6cb56090..3fc76bb4a70e 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/vite-mpa-extra-modules.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite7/vite-mpa-extra-modules.test.ts @@ -10,7 +10,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "page2.js.map": "{"version":3,"file":"page2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}", "shared-module.js": "!(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/after-upload-deletion.test.ts index c0e84898b270..2849ff5ca2b3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/after-upload-deletion.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/application-key.test.ts index 88a7d0a92d9a..86c29f6a5df5 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/application-key.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e) { for (var n = 1; n < arguments.length; n++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-cjs.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-cjs.test.ts index 8c701cb5a456..b648cee7c415 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-cjs.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-cjs.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-release-disabled.test.ts index b39ba31eec49..8014ac3f251c 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-release-disabled.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-sourcemaps.test.ts index e9cfa0643934..89054a7dc755 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic-sourcemaps.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic.test.ts index 8c701cb5a456..b648cee7c415 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/basic.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/build-info.test.ts index 7966268035db..1c3b7c834809 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/build-info.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "build-information-injection-test" }; e.SENTRY_BUILD_INFO = { "deps": [ diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/bundle-size-optimizations.test.ts index eeb6bf284506..8009d4082d72 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/bundle-size-optimizations.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "bundle.js": "//#region src/bundle.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-disabled.test.ts index 6f32107615e6..5a89d48fe531 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-disabled.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-next.test.ts index 41b172e14dd2..b53b1084b7a3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation-next.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation.test.ts index 388a4f11f7ae..62fb2be2a5cf 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/component-annotation.test.ts @@ -7,7 +7,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { { "app.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/debugids-already-injected.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/debugids-already-injected.test.ts index 67c935d746f7..144bda3205f8 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/debugids-already-injected.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/debugids-already-injected.test.ts @@ -22,7 +22,7 @@ test(import.meta.url, ({ runBundler, createTempDir }) => { "00000000-0000-0000-0000-000000000000-0.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/dont-mess-up-user-code.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/dont-mess-up-user-code.test.ts index d482c02f87f4..6c25c851bb2e 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/dont-mess-up-user-code.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/dont-mess-up-user-code.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "index.js": "//#region src/import.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "I am release!" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/module-metadata.test.ts index 05c0653cd811..46e7c0beed7d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/module-metadata.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; e._sentryModuleMetadata = e._sentryModuleMetadata || {}, e._sentryModuleMetadata[new e.Error().stack] = function(e) { for (var n = 1; n < arguments.length; n++) { diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/multiple-entry-points.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/multiple-entry-points.test.ts index 63b5f353f8f4..39f61082bcf3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/multiple-entry-points.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/multiple-entry-points.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "common.js": "//#region src/common.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} @@ -21,7 +21,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry1.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} @@ -33,7 +33,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { ", "entry2.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); } catch (e) {} diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/query-param.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/query-param.test.ts index 96666e28df19..11cc8e9048f6 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/query-param.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/query-param.test.ts @@ -13,7 +13,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { "common.js?seP58q4g": "//#region src/common.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -27,7 +27,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry1.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); @@ -40,7 +40,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { ", "entry2.js": "(function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/release-disabled.test.ts index 468da9e55d09..cd5480b81387 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/release-disabled.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/telemetry.test.ts index 608d363246ba..d09ee8bc094a 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/telemetry.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { "basic.js": "//#region src/basic.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/vite-mpa-extra-modules.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/vite-mpa-extra-modules.test.ts index 60a8d968f01a..f3a87d770686 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/vite-mpa-extra-modules.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/vite8/vite-mpa-extra-modules.test.ts @@ -8,7 +8,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { "shared-module.js": "//#region \\0vite/modulepreload-polyfill.js (function() { try { - var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; + var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; e.SENTRY_RELEASE = { id: "CURRENT_SHA" }; var n = new e.Error().stack; n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "00000000-0000-0000-0000-000000000000", e._sentryDebugIdIdentifier = "sentry-dbid-00000000-0000-0000-0000-000000000000"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/after-upload-deletion.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/after-upload-deletion.test.ts index b82433103407..fd1918a1f2f7 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/after-upload-deletion.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/after-upload-deletion.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/application-key.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/application-key.test.ts index 1b7b4b354b7c..48a26942d918 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/application-key.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/application-key.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-cjs.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-cjs.test.ts index c0a5365c61fd..6228a54dc2af 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-cjs.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-cjs.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-release-disabled.test.ts index 0f0ac8d0feff..a13089fc28be 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-release-disabled.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-sourcemaps.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-sourcemaps.test.ts index 575d00dc1ee9..5047772ddb31 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-sourcemaps.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic-sourcemaps.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic.test.ts index c0a5365c61fd..6228a54dc2af 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/basic.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/build-info.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/build-info.test.ts index 1f5107e559ef..bd317832e002 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/build-info.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/build-info.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@babel/preset-react","@sentry/bundler-plugins","babel-loader","webpack","webpack-cli"],"depsVersions":{"webpack":5},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"build-information-injection-test"};e.SENTRY_BUILD_INFO={"deps":["@babel/preset-react","@sentry/bundler-plugins","babel-loader","webpack","webpack-cli"],"depsVersions":{"webpack":5},"nodeVersion":"NODE_VERSION"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/bundle-size-optimizations.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/bundle-size-optimizations.test.ts index dacf1bc67701..6642adaa8ef9 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/bundle-size-optimizations.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/bundle-size-optimizations.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "bundle.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "bundle.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; console.log( JSON.stringify({ diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-disabled.test.ts index d3a532ff0ba3..0b5306ad6458 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-disabled.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "app.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // UNUSED EXPORTS: default diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-next.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-next.test.ts index ae93c38a8bc3..b7f32c2673e3 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-next.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation-next.test.ts @@ -10,7 +10,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "app.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // UNUSED EXPORTS: default diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation.test.ts index 750c7fbdaebe..901109ed9d7c 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/component-annotation.test.ts @@ -10,7 +10,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, ctx }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "app.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "app.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // UNUSED EXPORTS: default diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/debugids-already-injected.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/debugids-already-injected.test.ts index cf466e381a46..baaf743ad4d1 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/debugids-already-injected.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/debugids-already-injected.test.ts @@ -9,7 +9,7 @@ test(import.meta.url, ({ runBundler, createTempDir }) => { const files = readAllFiles(tempDir); expect(files).toMatchInlineSnapshot(` { - "33730b8e-5b8d-4795-94b2-666cea28fce6-0.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "33730b8e-5b8d-4795-94b2-666cea28fce6-0.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/module-metadata.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/module-metadata.test.ts index a6830a1f55b4..a0b58a92f77b 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/module-metadata.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/module-metadata.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/multiple-entry-points.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/multiple-entry-points.test.ts index 2683bd1001e3..0def0119bb3d 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/multiple-entry-points.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/multiple-entry-points.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "entry1.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "entry1.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; ;// ./src/common.js @@ -20,7 +20,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { /******/ })() ;", - "entry2.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "entry2.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; ;// ./src/common.js diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/release-disabled.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/release-disabled.test.ts index 9982a5b85bf9..08320b93d43a 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/release-disabled.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/release-disabled.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/telemetry.test.ts b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/telemetry.test.ts index e8b0d915de0e..0854328dd4a8 100644 --- a/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/telemetry.test.ts +++ b/dev-packages/bundler-plugin-integration-tests/fixtures/webpack5/telemetry.test.ts @@ -5,7 +5,7 @@ test(import.meta.url, ({ runBundler, readOutputFiles, runFileInNode }) => { runBundler(); expect(readOutputFiles()).toMatchInlineSnapshot(` { - "basic.js": "/******/ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap + "basic.js": "/******/ !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"CURRENT_SHA"};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="00000000-0000-0000-0000-000000000000",e._sentryDebugIdIdentifier="sentry-dbid-00000000-0000-0000-0000-000000000000");}catch(e){}}();(() => { // webpackBootstrap /******/ "use strict"; // eslint-disable-next-line no-console console.log("hello world"); diff --git a/packages/bundler-plugins/src/core/utils.ts b/packages/bundler-plugins/src/core/utils.ts index c8dd57597cc0..52ee892db587 100644 --- a/packages/bundler-plugins/src/core/utils.ts +++ b/packages/bundler-plugins/src/core/utils.ts @@ -451,7 +451,14 @@ export class CodeInjection { private readonly footer: string; constructor(private body: string = '') { - this.header = `!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};`; + // `globalThis` is checked first so the other identifiers are never evaluated + // where it exists. A downstream bundler that runs over an already-injected + // chunk can turn a free `global` into a `const` it declares further down the + // file (Nitro's node compat does this). Reading that binding from the top of + // the file hits the temporal dead zone, and `typeof` throws there instead of + // returning "undefined", so the whole injection was silently swallowed by the + // `catch` below and the chunk registered no debug ID. + this.header = `!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};`; this.footer = '}catch(e){}}();'; } diff --git a/packages/bundler-plugins/test/core/__snapshots__/utils.test.ts.snap b/packages/bundler-plugins/test/core/__snapshots__/utils.test.ts.snap index 6c13559d0663..8ba11230ba8c 100644 --- a/packages/bundler-plugins/test/core/__snapshots__/utils.test.ts.snap +++ b/packages/bundler-plugins/test/core/__snapshots__/utils.test.ts.snap @@ -1,5 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`generateModuleMetadataInjectorCode > generates code with empty metadata object 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n generates code with empty metadata object 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n generates code with metadata object 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n generates code with metadata object 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var n=1;n { // Bundle with debug ID snippet and sourceMappingURL fs.writeFileSync( bundlePath, - `"use strict";\n// some code\n;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="${debugId}",e._sentryDebugIdIdentifier="sentry-dbid-${debugId}")}catch(e){}}();\n//# sourceMappingURL=bundle.js.map`, + `"use strict";\n// some code\n;!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="${debugId}",e._sentryDebugIdIdentifier="sentry-dbid-${debugId}")}catch(e){}}();\n//# sourceMappingURL=bundle.js.map`, ); // Source map file diff --git a/packages/bundler-plugins/test/core/index.test.ts b/packages/bundler-plugins/test/core/index.test.ts index ebbc4a26a8a8..d5387fab9da7 100644 --- a/packages/bundler-plugins/test/core/index.test.ts +++ b/packages/bundler-plugins/test/core/index.test.ts @@ -45,9 +45,22 @@ describe('getDebugIdSnippet', () => { it('returns the debugId injection snippet for a passed debugId', () => { const snippet = getDebugIdSnippet('1234'); expect(snippet.code()).toMatchInlineSnapshot( - `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1234",e._sentryDebugIdIdentifier="sentry-dbid-1234");}catch(e){}}();"`, + `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1234",e._sentryDebugIdIdentifier="sentry-dbid-1234");}catch(e){}}();"`, ); }); + + it('registers the debug ID when a later `const global` shadows the identifier', () => { + // A second bundling pass over an already-injected chunk can rewrite a free + // `global` into a `const` declared below the injection. Reading it from the + // top of the file hits the temporal dead zone, where `typeof` throws rather + // than returning "undefined". + const scope: { Error: ErrorConstructor; _sentryDebugIds?: Record } = { Error }; + const run = new Function('globalThis', `${getDebugIdSnippet('5678').code()}\nconst global = globalThis;`); + + run(scope); + + expect(Object.values(scope._sentryDebugIds ?? {})).toEqual(['5678']); + }); }); describe('containsOnlyImports', () => { diff --git a/packages/bundler-plugins/test/rollup/__snapshots__/public-api.test.ts.snap b/packages/bundler-plugins/test/rollup/__snapshots__/public-api.test.ts.snap index cd0ad570649f..1a5408e72f96 100644 --- a/packages/bundler-plugins/test/rollup/__snapshots__/public-api.test.ts.snap +++ b/packages/bundler-plugins/test/rollup/__snapshots__/public-api.test.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Hooks > renderChunk > should process file 'bundle.cjs' 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; +exports[`Hooks > renderChunk > should process file 'bundle.cjs' 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; -exports[`Hooks > renderChunk > should process file 'bundle.js#hash' 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; +exports[`Hooks > renderChunk > should process file 'bundle.js#hash' 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; -exports[`Hooks > renderChunk > should process file 'bundle.js' 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; +exports[`Hooks > renderChunk > should process file 'bundle.js' 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; -exports[`Hooks > renderChunk > should process file 'bundle.js?foo=bar' 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; +exports[`Hooks > renderChunk > should process file 'bundle.js?foo=bar' 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; -exports[`Hooks > renderChunk > should process file 'bundle.mjs' 1`] = `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; +exports[`Hooks > renderChunk > should process file 'bundle.mjs' 1`] = `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b80112c0-6818-486d-96f0-185c023439b4",e._sentryDebugIdIdentifier="sentry-dbid-b80112c0-6818-486d-96f0-185c023439b4");}catch(e){}}();console.log("test");"`; diff --git a/packages/bundler-plugins/test/rollup/public-api.test.ts b/packages/bundler-plugins/test/rollup/public-api.test.ts index 53e5847cffe8..aee8cdb5034b 100644 --- a/packages/bundler-plugins/test/rollup/public-api.test.ts +++ b/packages/bundler-plugins/test/rollup/public-api.test.ts @@ -143,7 +143,7 @@ describe('Hooks', () => { expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot( - `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d4309f93-5358-4ae1-bcf0-3813aa590eb5",e._sentryDebugIdIdentifier="sentry-dbid-d4309f93-5358-4ae1-bcf0-3813aa590eb5");}catch(e){}}();console.log("Hello world");"`, + `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d4309f93-5358-4ae1-bcf0-3813aa590eb5",e._sentryDebugIdIdentifier="sentry-dbid-d4309f93-5358-4ae1-bcf0-3813aa590eb5");}catch(e){}}();console.log("Hello world");"`, ); }); @@ -154,7 +154,7 @@ describe('Hooks', () => { expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot(` ""use strict"; - !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="79a86c07-8ecc-4367-82b0-88cf822f2d41",e._sentryDebugIdIdentifier="sentry-dbid-79a86c07-8ecc-4367-82b0-88cf822f2d41");}catch(e){}}();console.log("Hello world");" + !function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="79a86c07-8ecc-4367-82b0-88cf822f2d41",e._sentryDebugIdIdentifier="sentry-dbid-79a86c07-8ecc-4367-82b0-88cf822f2d41");}catch(e){}}();console.log("Hello world");" `); }); @@ -291,7 +291,7 @@ export * from './moduleC.js';`, }); expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot( - `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c4c89e04-3658-4874-b25b-07e638185091",e._sentryDebugIdIdentifier="sentry-dbid-c4c89e04-3658-4874-b25b-07e638185091");}catch(e){}}();function main() { console.log("hello"); }"`, + `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c4c89e04-3658-4874-b25b-07e638185091",e._sentryDebugIdIdentifier="sentry-dbid-c4c89e04-3658-4874-b25b-07e638185091");}catch(e){}}();function main() { console.log("hello"); }"`, ); }); @@ -302,7 +302,7 @@ export * from './moduleC.js';`, }); expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot( - `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="43e69766-1963-49f2-a291-ff8de60cc652",e._sentryDebugIdIdentifier="sentry-dbid-43e69766-1963-49f2-a291-ff8de60cc652");}catch(e){}}();const x = 42;"`, + `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="43e69766-1963-49f2-a291-ff8de60cc652",e._sentryDebugIdIdentifier="sentry-dbid-43e69766-1963-49f2-a291-ff8de60cc652");}catch(e){}}();const x = 42;"`, ); }); @@ -322,7 +322,7 @@ bootstrap();`; }); expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot(` - "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d0c4524b-496e-45a4-9852-7558d043ba3c",e._sentryDebugIdIdentifier="sentry-dbid-d0c4524b-496e-45a4-9852-7558d043ba3c");}catch(e){}}();import { initApp } from './app.js'; + "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d0c4524b-496e-45a4-9852-7558d043ba3c",e._sentryDebugIdIdentifier="sentry-dbid-d0c4524b-496e-45a4-9852-7558d043ba3c");}catch(e){}}();import { initApp } from './app.js'; const config = { debug: true }; @@ -341,7 +341,7 @@ bootstrap();`; }); expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot(` - "!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="28f0bbaa-9aeb-40c4-98c9-4e44f1d4e175",e._sentryDebugIdIdentifier="sentry-dbid-28f0bbaa-9aeb-40c4-98c9-4e44f1d4e175");}catch(e){}}();import './polyfills.js'; + "!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="28f0bbaa-9aeb-40c4-98c9-4e44f1d4e175",e._sentryDebugIdIdentifier="sentry-dbid-28f0bbaa-9aeb-40c4-98c9-4e44f1d4e175");}catch(e){}}();import './polyfills.js'; import { init } from './app.js'; init();" @@ -352,7 +352,7 @@ bootstrap();`; const result = renderChunk(`console.log("Hello");`, { fileName: 'bundle.js' }); expect(result).not.toBeNull(); expect(result?.code).toMatchInlineSnapshot( - `"!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="79f18a7f-ca16-4168-9797-906c82058367",e._sentryDebugIdIdentifier="sentry-dbid-79f18a7f-ca16-4168-9797-906c82058367");}catch(e){}}();console.log("Hello");"`, + `"!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="79f18a7f-ca16-4168-9797-906c82058367",e._sentryDebugIdIdentifier="sentry-dbid-79f18a7f-ca16-4168-9797-906c82058367");}catch(e){}}();console.log("Hello");"`, ); }); }); diff --git a/packages/nextjs/src/config/loaders/moduleMetadataInjectionLoader.ts b/packages/nextjs/src/config/loaders/moduleMetadataInjectionLoader.ts index c199ecd75c8f..4232f1af7934 100644 --- a/packages/nextjs/src/config/loaders/moduleMetadataInjectionLoader.ts +++ b/packages/nextjs/src/config/loaders/moduleMetadataInjectionLoader.ts @@ -34,7 +34,7 @@ export default function moduleMetadataInjectionLoader( const metadata = JSON.stringify({ [`_sentryBundlerPluginAppKey:${applicationKey}`]: true }); const injectedCode = ';!function(){try{' + - 'var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};' + + 'var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};' + 'e._sentryModuleMetadata=e._sentryModuleMetadata||{},' + `e._sentryModuleMetadata[(new e.Error).stack]=Object.assign({},e._sentryModuleMetadata[(new e.Error).stack],${metadata});` + '}catch(e){}}();'; diff --git a/packages/remix/src/v3/debugId.ts b/packages/remix/src/v3/debugId.ts index 92094a9fef4c..8d7f0ae291bd 100644 --- a/packages/remix/src/v3/debugId.ts +++ b/packages/remix/src/v3/debugId.ts @@ -29,7 +29,7 @@ export function getDebugId(source: string): string { /** The snippet that registers a module's debug ID in `globalThis._sentryDebugIds`, keyed by its stack. */ export function getDebugIdSnippet(debugId: string): string { - return `!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="${debugId}",e._sentryDebugIdIdentifier="sentry-dbid-${debugId}");}catch(e){}}();`; + return `!function(){try{var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="${debugId}",e._sentryDebugIdIdentifier="sentry-dbid-${debugId}");}catch(e){}}();`; } /** Reads back the debug ID that {@link getDebugIdSnippet} put into a module, which survives minification. */