@sentry/bundler-plugin-core 3.6.0 → 4.0.0

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
@@ -7855,7 +7855,7 @@ function generateGlobalInjectorCode(_ref2) {
7855
7855
  // The checks are to support as many environments as possible. (Node.js, Browser, webworkers, etc.)
7856
7856
  var code = "{\n let _global =\n typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ?\n global :\n typeof globalThis !== 'undefined' ?\n globalThis :\n typeof self !== 'undefined' ?\n self :\n {};\n\n _global.SENTRY_RELEASE={id:".concat(JSON.stringify(release), "};");
7857
7857
  if (injectBuildInformation) {
7858
- var buildInfo = getBuildInformation$1();
7858
+ var buildInfo = getBuildInformation();
7859
7859
  code += "\n _global.SENTRY_BUILD_INFO=".concat(JSON.stringify(buildInfo), ";");
7860
7860
  }
7861
7861
  code += "}";
@@ -7869,7 +7869,7 @@ function generateModuleMetadataInjectorCode(metadata) {
7869
7869
  // We are merging the metadata objects in case modules are bundled twice with the plugin
7870
7870
  return "{\n let _sentryModuleMetadataGlobal =\n typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : typeof globalThis !== \"undefined\"\n ? globalThis\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}");
7871
7871
  }
7872
- function getBuildInformation$1() {
7872
+ function getBuildInformation() {
7873
7873
  var packageJson = getPackageJson();
7874
7874
  var _ref3 = packageJson ? getDependencies(packageJson) : {
7875
7875
  deps: [],
@@ -8195,7 +8195,7 @@ function createSentryInstance(options, shouldSendTelemetry, buildTool) {
8195
8195
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
8196
8196
  tracesSampleRate: 1,
8197
8197
  sampleRate: 1,
8198
- release: "3.6.0",
8198
+ release: "4.0.0",
8199
8199
  integrations: [],
8200
8200
  tracePropagationTargets: ["sentry.io/api"],
8201
8201
  stackParser: stackParser,
@@ -8771,7 +8771,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
8771
8771
  });
8772
8772
 
8773
8773
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
8774
- process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "3.6.0");
8774
+ process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.0.0");
8775
8775
 
8776
8776
  // Not a bulletproof check but should be good enough to at least sometimes determine
8777
8777
  // if the plugin is called in dev/watch mode or for a prod build. The important part
@@ -9051,7 +9051,10 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9051
9051
  _context6.next = 33;
9052
9052
  return cliInstance.releases.uploadSourceMaps(options.release.name, {
9053
9053
  include: normalizedInclude,
9054
- dist: options.release.dist
9054
+ dist: options.release.dist,
9055
+ // We want this promise to throw if the sourcemaps fail to upload so that we know about it.
9056
+ // see: https://github.com/getsentry/sentry-cli/pull/2605
9057
+ live: "rejectOnError"
9055
9058
  });
9056
9059
  case 33:
9057
9060
  if (!(options.release.setCommits !== false)) {
@@ -9339,7 +9342,10 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9339
9342
  paths: [tmpUploadFolder],
9340
9343
  rewrite: false,
9341
9344
  dist: options.release.dist
9342
- }]
9345
+ }],
9346
+ // We want this promise to throw if the sourcemaps fail to upload so that we know about it.
9347
+ // see: https://github.com/getsentry/sentry-cli/pull/2605
9348
+ live: "rejectOnError"
9343
9349
  });
9344
9350
  case 3:
9345
9351
  case "end":
@@ -9642,13 +9648,6 @@ function sentryUnpluginFactory(_ref) {
9642
9648
  });
9643
9649
  }
9644
9650
 
9645
- /**
9646
- * @deprecated This will be removed in v4
9647
- */
9648
- // TODO(v4): Don't export this from the package but keep the utils version
9649
- // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
9650
- var getBuildInformation = getBuildInformation$1;
9651
-
9652
9651
  /**
9653
9652
  * Determines whether the Sentry CLI binary is in its expected location.
9654
9653
  * This function is useful since `@sentry/cli` installs the binary via a post-install
@@ -9943,7 +9942,6 @@ exports.createRollupDebugIdUploadHooks = createRollupDebugIdUploadHooks;
9943
9942
  exports.createRollupModuleMetadataInjectionHooks = createRollupModuleMetadataInjectionHooks;
9944
9943
  exports.createRollupReleaseInjectionHooks = createRollupReleaseInjectionHooks;
9945
9944
  exports.createSentryBuildPluginManager = createSentryBuildPluginManager;
9946
- exports.getBuildInformation = getBuildInformation;
9947
9945
  exports.getDebugIdSnippet = getDebugIdSnippet;
9948
9946
  exports.replaceBooleanFlagsInCode = replaceBooleanFlagsInCode;
9949
9947
  exports.sentryCliBinaryExists = sentryCliBinaryExists;