@sentry/craft 2.32.0 → 2.33.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.
Files changed (2) hide show
  1. package/dist/craft +115 -69
  2. package/package.json +2 -2
package/dist/craft CHANGED
@@ -28243,7 +28243,7 @@ var init_esm6 = __esm({
28243
28243
  }
28244
28244
  });
28245
28245
 
28246
- // node_modules/.pnpm/brace-expansion@5.0.9/node_modules/brace-expansion/dist/esm/index.js
28246
+ // node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/esm/index.js
28247
28247
  function numeric(str2) {
28248
28248
  return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0);
28249
28249
  }
@@ -28253,36 +28253,44 @@ function escapeBraces(str2) {
28253
28253
  function unescapeBraces(str2) {
28254
28254
  return str2.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
28255
28255
  }
28256
- function parseCommaParts(str2) {
28257
- if (!str2) {
28258
- return [""];
28256
+ function pushAll(target, items) {
28257
+ for (let i5 = 0; i5 < items.length; i5++) {
28258
+ target.push(items[i5]);
28259
28259
  }
28260
+ }
28261
+ function parseCommaParts(str2) {
28260
28262
  const parts = [];
28261
- const m6 = balanced("{", "}", str2);
28262
- if (!m6) {
28263
- return str2.split(",");
28264
- }
28265
- const { pre, body, post } = m6;
28266
- const p6 = pre.split(",");
28267
- p6[p6.length - 1] += "{" + body + "}";
28268
- const postParts = parseCommaParts(post);
28269
- if (post.length) {
28270
- ;
28271
- p6[p6.length - 1] += postParts.shift();
28272
- p6.push.apply(p6, postParts);
28273
- }
28274
- parts.push.apply(parts, p6);
28275
- return parts;
28263
+ let carry = "";
28264
+ for (; ; ) {
28265
+ const m6 = balanced("{", "}", str2);
28266
+ if (!m6) {
28267
+ const tail = str2.split(",");
28268
+ tail[0] = carry + tail[0];
28269
+ pushAll(parts, tail);
28270
+ return parts;
28271
+ }
28272
+ const { pre, body, post } = m6;
28273
+ const p6 = pre.split(",");
28274
+ p6[0] = carry + p6[0];
28275
+ p6[p6.length - 1] += "{" + body + "}";
28276
+ if (!post.length) {
28277
+ pushAll(parts, p6);
28278
+ return parts;
28279
+ }
28280
+ carry = p6.pop();
28281
+ pushAll(parts, p6);
28282
+ str2 = post;
28283
+ }
28276
28284
  }
28277
28285
  function expand(str2, options = {}) {
28278
28286
  if (!str2) {
28279
28287
  return [];
28280
28288
  }
28281
- const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options;
28289
+ const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH, maxRewrites = EXPANSION_MAX_REWRITES } = options;
28282
28290
  if (str2.slice(0, 2) === "{}") {
28283
28291
  str2 = "\\{\\}" + str2.slice(2);
28284
28292
  }
28285
- return expand_(escapeBraces(str2), max, maxLength, true).map(unescapeBraces);
28293
+ return expand_(escapeBraces(str2), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
28286
28294
  }
28287
28295
  function embrace(str2) {
28288
28296
  return "{" + str2 + "}";
@@ -28360,8 +28368,12 @@ function expandSequence(body, isAlphaSequence, max, maxLength) {
28360
28368
  }
28361
28369
  return N4;
28362
28370
  }
28363
- function expand_(str2, max, maxLength, isTop) {
28371
+ function expand_(str2, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
28372
+ if (depth > maxDepth) {
28373
+ return [str2];
28374
+ }
28364
28375
  let acc = [""];
28376
+ let rewrites = 0;
28365
28377
  let dropEmpties = false;
28366
28378
  let firstGroup = true;
28367
28379
  for (; ; ) {
@@ -28383,7 +28395,8 @@ function expand_(str2, max, maxLength, isTop) {
28383
28395
  const isSequence = isNumericSequence || isAlphaSequence;
28384
28396
  const isOptions = m6.body.indexOf(",") >= 0;
28385
28397
  if (!isSequence && !isOptions) {
28386
- if (m6.post.match(/,(?!,).*\}/)) {
28398
+ if (rewrites < maxRewrites && m6.post.match(/,(?!,).*\}/)) {
28399
+ rewrites++;
28387
28400
  str2 = m6.pre + "{" + m6.body + escClose + m6.post;
28388
28401
  isTop = true;
28389
28402
  continue;
@@ -28400,7 +28413,7 @@ function expand_(str2, max, maxLength, isTop) {
28400
28413
  } else {
28401
28414
  let n4 = parseCommaParts(m6.body);
28402
28415
  if (n4.length === 1 && n4[0] !== void 0) {
28403
- n4 = expand_(n4[0], max, maxLength, false).map(embrace);
28416
+ n4 = expand_(n4[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
28404
28417
  if (n4.length === 1) {
28405
28418
  acc = combine(acc, pre + n4[0], [""], max, maxLength, dropEmpties && !m6.post.length);
28406
28419
  if (!m6.post.length)
@@ -28418,7 +28431,7 @@ function expand_(str2, max, maxLength, isTop) {
28418
28431
  values = [];
28419
28432
  let valuesLength = 0;
28420
28433
  outer: for (let j7 = 0; j7 < n4.length; j7++) {
28421
- const expanded = expand_(n4[j7], max, maxLength, false);
28434
+ const expanded = expand_(n4[j7], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
28422
28435
  for (let k7 = 0; k7 < expanded.length; k7++) {
28423
28436
  const v11 = expanded[k7];
28424
28437
  if (dropsEmpties && !v11)
@@ -28438,9 +28451,9 @@ function expand_(str2, max, maxLength, isTop) {
28438
28451
  }
28439
28452
  return acc;
28440
28453
  }
28441
- var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX, EXPANSION_MAX_LENGTH;
28454
+ var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX, EXPANSION_MAX_LENGTH, EXPANSION_MAX_DEPTH, EXPANSION_MAX_REWRITES;
28442
28455
  var init_esm7 = __esm({
28443
- "node_modules/.pnpm/brace-expansion@5.0.9/node_modules/brace-expansion/dist/esm/index.js"() {
28456
+ "node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/esm/index.js"() {
28444
28457
  init_import_meta_url();
28445
28458
  init_esm6();
28446
28459
  escSlash = "\0SLASH" + Math.random() + "\0";
@@ -28460,6 +28473,8 @@ var init_esm7 = __esm({
28460
28473
  periodPattern = /\\\./g;
28461
28474
  EXPANSION_MAX = 1e5;
28462
28475
  EXPANSION_MAX_LENGTH = 4e6;
28476
+ EXPANSION_MAX_DEPTH = 1e3;
28477
+ EXPANSION_MAX_REWRITES = 1e3;
28463
28478
  }
28464
28479
  });
28465
28480
 
@@ -126966,8 +126981,7 @@ var init_github3 = __esm({
126966
126981
  const typedConfig = this.config;
126967
126982
  const owner = typedConfig.owner || githubRepo.owner;
126968
126983
  const repo = typedConfig.repo || githubRepo.repo;
126969
- const configChangelog = getConfiguration().changelog;
126970
- const changelog = typeof configChangelog === "string" ? configChangelog : configChangelog?.filePath || DEFAULT_CHANGELOG_PATH;
126984
+ const changelog = getChangelogConfig().filePath;
126971
126985
  this.githubConfig = {
126972
126986
  owner,
126973
126987
  repo,
@@ -127453,9 +127467,8 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
127453
127467
  await this.updateFloatingTags(version2, revision);
127454
127468
  return;
127455
127469
  }
127456
- const config3 = getConfiguration();
127457
127470
  let changelog;
127458
- if (config3.changelogPolicy !== "none" /* None */) {
127471
+ if (getConfiguration().changelogPolicy !== "none" /* None */) {
127459
127472
  changelog = await this.getChangelog(version2);
127460
127473
  }
127461
127474
  const artifacts = await this.getArtifactsForRevision(revision);
@@ -165589,13 +165602,13 @@ var require_commonjs = __commonJS({
165589
165602
  }
165590
165603
  });
165591
165604
 
165592
- // node_modules/.pnpm/brace-expansion@5.0.9/node_modules/brace-expansion/dist/commonjs/index.js
165605
+ // node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/commonjs/index.js
165593
165606
  var require_commonjs2 = __commonJS({
165594
- "node_modules/.pnpm/brace-expansion@5.0.9/node_modules/brace-expansion/dist/commonjs/index.js"(exports2) {
165607
+ "node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/commonjs/index.js"(exports2) {
165595
165608
  "use strict";
165596
165609
  init_import_meta_url();
165597
165610
  Object.defineProperty(exports2, "__esModule", { value: true });
165598
- exports2.EXPANSION_MAX_LENGTH = exports2.EXPANSION_MAX = void 0;
165611
+ exports2.EXPANSION_MAX_REWRITES = exports2.EXPANSION_MAX_DEPTH = exports2.EXPANSION_MAX_LENGTH = exports2.EXPANSION_MAX = void 0;
165599
165612
  exports2.expand = expand3;
165600
165613
  var balanced_match_1 = require_commonjs();
165601
165614
  var escSlash2 = "\0SLASH" + Math.random() + "\0";
@@ -165615,6 +165628,8 @@ var require_commonjs2 = __commonJS({
165615
165628
  var periodPattern2 = /\\\./g;
165616
165629
  exports2.EXPANSION_MAX = 1e5;
165617
165630
  exports2.EXPANSION_MAX_LENGTH = 4e6;
165631
+ exports2.EXPANSION_MAX_DEPTH = 1e3;
165632
+ exports2.EXPANSION_MAX_REWRITES = 1e3;
165618
165633
  function numeric2(str2) {
165619
165634
  return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0);
165620
165635
  }
@@ -165624,36 +165639,44 @@ var require_commonjs2 = __commonJS({
165624
165639
  function unescapeBraces2(str2) {
165625
165640
  return str2.replace(escSlashPattern2, "\\").replace(escOpenPattern2, "{").replace(escClosePattern2, "}").replace(escCommaPattern2, ",").replace(escPeriodPattern2, ".");
165626
165641
  }
165627
- function parseCommaParts2(str2) {
165628
- if (!str2) {
165629
- return [""];
165642
+ function pushAll2(target, items) {
165643
+ for (let i5 = 0; i5 < items.length; i5++) {
165644
+ target.push(items[i5]);
165630
165645
  }
165646
+ }
165647
+ function parseCommaParts2(str2) {
165631
165648
  const parts = [];
165632
- const m6 = (0, balanced_match_1.balanced)("{", "}", str2);
165633
- if (!m6) {
165634
- return str2.split(",");
165635
- }
165636
- const { pre, body, post } = m6;
165637
- const p6 = pre.split(",");
165638
- p6[p6.length - 1] += "{" + body + "}";
165639
- const postParts = parseCommaParts2(post);
165640
- if (post.length) {
165641
- ;
165642
- p6[p6.length - 1] += postParts.shift();
165643
- p6.push.apply(p6, postParts);
165649
+ let carry = "";
165650
+ for (; ; ) {
165651
+ const m6 = (0, balanced_match_1.balanced)("{", "}", str2);
165652
+ if (!m6) {
165653
+ const tail = str2.split(",");
165654
+ tail[0] = carry + tail[0];
165655
+ pushAll2(parts, tail);
165656
+ return parts;
165657
+ }
165658
+ const { pre, body, post } = m6;
165659
+ const p6 = pre.split(",");
165660
+ p6[0] = carry + p6[0];
165661
+ p6[p6.length - 1] += "{" + body + "}";
165662
+ if (!post.length) {
165663
+ pushAll2(parts, p6);
165664
+ return parts;
165665
+ }
165666
+ carry = p6.pop();
165667
+ pushAll2(parts, p6);
165668
+ str2 = post;
165644
165669
  }
165645
- parts.push.apply(parts, p6);
165646
- return parts;
165647
165670
  }
165648
165671
  function expand3(str2, options = {}) {
165649
165672
  if (!str2) {
165650
165673
  return [];
165651
165674
  }
165652
- const { max = exports2.EXPANSION_MAX, maxLength = exports2.EXPANSION_MAX_LENGTH } = options;
165675
+ const { max = exports2.EXPANSION_MAX, maxLength = exports2.EXPANSION_MAX_LENGTH, maxDepth = exports2.EXPANSION_MAX_DEPTH, maxRewrites = exports2.EXPANSION_MAX_REWRITES } = options;
165653
165676
  if (str2.slice(0, 2) === "{}") {
165654
165677
  str2 = "\\{\\}" + str2.slice(2);
165655
165678
  }
165656
- return expand_2(escapeBraces2(str2), max, maxLength, true).map(unescapeBraces2);
165679
+ return expand_2(escapeBraces2(str2), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces2);
165657
165680
  }
165658
165681
  function embrace2(str2) {
165659
165682
  return "{" + str2 + "}";
@@ -165731,8 +165754,12 @@ var require_commonjs2 = __commonJS({
165731
165754
  }
165732
165755
  return N4;
165733
165756
  }
165734
- function expand_2(str2, max, maxLength, isTop) {
165757
+ function expand_2(str2, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
165758
+ if (depth > maxDepth) {
165759
+ return [str2];
165760
+ }
165735
165761
  let acc = [""];
165762
+ let rewrites = 0;
165736
165763
  let dropEmpties = false;
165737
165764
  let firstGroup = true;
165738
165765
  for (; ; ) {
@@ -165754,7 +165781,8 @@ var require_commonjs2 = __commonJS({
165754
165781
  const isSequence = isNumericSequence || isAlphaSequence;
165755
165782
  const isOptions = m6.body.indexOf(",") >= 0;
165756
165783
  if (!isSequence && !isOptions) {
165757
- if (m6.post.match(/,(?!,).*\}/)) {
165784
+ if (rewrites < maxRewrites && m6.post.match(/,(?!,).*\}/)) {
165785
+ rewrites++;
165758
165786
  str2 = m6.pre + "{" + m6.body + escClose2 + m6.post;
165759
165787
  isTop = true;
165760
165788
  continue;
@@ -165771,7 +165799,7 @@ var require_commonjs2 = __commonJS({
165771
165799
  } else {
165772
165800
  let n4 = parseCommaParts2(m6.body);
165773
165801
  if (n4.length === 1 && n4[0] !== void 0) {
165774
- n4 = expand_2(n4[0], max, maxLength, false).map(embrace2);
165802
+ n4 = expand_2(n4[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace2);
165775
165803
  if (n4.length === 1) {
165776
165804
  acc = combine2(acc, pre + n4[0], [""], max, maxLength, dropEmpties && !m6.post.length);
165777
165805
  if (!m6.post.length)
@@ -165789,7 +165817,7 @@ var require_commonjs2 = __commonJS({
165789
165817
  values = [];
165790
165818
  let valuesLength = 0;
165791
165819
  outer: for (let j7 = 0; j7 < n4.length; j7++) {
165792
- const expanded = expand_2(n4[j7], max, maxLength, false);
165820
+ const expanded = expand_2(n4[j7], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
165793
165821
  for (let k7 = 0; k7 < expanded.length; k7++) {
165794
165822
  const v11 = expanded[k7];
165795
165823
  if (dropsEmpties && !v11)
@@ -233193,9 +233221,31 @@ async function getStatusProviderFromConfig() {
233193
233221
  }
233194
233222
  }
233195
233223
  }
233224
+ function getDefaultChangelogFilePath() {
233225
+ const workspace = getActiveWorkspace();
233226
+ if (!workspace) {
233227
+ return DEFAULT_CHANGELOG_FILE_PATH;
233228
+ }
233229
+ if (!isSafeWorkspacePath(workspace)) {
233230
+ throw new ConfigurationError(`Invalid workspace path: "${workspace}"`);
233231
+ }
233232
+ const root = getConfigFileDir() || process.cwd();
233233
+ const directory = import_path24.default.resolve(root, workspace);
233234
+ if (!(0, import_fs24.existsSync)(directory) || !(0, import_fs24.lstatSync)(directory).isDirectory()) {
233235
+ return DEFAULT_CHANGELOG_FILE_PATH;
233236
+ }
233237
+ const realRoot = (0, import_fs24.realpathSync)(root);
233238
+ const realDirectory = (0, import_fs24.realpathSync)(directory);
233239
+ if (!realDirectory.startsWith(`${realRoot}${import_path24.default.sep}`)) {
233240
+ throw new ConfigurationError(
233241
+ `Workspace directory escapes the repository: "${workspace}"`
233242
+ );
233243
+ }
233244
+ return import_path24.default.posix.join(workspace, DEFAULT_CHANGELOG_FILE_PATH);
233245
+ }
233196
233246
  function getChangelogConfig() {
233197
233247
  const config3 = getConfiguration();
233198
- let filePath = DEFAULT_CHANGELOG_FILE_PATH;
233248
+ let filePath;
233199
233249
  let policy = "none" /* None */;
233200
233250
  let scopeGrouping = true;
233201
233251
  let includePaths = [];
@@ -233224,7 +233274,7 @@ function getChangelogConfig() {
233224
233274
  }
233225
233275
  }
233226
233276
  return {
233227
- filePath,
233277
+ filePath: filePath ?? getDefaultChangelogFilePath(),
233228
233278
  policy,
233229
233279
  scopeGrouping,
233230
233280
  includePaths
@@ -233305,7 +233355,7 @@ var require_package7 = __commonJS({
233305
233355
  "package.json"(exports2, module2) {
233306
233356
  module2.exports = {
233307
233357
  name: "@sentry/craft",
233308
- version: "2.32.0",
233358
+ version: "2.33.1",
233309
233359
  description: "The universal sentry workflow CLI",
233310
233360
  main: "dist/craft",
233311
233361
  repository: "https://github.com/getsentry/craft",
@@ -233410,7 +233460,7 @@ var require_package7 = __commonJS({
233410
233460
  overrides: {
233411
233461
  "fast-xml-parser": "^5.8.0",
233412
233462
  minimatch: "^10.2.6",
233413
- "brace-expansion": "^5.0.9",
233463
+ "brace-expansion": "^5.0.12",
233414
233464
  "ajv@<6.14.0": "^6.14.0",
233415
233465
  postcss: "^8.5.18",
233416
233466
  rollup: "^4.59.0",
@@ -233497,7 +233547,7 @@ function getPackage() {
233497
233547
  }
233498
233548
  function getPackageVersion() {
233499
233549
  const { version: version2 } = getPackage();
233500
- const buildInfo = "177c278ebf946da378659e3b5dfe7d5e4a4d383a";
233550
+ const buildInfo = "7fe142107c12ea31eaaba10e4985674490bf808b";
233501
233551
  return buildInfo ? `${version2} (${buildInfo})` : version2;
233502
233552
  }
233503
233553
  function semVerToString(s6) {
@@ -242936,8 +242986,7 @@ async function prepareMain(argv) {
242936
242986
  try {
242937
242987
  await createReleaseBranch(git, rev, branchName);
242938
242988
  const oldVersion = await getLatestTag(git, getGitTagPrefix());
242939
- const changelogPath = typeof config3.changelog === "string" ? config3.changelog : config3.changelog?.filePath;
242940
- const changelogPolicy = typeof config3.changelog === "object" && config3.changelog?.policy ? config3.changelog.policy : config3.changelogPolicy;
242989
+ const { filePath: changelogPath, policy: changelogPolicy } = getChangelogConfig();
242941
242990
  const changelogBody = await prepareChangelog(
242942
242991
  git,
242943
242992
  oldVersion,
@@ -242946,10 +242995,7 @@ async function prepareMain(argv) {
242946
242995
  changelogPath
242947
242996
  );
242948
242997
  if (changelogBody) {
242949
- const resolvedChangelogPath = (0, import_path31.relative)(
242950
- "",
242951
- changelogPath || DEFAULT_CHANGELOG_PATH
242952
- );
242998
+ const resolvedChangelogPath = (0, import_path31.relative)("", changelogPath);
242953
242999
  await git.add(resolvedChangelogPath);
242954
243000
  }
242955
243001
  const rootDir = getConfigFileDir() || process.cwd();
@@ -242971,7 +243017,7 @@ async function prepareMain(argv) {
242971
243017
  const isCalVer = argv.newVersion === "calver" || getVersioningPolicy() === "calver" /* CalVer */;
242972
243018
  const issueChangelog = isCalVer ? disableChangelogMentions(changelogBody) : changelogBody;
242973
243019
  writeGitHubActionsFile("changelog", issueChangelog);
242974
- const resolvedChangelogPath = changelogPath || DEFAULT_CHANGELOG_PATH;
243020
+ const resolvedChangelogPath = changelogPath;
242975
243021
  const lineRange = await getChangelogLineRange(
242976
243022
  git,
242977
243023
  resolvedChangelogPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/craft",
3
- "version": "2.32.0",
3
+ "version": "2.33.1",
4
4
  "description": "The universal sentry workflow CLI",
5
5
  "main": "dist/craft",
6
6
  "repository": "https://github.com/getsentry/craft",
@@ -105,7 +105,7 @@
105
105
  "overrides": {
106
106
  "fast-xml-parser": "^5.8.0",
107
107
  "minimatch": "^10.2.6",
108
- "brace-expansion": "^5.0.9",
108
+ "brace-expansion": "^5.0.12",
109
109
  "ajv@<6.14.0": "^6.14.0",
110
110
  "postcss": "^8.5.18",
111
111
  "rollup": "^4.59.0",