semantic-release-lerna 2.10.0 → 2.11.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.
- package/dist/index.js +237 -119
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1263,6 +1263,7 @@ var require_re = __commonJS({
|
|
|
1263
1263
|
var re = exports.re = [];
|
|
1264
1264
|
var safeRe = exports.safeRe = [];
|
|
1265
1265
|
var src = exports.src = [];
|
|
1266
|
+
var safeSrc = exports.safeSrc = [];
|
|
1266
1267
|
var t = exports.t = {};
|
|
1267
1268
|
var R = 0;
|
|
1268
1269
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -1283,6 +1284,7 @@ var require_re = __commonJS({
|
|
|
1283
1284
|
debug2(name, index, value);
|
|
1284
1285
|
t[name] = index;
|
|
1285
1286
|
src[index] = value;
|
|
1287
|
+
safeSrc[index] = safe;
|
|
1286
1288
|
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
1287
1289
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
1288
1290
|
};
|
|
@@ -1379,7 +1381,7 @@ var require_semver = __commonJS({
|
|
|
1379
1381
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
1380
1382
|
var debug2 = require_debug();
|
|
1381
1383
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
1382
|
-
var { safeRe: re, t } = require_re();
|
|
1384
|
+
var { safeRe: re, safeSrc: src, t } = require_re();
|
|
1383
1385
|
var parseOptions = require_parse_options();
|
|
1384
1386
|
var { compareIdentifiers } = require_identifiers();
|
|
1385
1387
|
var SemVer = class _SemVer {
|
|
@@ -1519,6 +1521,18 @@ var require_semver = __commonJS({
|
|
|
1519
1521
|
// preminor will bump the version up to the next minor release, and immediately
|
|
1520
1522
|
// down to pre-release. premajor and prepatch work the same way.
|
|
1521
1523
|
inc(release, identifier, identifierBase) {
|
|
1524
|
+
if (release.startsWith("pre")) {
|
|
1525
|
+
if (!identifier && identifierBase === false) {
|
|
1526
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
1527
|
+
}
|
|
1528
|
+
if (identifier) {
|
|
1529
|
+
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
|
|
1530
|
+
const match2 = `-${identifier}`.match(r);
|
|
1531
|
+
if (!match2 || match2[1] !== identifier) {
|
|
1532
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1522
1536
|
switch (release) {
|
|
1523
1537
|
case "premajor":
|
|
1524
1538
|
this.prerelease.length = 0;
|
|
@@ -1546,6 +1560,12 @@ var require_semver = __commonJS({
|
|
|
1546
1560
|
}
|
|
1547
1561
|
this.inc("pre", identifier, identifierBase);
|
|
1548
1562
|
break;
|
|
1563
|
+
case "release":
|
|
1564
|
+
if (this.prerelease.length === 0) {
|
|
1565
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
1566
|
+
}
|
|
1567
|
+
this.prerelease.length = 0;
|
|
1568
|
+
break;
|
|
1549
1569
|
case "major":
|
|
1550
1570
|
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
1551
1571
|
this.major++;
|
|
@@ -1571,9 +1591,6 @@ var require_semver = __commonJS({
|
|
|
1571
1591
|
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
1572
1592
|
case "pre": {
|
|
1573
1593
|
const base = Number(identifierBase) ? 1 : 0;
|
|
1574
|
-
if (!identifier && identifierBase === false) {
|
|
1575
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
1576
|
-
}
|
|
1577
1594
|
if (this.prerelease.length === 0) {
|
|
1578
1595
|
this.prerelease = [base];
|
|
1579
1596
|
} else {
|
|
@@ -4694,7 +4711,7 @@ var require_pattern = __commonJS({
|
|
|
4694
4711
|
"node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
4695
4712
|
"use strict";
|
|
4696
4713
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4697
|
-
exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
4714
|
+
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
4698
4715
|
var path22 = __require("path");
|
|
4699
4716
|
var globParent = require_glob_parent();
|
|
4700
4717
|
var micromatch = require_micromatch();
|
|
@@ -4834,6 +4851,23 @@ var require_pattern = __commonJS({
|
|
|
4834
4851
|
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
4835
4852
|
}
|
|
4836
4853
|
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
4854
|
+
function partitionAbsoluteAndRelative(patterns) {
|
|
4855
|
+
const absolute = [];
|
|
4856
|
+
const relative = [];
|
|
4857
|
+
for (const pattern of patterns) {
|
|
4858
|
+
if (isAbsolute(pattern)) {
|
|
4859
|
+
absolute.push(pattern);
|
|
4860
|
+
} else {
|
|
4861
|
+
relative.push(pattern);
|
|
4862
|
+
}
|
|
4863
|
+
}
|
|
4864
|
+
return [absolute, relative];
|
|
4865
|
+
}
|
|
4866
|
+
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
4867
|
+
function isAbsolute(pattern) {
|
|
4868
|
+
return path22.isAbsolute(pattern);
|
|
4869
|
+
}
|
|
4870
|
+
exports.isAbsolute = isAbsolute;
|
|
4837
4871
|
}
|
|
4838
4872
|
});
|
|
4839
4873
|
|
|
@@ -5920,17 +5954,19 @@ var require_queue = __commonJS({
|
|
|
5920
5954
|
return p;
|
|
5921
5955
|
}
|
|
5922
5956
|
function drained() {
|
|
5923
|
-
if (queue.idle()) {
|
|
5924
|
-
return new Promise(function(resolve2) {
|
|
5925
|
-
resolve2();
|
|
5926
|
-
});
|
|
5927
|
-
}
|
|
5928
|
-
var previousDrain = queue.drain;
|
|
5929
5957
|
var p = new Promise(function(resolve2) {
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5958
|
+
process.nextTick(function() {
|
|
5959
|
+
if (queue.idle()) {
|
|
5960
|
+
resolve2();
|
|
5961
|
+
} else {
|
|
5962
|
+
var previousDrain = queue.drain;
|
|
5963
|
+
queue.drain = function() {
|
|
5964
|
+
if (typeof previousDrain === "function") previousDrain();
|
|
5965
|
+
resolve2();
|
|
5966
|
+
queue.drain = previousDrain;
|
|
5967
|
+
};
|
|
5968
|
+
}
|
|
5969
|
+
});
|
|
5934
5970
|
});
|
|
5935
5971
|
return p;
|
|
5936
5972
|
}
|
|
@@ -6628,11 +6664,19 @@ var require_entry = __commonJS({
|
|
|
6628
6664
|
this.index = /* @__PURE__ */ new Map();
|
|
6629
6665
|
}
|
|
6630
6666
|
getFilter(positive, negative) {
|
|
6631
|
-
const
|
|
6632
|
-
const
|
|
6633
|
-
|
|
6667
|
+
const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
|
|
6668
|
+
const patterns = {
|
|
6669
|
+
positive: {
|
|
6670
|
+
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
|
|
6671
|
+
},
|
|
6672
|
+
negative: {
|
|
6673
|
+
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
|
|
6674
|
+
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
|
|
6675
|
+
}
|
|
6676
|
+
};
|
|
6677
|
+
return (entry) => this._filter(entry, patterns);
|
|
6634
6678
|
}
|
|
6635
|
-
_filter(entry,
|
|
6679
|
+
_filter(entry, patterns) {
|
|
6636
6680
|
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
6637
6681
|
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
6638
6682
|
return false;
|
|
@@ -6640,11 +6684,7 @@ var require_entry = __commonJS({
|
|
|
6640
6684
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
6641
6685
|
return false;
|
|
6642
6686
|
}
|
|
6643
|
-
|
|
6644
|
-
return false;
|
|
6645
|
-
}
|
|
6646
|
-
const isDirectory2 = entry.dirent.isDirectory();
|
|
6647
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory2) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory2);
|
|
6687
|
+
const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
|
|
6648
6688
|
if (this._settings.unique && isMatched) {
|
|
6649
6689
|
this._createIndexRecord(filepath);
|
|
6650
6690
|
}
|
|
@@ -6662,14 +6702,32 @@ var require_entry = __commonJS({
|
|
|
6662
6702
|
_onlyDirectoryFilter(entry) {
|
|
6663
6703
|
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
|
|
6664
6704
|
}
|
|
6665
|
-
|
|
6666
|
-
|
|
6705
|
+
_isMatchToPatternsSet(filepath, patterns, isDirectory2) {
|
|
6706
|
+
const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2);
|
|
6707
|
+
if (!isMatched) {
|
|
6708
|
+
return false;
|
|
6709
|
+
}
|
|
6710
|
+
const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2);
|
|
6711
|
+
if (isMatchedByRelativeNegative) {
|
|
6712
|
+
return false;
|
|
6713
|
+
}
|
|
6714
|
+
const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2);
|
|
6715
|
+
if (isMatchedByAbsoluteNegative) {
|
|
6716
|
+
return false;
|
|
6717
|
+
}
|
|
6718
|
+
return true;
|
|
6719
|
+
}
|
|
6720
|
+
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) {
|
|
6721
|
+
if (patternsRe.length === 0) {
|
|
6667
6722
|
return false;
|
|
6668
6723
|
}
|
|
6669
|
-
const fullpath = utils.path.makeAbsolute(this._settings.cwd,
|
|
6670
|
-
return
|
|
6724
|
+
const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
|
|
6725
|
+
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2);
|
|
6671
6726
|
}
|
|
6672
6727
|
_isMatchToPatterns(filepath, patternsRe, isDirectory2) {
|
|
6728
|
+
if (patternsRe.length === 0) {
|
|
6729
|
+
return false;
|
|
6730
|
+
}
|
|
6673
6731
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
6674
6732
|
if (!isMatched && isDirectory2) {
|
|
6675
6733
|
return utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -9585,13 +9643,12 @@ var require_diff = __commonJS({
|
|
|
9585
9643
|
if (!lowVersion.patch && !lowVersion.minor) {
|
|
9586
9644
|
return "major";
|
|
9587
9645
|
}
|
|
9588
|
-
if (highVersion
|
|
9646
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
9647
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
9648
|
+
return "minor";
|
|
9649
|
+
}
|
|
9589
9650
|
return "patch";
|
|
9590
9651
|
}
|
|
9591
|
-
if (highVersion.minor) {
|
|
9592
|
-
return "minor";
|
|
9593
|
-
}
|
|
9594
|
-
return "major";
|
|
9595
9652
|
}
|
|
9596
9653
|
const prefix = highHasPre ? "pre" : "";
|
|
9597
9654
|
if (v1.major !== v2.major) {
|
|
@@ -11184,23 +11241,22 @@ var require_lib3 = __commonJS({
|
|
|
11184
11241
|
var require_npa = __commonJS({
|
|
11185
11242
|
"node_modules/npm-package-arg/lib/npa.js"(exports, module) {
|
|
11186
11243
|
"use strict";
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
var { URL: URL3 } = __require("url");
|
|
11244
|
+
var isWindows = process.platform === "win32";
|
|
11245
|
+
var { URL: URL3 } = __require("node:url");
|
|
11246
|
+
var path22 = isWindows ? __require("node:path/win32") : __require("node:path");
|
|
11247
|
+
var { homedir } = __require("node:os");
|
|
11192
11248
|
var HostedGit = require_lib();
|
|
11193
11249
|
var semver = require_semver2();
|
|
11194
|
-
var path22 = global.FAKE_WINDOWS ? __require("path").win32 : __require("path");
|
|
11195
11250
|
var validatePackageName = require_lib2();
|
|
11196
|
-
var { homedir } = __require("os");
|
|
11197
11251
|
var { log } = require_lib3();
|
|
11198
|
-
var isWindows = process.platform === "win32" || global.FAKE_WINDOWS;
|
|
11199
11252
|
var hasSlashes = isWindows ? /\\|[/]/ : /[/]/;
|
|
11200
11253
|
var isURL = /^(?:git[+])?[a-z]+:/i;
|
|
11201
11254
|
var isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i;
|
|
11202
|
-
var
|
|
11255
|
+
var isFileType = /[.](?:tgz|tar.gz|tar)$/i;
|
|
11203
11256
|
var isPortNumber = /:[0-9]+(\/|$)/i;
|
|
11257
|
+
var isWindowsFile = /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/;
|
|
11258
|
+
var isPosixFile = /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;
|
|
11259
|
+
var defaultRegistry = "https://registry.npmjs.org";
|
|
11204
11260
|
function npa2(arg, where) {
|
|
11205
11261
|
let name;
|
|
11206
11262
|
let spec;
|
|
@@ -11213,13 +11269,13 @@ var require_npa = __commonJS({
|
|
|
11213
11269
|
return npa2(arg.raw, where || arg.where);
|
|
11214
11270
|
}
|
|
11215
11271
|
}
|
|
11216
|
-
const nameEndsAt = arg
|
|
11272
|
+
const nameEndsAt = arg.indexOf("@", 1);
|
|
11217
11273
|
const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg;
|
|
11218
11274
|
if (isURL.test(arg)) {
|
|
11219
11275
|
spec = arg;
|
|
11220
11276
|
} else if (isGit.test(arg)) {
|
|
11221
11277
|
spec = `git+ssh://${arg}`;
|
|
11222
|
-
} else if (namePart
|
|
11278
|
+
} else if (!namePart.startsWith("@") && (hasSlashes.test(namePart) || isFileType.test(namePart))) {
|
|
11223
11279
|
spec = arg;
|
|
11224
11280
|
} else if (nameEndsAt > 0) {
|
|
11225
11281
|
name = namePart;
|
|
@@ -11235,7 +11291,24 @@ var require_npa = __commonJS({
|
|
|
11235
11291
|
}
|
|
11236
11292
|
return resolve2(name, spec, where, arg);
|
|
11237
11293
|
}
|
|
11238
|
-
|
|
11294
|
+
function isFileSpec(spec) {
|
|
11295
|
+
if (!spec) {
|
|
11296
|
+
return false;
|
|
11297
|
+
}
|
|
11298
|
+
if (spec.toLowerCase().startsWith("file:")) {
|
|
11299
|
+
return true;
|
|
11300
|
+
}
|
|
11301
|
+
if (isWindows) {
|
|
11302
|
+
return isWindowsFile.test(spec);
|
|
11303
|
+
}
|
|
11304
|
+
return isPosixFile.test(spec);
|
|
11305
|
+
}
|
|
11306
|
+
function isAliasSpec(spec) {
|
|
11307
|
+
if (!spec) {
|
|
11308
|
+
return false;
|
|
11309
|
+
}
|
|
11310
|
+
return spec.toLowerCase().startsWith("npm:");
|
|
11311
|
+
}
|
|
11239
11312
|
function resolve2(name, spec, where, arg) {
|
|
11240
11313
|
const res = new Result({
|
|
11241
11314
|
raw: arg,
|
|
@@ -11244,11 +11317,14 @@ var require_npa = __commonJS({
|
|
|
11244
11317
|
fromArgument: arg != null
|
|
11245
11318
|
});
|
|
11246
11319
|
if (name) {
|
|
11247
|
-
res.
|
|
11320
|
+
res.name = name;
|
|
11248
11321
|
}
|
|
11249
|
-
if (
|
|
11322
|
+
if (!where) {
|
|
11323
|
+
where = process.cwd();
|
|
11324
|
+
}
|
|
11325
|
+
if (isFileSpec(spec)) {
|
|
11250
11326
|
return fromFile(res, where);
|
|
11251
|
-
} else if (
|
|
11327
|
+
} else if (isAliasSpec(spec)) {
|
|
11252
11328
|
return fromAlias(res, where);
|
|
11253
11329
|
}
|
|
11254
11330
|
const hosted = HostedGit.fromUrl(spec, {
|
|
@@ -11259,13 +11335,12 @@ var require_npa = __commonJS({
|
|
|
11259
11335
|
return fromHostedGit(res, hosted);
|
|
11260
11336
|
} else if (spec && isURL.test(spec)) {
|
|
11261
11337
|
return fromURL(res);
|
|
11262
|
-
} else if (spec && (hasSlashes.test(spec) ||
|
|
11338
|
+
} else if (spec && (hasSlashes.test(spec) || isFileType.test(spec))) {
|
|
11263
11339
|
return fromFile(res, where);
|
|
11264
11340
|
} else {
|
|
11265
11341
|
return fromRegistry(res);
|
|
11266
11342
|
}
|
|
11267
11343
|
}
|
|
11268
|
-
var defaultRegistry = "https://registry.npmjs.org";
|
|
11269
11344
|
function toPurl(arg, reg = defaultRegistry) {
|
|
11270
11345
|
const res = npa2(arg);
|
|
11271
11346
|
if (res.type !== "version") {
|
|
@@ -11292,54 +11367,57 @@ var require_npa = __commonJS({
|
|
|
11292
11367
|
err.code = "EINVALIDPURLTYPE";
|
|
11293
11368
|
return err;
|
|
11294
11369
|
}
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
|
|
11328
|
-
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
full
|
|
11370
|
+
var Result = class {
|
|
11371
|
+
constructor(opts) {
|
|
11372
|
+
this.type = opts.type;
|
|
11373
|
+
this.registry = opts.registry;
|
|
11374
|
+
this.where = opts.where;
|
|
11375
|
+
if (opts.raw == null) {
|
|
11376
|
+
this.raw = opts.name ? `${opts.name}@${opts.rawSpec}` : opts.rawSpec;
|
|
11377
|
+
} else {
|
|
11378
|
+
this.raw = opts.raw;
|
|
11379
|
+
}
|
|
11380
|
+
this.name = void 0;
|
|
11381
|
+
this.escapedName = void 0;
|
|
11382
|
+
this.scope = void 0;
|
|
11383
|
+
this.rawSpec = opts.rawSpec || "";
|
|
11384
|
+
this.saveSpec = opts.saveSpec;
|
|
11385
|
+
this.fetchSpec = opts.fetchSpec;
|
|
11386
|
+
if (opts.name) {
|
|
11387
|
+
this.setName(opts.name);
|
|
11388
|
+
}
|
|
11389
|
+
this.gitRange = opts.gitRange;
|
|
11390
|
+
this.gitCommittish = opts.gitCommittish;
|
|
11391
|
+
this.gitSubdir = opts.gitSubdir;
|
|
11392
|
+
this.hosted = opts.hosted;
|
|
11393
|
+
}
|
|
11394
|
+
// TODO move this to a getter/setter in a semver major
|
|
11395
|
+
setName(name) {
|
|
11396
|
+
const valid = validatePackageName(name);
|
|
11397
|
+
if (!valid.validForOldPackages) {
|
|
11398
|
+
throw invalidPackageName(name, valid, this.raw);
|
|
11399
|
+
}
|
|
11400
|
+
this.name = name;
|
|
11401
|
+
this.scope = name[0] === "@" ? name.slice(0, name.indexOf("/")) : void 0;
|
|
11402
|
+
this.escapedName = name.replace("/", "%2f");
|
|
11403
|
+
return this;
|
|
11404
|
+
}
|
|
11405
|
+
toString() {
|
|
11406
|
+
const full = [];
|
|
11407
|
+
if (this.name != null && this.name !== "") {
|
|
11408
|
+
full.push(this.name);
|
|
11409
|
+
}
|
|
11410
|
+
const spec = this.saveSpec || this.fetchSpec || this.rawSpec;
|
|
11411
|
+
if (spec != null && spec !== "") {
|
|
11412
|
+
full.push(spec);
|
|
11413
|
+
}
|
|
11414
|
+
return full.length ? full.join("@") : this.raw;
|
|
11332
11415
|
}
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11416
|
+
toJSON() {
|
|
11417
|
+
const result = Object.assign({}, this);
|
|
11418
|
+
delete result.hosted;
|
|
11419
|
+
return result;
|
|
11336
11420
|
}
|
|
11337
|
-
return full.length ? full.join("@") : this.raw;
|
|
11338
|
-
};
|
|
11339
|
-
Result.prototype.toJSON = function() {
|
|
11340
|
-
const result = Object.assign({}, this);
|
|
11341
|
-
delete result.hosted;
|
|
11342
|
-
return result;
|
|
11343
11421
|
};
|
|
11344
11422
|
function setGitAttrs(res, committish) {
|
|
11345
11423
|
if (!committish) {
|
|
@@ -11378,20 +11456,50 @@ var require_npa = __commonJS({
|
|
|
11378
11456
|
log.warn("npm-package-arg", `ignoring unknown key "${name}"`);
|
|
11379
11457
|
}
|
|
11380
11458
|
}
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
|
|
11459
|
+
var encodedPathChars = /* @__PURE__ */ new Map([
|
|
11460
|
+
["\0", "%00"],
|
|
11461
|
+
[" ", "%09"],
|
|
11462
|
+
["\n", "%0A"],
|
|
11463
|
+
["\r", "%0D"],
|
|
11464
|
+
[" ", "%20"],
|
|
11465
|
+
['"', "%22"],
|
|
11466
|
+
["#", "%23"],
|
|
11467
|
+
["%", "%25"],
|
|
11468
|
+
["?", "%3F"],
|
|
11469
|
+
["[", "%5B"],
|
|
11470
|
+
["\\", isWindows ? "/" : "%5C"],
|
|
11471
|
+
["]", "%5D"],
|
|
11472
|
+
["^", "%5E"],
|
|
11473
|
+
["|", "%7C"],
|
|
11474
|
+
["~", "%7E"]
|
|
11475
|
+
]);
|
|
11476
|
+
function pathToFileURL3(str2) {
|
|
11477
|
+
let result = "";
|
|
11478
|
+
for (let i2 = 0; i2 < str2.length; i2++) {
|
|
11479
|
+
result = `${result}${encodedPathChars.get(str2[i2]) ?? str2[i2]}`;
|
|
11480
|
+
}
|
|
11481
|
+
if (result.startsWith("file:")) {
|
|
11482
|
+
return result;
|
|
11384
11483
|
}
|
|
11385
|
-
|
|
11484
|
+
return `file:${result}`;
|
|
11485
|
+
}
|
|
11486
|
+
function fromFile(res, where) {
|
|
11487
|
+
res.type = isFileType.test(res.rawSpec) ? "file" : "directory";
|
|
11386
11488
|
res.where = where;
|
|
11387
|
-
let
|
|
11489
|
+
let rawSpec = pathToFileURL3(res.rawSpec);
|
|
11490
|
+
if (rawSpec.startsWith("file:/")) {
|
|
11491
|
+
if (/^file:\/\/[^/]/.test(rawSpec)) {
|
|
11492
|
+
rawSpec = `file:/${rawSpec.slice(5)}`;
|
|
11493
|
+
}
|
|
11494
|
+
if (/^\/{1,3}\.\.?(\/|$)/.test(rawSpec.slice(5))) {
|
|
11495
|
+
rawSpec = rawSpec.replace(/^file:\/{1,3}/, "file:");
|
|
11496
|
+
}
|
|
11497
|
+
}
|
|
11388
11498
|
let resolvedUrl;
|
|
11389
|
-
|
|
11390
|
-
const rawWithPrefix = prefix + res.rawSpec;
|
|
11391
|
-
let rawNoPrefix = rawWithPrefix.replace(/^file:/, "");
|
|
11499
|
+
let specUrl;
|
|
11392
11500
|
try {
|
|
11393
|
-
resolvedUrl = new URL3(
|
|
11394
|
-
specUrl = new URL3(
|
|
11501
|
+
resolvedUrl = new URL3(rawSpec, `${pathToFileURL3(path22.resolve(where))}/`);
|
|
11502
|
+
specUrl = new URL3(rawSpec);
|
|
11395
11503
|
} catch (originalError) {
|
|
11396
11504
|
const er = new Error("Invalid file: URL, must comply with RFC 8089");
|
|
11397
11505
|
throw Object.assign(er, {
|
|
@@ -11401,18 +11509,6 @@ var require_npa = __commonJS({
|
|
|
11401
11509
|
originalError
|
|
11402
11510
|
});
|
|
11403
11511
|
}
|
|
11404
|
-
if (resolvedUrl.host && resolvedUrl.host !== "localhost") {
|
|
11405
|
-
const rawSpec = res.rawSpec.replace(/^file:\/\//, "file:///");
|
|
11406
|
-
resolvedUrl = new URL3(rawSpec, `file://${path22.resolve(where)}/`);
|
|
11407
|
-
specUrl = new URL3(rawSpec);
|
|
11408
|
-
rawNoPrefix = rawSpec.replace(/^file:/, "");
|
|
11409
|
-
}
|
|
11410
|
-
if (/^\/{1,3}\.\.?(\/|$)/.test(rawNoPrefix)) {
|
|
11411
|
-
const rawSpec = res.rawSpec.replace(/^file:\/{1,3}/, "file:");
|
|
11412
|
-
resolvedUrl = new URL3(rawSpec, `file://${path22.resolve(where)}/`);
|
|
11413
|
-
specUrl = new URL3(rawSpec);
|
|
11414
|
-
rawNoPrefix = rawSpec.replace(/^file:/, "");
|
|
11415
|
-
}
|
|
11416
11512
|
let specPath = decodeURIComponent(specUrl.pathname);
|
|
11417
11513
|
let resolvedPath = decodeURIComponent(resolvedUrl.pathname);
|
|
11418
11514
|
if (isWindows) {
|
|
@@ -11422,12 +11518,16 @@ var require_npa = __commonJS({
|
|
|
11422
11518
|
if (/^\/~(\/|$)/.test(specPath)) {
|
|
11423
11519
|
res.saveSpec = `file:${specPath.substr(1)}`;
|
|
11424
11520
|
resolvedPath = path22.resolve(homedir(), specPath.substr(3));
|
|
11425
|
-
} else if (!path22.isAbsolute(
|
|
11521
|
+
} else if (!path22.isAbsolute(rawSpec.slice(5))) {
|
|
11426
11522
|
res.saveSpec = `file:${path22.relative(where, resolvedPath)}`;
|
|
11427
11523
|
} else {
|
|
11428
11524
|
res.saveSpec = `file:${path22.resolve(resolvedPath)}`;
|
|
11429
11525
|
}
|
|
11430
11526
|
res.fetchSpec = path22.resolve(where, resolvedPath);
|
|
11527
|
+
res.saveSpec = res.saveSpec.split("\\").join("/");
|
|
11528
|
+
if (res.saveSpec.startsWith("file://")) {
|
|
11529
|
+
res.saveSpec = `file:/${res.saveSpec.slice(7)}`;
|
|
11530
|
+
}
|
|
11431
11531
|
return res;
|
|
11432
11532
|
}
|
|
11433
11533
|
function fromHostedGit(res, hosted) {
|
|
@@ -11525,6 +11625,10 @@ var require_npa = __commonJS({
|
|
|
11525
11625
|
}
|
|
11526
11626
|
return res;
|
|
11527
11627
|
}
|
|
11628
|
+
module.exports = npa2;
|
|
11629
|
+
module.exports.resolve = resolve2;
|
|
11630
|
+
module.exports.toPurl = toPurl;
|
|
11631
|
+
module.exports.Result = Result;
|
|
11528
11632
|
}
|
|
11529
11633
|
});
|
|
11530
11634
|
|
|
@@ -12865,6 +12969,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
12865
12969
|
"Bitstream-Vera",
|
|
12866
12970
|
"BlueOak-1.0.0",
|
|
12867
12971
|
"Boehm-GC",
|
|
12972
|
+
"Boehm-GC-without-fee",
|
|
12868
12973
|
"Borceux",
|
|
12869
12974
|
"Brian-Gladman-2-Clause",
|
|
12870
12975
|
"Brian-Gladman-3-Clause",
|
|
@@ -12924,6 +13029,8 @@ var require_spdx_license_ids = __commonJS({
|
|
|
12924
13029
|
"CC-BY-SA-3.0-IGO",
|
|
12925
13030
|
"CC-BY-SA-4.0",
|
|
12926
13031
|
"CC-PDDC",
|
|
13032
|
+
"CC-PDM-1.0",
|
|
13033
|
+
"CC-SA-1.0",
|
|
12927
13034
|
"CC0-1.0",
|
|
12928
13035
|
"CDDL-1.0",
|
|
12929
13036
|
"CDDL-1.1",
|
|
@@ -12974,6 +13081,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
12974
13081
|
"DRL-1.1",
|
|
12975
13082
|
"DSDP",
|
|
12976
13083
|
"DocBook-Schema",
|
|
13084
|
+
"DocBook-Stylesheet",
|
|
12977
13085
|
"DocBook-XML",
|
|
12978
13086
|
"Dotseqn",
|
|
12979
13087
|
"ECL-1.0",
|
|
@@ -13081,6 +13189,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13081
13189
|
"Imlib2",
|
|
13082
13190
|
"Info-ZIP",
|
|
13083
13191
|
"Inner-Net-2.0",
|
|
13192
|
+
"InnoSetup",
|
|
13084
13193
|
"Intel",
|
|
13085
13194
|
"Intel-ACPI",
|
|
13086
13195
|
"Interbase-1.0",
|
|
@@ -13125,9 +13234,11 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13125
13234
|
"Linux-man-pages-copyleft-2-para",
|
|
13126
13235
|
"Linux-man-pages-copyleft-var",
|
|
13127
13236
|
"Lucida-Bitmap-Fonts",
|
|
13237
|
+
"MIPS",
|
|
13128
13238
|
"MIT",
|
|
13129
13239
|
"MIT-0",
|
|
13130
13240
|
"MIT-CMU",
|
|
13241
|
+
"MIT-Click",
|
|
13131
13242
|
"MIT-Festival",
|
|
13132
13243
|
"MIT-Khronos-old",
|
|
13133
13244
|
"MIT-Modern-Variant",
|
|
@@ -13278,6 +13389,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13278
13389
|
"SISSL",
|
|
13279
13390
|
"SISSL-1.2",
|
|
13280
13391
|
"SL",
|
|
13392
|
+
"SMAIL-GPL",
|
|
13281
13393
|
"SMLNJ",
|
|
13282
13394
|
"SMPPL",
|
|
13283
13395
|
"SNIA",
|
|
@@ -13291,6 +13403,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13291
13403
|
"SchemeReport",
|
|
13292
13404
|
"Sendmail",
|
|
13293
13405
|
"Sendmail-8.23",
|
|
13406
|
+
"Sendmail-Open-Source-1.1",
|
|
13294
13407
|
"SimPL-2.0",
|
|
13295
13408
|
"Sleepycat",
|
|
13296
13409
|
"Soundex",
|
|
@@ -13316,6 +13429,8 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13316
13429
|
"TU-Berlin-1.0",
|
|
13317
13430
|
"TU-Berlin-2.0",
|
|
13318
13431
|
"TermReadKey",
|
|
13432
|
+
"ThirdEye",
|
|
13433
|
+
"TrustedQSL",
|
|
13319
13434
|
"UCAR",
|
|
13320
13435
|
"UCL-1.0",
|
|
13321
13436
|
"UMich-Merit",
|
|
@@ -13359,6 +13474,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13359
13474
|
"Zimbra-1.4",
|
|
13360
13475
|
"Zlib",
|
|
13361
13476
|
"any-OSI",
|
|
13477
|
+
"any-OSI-perl-modules",
|
|
13362
13478
|
"bcrypt-Solar-Designer",
|
|
13363
13479
|
"blessing",
|
|
13364
13480
|
"bzip2-1.0.6",
|
|
@@ -13375,6 +13491,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13375
13491
|
"etalab-2.0",
|
|
13376
13492
|
"fwlw",
|
|
13377
13493
|
"gSOAP-1.3b",
|
|
13494
|
+
"generic-xts",
|
|
13378
13495
|
"gnuplot",
|
|
13379
13496
|
"gtkbook",
|
|
13380
13497
|
"hdparm",
|
|
@@ -13403,6 +13520,7 @@ var require_spdx_license_ids = __commonJS({
|
|
|
13403
13520
|
"threeparttable",
|
|
13404
13521
|
"ulem",
|
|
13405
13522
|
"w3m",
|
|
13523
|
+
"wwl",
|
|
13406
13524
|
"xinetd",
|
|
13407
13525
|
"xkeyboard-config-Zinoviev",
|
|
13408
13526
|
"xlock",
|