semantic-release-lerna 2.17.0 → 2.17.2

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/index.js +95 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22267,7 +22267,7 @@ import process11 from "node:process";
22267
22267
  import fs4 from "node:fs";
22268
22268
  import nodePath from "node:path";
22269
22269
  import { Readable as Readable4 } from "node:stream";
22270
- var import_fast_glob2 = __toESM(require_out4(), 1);
22270
+ var import_fast_glob3 = __toESM(require_out4(), 1);
22271
22271
 
22272
22272
  // node_modules/globby/node_modules/unicorn-magic/node.js
22273
22273
  import { promisify as promisify3 } from "node:util";
@@ -22280,7 +22280,7 @@ function toPath2(urlOrPath) {
22280
22280
  var TEN_MEGABYTES_IN_BYTES2 = 10 * 1024 * 1024;
22281
22281
 
22282
22282
  // node_modules/globby/ignore.js
22283
- var import_fast_glob = __toESM(require_out4(), 1);
22283
+ var import_fast_glob2 = __toESM(require_out4(), 1);
22284
22284
  var import_ignore = __toESM(require_ignore(), 1);
22285
22285
  import process10 from "node:process";
22286
22286
  import fs3 from "node:fs";
@@ -22306,11 +22306,55 @@ function slash(path26) {
22306
22306
  }
22307
22307
 
22308
22308
  // node_modules/globby/utilities.js
22309
+ var import_fast_glob = __toESM(require_out4(), 1);
22309
22310
  import fs2 from "node:fs";
22310
22311
  import path8 from "node:path";
22311
22312
  import { promisify as promisify4 } from "node:util";
22312
22313
  var isNegativePattern = (pattern) => pattern[0] === "!";
22313
- var normalizeAbsolutePatternToRelative = (pattern) => pattern.startsWith("/") ? pattern.slice(1) : pattern;
22314
+ var normalizeAbsolutePatternToRelative = (pattern) => {
22315
+ if (!pattern.startsWith("/")) {
22316
+ return pattern;
22317
+ }
22318
+ const inner = pattern.slice(1);
22319
+ const firstSlashIndex = inner.indexOf("/");
22320
+ const firstSegment = firstSlashIndex > 0 ? inner.slice(0, firstSlashIndex) : inner;
22321
+ if (firstSlashIndex > 0 && !import_fast_glob.default.isDynamicPattern(firstSegment)) {
22322
+ return pattern;
22323
+ }
22324
+ return inner;
22325
+ };
22326
+ var absolutePrefixesMatch = (positivePrefix, negativePrefix) => negativePrefix === positivePrefix;
22327
+ var getStaticAbsolutePathPrefix = (pattern) => {
22328
+ if (!path8.isAbsolute(pattern)) {
22329
+ return void 0;
22330
+ }
22331
+ const staticSegments = [];
22332
+ for (const segment of pattern.split("/")) {
22333
+ if (!segment) {
22334
+ continue;
22335
+ }
22336
+ if (import_fast_glob.default.isDynamicPattern(segment)) {
22337
+ break;
22338
+ }
22339
+ staticSegments.push(segment);
22340
+ }
22341
+ return staticSegments.length === 0 ? void 0 : `/${staticSegments.join("/")}`;
22342
+ };
22343
+ var normalizeNegativePattern = (pattern, positiveAbsolutePathPrefixes = [], hasRelativePositivePattern = false) => {
22344
+ if (!pattern.startsWith("/")) {
22345
+ return pattern;
22346
+ }
22347
+ const normalizedPattern = normalizeAbsolutePatternToRelative(pattern);
22348
+ if (normalizedPattern !== pattern) {
22349
+ return normalizedPattern;
22350
+ }
22351
+ if (hasRelativePositivePattern) {
22352
+ return pattern.slice(1);
22353
+ }
22354
+ const negativeAbsolutePathPrefix = getStaticAbsolutePathPrefix(pattern);
22355
+ const preserveAsAbsolutePattern = negativeAbsolutePathPrefix !== void 0 && positiveAbsolutePathPrefixes.some((positiveAbsolutePathPrefix) => absolutePrefixesMatch(positiveAbsolutePathPrefix, negativeAbsolutePathPrefix));
22356
+ return preserveAsAbsolutePattern ? pattern : pattern.slice(1);
22357
+ };
22314
22358
  var bindFsMethod = (object, methodName) => {
22315
22359
  const method = object?.[methodName];
22316
22360
  return typeof method === "function" ? method.bind(object) : void 0;
@@ -22636,7 +22680,7 @@ var normalizeOptions2 = (options = {}) => {
22636
22680
  };
22637
22681
  var collectIgnoreFileArtifactsAsync = async (patterns, options, includeParentIgnoreFiles) => {
22638
22682
  const normalizedOptions = normalizeOptions2(options);
22639
- const childPaths = await globIgnoreFiles(import_fast_glob.default, patterns, normalizedOptions);
22683
+ const childPaths = await globIgnoreFiles(import_fast_glob2.default, patterns, normalizedOptions);
22640
22684
  const gitRoot = includeParentIgnoreFiles ? await findGitRoot(normalizedOptions.cwd, normalizedOptions.fs) : void 0;
22641
22685
  const allPaths = combineIgnoreFilePaths(gitRoot, normalizedOptions, childPaths);
22642
22686
  const readFileMethod = getReadFileMethod(normalizedOptions.fs);
@@ -22645,7 +22689,7 @@ var collectIgnoreFileArtifactsAsync = async (patterns, options, includeParentIgn
22645
22689
  };
22646
22690
  var collectIgnoreFileArtifactsSync = (patterns, options, includeParentIgnoreFiles) => {
22647
22691
  const normalizedOptions = normalizeOptions2(options);
22648
- const childPaths = globIgnoreFiles(import_fast_glob.default.sync, patterns, normalizedOptions);
22692
+ const childPaths = globIgnoreFiles(import_fast_glob2.default.sync, patterns, normalizedOptions);
22649
22693
  const gitRoot = includeParentIgnoreFiles ? findGitRootSync(normalizedOptions.cwd, normalizedOptions.fs) : void 0;
22650
22694
  const allPaths = combineIgnoreFilePaths(gitRoot, normalizedOptions, childPaths);
22651
22695
  const readFileSyncMethod = getReadFileSyncMethod(normalizedOptions.fs);
@@ -22855,7 +22899,23 @@ var convertNegativePatterns = (patterns, options) => {
22855
22899
  }
22856
22900
  patterns = ["**/*", ...patterns];
22857
22901
  }
22858
- patterns = patterns.map((pattern) => isNegativePattern(pattern) ? `!${normalizeAbsolutePatternToRelative(pattern.slice(1))}` : pattern);
22902
+ const positiveAbsolutePathPrefixes = [];
22903
+ let hasRelativePositivePattern = false;
22904
+ const normalizedPatterns = [];
22905
+ for (const pattern of patterns) {
22906
+ if (isNegativePattern(pattern)) {
22907
+ normalizedPatterns.push(`!${normalizeNegativePattern(pattern.slice(1), positiveAbsolutePathPrefixes, hasRelativePositivePattern)}`);
22908
+ continue;
22909
+ }
22910
+ normalizedPatterns.push(pattern);
22911
+ const staticAbsolutePathPrefix = getStaticAbsolutePathPrefix(pattern);
22912
+ if (staticAbsolutePathPrefix === void 0) {
22913
+ hasRelativePositivePattern = true;
22914
+ continue;
22915
+ }
22916
+ positiveAbsolutePathPrefixes.push(staticAbsolutePathPrefix);
22917
+ }
22918
+ patterns = normalizedPatterns;
22859
22919
  const tasks = [];
22860
22920
  while (patterns.length > 0) {
22861
22921
  const index = patterns.findIndex((pattern) => isNegativePattern(pattern));
@@ -22938,29 +22998,29 @@ var generateTasksSync = (patterns, options) => {
22938
22998
  var globby = normalizeArguments(async (patterns, options) => {
22939
22999
  const { options: modifiedOptions, filter: filter2 } = await applyIgnoreFilesAndGetFilter(options);
22940
23000
  const tasks = await generateTasks(patterns, modifiedOptions);
22941
- const results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options)));
23001
+ const results = await Promise.all(tasks.map((task) => (0, import_fast_glob3.default)(task.patterns, task.options)));
22942
23002
  return unionFastGlobResults(results, filter2);
22943
23003
  });
22944
23004
  var globbySync = normalizeArgumentsSync((patterns, options) => {
22945
23005
  const { options: modifiedOptions, filter: filter2 } = applyIgnoreFilesAndGetFilterSync(options);
22946
23006
  const tasks = generateTasksSync(patterns, modifiedOptions);
22947
- const results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options));
23007
+ const results = tasks.map((task) => import_fast_glob3.default.sync(task.patterns, task.options));
22948
23008
  return unionFastGlobResults(results, filter2);
22949
23009
  });
22950
23010
  var globbyStream = normalizeArgumentsSync((patterns, options) => {
22951
23011
  const { options: modifiedOptions, filter: filter2 } = applyIgnoreFilesAndGetFilterSync(options);
22952
23012
  const tasks = generateTasksSync(patterns, modifiedOptions);
22953
- const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options));
23013
+ const streams = tasks.map((task) => import_fast_glob3.default.stream(task.patterns, task.options));
22954
23014
  if (streams.length === 0) {
22955
23015
  return Readable4.from([]);
22956
23016
  }
22957
23017
  const stream = mergeStreams(streams).filter((fastGlobResult) => filter2(fastGlobResult));
22958
23018
  return stream;
22959
23019
  });
22960
- var isDynamicPattern = normalizeArgumentsSync((patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)));
23020
+ var isDynamicPattern = normalizeArgumentsSync((patterns, options) => patterns.some((pattern) => import_fast_glob3.default.isDynamicPattern(pattern, options)));
22961
23021
  var generateGlobTasks = normalizeArguments(generateTasks);
22962
23022
  var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
22963
- var { convertPathToPattern } = import_fast_glob2.default;
23023
+ var { convertPathToPattern } = import_fast_glob3.default;
22964
23024
 
22965
23025
  // node_modules/js-yaml/dist/js-yaml.mjs
22966
23026
  function isNothing(subject) {
@@ -25737,7 +25797,7 @@ function hasTags(opts, logger) {
25737
25797
  // src/utils/make-diff-predicate.js
25738
25798
  import path11 from "node:path/posix";
25739
25799
 
25740
- // node_modules/@isaacs/balanced-match/dist/esm/index.js
25800
+ // node_modules/minimatch/node_modules/balanced-match/dist/esm/index.js
25741
25801
  var balanced = (a2, b, str2) => {
25742
25802
  const ma = a2 instanceof RegExp ? maybeMatch(a2, str2) : a2;
25743
25803
  const mb = b instanceof RegExp ? maybeMatch(b, str2) : b;
@@ -25790,7 +25850,7 @@ var range = (a2, b, str2) => {
25790
25850
  return result;
25791
25851
  };
25792
25852
 
25793
- // node_modules/@isaacs/brace-expansion/dist/esm/index.js
25853
+ // node_modules/minimatch/node_modules/brace-expansion/dist/esm/index.js
25794
25854
  var escSlash = "\0SLASH" + Math.random() + "\0";
25795
25855
  var escOpen = "\0OPEN" + Math.random() + "\0";
25796
25856
  var escClose = "\0CLOSE" + Math.random() + "\0";
@@ -26513,6 +26573,7 @@ var AST = class _AST {
26513
26573
  let escaping = false;
26514
26574
  let re = "";
26515
26575
  let uflag = false;
26576
+ let inStar = false;
26516
26577
  for (let i2 = 0; i2 < glob.length; i2++) {
26517
26578
  const c3 = glob.charAt(i2);
26518
26579
  if (escaping) {
@@ -26520,6 +26581,16 @@ var AST = class _AST {
26520
26581
  re += (reSpecials.has(c3) ? "\\" : "") + c3;
26521
26582
  continue;
26522
26583
  }
26584
+ if (c3 === "*") {
26585
+ if (inStar)
26586
+ continue;
26587
+ inStar = true;
26588
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
26589
+ hasMagic = true;
26590
+ continue;
26591
+ } else {
26592
+ inStar = false;
26593
+ }
26523
26594
  if (c3 === "\\") {
26524
26595
  if (i2 === glob.length - 1) {
26525
26596
  re += "\\\\";
@@ -26538,11 +26609,6 @@ var AST = class _AST {
26538
26609
  continue;
26539
26610
  }
26540
26611
  }
26541
- if (c3 === "*") {
26542
- re += noEmpty && glob === "*" ? starNoEmpty : star;
26543
- hasMagic = true;
26544
- continue;
26545
- }
26546
26612
  if (c3 === "?") {
26547
26613
  re += qmark;
26548
26614
  hasMagic = true;
@@ -26678,7 +26744,7 @@ var braceExpand = (pattern, options = {}) => {
26678
26744
  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
26679
26745
  return [pattern];
26680
26746
  }
26681
- return expand(pattern);
26747
+ return expand(pattern, { max: options.braceExpandMax });
26682
26748
  };
26683
26749
  minimatch.braceExpand = braceExpand;
26684
26750
  var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
@@ -26719,7 +26785,8 @@ var Minimatch = class {
26719
26785
  this.pattern = pattern;
26720
26786
  this.platform = options.platform || defaultPlatform;
26721
26787
  this.isWindows = this.platform === "win32";
26722
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
26788
+ const awe = "allowWindowsEscape";
26789
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
26723
26790
  if (this.windowsPathsNoEscape) {
26724
26791
  this.pattern = this.pattern.replace(/\\/g, "/");
26725
26792
  }
@@ -26776,7 +26843,10 @@ var Minimatch = class {
26776
26843
  const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
26777
26844
  const isDrive = /^[a-z]:/i.test(s[0]);
26778
26845
  if (isUNC) {
26779
- return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
26846
+ return [
26847
+ ...s.slice(0, 4),
26848
+ ...s.slice(4).map((ss) => this.parse(ss))
26849
+ ];
26780
26850
  } else if (isDrive) {
26781
26851
  return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
26782
26852
  }
@@ -27057,7 +27127,10 @@ var Minimatch = class {
27057
27127
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
27058
27128
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
27059
27129
  if (typeof fdi === "number" && typeof pdi === "number") {
27060
- const [fd, pd] = [file[fdi], pattern[pdi]];
27130
+ const [fd, pd] = [
27131
+ file[fdi],
27132
+ pattern[pdi]
27133
+ ];
27061
27134
  if (fd.toLowerCase() === pd.toLowerCase()) {
27062
27135
  pattern[pdi] = fd;
27063
27136
  if (pdi > fdi) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-release-lerna",
3
- "version": "2.17.0",
3
+ "version": "2.17.2",
4
4
  "description": "semantic-release plugin to publish lerna monorepo packages to npm",
5
5
  "keywords": [
6
6
  "npm",