@sentry/bundler-plugin-core 2.22.2 → 2.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -667,7 +667,7 @@ function generateModuleMetadataInjectorCode(metadata) {
667
667
  // The code below is mostly ternary operators because it saves bundle size.
668
668
  // The checks are to support as many environments as possible. (Node.js, Browser, webworkers, etc.)
669
669
  // We are merging the metadata objects in case modules are bundled twice with the plugin
670
- return "{\n var _sentryModuleMetadataGlobal =\n typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : typeof self !== \"undefined\"\n ? self\n : {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata =\n _sentryModuleMetadataGlobal._sentryModuleMetadata || {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack] =\n Object.assign(\n {},\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack],\n ".concat(JSON.stringify(metadata), "\n );\n}");
670
+ return "{\n var _sentryModuleMetadataGlobal =\n typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : typeof self !== \"undefined\"\n ? self\n : {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata =\n _sentryModuleMetadataGlobal._sentryModuleMetadata || {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack] =\n Object.assign(\n {},\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack],\n ".concat(JSON.stringify(metadata), "\n );\n}");
671
671
  }
672
672
  function getBuildInformation$1() {
673
673
  var packageJson = getPackageJson();
@@ -13619,7 +13619,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
13619
13619
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
13620
13620
  tracesSampleRate: 1,
13621
13621
  sampleRate: 1,
13622
- release: "2.22.2",
13622
+ release: "2.22.4",
13623
13623
  integrations: [],
13624
13624
  tracePropagationTargets: ["sentry.io/api"],
13625
13625
  stackParser: defaultStackParser,
@@ -13866,7 +13866,7 @@ function createDebugIdUploadFunction(_ref) {
13866
13866
  globResult = _context3.sent;
13867
13867
  globSpan.finish();
13868
13868
  debugIdChunkFilePaths = globResult.filter(function (debugIdChunkFilePath) {
13869
- return debugIdChunkFilePath.endsWith(".js") || debugIdChunkFilePath.endsWith(".mjs") || debugIdChunkFilePath.endsWith(".cjs");
13869
+ return !!stripQueryAndHashFromPath(debugIdChunkFilePath).match(/\.(js|mjs|cjs)$/);
13870
13870
  }); // The order of the files output by glob() is not deterministic
13871
13871
  // Ensure order within the files so that {debug-id}-{chunkIndex} coupling is consistent
13872
13872
  debugIdChunkFilePaths.sort();
@@ -14583,7 +14583,7 @@ function sentryUnpluginFactory(_ref) {
14583
14583
  });
14584
14584
 
14585
14585
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
14586
- process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.2");
14586
+ process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.4");
14587
14587
  function handleRecoverableError(unknownError) {
14588
14588
  sentrySession.status = "abnormal";
14589
14589
  try {
@@ -14899,10 +14899,11 @@ var COMMENT_USE_STRICT_REGEX =
14899
14899
  function createRollupDebugIdInjectionHooks() {
14900
14900
  return {
14901
14901
  renderChunk: function renderChunk(code, chunk) {
14902
- if ([".js", ".mjs", ".cjs"].some(function (ending) {
14903
- return chunk.fileName.endsWith(ending);
14904
- }) // chunks could be any file (html, md, ...)
14905
- ) {
14902
+ if (
14903
+ // chunks could be any file (html, md, ...)
14904
+ [".js", ".mjs", ".cjs"].some(function (ending) {
14905
+ return stripQueryAndHashFromPath(chunk.fileName).endsWith(ending);
14906
+ })) {
14906
14907
  var _code$match;
14907
14908
  var debugId = stringToUUID(code); // generate a deterministic debug ID
14908
14909
  var codeToInject = getDebugIdSnippet(debugId);
@@ -14936,10 +14937,11 @@ function createRollupDebugIdInjectionHooks() {
14936
14937
  function createRollupModuleMetadataInjectionHooks(injectionCode) {
14937
14938
  return {
14938
14939
  renderChunk: function renderChunk(code, chunk) {
14939
- if ([".js", ".mjs", ".cjs"].some(function (ending) {
14940
- return chunk.fileName.endsWith(ending);
14941
- }) // chunks could be any file (html, md, ...)
14942
- ) {
14940
+ if (
14941
+ // chunks could be any file (html, md, ...)
14942
+ [".js", ".mjs", ".cjs"].some(function (ending) {
14943
+ return stripQueryAndHashFromPath(chunk.fileName).endsWith(ending);
14944
+ })) {
14943
14945
  var _code$match2;
14944
14946
  var ms = new MagicString(code, {
14945
14947
  filename: chunk.fileName
@@ -14982,7 +14984,11 @@ function createRollupDebugIdUploadHooks(upload) {
14982
14984
  }
14983
14985
  outputDir = outputOptions.dir;
14984
14986
  _context.next = 4;
14985
- return glob(["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"], {
14987
+ return glob(["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"].map(function (q) {
14988
+ return "".concat(q, "?(\\?*)?(#*)");
14989
+ }),
14990
+ // We want to allow query and hashes strings at the end of files
14991
+ {
14986
14992
  root: outputDir,
14987
14993
  absolute: true,
14988
14994
  nodir: true
@@ -15088,7 +15094,7 @@ function createComponentNameAnnotateHooks() {
15088
15094
  };
15089
15095
  }
15090
15096
  function getDebugIdSnippet(debugId) {
15091
- return ";!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\"".concat(debugId, "\",e._sentryDebugIdIdentifier=\"sentry-dbid-").concat(debugId, "\")}catch(e){}}();");
15097
+ return ";!function(){try{var e=\"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]=\"".concat(debugId, "\",e._sentryDebugIdIdentifier=\"sentry-dbid-").concat(debugId, "\")}catch(e){}}();");
15092
15098
  }
15093
15099
 
15094
15100
  export { createComponentNameAnnotateHooks, createRollupBundleSizeOptimizationHooks, createRollupDebugIdInjectionHooks, createRollupDebugIdUploadHooks, createRollupModuleMetadataInjectionHooks, createRollupReleaseInjectionHooks, getBuildInformation, getDebugIdSnippet, replaceBooleanFlagsInCode, sentryCliBinaryExists, sentryUnpluginFactory, stringToUUID };