@sentry/bundler-plugin-core 4.4.0 → 4.6.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.
@@ -7986,12 +7986,27 @@ function getTurborepoEnvPassthroughWarning(envVarName) {
7986
7986
  return process.env["TURBO_HASH"] ? "\nYou seem to be using Turborepo, did you forget to put ".concat(envVarName, " in `passThroughEnv`? https://turbo.build/repo/docs/reference/configuration#passthroughenv") : "";
7987
7987
  }
7988
7988
 
7989
+ /**
7990
+ * Gets the projects from the project option. This might be a single project or an array of projects.
7991
+ */
7992
+ function getProjects(project) {
7993
+ if (Array.isArray(project)) {
7994
+ return project;
7995
+ }
7996
+ if (project) {
7997
+ return [project];
7998
+ }
7999
+ return undefined;
8000
+ }
8001
+
7989
8002
  var SENTRY_SAAS_URL = "https://sentry.io";
7990
8003
  function normalizeUserOptions(userOptions) {
7991
- var _userOptions$org, _userOptions$project, _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;
8004
+ 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;
7992
8005
  var options = {
7993
8006
  org: (_userOptions$org = userOptions.org) !== null && _userOptions$org !== void 0 ? _userOptions$org : process.env["SENTRY_ORG"],
7994
- project: (_userOptions$project = userOptions.project) !== null && _userOptions$project !== void 0 ? _userOptions$project : process.env["SENTRY_PROJECT"],
8007
+ 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) {
8008
+ return p.trim();
8009
+ }) : process.env["SENTRY_PROJECT"],
7995
8010
  authToken: (_userOptions$authToke = userOptions.authToken) !== null && _userOptions$authToke !== void 0 ? _userOptions$authToke : process.env["SENTRY_AUTH_TOKEN"],
7996
8011
  url: (_ref = (_userOptions$url = userOptions.url) !== null && _userOptions$url !== void 0 ? _userOptions$url : process.env["SENTRY_URL"]) !== null && _ref !== void 0 ? _ref : SENTRY_SAAS_URL,
7997
8012
  headers: userOptions.headers,
@@ -8080,6 +8095,20 @@ function validateOptions(options, logger) {
8080
8095
  logger.error("The `deploy` option was specified but is missing the required `env` property.", "Please set the `env` property.");
8081
8096
  return false;
8082
8097
  }
8098
+ if (options.project && Array.isArray(options.project)) {
8099
+ if (options.project.length === 0) {
8100
+ logger.error("The `project` option was specified as an array but is empty.", "Please provide at least one project slug.");
8101
+ return false;
8102
+ }
8103
+ // Check each project is a non-empty string
8104
+ var invalidProjects = options.project.filter(function (p) {
8105
+ return typeof p !== "string" || p.trim() === "";
8106
+ });
8107
+ if (invalidProjects.length > 0) {
8108
+ logger.error("The `project` option contains invalid project slugs.", "All projects must be non-empty strings.");
8109
+ return false;
8110
+ }
8111
+ }
8083
8112
  return true;
8084
8113
  }
8085
8114
 
@@ -8270,7 +8299,7 @@ function createSentryInstance(options, shouldSendTelemetry, buildTool) {
8270
8299
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
8271
8300
  tracesSampleRate: 1,
8272
8301
  sampleRate: 1,
8273
- release: "4.4.0",
8302
+ release: "4.6.0",
8274
8303
  integrations: [],
8275
8304
  tracePropagationTargets: ["sentry.io/api"],
8276
8305
  stackParser: stackParser,
@@ -8337,7 +8366,7 @@ function setTelemetryDataOnScope(options, scope, buildTool) {
8337
8366
  scope.setTag("ci", !!process.env["CI"]);
8338
8367
  scope.setTags({
8339
8368
  organization: org,
8340
- project: project,
8369
+ project: Array.isArray(project) ? project.join(", ") : project !== null && project !== void 0 ? project : "undefined",
8341
8370
  bundler: buildTool
8342
8371
  });
8343
8372
  scope.setUser({
@@ -8353,7 +8382,7 @@ function allowedToSendTelemetry(_x) {
8353
8382
  */
8354
8383
  function _allowedToSendTelemetry() {
8355
8384
  _allowedToSendTelemetry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(options) {
8356
- var _cliInfo$split$, _cliInfo$split$$repla;
8385
+ var _getProjects, _cliInfo$split$, _cliInfo$split$$repla;
8357
8386
  var silent, org, project, authToken, url, headers, telemetry, release, cli, cliInfo, cliInfoUrl;
8358
8387
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8359
8388
  while (1) switch (_context.prev = _context.next) {
@@ -8375,7 +8404,7 @@ function _allowedToSendTelemetry() {
8375
8404
  url: url,
8376
8405
  authToken: authToken,
8377
8406
  org: org,
8378
- project: project,
8407
+ project: (_getProjects = getProjects(project)) === null || _getProjects === void 0 ? void 0 : _getProjects[0],
8379
8408
  vcsRemote: release.vcsRemote,
8380
8409
  silent: silent,
8381
8410
  headers: headers
@@ -8712,10 +8741,12 @@ function defaultRewriteSourcesHook(source) {
8712
8741
  }
8713
8742
 
8714
8743
  function createCliInstance(options) {
8744
+ var _getProjects;
8715
8745
  return new SentryCli(null, {
8716
8746
  authToken: options.authToken,
8717
8747
  org: options.org,
8718
- project: options.project,
8748
+ // Default to the first project if multiple projects are specified
8749
+ project: (_getProjects = getProjects(options.project)) === null || _getProjects === void 0 ? void 0 : _getProjects[0],
8719
8750
  silent: options.silent,
8720
8751
  url: options.url,
8721
8752
  vcsRemote: options.release.vcsRemote,
@@ -8877,7 +8908,13 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
8877
8908
  });
8878
8909
 
8879
8910
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
8880
- process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.4.0");
8911
+ process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.6.0");
8912
+
8913
+ // Propagate debug flag to Sentry CLI via environment variable
8914
+ // Only set if not already defined to respect user's explicit configuration
8915
+ if (options.debug && !process.env["SENTRY_LOG_LEVEL"]) {
8916
+ process.env["SENTRY_LOG_LEVEL"] = "debug";
8917
+ }
8881
8918
 
8882
8919
  // Not a bulletproof check but should be good enough to at least sometimes determine
8883
8920
  // if the plugin is called in dev/watch mode or for a prod build. The important part
@@ -8999,9 +9036,11 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
8999
9036
  bundleMetadata["_sentryBundlerPluginAppKey:".concat(options.applicationKey)] = true;
9000
9037
  }
9001
9038
  if (typeof options.moduleMetadata === "function") {
9039
+ var _getProjects2;
9002
9040
  var args = {
9003
9041
  org: options.org,
9004
- project: options.project,
9042
+ project: (_getProjects2 = getProjects(options.project)) === null || _getProjects2 === void 0 ? void 0 : _getProjects2[0],
9043
+ projects: getProjects(options.project),
9005
9044
  release: options.release.name
9006
9045
  };
9007
9046
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
@@ -9109,7 +9148,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9109
9148
  logger.warn("No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug." + getTurborepoEnvPassthroughWarning("SENTRY_ORG"));
9110
9149
  return _context7.abrupt("return");
9111
9150
  case 20:
9112
- if (options.project) {
9151
+ if (!(!options.project || Array.isArray(options.project) && options.project.length === 0)) {
9113
9152
  _context7.next = 23;
9114
9153
  break;
9115
9154
  }
@@ -9150,6 +9189,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9150
9189
  return cliInstance.releases.uploadSourceMaps(options.release.name, {
9151
9190
  include: normalizedInclude,
9152
9191
  dist: options.release.dist,
9192
+ projects: getProjects(options.project),
9153
9193
  // We want this promise to throw if the sourcemaps fail to upload so that we know about it.
9154
9194
  // see: https://github.com/getsentry/sentry-cli/pull/2605
9155
9195
  live: "rejectOnError"
@@ -9352,6 +9392,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9352
9392
  dist: options.release.dist
9353
9393
  }],
9354
9394
  ignore: ignorePaths,
9395
+ projects: getProjects(options.project),
9355
9396
  live: "rejectOnError"
9356
9397
  });
9357
9398
  case 3:
@@ -9541,6 +9582,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9541
9582
  rewrite: false,
9542
9583
  dist: options.release.dist
9543
9584
  }],
9585
+ projects: getProjects(options.project),
9544
9586
  live: "rejectOnError"
9545
9587
  });
9546
9588
  case 3:
@@ -9572,6 +9614,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9572
9614
  case 34:
9573
9615
  _context18.prev = 34;
9574
9616
  if (folderToCleanUp && !((_process$env2 = process.env) !== null && _process$env2 !== void 0 && _process$env2["SENTRY_TEST_OVERRIDE_TEMP_DIR"])) {
9617
+ logger.debug("Cleaning up temporary files...");
9575
9618
  void startSpan({
9576
9619
  name: "cleanup",
9577
9620
  scope: sentryScope
@@ -9580,7 +9623,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9580
9623
  while (1) switch (_context17.prev = _context17.next) {
9581
9624
  case 0:
9582
9625
  if (!folderToCleanUp) {
9583
- _context17.next = 3;
9626
+ _context17.next = 4;
9584
9627
  break;
9585
9628
  }
9586
9629
  _context17.next = 3;
@@ -9589,22 +9632,27 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9589
9632
  force: true
9590
9633
  });
9591
9634
  case 3:
9635
+ logger.debug("Temporary folder deleted: ".concat(folderToCleanUp));
9636
+ case 4:
9592
9637
  case "end":
9593
9638
  return _context17.stop();
9594
9639
  }
9595
9640
  }, _callee17);
9596
9641
  })));
9597
9642
  }
9643
+ logger.debug("Freeing upload dependencies...");
9598
9644
  freeUploadDependencyOnBuildArtifacts();
9599
- _context18.next = 39;
9645
+ logger.debug("Flushing telemetry data...");
9646
+ _context18.next = 41;
9600
9647
  return safeFlushTelemetry(sentryClient);
9601
- case 39:
9648
+ case 41:
9649
+ logger.debug("Telemetry flushed. Plugin upload process complete.");
9602
9650
  return _context18.finish(34);
9603
- case 40:
9651
+ case 43:
9604
9652
  case "end":
9605
9653
  return _context18.stop();
9606
9654
  }
9607
- }, _callee18, null, [[2, 30, 34, 40]]);
9655
+ }, _callee18, null, [[2, 30, 34, 43]]);
9608
9656
  })));
9609
9657
  case 8:
9610
9658
  case "end":
@@ -9678,7 +9726,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
9678
9726
  };
9679
9727
  }
9680
9728
  function canUploadSourceMaps(options, logger, isDevMode) {
9681
- var _options$sourcemaps10;
9729
+ var _options$sourcemaps10, _getProjects3;
9682
9730
  if ((_options$sourcemaps10 = options.sourcemaps) !== null && _options$sourcemaps10 !== void 0 && _options$sourcemaps10.disable) {
9683
9731
  logger.debug("Source map upload was disabled. Will not upload sourcemaps using debug ID process.");
9684
9732
  return false;
@@ -9695,7 +9743,7 @@ function canUploadSourceMaps(options, logger, isDevMode) {
9695
9743
  logger.warn("No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug." + getTurborepoEnvPassthroughWarning("SENTRY_ORG"));
9696
9744
  return false;
9697
9745
  }
9698
- if (!options.project) {
9746
+ if (!((_getProjects3 = getProjects(options.project)) !== null && _getProjects3 !== void 0 && _getProjects3[0])) {
9699
9747
  logger.warn("No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug." + getTurborepoEnvPassthroughWarning("SENTRY_PROJECT"));
9700
9748
  return false;
9701
9749
  }
@@ -9737,18 +9785,14 @@ function sentryUnpluginFactory(_ref) {
9737
9785
  plugins.push({
9738
9786
  name: "sentry-telemetry-plugin",
9739
9787
  buildStart: function buildStart() {
9740
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9741
- return _regeneratorRuntime().wrap(function _callee$(_context) {
9742
- while (1) switch (_context.prev = _context.next) {
9743
- case 0:
9744
- _context.next = 2;
9745
- return sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal();
9746
- case 2:
9747
- case "end":
9748
- return _context.stop();
9749
- }
9750
- }, _callee);
9751
- }))();
9788
+ // Technically, for very fast builds we might miss the telemetry signal
9789
+ // but it's okay because telemetry is not critical for us.
9790
+ // We cannot await the flush here because it would block the build start
9791
+ // which in turn would break module federation builds, see
9792
+ // https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/816
9793
+ void sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal()["catch"](function () {
9794
+ // Nothing for the users to do here. If telemetry fails it's acceptable.
9795
+ });
9752
9796
  }
9753
9797
  });
9754
9798
  if (Object.keys(bundleSizeOptimizationReplacementValues).length > 0) {
@@ -9775,22 +9819,22 @@ function sentryUnpluginFactory(_ref) {
9775
9819
  plugins.push({
9776
9820
  name: "sentry-release-management-plugin",
9777
9821
  writeBundle: function writeBundle() {
9778
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
9779
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9780
- while (1) switch (_context2.prev = _context2.next) {
9822
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9823
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
9824
+ while (1) switch (_context.prev = _context.next) {
9781
9825
  case 0:
9782
- _context2.prev = 0;
9783
- _context2.next = 3;
9826
+ _context.prev = 0;
9827
+ _context.next = 3;
9784
9828
  return sentryBuildPluginManager.createRelease();
9785
9829
  case 3:
9786
- _context2.prev = 3;
9830
+ _context.prev = 3;
9787
9831
  freeGlobalDependencyOnBuildArtifacts();
9788
- return _context2.finish(3);
9832
+ return _context.finish(3);
9789
9833
  case 6:
9790
9834
  case "end":
9791
- return _context2.stop();
9835
+ return _context.stop();
9792
9836
  }
9793
- }, _callee2, null, [[0,, 3, 6]]);
9837
+ }, _callee, null, [[0,, 3, 6]]);
9794
9838
  }))();
9795
9839
  }
9796
9840
  });
@@ -9819,17 +9863,17 @@ function sentryUnpluginFactory(_ref) {
9819
9863
  plugins.push({
9820
9864
  name: "sentry-file-deletion-plugin",
9821
9865
  writeBundle: function writeBundle() {
9822
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
9823
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
9824
- while (1) switch (_context3.prev = _context3.next) {
9866
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
9867
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9868
+ while (1) switch (_context2.prev = _context2.next) {
9825
9869
  case 0:
9826
- _context3.next = 2;
9870
+ _context2.next = 2;
9827
9871
  return sentryBuildPluginManager.deleteArtifacts();
9828
9872
  case 2:
9829
9873
  case "end":
9830
- return _context3.stop();
9874
+ return _context2.stop();
9831
9875
  }
9832
- }, _callee3);
9876
+ }, _callee2);
9833
9877
  }))();
9834
9878
  }
9835
9879
  });
@@ -9979,18 +10023,18 @@ function createRollupDebugIdUploadHooks(upload, _logger, createDependencyOnBuild
9979
10023
  var freeGlobalDependencyOnDebugIdSourcemapArtifacts = createDependencyOnBuildArtifacts();
9980
10024
  return {
9981
10025
  writeBundle: function writeBundle(outputOptions, bundle) {
9982
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
10026
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
9983
10027
  var outputDir, _buildArtifacts, _buildArtifacts2;
9984
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
9985
- while (1) switch (_context4.prev = _context4.next) {
10028
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
10029
+ while (1) switch (_context3.prev = _context3.next) {
9986
10030
  case 0:
9987
- _context4.prev = 0;
10031
+ _context3.prev = 0;
9988
10032
  if (!outputOptions.dir) {
9989
- _context4.next = 10;
10033
+ _context3.next = 10;
9990
10034
  break;
9991
10035
  }
9992
10036
  outputDir = outputOptions.dir;
9993
- _context4.next = 5;
10037
+ _context3.next = 5;
9994
10038
  return glob(["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"].map(function (q) {
9995
10039
  return "".concat(q, "?(\\?*)?(#*)");
9996
10040
  }),
@@ -10001,37 +10045,37 @@ function createRollupDebugIdUploadHooks(upload, _logger, createDependencyOnBuild
10001
10045
  nodir: true
10002
10046
  });
10003
10047
  case 5:
10004
- _buildArtifacts = _context4.sent;
10005
- _context4.next = 8;
10048
+ _buildArtifacts = _context3.sent;
10049
+ _context3.next = 8;
10006
10050
  return upload(_buildArtifacts);
10007
10051
  case 8:
10008
- _context4.next = 18;
10052
+ _context3.next = 18;
10009
10053
  break;
10010
10054
  case 10:
10011
10055
  if (!outputOptions.file) {
10012
- _context4.next = 15;
10056
+ _context3.next = 15;
10013
10057
  break;
10014
10058
  }
10015
- _context4.next = 13;
10059
+ _context3.next = 13;
10016
10060
  return upload([outputOptions.file]);
10017
10061
  case 13:
10018
- _context4.next = 18;
10062
+ _context3.next = 18;
10019
10063
  break;
10020
10064
  case 15:
10021
10065
  _buildArtifacts2 = Object.keys(bundle).map(function (asset) {
10022
10066
  return path.join(path.resolve(), asset);
10023
10067
  });
10024
- _context4.next = 18;
10068
+ _context3.next = 18;
10025
10069
  return upload(_buildArtifacts2);
10026
10070
  case 18:
10027
- _context4.prev = 18;
10071
+ _context3.prev = 18;
10028
10072
  freeGlobalDependencyOnDebugIdSourcemapArtifacts();
10029
- return _context4.finish(18);
10073
+ return _context3.finish(18);
10030
10074
  case 21:
10031
10075
  case "end":
10032
- return _context4.stop();
10076
+ return _context3.stop();
10033
10077
  }
10034
- }, _callee4, null, [[0,, 18, 21]]);
10078
+ }, _callee3, null, [[0,, 18, 21]]);
10035
10079
  }))();
10036
10080
  }
10037
10081
  };
@@ -10039,26 +10083,26 @@ function createRollupDebugIdUploadHooks(upload, _logger, createDependencyOnBuild
10039
10083
  function createComponentNameAnnotateHooks(ignoredComponents) {
10040
10084
  return {
10041
10085
  transform: function transform(code, id) {
10042
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
10086
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
10043
10087
  var idWithoutQueryAndHash, parserPlugins, _result$code, result;
10044
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
10045
- while (1) switch (_context5.prev = _context5.next) {
10088
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
10089
+ while (1) switch (_context4.prev = _context4.next) {
10046
10090
  case 0:
10047
10091
  // id may contain query and hash which will trip up our file extension logic below
10048
10092
  idWithoutQueryAndHash = stripQueryAndHashFromPath(id);
10049
10093
  if (!idWithoutQueryAndHash.match(/\\node_modules\\|\/node_modules\//)) {
10050
- _context5.next = 3;
10094
+ _context4.next = 3;
10051
10095
  break;
10052
10096
  }
10053
- return _context5.abrupt("return", null);
10097
+ return _context4.abrupt("return", null);
10054
10098
  case 3:
10055
10099
  if ([".jsx", ".tsx"].some(function (ending) {
10056
10100
  return idWithoutQueryAndHash.endsWith(ending);
10057
10101
  })) {
10058
- _context5.next = 5;
10102
+ _context4.next = 5;
10059
10103
  break;
10060
10104
  }
10061
- return _context5.abrupt("return", null);
10105
+ return _context4.abrupt("return", null);
10062
10106
  case 5:
10063
10107
  parserPlugins = [];
10064
10108
  if (idWithoutQueryAndHash.endsWith(".jsx")) {
@@ -10066,8 +10110,8 @@ function createComponentNameAnnotateHooks(ignoredComponents) {
10066
10110
  } else if (idWithoutQueryAndHash.endsWith(".tsx")) {
10067
10111
  parserPlugins.push("jsx", "typescript");
10068
10112
  }
10069
- _context5.prev = 7;
10070
- _context5.next = 10;
10113
+ _context4.prev = 7;
10114
+ _context4.next = 10;
10071
10115
  return transformAsync(code, {
10072
10116
  plugins: [[componentNameAnnotatePlugin, {
10073
10117
  ignoredComponents: ignoredComponents
@@ -10084,24 +10128,24 @@ function createComponentNameAnnotateHooks(ignoredComponents) {
10084
10128
  sourceMaps: true
10085
10129
  });
10086
10130
  case 10:
10087
- result = _context5.sent;
10088
- return _context5.abrupt("return", {
10131
+ result = _context4.sent;
10132
+ return _context4.abrupt("return", {
10089
10133
  code: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : code,
10090
10134
  map: result === null || result === void 0 ? void 0 : result.map
10091
10135
  });
10092
10136
  case 14:
10093
- _context5.prev = 14;
10094
- _context5.t0 = _context5["catch"](7);
10095
- logger.error("Failed to apply react annotate plugin", _context5.t0);
10137
+ _context4.prev = 14;
10138
+ _context4.t0 = _context4["catch"](7);
10139
+ logger.error("Failed to apply react annotate plugin", _context4.t0);
10096
10140
  case 17:
10097
- return _context5.abrupt("return", {
10141
+ return _context4.abrupt("return", {
10098
10142
  code: code
10099
10143
  });
10100
10144
  case 18:
10101
10145
  case "end":
10102
- return _context5.stop();
10146
+ return _context4.stop();
10103
10147
  }
10104
- }, _callee5, null, [[7, 14]]);
10148
+ }, _callee4, null, [[7, 14]]);
10105
10149
  }))();
10106
10150
  }
10107
10151
  };