@sentry/bundler-plugin-core 2.5.0 → 2.6.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.
@@ -829,6 +829,9 @@ function createDebugIdUploadFunction(_ref) {
829
829
  return Promise.all(filePathsToDelete.map(function (filePathToDelete) {
830
830
  return fs__default.promises.rm(filePathToDelete, {
831
831
  force: true
832
+ })["catch"](function (e) {
833
+ // This is allowed to fail - we just don't do anything
834
+ logger.debug("An error occured while attempting to delete asset: ".concat(filePathToDelete), e);
832
835
  });
833
836
  }));
834
837
  case 53:
@@ -1266,7 +1269,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
1266
1269
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
1267
1270
  tracesSampleRate: 1,
1268
1271
  sampleRate: 1,
1269
- release: "2.5.0",
1272
+ release: "2.6.1",
1270
1273
  integrations: [],
1271
1274
  tracePropagationTargets: ["sentry.io/api"],
1272
1275
  stackParser: defaultStackParser,
@@ -1336,6 +1339,8 @@ function setTelemetryDataOnHub(options, hub, bundler) {
1336
1339
  if (release.uploadLegacySourcemaps) {
1337
1340
  hub.setTag("uploadLegacySourcemapsEntries", Array.isArray(release.uploadLegacySourcemaps) ? release.uploadLegacySourcemaps.length : 1);
1338
1341
  }
1342
+ hub.setTag("module-metadata", !!options._experiments.moduleMetadata);
1343
+ hub.setTag("inject-build-information", !!options._experiments.injectBuildInformation);
1339
1344
 
1340
1345
  // Optional release pipeline steps
1341
1346
  hub.setTag("clean-artifacts", release.cleanArtifacts);
@@ -1496,7 +1501,7 @@ function sentryUnpluginFactory(_ref) {
1496
1501
  });
1497
1502
 
1498
1503
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
1499
- process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.5.0");
1504
+ process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.1");
1500
1505
  function handleRecoverableError(unknownError) {
1501
1506
  sentrySession.status = "abnormal";
1502
1507
  try {
@@ -1566,7 +1571,7 @@ function sentryUnpluginFactory(_ref) {
1566
1571
  logger.warn("No release name provided. Will not create release. Please set the `release.name` option to identify your release.");
1567
1572
  } else if (!options.authToken) {
1568
1573
  logger.warn("No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/");
1569
- } else if (!options.org) {
1574
+ } else if (!options.org && !options.authToken.startsWith("sntrys_")) {
1570
1575
  logger.warn("No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.");
1571
1576
  } else if (!options.project) {
1572
1577
  logger.warn("No project provided. Will not create release. Please set the `project` option to your Sentry project slug.");
@@ -1598,7 +1603,7 @@ function sentryUnpluginFactory(_ref) {
1598
1603
  plugins.push(debugIdInjectionPlugin());
1599
1604
  if (!options.authToken) {
1600
1605
  logger.warn("No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/");
1601
- } else if (!options.org) {
1606
+ } else if (!options.org && !options.authToken.startsWith("sntrys_")) {
1602
1607
  logger.warn("No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.");
1603
1608
  } else if (!options.project) {
1604
1609
  logger.warn("No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug.");
@@ -1751,35 +1756,40 @@ function createRollupDebugIdUploadHooks(upload) {
1751
1756
  while (1) switch (_context.prev = _context.next) {
1752
1757
  case 0:
1753
1758
  if (!outputOptions.dir) {
1754
- _context.next = 7;
1759
+ _context.next = 9;
1755
1760
  break;
1756
1761
  }
1757
1762
  outputDir = outputOptions.dir;
1758
- _buildArtifacts = Object.keys(bundle).map(function (asset) {
1759
- return path.join(outputDir, asset);
1763
+ _context.next = 4;
1764
+ return glob(["/**/*.js", "/**/*.js.map"], {
1765
+ root: outputDir,
1766
+ absolute: true,
1767
+ nodir: true
1760
1768
  });
1761
- _context.next = 5;
1769
+ case 4:
1770
+ _buildArtifacts = _context.sent;
1771
+ _context.next = 7;
1762
1772
  return upload(_buildArtifacts);
1763
- case 5:
1764
- _context.next = 15;
1765
- break;
1766
1773
  case 7:
1774
+ _context.next = 17;
1775
+ break;
1776
+ case 9:
1767
1777
  if (!outputOptions.file) {
1768
- _context.next = 12;
1778
+ _context.next = 14;
1769
1779
  break;
1770
1780
  }
1771
- _context.next = 10;
1781
+ _context.next = 12;
1772
1782
  return upload([outputOptions.file]);
1773
- case 10:
1774
- _context.next = 15;
1775
- break;
1776
1783
  case 12:
1784
+ _context.next = 17;
1785
+ break;
1786
+ case 14:
1777
1787
  _buildArtifacts2 = Object.keys(bundle).map(function (asset) {
1778
1788
  return path.join(path.resolve(), asset);
1779
1789
  });
1780
- _context.next = 15;
1790
+ _context.next = 17;
1781
1791
  return upload(_buildArtifacts2);
1782
- case 15:
1792
+ case 17:
1783
1793
  case "end":
1784
1794
  return _context.stop();
1785
1795
  }