@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.
package/dist/cjs/index.js CHANGED
@@ -707,7 +707,7 @@ function generateModuleMetadataInjectorCode(metadata) {
707
707
  // The code below is mostly ternary operators because it saves bundle size.
708
708
  // The checks are to support as many environments as possible. (Node.js, Browser, webworkers, etc.)
709
709
  // We are merging the metadata objects in case modules are bundled twice with the plugin
710
- 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}");
710
+ 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}");
711
711
  }
712
712
  function getBuildInformation$1() {
713
713
  var packageJson = getPackageJson();
@@ -13659,7 +13659,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
13659
13659
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
13660
13660
  tracesSampleRate: 1,
13661
13661
  sampleRate: 1,
13662
- release: "2.22.2",
13662
+ release: "2.22.4",
13663
13663
  integrations: [],
13664
13664
  tracePropagationTargets: ["sentry.io/api"],
13665
13665
  stackParser: defaultStackParser,
@@ -13906,7 +13906,7 @@ function createDebugIdUploadFunction(_ref) {
13906
13906
  globResult = _context3.sent;
13907
13907
  globSpan.finish();
13908
13908
  debugIdChunkFilePaths = globResult.filter(function (debugIdChunkFilePath) {
13909
- return debugIdChunkFilePath.endsWith(".js") || debugIdChunkFilePath.endsWith(".mjs") || debugIdChunkFilePath.endsWith(".cjs");
13909
+ return !!stripQueryAndHashFromPath(debugIdChunkFilePath).match(/\.(js|mjs|cjs)$/);
13910
13910
  }); // The order of the files output by glob() is not deterministic
13911
13911
  // Ensure order within the files so that {debug-id}-{chunkIndex} coupling is consistent
13912
13912
  debugIdChunkFilePaths.sort();
@@ -14623,7 +14623,7 @@ function sentryUnpluginFactory(_ref) {
14623
14623
  });
14624
14624
 
14625
14625
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
14626
- process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.2");
14626
+ process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.4");
14627
14627
  function handleRecoverableError(unknownError) {
14628
14628
  sentrySession.status = "abnormal";
14629
14629
  try {
@@ -14939,10 +14939,11 @@ var COMMENT_USE_STRICT_REGEX =
14939
14939
  function createRollupDebugIdInjectionHooks() {
14940
14940
  return {
14941
14941
  renderChunk: function renderChunk(code, chunk) {
14942
- if ([".js", ".mjs", ".cjs"].some(function (ending) {
14943
- return chunk.fileName.endsWith(ending);
14944
- }) // chunks could be any file (html, md, ...)
14945
- ) {
14942
+ if (
14943
+ // chunks could be any file (html, md, ...)
14944
+ [".js", ".mjs", ".cjs"].some(function (ending) {
14945
+ return stripQueryAndHashFromPath(chunk.fileName).endsWith(ending);
14946
+ })) {
14946
14947
  var _code$match;
14947
14948
  var debugId = stringToUUID(code); // generate a deterministic debug ID
14948
14949
  var codeToInject = getDebugIdSnippet(debugId);
@@ -14976,10 +14977,11 @@ function createRollupDebugIdInjectionHooks() {
14976
14977
  function createRollupModuleMetadataInjectionHooks(injectionCode) {
14977
14978
  return {
14978
14979
  renderChunk: function renderChunk(code, chunk) {
14979
- if ([".js", ".mjs", ".cjs"].some(function (ending) {
14980
- return chunk.fileName.endsWith(ending);
14981
- }) // chunks could be any file (html, md, ...)
14982
- ) {
14980
+ if (
14981
+ // chunks could be any file (html, md, ...)
14982
+ [".js", ".mjs", ".cjs"].some(function (ending) {
14983
+ return stripQueryAndHashFromPath(chunk.fileName).endsWith(ending);
14984
+ })) {
14983
14985
  var _code$match2;
14984
14986
  var ms = new MagicString__default["default"](code, {
14985
14987
  filename: chunk.fileName
@@ -15022,7 +15024,11 @@ function createRollupDebugIdUploadHooks(upload) {
15022
15024
  }
15023
15025
  outputDir = outputOptions.dir;
15024
15026
  _context.next = 4;
15025
- return glob.glob(["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"], {
15027
+ return glob.glob(["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"].map(function (q) {
15028
+ return "".concat(q, "?(\\?*)?(#*)");
15029
+ }),
15030
+ // We want to allow query and hashes strings at the end of files
15031
+ {
15026
15032
  root: outputDir,
15027
15033
  absolute: true,
15028
15034
  nodir: true
@@ -15128,7 +15134,7 @@ function createComponentNameAnnotateHooks() {
15128
15134
  };
15129
15135
  }
15130
15136
  function getDebugIdSnippet(debugId) {
15131
- 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){}}();");
15137
+ 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){}}();");
15132
15138
  }
15133
15139
 
15134
15140
  exports.createComponentNameAnnotateHooks = createComponentNameAnnotateHooks;