@sentry/bundler-plugin-core 4.8.0 → 4.9.1

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.
@@ -8104,7 +8104,7 @@ var CodeInjection = /*#__PURE__*/function () {
8104
8104
 
8105
8105
  var SENTRY_SAAS_URL = "https://sentry.io";
8106
8106
  function normalizeUserOptions(userOptions) {
8107
- var _userOptions$org, _userOptions$project, _process$env$SENTRY_P, _userOptions$authToke, _ref, _userOptions$url, _userOptions$debug, _userOptions$silent, _userOptions$telemetr, _userOptions$disable, _ref2, _userOptions$release$, _userOptions$release, _userOptions$release$2, _userOptions$release2, _userOptions$release$3, _userOptions$release3, _userOptions$release$4, _userOptions$release4, _ref3, _userOptions$release$5, _userOptions$release5, _userOptions$release6, _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$_experim;
8107
+ var _userOptions$org, _userOptions$project, _process$env$SENTRY_P, _userOptions$authToke, _ref, _userOptions$url, _userOptions$debug, _userOptions$silent, _userOptions$telemetr, _userOptions$disable, _ref2, _userOptions$release$, _userOptions$release, _userOptions$release$2, _userOptions$release2, _userOptions$release$3, _userOptions$release3, _userOptions$release$4, _userOptions$release4, _ref3, _userOptions$release$5, _userOptions$release5, _userOptions$release6, _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$_metaOpt3, _userOptions$_metaOpt4, _userOptions$_experim;
8108
8108
  var options = {
8109
8109
  org: (_userOptions$org = userOptions.org) !== null && _userOptions$org !== void 0 ? _userOptions$org : process.env["SENTRY_ORG"],
8110
8110
  project: (_userOptions$project = userOptions.project) !== null && _userOptions$project !== void 0 ? _userOptions$project : (_process$env$SENTRY_P = process.env["SENTRY_PROJECT"]) !== null && _process$env$SENTRY_P !== void 0 && _process$env$SENTRY_P.includes(",") ? process.env["SENTRY_PROJECT"].split(",").map(function (p) {
@@ -8131,7 +8131,8 @@ function normalizeUserOptions(userOptions) {
8131
8131
  reactComponentAnnotation: userOptions.reactComponentAnnotation,
8132
8132
  _metaOptions: {
8133
8133
  telemetry: {
8134
- metaFramework: (_userOptions$_metaOpt = userOptions._metaOptions) === null || _userOptions$_metaOpt === void 0 ? void 0 : (_userOptions$_metaOpt2 = _userOptions$_metaOpt.telemetry) === null || _userOptions$_metaOpt2 === void 0 ? void 0 : _userOptions$_metaOpt2.metaFramework
8134
+ metaFramework: (_userOptions$_metaOpt = userOptions._metaOptions) === null || _userOptions$_metaOpt === void 0 ? void 0 : (_userOptions$_metaOpt2 = _userOptions$_metaOpt.telemetry) === null || _userOptions$_metaOpt2 === void 0 ? void 0 : _userOptions$_metaOpt2.metaFramework,
8135
+ bundlerMajorVersion: (_userOptions$_metaOpt3 = userOptions._metaOptions) === null || _userOptions$_metaOpt3 === void 0 ? void 0 : (_userOptions$_metaOpt4 = _userOptions$_metaOpt3.telemetry) === null || _userOptions$_metaOpt4 === void 0 ? void 0 : _userOptions$_metaOpt4.bundlerMajorVersion
8135
8136
  }
8136
8137
  },
8137
8138
  applicationKey: userOptions.applicationKey,
@@ -8392,7 +8393,7 @@ function makeOptionallyEnabledNodeTransport(shouldSendTelemetry) {
8392
8393
 
8393
8394
  var SENTRY_SAAS_HOSTNAME = "sentry.io";
8394
8395
  var stackParser = createStackParser(nodeStackLineParser());
8395
- function createSentryInstance(options, shouldSendTelemetry, buildTool) {
8396
+ function createSentryInstance(options, shouldSendTelemetry, buildTool, buildToolMajorVersion) {
8396
8397
  var clientOptions = {
8397
8398
  platform: "node",
8398
8399
  runtime: {
@@ -8402,7 +8403,7 @@ function createSentryInstance(options, shouldSendTelemetry, buildTool) {
8402
8403
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
8403
8404
  tracesSampleRate: 1,
8404
8405
  sampleRate: 1,
8405
- release: "4.8.0",
8406
+ release: "4.9.1",
8406
8407
  integrations: [],
8407
8408
  tracePropagationTargets: ["sentry.io/api"],
8408
8409
  stackParser: stackParser,
@@ -8426,13 +8427,13 @@ function createSentryInstance(options, shouldSendTelemetry, buildTool) {
8426
8427
  var client = new ServerRuntimeClient(clientOptions);
8427
8428
  var scope = new Scope();
8428
8429
  scope.setClient(client);
8429
- setTelemetryDataOnScope(options, scope, buildTool);
8430
+ setTelemetryDataOnScope(options, scope, buildTool, buildToolMajorVersion);
8430
8431
  return {
8431
8432
  sentryScope: scope,
8432
8433
  sentryClient: client
8433
8434
  };
8434
8435
  }
8435
- function setTelemetryDataOnScope(options, scope, buildTool) {
8436
+ function setTelemetryDataOnScope(options, scope, buildTool, buildToolMajorVersion) {
8436
8437
  var _options$_metaOptions;
8437
8438
  var org = options.org,
8438
8439
  project = options.project,
@@ -8472,6 +8473,9 @@ function setTelemetryDataOnScope(options, scope, buildTool) {
8472
8473
  project: Array.isArray(project) ? project.join(", ") : project !== null && project !== void 0 ? project : "undefined",
8473
8474
  bundler: buildTool
8474
8475
  });
8476
+ if (buildToolMajorVersion) {
8477
+ scope.setTag("bundler-major-version", buildToolMajorVersion);
8478
+ }
8475
8479
  scope.setUser({
8476
8480
  id: org
8477
8481
  });
@@ -8980,7 +8984,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
8980
8984
  };
8981
8985
  }
8982
8986
  var shouldSendTelemetry = allowedToSendTelemetry(options);
8983
- var _createSentryInstance = createSentryInstance(options, shouldSendTelemetry, bundlerPluginMetaContext.buildTool),
8987
+ var _createSentryInstance = createSentryInstance(options, shouldSendTelemetry, bundlerPluginMetaContext.buildTool, bundlerPluginMetaContext.buildToolMajorVersion),
8984
8988
  sentryScope = _createSentryInstance.sentryScope,
8985
8989
  sentryClient = _createSentryInstance.sentryClient;
8986
8990
  var _sentryClient$getOpti = sentryClient.getOptions(),
@@ -9011,7 +9015,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9011
9015
  });
9012
9016
 
9013
9017
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
9014
- process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.8.0");
9018
+ process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.9.1");
9015
9019
 
9016
9020
  // Propagate debug flag to Sentry CLI via environment variable
9017
9021
  // Only set if not already defined to respect user's explicit configuration
@@ -9863,14 +9867,16 @@ function sentryUnpluginFactory(_ref) {
9863
9867
  var injectionPlugin = _ref.injectionPlugin,
9864
9868
  componentNameAnnotatePlugin = _ref.componentNameAnnotatePlugin,
9865
9869
  debugIdUploadPlugin = _ref.debugIdUploadPlugin,
9866
- bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin;
9870
+ bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin,
9871
+ getBundlerMajorVersion = _ref.getBundlerMajorVersion;
9867
9872
  return createUnplugin(function () {
9868
9873
  var _userOptions$_metaOpt, _userOptions$_metaOpt2, _options$sourcemaps, _options$sourcemaps3;
9869
9874
  var userOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9870
9875
  var unpluginMetaContext = arguments.length > 1 ? arguments[1] : undefined;
9871
9876
  var sentryBuildPluginManager = createSentryBuildPluginManager(userOptions, {
9872
9877
  loggerPrefix: (_userOptions$_metaOpt = (_userOptions$_metaOpt2 = userOptions._metaOptions) === null || _userOptions$_metaOpt2 === void 0 ? void 0 : _userOptions$_metaOpt2.loggerPrefixOverride) !== null && _userOptions$_metaOpt !== void 0 ? _userOptions$_metaOpt : "[sentry-".concat(unpluginMetaContext.framework, "-plugin]"),
9873
- buildTool: unpluginMetaContext.framework
9878
+ buildTool: unpluginMetaContext.framework,
9879
+ buildToolMajorVersion: getBundlerMajorVersion === null || getBundlerMajorVersion === void 0 ? void 0 : getBundlerMajorVersion()
9874
9880
  });
9875
9881
  var logger = sentryBuildPluginManager.logger,
9876
9882
  options = sentryBuildPluginManager.normalizedOptions,