vite-plus 1.0.0 → 1.1.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/LICENSE +30 -5
- package/README.md +7 -7
- package/binding/index.cjs +54 -55
- package/binding/index.d.cts +50 -12
- package/dist/{agent-CKMI1a8W.js → agent-eISuMXJb.js} +2 -2
- package/dist/bin.js +9 -6
- package/dist/config/bin.js +3 -3
- package/dist/{constants-BqJiMVVU.js → constants-CCQkpaxK.js} +2 -2
- package/dist/create/bin.js +42 -10
- package/dist/{define-config-C_KGDLUZ.cjs → define-config-CREUiMmM.cjs} +2 -2
- package/dist/{define-config-Cf_5GHmY.d.ts → define-config-CeW9DETl.d.ts} +24 -8
- package/dist/{define-config-DhEJaYRc.js → define-config-Ro6PS4dP.js} +2 -2
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{dist-BWiANxFS.js → dist-DUsqQuw8.js} +117 -1395
- package/dist/{editor-CHfGUhxP.js → editor-B8tkz7nL.js} +94 -52
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +54 -50
- package/dist/{oxlint-plugin-config-lMMD5fAC.js → oxlint-plugin-config-CbG58Kzr.js} +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/pack-bin.js +3 -2
- package/dist/{package-Cgdlhamw.js → package-BS84eWrW.js} +7 -2
- package/dist/package-overrides-CpoQngt3.js +411 -0
- package/dist/{prompts-jMH8S4Wp.js → prompts-ByOzbMBG.js} +537 -252
- package/dist/{resolve-vite-config-BJYYtfY3.js → resolve-vite-config-Be237LWp.js} +2 -2
- package/dist/{resolve-vite-config-BPgpYMYp.js → resolve-vite-config-CofpYgnY.js} +1 -1
- package/dist/staged/bin.js +791 -742
- package/dist/sync-versions/bin.js +4 -6
- package/dist/sync-versions/bin.mjs +247 -1419
- package/dist/toolchain.js +9 -9
- package/dist/toolchain.json +9 -9
- package/dist/{tsconfig-CmKidmRD.js → tsconfig-3ONY2k2K.js} +1 -1
- package/dist/{tsconfig-BoYTBNX_.js → tsconfig-DzZ-nrx2.js} +2 -2
- package/dist/version.js +2 -2
- package/dist/versions.js +5 -5
- package/docs/guide/ci.md +3 -4
- package/docs/guide/env.md +10 -5
- package/docs/guide/github-actions-cache.md +1 -3
- package/docs/guide/ide-integration.md +3 -1
- package/docs/guide/implode.md +2 -0
- package/docs/guide/install.md +3 -0
- package/docs/guide/local-cli.md +7 -7
- package/docs/guide/migrate-rules.md +8 -0
- package/docs/guide/migrate.md +7 -7
- package/docs/guide/test.md +1 -1
- package/docs/guide/troubleshooting.md +2 -2
- package/docs/guide/upgrade-project.md +1 -1
- package/docs/guide/vitest-v5.md +2 -2
- package/docs/guide/vpx.md +2 -2
- package/package.json +31 -28
- package/dist/package-overrides-Dpn4scvN.js +0 -17
|
@@ -3,27 +3,7 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
6
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
-
key = keys[i];
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
7
|
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
28
8
|
//#endregion
|
|
29
9
|
//#region src/sync-versions/input.ts
|
|
@@ -4183,7 +4163,7 @@ var ParseOptions;
|
|
|
4183
4163
|
* Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
|
|
4184
4164
|
* Therefore always check the errors list to find out if the input was valid.
|
|
4185
4165
|
*/
|
|
4186
|
-
function parse$
|
|
4166
|
+
function parse$2(text, errors = [], options = ParseOptions.DEFAULT) {
|
|
4187
4167
|
let currentProperty = null;
|
|
4188
4168
|
let currentParent = [];
|
|
4189
4169
|
const previousParents = [];
|
|
@@ -4759,7 +4739,7 @@ var SyntaxKind;
|
|
|
4759
4739
|
* Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
|
|
4760
4740
|
* Therefore, always check the errors list to find out if the input was valid.
|
|
4761
4741
|
*/
|
|
4762
|
-
const parse = parse$
|
|
4742
|
+
const parse$1 = parse$2;
|
|
4763
4743
|
var ParseErrorCode;
|
|
4764
4744
|
(function(ParseErrorCode) {
|
|
4765
4745
|
ParseErrorCode[ParseErrorCode["InvalidSymbol"] = 1] = "InvalidSymbol";
|
|
@@ -4817,1403 +4797,255 @@ function applyEdits(text, edits) {
|
|
|
4817
4797
|
return text;
|
|
4818
4798
|
}
|
|
4819
4799
|
//#endregion
|
|
4820
|
-
//#region ../../node_modules/.pnpm/
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
4851
|
-
const debug = require_debug();
|
|
4852
|
-
exports = module.exports = {};
|
|
4853
|
-
const re = exports.re = [];
|
|
4854
|
-
const safeRe = exports.safeRe = [];
|
|
4855
|
-
const src = exports.src = [];
|
|
4856
|
-
const safeSrc = exports.safeSrc = [];
|
|
4857
|
-
const t = exports.t = {};
|
|
4858
|
-
let R = 0;
|
|
4859
|
-
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
4860
|
-
const safeRegexReplacements = [
|
|
4861
|
-
["\\s", 1],
|
|
4862
|
-
["\\d", MAX_LENGTH],
|
|
4863
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
4800
|
+
//#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/comparison-CmVirWIW.js
|
|
4801
|
+
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
4802
|
+
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
4803
|
+
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
4804
|
+
const NON_NUMERIC_IDENTIFIER = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER}*`;
|
|
4805
|
+
const MAIN_VERSION = String.raw`(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})`;
|
|
4806
|
+
const MAIN_VERSION_LOOSE = String.raw`(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
4807
|
+
const PRERELEASE_IDENTIFIER = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER})`;
|
|
4808
|
+
const PRERELEASE_IDENTIFIER_LOOSE = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
4809
|
+
const PRERELEASE = String.raw`(?:-(${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*))`;
|
|
4810
|
+
const PRERELEASE_LOOSE = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE}(?:\.${PRERELEASE_IDENTIFIER_LOOSE})*))`;
|
|
4811
|
+
const BUILD_IDENTIFIER = `${LETTER_DASH_NUMBER}+`;
|
|
4812
|
+
const BUILD = String.raw`(?:\+(${BUILD_IDENTIFIER}(?:\.${BUILD_IDENTIFIER})*))`;
|
|
4813
|
+
const FULL_PLAIN = `v?${MAIN_VERSION}${PRERELEASE}?${BUILD}?`;
|
|
4814
|
+
const LOOSE_PLAIN = String.raw`[v=\s]*${MAIN_VERSION_LOOSE}${PRERELEASE_LOOSE}?${BUILD}?`;
|
|
4815
|
+
const GREATER_LESS_THAN = "((?:<|>)?=?)";
|
|
4816
|
+
const XRANGE_IDENTIFIER = String.raw`${NUMERIC_IDENTIFIER}|x|X|\*`;
|
|
4817
|
+
const XRANGE_IDENTIFIER_LOOSE = String.raw`${NUMERIC_IDENTIFIER_LOOSE}|x|X|\*`;
|
|
4818
|
+
const XRANGE_PLAIN = String.raw`[v=\s]*(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:${PRERELEASE})?${BUILD}?)?)?`;
|
|
4819
|
+
const XRANGE_PLAIN_LOOSE = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:${PRERELEASE_LOOSE})?${BUILD}?)?)?`;
|
|
4820
|
+
const LONE_TILDE = "(?:~>?)";
|
|
4821
|
+
const LONE_CARET = String.raw`(?:\^)`;
|
|
4822
|
+
const COERCE_PLAIN = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;
|
|
4823
|
+
String.raw`${COERCE_PLAIN}(?:$|[^\d])`;
|
|
4824
|
+
String.raw`${COERCE_PLAIN}(?:${PRERELEASE})?(?:${BUILD})?(?:$|[^\d])`;
|
|
4825
|
+
function makeSafeRegexSource(source) {
|
|
4826
|
+
const replacements = [
|
|
4827
|
+
[String.raw`\s`, 1],
|
|
4828
|
+
[String.raw`\d`, 256],
|
|
4829
|
+
[LETTER_DASH_NUMBER, 250]
|
|
4864
4830
|
];
|
|
4865
|
-
const
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
4903
|
-
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
4904
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
4905
|
-
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
4906
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
4907
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
4908
|
-
exports.tildeTrimReplace = "$1~";
|
|
4909
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
4910
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
4911
|
-
createToken("LONECARET", "(?:\\^)");
|
|
4912
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
4913
|
-
exports.caretTrimReplace = "$1^";
|
|
4914
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
4915
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
4916
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
4917
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
4918
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
4919
|
-
exports.comparatorTrimReplace = "$1$2$3";
|
|
4920
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
4921
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
4922
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
4923
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
4924
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
4925
|
-
}));
|
|
4926
|
-
//#endregion
|
|
4927
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
|
|
4928
|
-
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4929
|
-
const looseOption = Object.freeze({ loose: true });
|
|
4930
|
-
const emptyOpts = Object.freeze({});
|
|
4931
|
-
const parseOptions = (options) => {
|
|
4932
|
-
if (!options) return emptyOpts;
|
|
4933
|
-
if (typeof options !== "object") return looseOption;
|
|
4934
|
-
return options;
|
|
4935
|
-
};
|
|
4936
|
-
module.exports = parseOptions;
|
|
4937
|
-
}));
|
|
4938
|
-
//#endregion
|
|
4939
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
|
|
4940
|
-
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4941
|
-
const numeric = /^[0-9]+$/;
|
|
4942
|
-
const compareIdentifiers = (a, b) => {
|
|
4943
|
-
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
4944
|
-
const anum = numeric.test(a);
|
|
4945
|
-
const bnum = numeric.test(b);
|
|
4946
|
-
if (anum && bnum) {
|
|
4947
|
-
a = +a;
|
|
4948
|
-
b = +b;
|
|
4949
|
-
}
|
|
4950
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
4951
|
-
};
|
|
4952
|
-
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
4953
|
-
module.exports = {
|
|
4954
|
-
compareIdentifiers,
|
|
4955
|
-
rcompareIdentifiers
|
|
4956
|
-
};
|
|
4957
|
-
}));
|
|
4958
|
-
//#endregion
|
|
4959
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
|
|
4960
|
-
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4961
|
-
const debug = require_debug();
|
|
4962
|
-
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
4963
|
-
const { safeRe: re, t } = require_re();
|
|
4964
|
-
const parseOptions = require_parse_options();
|
|
4965
|
-
const { compareIdentifiers } = require_identifiers();
|
|
4966
|
-
const isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
4967
|
-
const identifiers = identifier.split(".");
|
|
4968
|
-
if (identifiers.length > prerelease.length) return false;
|
|
4969
|
-
for (let i = 0; i < identifiers.length; i++) if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) return false;
|
|
4970
|
-
return true;
|
|
4971
|
-
};
|
|
4972
|
-
module.exports = class SemVer {
|
|
4973
|
-
constructor(version, options) {
|
|
4974
|
-
options = parseOptions(options);
|
|
4975
|
-
if (version instanceof SemVer) {
|
|
4976
|
-
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
4977
|
-
else version = version.version;
|
|
4978
|
-
} else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
4979
|
-
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
4980
|
-
debug("SemVer", version, options);
|
|
4981
|
-
this.options = options;
|
|
4982
|
-
this.loose = !!options.loose;
|
|
4983
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
4984
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
4985
|
-
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
4986
|
-
this.raw = version;
|
|
4987
|
-
this.major = +m[1];
|
|
4988
|
-
this.minor = +m[2];
|
|
4989
|
-
this.patch = +m[3];
|
|
4990
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
4991
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
4992
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
4993
|
-
if (!m[4]) this.prerelease = [];
|
|
4994
|
-
else this.prerelease = m[4].split(".").map((id) => {
|
|
4995
|
-
if (/^[0-9]+$/.test(id)) {
|
|
4996
|
-
const num = +id;
|
|
4997
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
4998
|
-
}
|
|
4999
|
-
return id;
|
|
5000
|
-
});
|
|
5001
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
5002
|
-
this.format();
|
|
5003
|
-
}
|
|
5004
|
-
format() {
|
|
5005
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
5006
|
-
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
5007
|
-
return this.version;
|
|
5008
|
-
}
|
|
5009
|
-
toString() {
|
|
5010
|
-
return this.version;
|
|
5011
|
-
}
|
|
5012
|
-
compare(other) {
|
|
5013
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
5014
|
-
if (!(other instanceof SemVer)) {
|
|
5015
|
-
if (typeof other === "string" && other === this.version) return 0;
|
|
5016
|
-
other = new SemVer(other, this.options);
|
|
5017
|
-
}
|
|
5018
|
-
if (other.version === this.version) return 0;
|
|
5019
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
5020
|
-
}
|
|
5021
|
-
compareMain(other) {
|
|
5022
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
5023
|
-
if (this.major < other.major) return -1;
|
|
5024
|
-
if (this.major > other.major) return 1;
|
|
5025
|
-
if (this.minor < other.minor) return -1;
|
|
5026
|
-
if (this.minor > other.minor) return 1;
|
|
5027
|
-
if (this.patch < other.patch) return -1;
|
|
5028
|
-
if (this.patch > other.patch) return 1;
|
|
5029
|
-
return 0;
|
|
5030
|
-
}
|
|
5031
|
-
comparePre(other) {
|
|
5032
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
5033
|
-
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
5034
|
-
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
5035
|
-
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
5036
|
-
let i = 0;
|
|
5037
|
-
do {
|
|
5038
|
-
const a = this.prerelease[i];
|
|
5039
|
-
const b = other.prerelease[i];
|
|
5040
|
-
debug("prerelease compare", i, a, b);
|
|
5041
|
-
if (a === void 0 && b === void 0) return 0;
|
|
5042
|
-
else if (b === void 0) return 1;
|
|
5043
|
-
else if (a === void 0) return -1;
|
|
5044
|
-
else if (a === b) continue;
|
|
5045
|
-
else return compareIdentifiers(a, b);
|
|
5046
|
-
} while (++i);
|
|
5047
|
-
}
|
|
5048
|
-
compareBuild(other) {
|
|
5049
|
-
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
5050
|
-
let i = 0;
|
|
5051
|
-
do {
|
|
5052
|
-
const a = this.build[i];
|
|
5053
|
-
const b = other.build[i];
|
|
5054
|
-
debug("build compare", i, a, b);
|
|
5055
|
-
if (a === void 0 && b === void 0) return 0;
|
|
5056
|
-
else if (b === void 0) return 1;
|
|
5057
|
-
else if (a === void 0) return -1;
|
|
5058
|
-
else if (a === b) continue;
|
|
5059
|
-
else return compareIdentifiers(a, b);
|
|
5060
|
-
} while (++i);
|
|
5061
|
-
}
|
|
5062
|
-
inc(release, identifier, identifierBase) {
|
|
5063
|
-
if (release.startsWith("pre")) {
|
|
5064
|
-
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
5065
|
-
if (identifier) {
|
|
5066
|
-
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
5067
|
-
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
5068
|
-
}
|
|
5069
|
-
}
|
|
5070
|
-
switch (release) {
|
|
5071
|
-
case "premajor":
|
|
5072
|
-
this.prerelease.length = 0;
|
|
5073
|
-
this.patch = 0;
|
|
5074
|
-
this.minor = 0;
|
|
5075
|
-
this.major++;
|
|
5076
|
-
this.inc("pre", identifier, identifierBase);
|
|
5077
|
-
break;
|
|
5078
|
-
case "preminor":
|
|
5079
|
-
this.prerelease.length = 0;
|
|
5080
|
-
this.patch = 0;
|
|
5081
|
-
this.minor++;
|
|
5082
|
-
this.inc("pre", identifier, identifierBase);
|
|
5083
|
-
break;
|
|
5084
|
-
case "prepatch":
|
|
5085
|
-
this.prerelease.length = 0;
|
|
5086
|
-
this.inc("patch", identifier, identifierBase);
|
|
5087
|
-
this.inc("pre", identifier, identifierBase);
|
|
5088
|
-
break;
|
|
5089
|
-
case "prerelease":
|
|
5090
|
-
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
5091
|
-
this.inc("pre", identifier, identifierBase);
|
|
5092
|
-
break;
|
|
5093
|
-
case "release":
|
|
5094
|
-
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
5095
|
-
this.prerelease.length = 0;
|
|
5096
|
-
break;
|
|
5097
|
-
case "major":
|
|
5098
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
5099
|
-
this.minor = 0;
|
|
5100
|
-
this.patch = 0;
|
|
5101
|
-
this.prerelease = [];
|
|
5102
|
-
break;
|
|
5103
|
-
case "minor":
|
|
5104
|
-
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
5105
|
-
this.patch = 0;
|
|
5106
|
-
this.prerelease = [];
|
|
5107
|
-
break;
|
|
5108
|
-
case "patch":
|
|
5109
|
-
if (this.prerelease.length === 0) this.patch++;
|
|
5110
|
-
this.prerelease = [];
|
|
5111
|
-
break;
|
|
5112
|
-
case "pre": {
|
|
5113
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
5114
|
-
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
5115
|
-
else {
|
|
5116
|
-
let i = this.prerelease.length;
|
|
5117
|
-
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
5118
|
-
this.prerelease[i]++;
|
|
5119
|
-
i = -2;
|
|
5120
|
-
}
|
|
5121
|
-
if (i === -1) {
|
|
5122
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
5123
|
-
this.prerelease.push(base);
|
|
5124
|
-
}
|
|
5125
|
-
}
|
|
5126
|
-
if (identifier) {
|
|
5127
|
-
let prerelease = [identifier, base];
|
|
5128
|
-
if (identifierBase === false) prerelease = [identifier];
|
|
5129
|
-
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
5130
|
-
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
5131
|
-
if (isNaN(prereleaseBase)) this.prerelease = prerelease;
|
|
5132
|
-
} else this.prerelease = prerelease;
|
|
5133
|
-
}
|
|
5134
|
-
break;
|
|
5135
|
-
}
|
|
5136
|
-
default: throw new Error(`invalid increment argument: ${release}`);
|
|
5137
|
-
}
|
|
5138
|
-
this.raw = this.format();
|
|
5139
|
-
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
5140
|
-
return this;
|
|
5141
|
-
}
|
|
5142
|
-
};
|
|
5143
|
-
}));
|
|
5144
|
-
//#endregion
|
|
5145
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
|
|
5146
|
-
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5147
|
-
const SemVer = require_semver$1();
|
|
5148
|
-
const parse = (version, options, throwErrors = false) => {
|
|
5149
|
-
if (version instanceof SemVer) return version;
|
|
5150
|
-
try {
|
|
5151
|
-
return new SemVer(version, options);
|
|
5152
|
-
} catch (er) {
|
|
5153
|
-
if (!throwErrors) return null;
|
|
5154
|
-
throw er;
|
|
5155
|
-
}
|
|
5156
|
-
};
|
|
5157
|
-
module.exports = parse;
|
|
5158
|
-
}));
|
|
5159
|
-
//#endregion
|
|
5160
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
|
|
5161
|
-
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5162
|
-
const parse = require_parse();
|
|
5163
|
-
const valid = (version, options) => {
|
|
5164
|
-
const v = parse(version, options);
|
|
5165
|
-
return v ? v.version : null;
|
|
5166
|
-
};
|
|
5167
|
-
module.exports = valid;
|
|
5168
|
-
}));
|
|
5169
|
-
//#endregion
|
|
5170
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
|
|
5171
|
-
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5172
|
-
const parse = require_parse();
|
|
5173
|
-
const clean = (version, options) => {
|
|
5174
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
5175
|
-
return s ? s.version : null;
|
|
5176
|
-
};
|
|
5177
|
-
module.exports = clean;
|
|
5178
|
-
}));
|
|
5179
|
-
//#endregion
|
|
5180
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
|
|
5181
|
-
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5182
|
-
const SemVer = require_semver$1();
|
|
5183
|
-
const inc = (version, release, options, identifier, identifierBase) => {
|
|
5184
|
-
if (typeof options === "string") {
|
|
5185
|
-
identifierBase = identifier;
|
|
5186
|
-
identifier = options;
|
|
5187
|
-
options = void 0;
|
|
5188
|
-
}
|
|
5189
|
-
try {
|
|
5190
|
-
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
5191
|
-
} catch (er) {
|
|
5192
|
-
return null;
|
|
5193
|
-
}
|
|
5194
|
-
};
|
|
5195
|
-
module.exports = inc;
|
|
5196
|
-
}));
|
|
5197
|
-
//#endregion
|
|
5198
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
|
|
5199
|
-
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5200
|
-
const parse = require_parse();
|
|
5201
|
-
const diff = (version1, version2) => {
|
|
5202
|
-
const v1 = parse(version1, null, true);
|
|
5203
|
-
const v2 = parse(version2, null, true);
|
|
5204
|
-
const comparison = v1.compare(v2);
|
|
5205
|
-
if (comparison === 0) return null;
|
|
5206
|
-
const v1Higher = comparison > 0;
|
|
5207
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
5208
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
5209
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
5210
|
-
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
5211
|
-
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
5212
|
-
if (lowVersion.compareMain(highVersion) === 0) {
|
|
5213
|
-
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
5214
|
-
return "patch";
|
|
5215
|
-
}
|
|
5216
|
-
}
|
|
5217
|
-
const prefix = highHasPre ? "pre" : "";
|
|
5218
|
-
if (v1.major !== v2.major) return prefix + "major";
|
|
5219
|
-
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
5220
|
-
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
5221
|
-
return "prerelease";
|
|
5222
|
-
};
|
|
5223
|
-
module.exports = diff;
|
|
5224
|
-
}));
|
|
5225
|
-
//#endregion
|
|
5226
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
|
|
5227
|
-
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5228
|
-
const SemVer = require_semver$1();
|
|
5229
|
-
const major = (a, loose) => new SemVer(a, loose).major;
|
|
5230
|
-
module.exports = major;
|
|
5231
|
-
}));
|
|
5232
|
-
//#endregion
|
|
5233
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
|
|
5234
|
-
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5235
|
-
const SemVer = require_semver$1();
|
|
5236
|
-
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
5237
|
-
module.exports = minor;
|
|
5238
|
-
}));
|
|
5239
|
-
//#endregion
|
|
5240
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
|
|
5241
|
-
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5242
|
-
const SemVer = require_semver$1();
|
|
5243
|
-
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
5244
|
-
module.exports = patch;
|
|
5245
|
-
}));
|
|
5246
|
-
//#endregion
|
|
5247
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
|
|
5248
|
-
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5249
|
-
const parse = require_parse();
|
|
5250
|
-
const prerelease = (version, options) => {
|
|
5251
|
-
const parsed = parse(version, options);
|
|
5252
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
5253
|
-
};
|
|
5254
|
-
module.exports = prerelease;
|
|
5255
|
-
}));
|
|
5256
|
-
//#endregion
|
|
5257
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
|
|
5258
|
-
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5259
|
-
const SemVer = require_semver$1();
|
|
5260
|
-
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
5261
|
-
module.exports = compare;
|
|
5262
|
-
}));
|
|
5263
|
-
//#endregion
|
|
5264
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
|
|
5265
|
-
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5266
|
-
const compare = require_compare();
|
|
5267
|
-
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
5268
|
-
module.exports = rcompare;
|
|
5269
|
-
}));
|
|
5270
|
-
//#endregion
|
|
5271
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
|
|
5272
|
-
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5273
|
-
const compare = require_compare();
|
|
5274
|
-
const compareLoose = (a, b) => compare(a, b, true);
|
|
5275
|
-
module.exports = compareLoose;
|
|
5276
|
-
}));
|
|
5277
|
-
//#endregion
|
|
5278
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
|
|
5279
|
-
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5280
|
-
const SemVer = require_semver$1();
|
|
5281
|
-
const compareBuild = (a, b, loose) => {
|
|
5282
|
-
const versionA = new SemVer(a, loose);
|
|
5283
|
-
const versionB = new SemVer(b, loose);
|
|
5284
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
5285
|
-
};
|
|
5286
|
-
module.exports = compareBuild;
|
|
5287
|
-
}));
|
|
5288
|
-
//#endregion
|
|
5289
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
|
|
5290
|
-
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5291
|
-
const compareBuild = require_compare_build();
|
|
5292
|
-
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
5293
|
-
module.exports = sort;
|
|
5294
|
-
}));
|
|
5295
|
-
//#endregion
|
|
5296
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
|
|
5297
|
-
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5298
|
-
const compareBuild = require_compare_build();
|
|
5299
|
-
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
5300
|
-
module.exports = rsort;
|
|
5301
|
-
}));
|
|
5302
|
-
//#endregion
|
|
5303
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
|
|
5304
|
-
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5305
|
-
const compare = require_compare();
|
|
5306
|
-
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
5307
|
-
module.exports = gt;
|
|
5308
|
-
}));
|
|
5309
|
-
//#endregion
|
|
5310
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
|
|
5311
|
-
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5312
|
-
const compare = require_compare();
|
|
5313
|
-
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
5314
|
-
module.exports = lt;
|
|
5315
|
-
}));
|
|
5316
|
-
//#endregion
|
|
5317
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
|
|
5318
|
-
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5319
|
-
const compare = require_compare();
|
|
5320
|
-
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
5321
|
-
module.exports = eq;
|
|
5322
|
-
}));
|
|
5323
|
-
//#endregion
|
|
5324
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
|
|
5325
|
-
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5326
|
-
const compare = require_compare();
|
|
5327
|
-
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
5328
|
-
module.exports = neq;
|
|
5329
|
-
}));
|
|
5330
|
-
//#endregion
|
|
5331
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
|
|
5332
|
-
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5333
|
-
const compare = require_compare();
|
|
5334
|
-
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
5335
|
-
module.exports = gte;
|
|
5336
|
-
}));
|
|
5337
|
-
//#endregion
|
|
5338
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
|
|
5339
|
-
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5340
|
-
const compare = require_compare();
|
|
5341
|
-
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
5342
|
-
module.exports = lte;
|
|
5343
|
-
}));
|
|
5344
|
-
//#endregion
|
|
5345
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
|
|
5346
|
-
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5347
|
-
const eq = require_eq();
|
|
5348
|
-
const neq = require_neq();
|
|
5349
|
-
const gt = require_gt();
|
|
5350
|
-
const gte = require_gte();
|
|
5351
|
-
const lt = require_lt();
|
|
5352
|
-
const lte = require_lte();
|
|
5353
|
-
const cmp = (a, op, b, loose) => {
|
|
5354
|
-
switch (op) {
|
|
5355
|
-
case "===":
|
|
5356
|
-
if (typeof a === "object") a = a.version;
|
|
5357
|
-
if (typeof b === "object") b = b.version;
|
|
5358
|
-
return a === b;
|
|
5359
|
-
case "!==":
|
|
5360
|
-
if (typeof a === "object") a = a.version;
|
|
5361
|
-
if (typeof b === "object") b = b.version;
|
|
5362
|
-
return a !== b;
|
|
5363
|
-
case "":
|
|
5364
|
-
case "=":
|
|
5365
|
-
case "==": return eq(a, b, loose);
|
|
5366
|
-
case "!=": return neq(a, b, loose);
|
|
5367
|
-
case ">": return gt(a, b, loose);
|
|
5368
|
-
case ">=": return gte(a, b, loose);
|
|
5369
|
-
case "<": return lt(a, b, loose);
|
|
5370
|
-
case "<=": return lte(a, b, loose);
|
|
5371
|
-
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
5372
|
-
}
|
|
5373
|
-
};
|
|
5374
|
-
module.exports = cmp;
|
|
5375
|
-
}));
|
|
5376
|
-
//#endregion
|
|
5377
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
|
|
5378
|
-
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5379
|
-
const SemVer = require_semver$1();
|
|
5380
|
-
const parse = require_parse();
|
|
5381
|
-
const { safeRe: re, t } = require_re();
|
|
5382
|
-
const coerce = (version, options) => {
|
|
5383
|
-
if (version instanceof SemVer) return version;
|
|
5384
|
-
if (typeof version === "number") version = String(version);
|
|
5385
|
-
if (typeof version !== "string") return null;
|
|
5386
|
-
options = options || {};
|
|
5387
|
-
let match = null;
|
|
5388
|
-
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
5389
|
-
else {
|
|
5390
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
5391
|
-
let next;
|
|
5392
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
5393
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
5394
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
5395
|
-
}
|
|
5396
|
-
coerceRtlRegex.lastIndex = -1;
|
|
5397
|
-
}
|
|
5398
|
-
if (match === null) return null;
|
|
5399
|
-
const major = match[2];
|
|
5400
|
-
const minor = match[3] || "0";
|
|
5401
|
-
const patch = match[4] || "0";
|
|
5402
|
-
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
5403
|
-
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
5404
|
-
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
5405
|
-
};
|
|
5406
|
-
module.exports = coerce;
|
|
5407
|
-
}));
|
|
5408
|
-
//#endregion
|
|
5409
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
|
|
5410
|
-
var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5411
|
-
const parse = require_parse();
|
|
5412
|
-
const constants = require_constants();
|
|
5413
|
-
const SemVer = require_semver$1();
|
|
5414
|
-
const truncate = (version, truncation, options) => {
|
|
5415
|
-
if (!constants.RELEASE_TYPES.includes(truncation)) return null;
|
|
5416
|
-
const clonedVersion = cloneInputVersion(version, options);
|
|
5417
|
-
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
5418
|
-
};
|
|
5419
|
-
const cloneInputVersion = (version, options) => {
|
|
5420
|
-
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
5421
|
-
return parse(versionStringToParse, options);
|
|
5422
|
-
};
|
|
5423
|
-
const doTruncation = (version, truncation) => {
|
|
5424
|
-
if (isPrerelease(truncation)) return version.version;
|
|
5425
|
-
version.prerelease = [];
|
|
5426
|
-
switch (truncation) {
|
|
5427
|
-
case "major":
|
|
5428
|
-
version.minor = 0;
|
|
5429
|
-
version.patch = 0;
|
|
5430
|
-
break;
|
|
5431
|
-
case "minor": version.patch = 0;
|
|
5432
|
-
}
|
|
5433
|
-
return version.format();
|
|
5434
|
-
};
|
|
5435
|
-
const isPrerelease = (type) => {
|
|
5436
|
-
return type.startsWith("pre");
|
|
4831
|
+
for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`);
|
|
4832
|
+
return source;
|
|
4833
|
+
}
|
|
4834
|
+
function safeRegex(source, flags) {
|
|
4835
|
+
return new RegExp(makeSafeRegexSource(source), flags);
|
|
4836
|
+
}
|
|
4837
|
+
const FULL = safeRegex(`^${FULL_PLAIN}$`);
|
|
4838
|
+
const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`);
|
|
4839
|
+
const NUMERIC$1 = /^\d+$/;
|
|
4840
|
+
function formatComparableVersion(version) {
|
|
4841
|
+
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
4842
|
+
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
4843
|
+
}
|
|
4844
|
+
function parse(version, options = {}) {
|
|
4845
|
+
if (typeof version !== "string") return version;
|
|
4846
|
+
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
4847
|
+
const match = version.trim().match(options.loose ? LOOSE : FULL);
|
|
4848
|
+
if (!match) throw new TypeError(`Invalid version syntax: ${version}`);
|
|
4849
|
+
const major = Number(match[1]);
|
|
4850
|
+
const minor = Number(match[2]);
|
|
4851
|
+
const patch = Number(match[3]);
|
|
4852
|
+
if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`);
|
|
4853
|
+
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
4854
|
+
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
4855
|
+
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
4856
|
+
if (NUMERIC$1.test(identifier)) {
|
|
4857
|
+
const numeric = Number(identifier);
|
|
4858
|
+
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
4859
|
+
}
|
|
4860
|
+
return identifier;
|
|
4861
|
+
}) : void 0;
|
|
4862
|
+
return {
|
|
4863
|
+
build: match[5]?.split("."),
|
|
4864
|
+
major,
|
|
4865
|
+
minor,
|
|
4866
|
+
patch,
|
|
4867
|
+
prerelease
|
|
5437
4868
|
};
|
|
5438
|
-
|
|
5439
|
-
}));
|
|
4869
|
+
}
|
|
5440
4870
|
//#endregion
|
|
5441
|
-
//#region ../../node_modules/.pnpm/
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
}
|
|
5460
|
-
set(key, value) {
|
|
5461
|
-
if (!this.delete(key) && value !== void 0) {
|
|
5462
|
-
if (this.map.size >= this.max) {
|
|
5463
|
-
const firstKey = this.map.keys().next().value;
|
|
5464
|
-
this.delete(firstKey);
|
|
5465
|
-
}
|
|
5466
|
-
this.map.set(key, value);
|
|
5467
|
-
}
|
|
5468
|
-
return this;
|
|
5469
|
-
}
|
|
4871
|
+
//#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/set-BGFWKKE8.js
|
|
4872
|
+
const STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
|
|
4873
|
+
const LOOSE_COMPARATOR$1 = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
|
|
4874
|
+
function formatComparator(comparator) {
|
|
4875
|
+
return comparator.version ? `${comparator.operator}${formatComparableVersion(comparator.version)}` : "";
|
|
4876
|
+
}
|
|
4877
|
+
function parseComparator(comparator, options = {}) {
|
|
4878
|
+
if (typeof comparator !== "string") return comparator;
|
|
4879
|
+
const normalized = comparator.trim().replaceAll(/\s+/g, " ");
|
|
4880
|
+
const match = normalized.match(options.loose ? LOOSE_COMPARATOR$1 : STRICT_COMPARATOR);
|
|
4881
|
+
if (!match) throw new TypeError(`Invalid comparator: ${normalized}`);
|
|
4882
|
+
const operator = match[1] === "=" ? "" : match[1] || "";
|
|
4883
|
+
const version = match[2] ? parse(match[2], options) : null;
|
|
4884
|
+
return {
|
|
4885
|
+
operator,
|
|
4886
|
+
options,
|
|
4887
|
+
value: version ? `${operator}${formatComparableVersion(version)}` : "",
|
|
4888
|
+
version
|
|
5470
4889
|
};
|
|
5471
|
-
|
|
5472
|
-
}));
|
|
4890
|
+
}
|
|
5473
4891
|
//#endregion
|
|
5474
|
-
//#region ../../node_modules/.pnpm/
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
}
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
}
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
if (
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
if (
|
|
5554
|
-
|
|
5555
|
-
}
|
|
5556
|
-
if (
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
}
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
}
|
|
5583
|
-
};
|
|
5584
|
-
const cache = new (require_lrucache())();
|
|
5585
|
-
const parseOptions = require_parse_options();
|
|
5586
|
-
const Comparator = require_comparator();
|
|
5587
|
-
const debug = require_debug();
|
|
5588
|
-
const SemVer = require_semver$1();
|
|
5589
|
-
const { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
5590
|
-
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
5591
|
-
const BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
|
|
5592
|
-
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
5593
|
-
const isAny = (c) => c.value === "";
|
|
5594
|
-
const isSatisfiable = (comparators, options) => {
|
|
5595
|
-
let result = true;
|
|
5596
|
-
const remainingComparators = comparators.slice();
|
|
5597
|
-
let testComparator = remainingComparators.pop();
|
|
5598
|
-
while (result && remainingComparators.length) {
|
|
5599
|
-
result = remainingComparators.every((otherComparator) => {
|
|
5600
|
-
return testComparator.intersects(otherComparator, options);
|
|
5601
|
-
});
|
|
5602
|
-
testComparator = remainingComparators.pop();
|
|
5603
|
-
}
|
|
5604
|
-
return result;
|
|
5605
|
-
};
|
|
5606
|
-
const parseComparator = (comp, options) => {
|
|
5607
|
-
comp = comp.replace(re[t.BUILD], "");
|
|
5608
|
-
debug("comp", comp, options);
|
|
5609
|
-
comp = replaceCarets(comp, options);
|
|
5610
|
-
debug("caret", comp);
|
|
5611
|
-
comp = replaceTildes(comp, options);
|
|
5612
|
-
debug("tildes", comp);
|
|
5613
|
-
comp = replaceXRanges(comp, options);
|
|
5614
|
-
debug("xrange", comp);
|
|
5615
|
-
comp = replaceStars(comp, options);
|
|
5616
|
-
debug("stars", comp);
|
|
5617
|
-
return comp;
|
|
5618
|
-
};
|
|
5619
|
-
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
5620
|
-
const invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
|
|
5621
|
-
const replaceTildes = (comp, options) => {
|
|
5622
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
5623
|
-
};
|
|
5624
|
-
const replaceTilde = (comp, options) => {
|
|
5625
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
5626
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
5627
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
5628
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
5629
|
-
let ret;
|
|
5630
|
-
if (isX(M)) ret = "";
|
|
5631
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
5632
|
-
else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
5633
|
-
else if (pr) {
|
|
5634
|
-
debug("replaceTilde pr", pr);
|
|
5635
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
5636
|
-
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
5637
|
-
debug("tilde return", ret);
|
|
5638
|
-
return ret;
|
|
5639
|
-
});
|
|
5640
|
-
};
|
|
5641
|
-
const replaceCarets = (comp, options) => {
|
|
5642
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
5643
|
-
};
|
|
5644
|
-
const replaceCaret = (comp, options) => {
|
|
5645
|
-
debug("caret", comp, options);
|
|
5646
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
5647
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
5648
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
5649
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
5650
|
-
let ret;
|
|
5651
|
-
if (isX(M)) ret = "";
|
|
5652
|
-
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
5653
|
-
else if (isX(p)) {
|
|
5654
|
-
if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
5655
|
-
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
5656
|
-
} else if (pr) {
|
|
5657
|
-
debug("replaceCaret pr", pr);
|
|
5658
|
-
if (M === "0") {
|
|
5659
|
-
if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
5660
|
-
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
5661
|
-
} else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
5662
|
-
} else {
|
|
5663
|
-
debug("no pr");
|
|
5664
|
-
if (M === "0") {
|
|
5665
|
-
if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
|
|
5666
|
-
else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
5667
|
-
} else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
5668
|
-
}
|
|
5669
|
-
debug("caret return", ret);
|
|
5670
|
-
return ret;
|
|
5671
|
-
});
|
|
5672
|
-
};
|
|
5673
|
-
const replaceXRanges = (comp, options) => {
|
|
5674
|
-
debug("replaceXRanges", comp, options);
|
|
5675
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
5676
|
-
};
|
|
5677
|
-
const replaceXRange = (comp, options) => {
|
|
5678
|
-
comp = comp.trim();
|
|
5679
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
5680
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
5681
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
5682
|
-
if (invalidXRangeOrder(M, m, p)) return comp;
|
|
5683
|
-
const xM = isX(M);
|
|
5684
|
-
const xm = xM || isX(m);
|
|
5685
|
-
const xp = xm || isX(p);
|
|
5686
|
-
const anyX = xp;
|
|
5687
|
-
if (gtlt === "=" && anyX) gtlt = "";
|
|
5688
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
5689
|
-
if (xM) {
|
|
5690
|
-
if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
5691
|
-
else ret = "*";
|
|
5692
|
-
} else if (gtlt && anyX) {
|
|
5693
|
-
if (xm) m = 0;
|
|
5694
|
-
p = 0;
|
|
5695
|
-
if (gtlt === ">") {
|
|
5696
|
-
gtlt = ">=";
|
|
5697
|
-
if (xm) {
|
|
5698
|
-
M = +M + 1;
|
|
5699
|
-
m = 0;
|
|
5700
|
-
p = 0;
|
|
5701
|
-
} else {
|
|
5702
|
-
m = +m + 1;
|
|
5703
|
-
p = 0;
|
|
5704
|
-
}
|
|
5705
|
-
} else if (gtlt === "<=") {
|
|
5706
|
-
gtlt = "<";
|
|
5707
|
-
if (xm) M = +M + 1;
|
|
5708
|
-
else m = +m + 1;
|
|
5709
|
-
}
|
|
5710
|
-
if (gtlt === "<") pr = "-0";
|
|
5711
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
5712
|
-
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
5713
|
-
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
5714
|
-
debug("xRange return", ret);
|
|
5715
|
-
return ret;
|
|
5716
|
-
});
|
|
5717
|
-
};
|
|
5718
|
-
const replaceStars = (comp, options) => {
|
|
5719
|
-
debug("replaceStars", comp, options);
|
|
5720
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
5721
|
-
};
|
|
5722
|
-
const replaceGTE0 = (comp, options) => {
|
|
5723
|
-
debug("replaceGTE0", comp, options);
|
|
5724
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
5725
|
-
};
|
|
5726
|
-
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
5727
|
-
if (isX(fM)) from = "";
|
|
5728
|
-
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
5729
|
-
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
5730
|
-
else if (fpr) from = `>=${from}`;
|
|
5731
|
-
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
5732
|
-
if (isX(tM)) to = "";
|
|
5733
|
-
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
5734
|
-
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
5735
|
-
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
5736
|
-
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
4892
|
+
//#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/range-C5wjdo9a.js
|
|
4893
|
+
function formatRange(range) {
|
|
4894
|
+
return range.sets.map((set) => set.map(formatComparator).join(" ")).join("||");
|
|
4895
|
+
}
|
|
4896
|
+
const BUILD_STRIP = new RegExp(BUILD, "g");
|
|
4897
|
+
const BUILD_SAFE = safeRegex(BUILD);
|
|
4898
|
+
const STRICT_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN})\s+-\s+(${XRANGE_PLAIN})\s*$`);
|
|
4899
|
+
const LOOSE_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN_LOOSE})\s+-\s+(${XRANGE_PLAIN_LOOSE})\s*$`);
|
|
4900
|
+
const COMPARATOR_TRIM = safeRegex(String.raw`(\s*)${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN}|${XRANGE_PLAIN})`, "g");
|
|
4901
|
+
const TILDE_TRIM = safeRegex(String.raw`(\s*)${LONE_TILDE}\s+`, "g");
|
|
4902
|
+
const CARET_TRIM = safeRegex(String.raw`(\s*)${LONE_CARET}\s+`, "g");
|
|
4903
|
+
const STRICT_TILDE = safeRegex(`^${LONE_TILDE}${XRANGE_PLAIN}$`);
|
|
4904
|
+
const LOOSE_TILDE = safeRegex(`^${LONE_TILDE}${XRANGE_PLAIN_LOOSE}$`);
|
|
4905
|
+
const STRICT_CARET = safeRegex(`^${LONE_CARET}${XRANGE_PLAIN}$`);
|
|
4906
|
+
const LOOSE_CARET = safeRegex(`^${LONE_CARET}${XRANGE_PLAIN_LOOSE}$`);
|
|
4907
|
+
const STRICT_XRANGE = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*${XRANGE_PLAIN}$`);
|
|
4908
|
+
const LOOSE_XRANGE = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*${XRANGE_PLAIN_LOOSE}$`);
|
|
4909
|
+
const STAR = safeRegex(String.raw`(<|>)?=?\s*\*`);
|
|
4910
|
+
const GTE_ZERO = /^\s*>=\s*0\.0\.0\s*$/;
|
|
4911
|
+
const GTE_ZERO_PRERELEASE = /^\s*>=\s*0\.0\.0-0\s*$/;
|
|
4912
|
+
const LOOSE_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
|
|
4913
|
+
function isWildcard(value) {
|
|
4914
|
+
return !value || String(value).toLowerCase() === "x" || String(value) === "*";
|
|
4915
|
+
}
|
|
4916
|
+
function hasInvalidWildcardOrder(major, minor, patch) {
|
|
4917
|
+
return isWildcard(major) && !isWildcard(minor) || isWildcard(minor) && Boolean(patch) && !isWildcard(patch);
|
|
4918
|
+
}
|
|
4919
|
+
function replaceTilde(comparator, options) {
|
|
4920
|
+
const expression = options.loose ? LOOSE_TILDE : STRICT_TILDE;
|
|
4921
|
+
const lowerPrerelease = options.includePrerelease ? "-0" : "";
|
|
4922
|
+
return comparator.replace(expression, (_match, major, minor, patch, prerelease) => {
|
|
4923
|
+
if (isWildcard(major)) return "";
|
|
4924
|
+
if (isWildcard(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
4925
|
+
if (isWildcard(patch)) return `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0`;
|
|
4926
|
+
return prerelease ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0`;
|
|
4927
|
+
});
|
|
4928
|
+
}
|
|
4929
|
+
function replaceTildes(comparator, options) {
|
|
4930
|
+
return comparator.trim().split(/\s+/).map((part) => replaceTilde(part, options)).join(" ");
|
|
4931
|
+
}
|
|
4932
|
+
function replaceCaret(comparator, options) {
|
|
4933
|
+
const expression = options.loose ? LOOSE_CARET : STRICT_CARET;
|
|
4934
|
+
const lowerPrerelease = options.includePrerelease ? "-0" : "";
|
|
4935
|
+
return comparator.replace(expression, (_match, major, minor, patch, prerelease) => {
|
|
4936
|
+
if (isWildcard(major)) return "";
|
|
4937
|
+
if (isWildcard(minor)) return `>=${major}.0.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
4938
|
+
if (isWildcard(patch)) return major === "0" ? `>=${major}.${minor}.0${lowerPrerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.0${lowerPrerelease} <${Number(major) + 1}.0.0-0`;
|
|
4939
|
+
if (prerelease) return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch}-${prerelease} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch}-${prerelease} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch}-${prerelease} <${Number(major) + 1}.0.0-0`;
|
|
4940
|
+
return major === "0" ? minor === "0" ? `>=${major}.${minor}.${patch} <${major}.${minor}.${Number(patch) + 1}-0` : `>=${major}.${minor}.${patch} <${major}.${Number(minor) + 1}.0-0` : `>=${major}.${minor}.${patch} <${Number(major) + 1}.0.0-0`;
|
|
4941
|
+
});
|
|
4942
|
+
}
|
|
4943
|
+
function replaceCarets(comparator, options) {
|
|
4944
|
+
return comparator.trim().split(/\s+/).map((part) => replaceCaret(part, options)).join(" ");
|
|
4945
|
+
}
|
|
4946
|
+
function replaceXRange(comparator, options) {
|
|
4947
|
+
const expression = options.loose ? LOOSE_XRANGE : STRICT_XRANGE;
|
|
4948
|
+
return comparator.trim().replace(expression, (match, rawOperator, rawMajor, rawMinor, rawPatch) => {
|
|
4949
|
+
let operator = rawOperator;
|
|
4950
|
+
let major = rawMajor;
|
|
4951
|
+
let minor = rawMinor;
|
|
4952
|
+
let patch = rawPatch;
|
|
4953
|
+
if (hasInvalidWildcardOrder(String(major), minor === void 0 ? void 0 : String(minor), patch === void 0 ? void 0 : String(patch))) return comparator;
|
|
4954
|
+
const wildcardMajor = isWildcard(major);
|
|
4955
|
+
const wildcardMinor = wildcardMajor || isWildcard(minor);
|
|
4956
|
+
const wildcardPatch = wildcardMinor || isWildcard(patch);
|
|
4957
|
+
if (operator === "=" && wildcardPatch) operator = "";
|
|
4958
|
+
if (wildcardMajor) return operator === ">" || operator === "<" ? "<0.0.0-0" : "*";
|
|
4959
|
+
let prerelease = options.includePrerelease ? "-0" : "";
|
|
4960
|
+
if (operator && wildcardPatch) {
|
|
4961
|
+
if (wildcardMinor) minor = 0;
|
|
4962
|
+
patch = 0;
|
|
4963
|
+
if (operator === ">") {
|
|
4964
|
+
operator = ">=";
|
|
4965
|
+
if (wildcardMinor) {
|
|
4966
|
+
major = Number(major) + 1;
|
|
4967
|
+
minor = 0;
|
|
4968
|
+
} else minor = Number(minor) + 1;
|
|
4969
|
+
} else if (operator === "<=") {
|
|
4970
|
+
operator = "<";
|
|
4971
|
+
if (wildcardMinor) major = Number(major) + 1;
|
|
4972
|
+
else minor = Number(minor) + 1;
|
|
4973
|
+
}
|
|
4974
|
+
if (operator === "<") prerelease = "-0";
|
|
4975
|
+
return `${operator}${major}.${minor}.${patch}${prerelease}`;
|
|
4976
|
+
}
|
|
4977
|
+
if (wildcardMinor) return `>=${major}.0.0${prerelease} <${Number(major) + 1}.0.0-0`;
|
|
4978
|
+
if (wildcardPatch) return `>=${major}.${minor}.0${prerelease} <${major}.${Number(minor) + 1}.0-0`;
|
|
4979
|
+
return match;
|
|
4980
|
+
});
|
|
4981
|
+
}
|
|
4982
|
+
function replaceXRanges(comparator, options) {
|
|
4983
|
+
return comparator.split(/\s+/).map((part) => replaceXRange(part, options)).join(" ");
|
|
4984
|
+
}
|
|
4985
|
+
function replaceHyphenRange(range, options) {
|
|
4986
|
+
const expression = options.loose ? LOOSE_HYPHEN : STRICT_HYPHEN;
|
|
4987
|
+
return range.replace(expression, (_match, rawFrom, fromMajor, fromMinor, fromPatch, fromPrerelease, _fromBuild, rawTo, toMajor, toMinor, toPatch, toPrerelease) => {
|
|
4988
|
+
let from = rawFrom;
|
|
4989
|
+
let to = rawTo;
|
|
4990
|
+
if (isWildcard(fromMajor)) from = "";
|
|
4991
|
+
else if (isWildcard(fromMinor)) from = `>=${fromMajor}.0.0${options.includePrerelease ? "-0" : ""}`;
|
|
4992
|
+
else if (isWildcard(fromPatch)) from = `>=${fromMajor}.${fromMinor}.0${options.includePrerelease ? "-0" : ""}`;
|
|
4993
|
+
else if (fromPrerelease) from = `>=${from}`;
|
|
4994
|
+
else from = `>=${from}${options.includePrerelease ? "-0" : ""}`;
|
|
4995
|
+
if (isWildcard(toMajor)) to = "";
|
|
4996
|
+
else if (isWildcard(toMinor)) to = `<${Number(toMajor) + 1}.0.0-0`;
|
|
4997
|
+
else if (isWildcard(toPatch)) to = `<${toMajor}.${Number(toMinor) + 1}.0-0`;
|
|
4998
|
+
else if (toPrerelease) to = `<=${toMajor}.${toMinor}.${toPatch}-${toPrerelease}`;
|
|
4999
|
+
else if (options.includePrerelease) to = `<${toMajor}.${toMinor}.${Number(toPatch) + 1}-0`;
|
|
5737
5000
|
else to = `<=${to}`;
|
|
5738
5001
|
return `${from} ${to}`.trim();
|
|
5739
|
-
};
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
})
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
else comp = comp.value;
|
|
5769
|
-
}
|
|
5770
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
5771
|
-
debug("comparator", comp, options);
|
|
5772
|
-
this.options = options;
|
|
5773
|
-
this.loose = !!options.loose;
|
|
5774
|
-
this.parse(comp);
|
|
5775
|
-
if (this.semver === ANY) this.value = "";
|
|
5776
|
-
else this.value = this.operator + this.semver.version;
|
|
5777
|
-
debug("comp", this);
|
|
5778
|
-
}
|
|
5779
|
-
parse(comp) {
|
|
5780
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
5781
|
-
const m = comp.match(r);
|
|
5782
|
-
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
5783
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
5784
|
-
if (this.operator === "=") this.operator = "";
|
|
5785
|
-
if (!m[2]) this.semver = ANY;
|
|
5786
|
-
else this.semver = new SemVer(m[2], this.options.loose);
|
|
5787
|
-
}
|
|
5788
|
-
toString() {
|
|
5789
|
-
return this.value;
|
|
5790
|
-
}
|
|
5791
|
-
test(version) {
|
|
5792
|
-
debug("Comparator.test", version, this.options.loose);
|
|
5793
|
-
if (this.semver === ANY || version === ANY) return true;
|
|
5794
|
-
if (typeof version === "string") try {
|
|
5795
|
-
version = new SemVer(version, this.options);
|
|
5796
|
-
} catch (er) {
|
|
5797
|
-
return false;
|
|
5798
|
-
}
|
|
5799
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
5800
|
-
}
|
|
5801
|
-
intersects(comp, options) {
|
|
5802
|
-
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
5803
|
-
if (this.operator === "") {
|
|
5804
|
-
if (this.value === "") return true;
|
|
5805
|
-
return new Range(comp.value, options).test(this.value);
|
|
5806
|
-
} else if (comp.operator === "") {
|
|
5807
|
-
if (comp.value === "") return true;
|
|
5808
|
-
return new Range(this.value, options).test(comp.semver);
|
|
5809
|
-
}
|
|
5810
|
-
options = parseOptions(options);
|
|
5811
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
5812
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
5813
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
5814
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
5815
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
5816
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
5817
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
5818
|
-
return false;
|
|
5819
|
-
}
|
|
5820
|
-
};
|
|
5821
|
-
const parseOptions = require_parse_options();
|
|
5822
|
-
const { safeRe: re, t } = require_re();
|
|
5823
|
-
const cmp = require_cmp();
|
|
5824
|
-
const debug = require_debug();
|
|
5825
|
-
const SemVer = require_semver$1();
|
|
5826
|
-
const Range = require_range();
|
|
5827
|
-
}));
|
|
5828
|
-
//#endregion
|
|
5829
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
|
|
5830
|
-
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5831
|
-
const Range = require_range();
|
|
5832
|
-
const satisfies = (version, range, options) => {
|
|
5833
|
-
try {
|
|
5834
|
-
range = new Range(range, options);
|
|
5835
|
-
} catch (er) {
|
|
5836
|
-
return false;
|
|
5837
|
-
}
|
|
5838
|
-
return range.test(version);
|
|
5839
|
-
};
|
|
5840
|
-
module.exports = satisfies;
|
|
5841
|
-
}));
|
|
5842
|
-
//#endregion
|
|
5843
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
|
|
5844
|
-
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5845
|
-
const Range = require_range();
|
|
5846
|
-
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
5847
|
-
module.exports = toComparators;
|
|
5848
|
-
}));
|
|
5849
|
-
//#endregion
|
|
5850
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
|
|
5851
|
-
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5852
|
-
const SemVer = require_semver$1();
|
|
5853
|
-
const Range = require_range();
|
|
5854
|
-
const maxSatisfying = (versions, range, options) => {
|
|
5855
|
-
let max = null;
|
|
5856
|
-
let maxSV = null;
|
|
5857
|
-
let rangeObj = null;
|
|
5858
|
-
try {
|
|
5859
|
-
rangeObj = new Range(range, options);
|
|
5860
|
-
} catch (er) {
|
|
5861
|
-
return null;
|
|
5862
|
-
}
|
|
5863
|
-
versions.forEach((v) => {
|
|
5864
|
-
if (rangeObj.test(v)) {
|
|
5865
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
5866
|
-
max = v;
|
|
5867
|
-
maxSV = new SemVer(max, options);
|
|
5868
|
-
}
|
|
5869
|
-
}
|
|
5870
|
-
});
|
|
5871
|
-
return max;
|
|
5872
|
-
};
|
|
5873
|
-
module.exports = maxSatisfying;
|
|
5874
|
-
}));
|
|
5875
|
-
//#endregion
|
|
5876
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
|
|
5877
|
-
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5878
|
-
const SemVer = require_semver$1();
|
|
5879
|
-
const Range = require_range();
|
|
5880
|
-
const minSatisfying = (versions, range, options) => {
|
|
5881
|
-
let min = null;
|
|
5882
|
-
let minSV = null;
|
|
5883
|
-
let rangeObj = null;
|
|
5884
|
-
try {
|
|
5885
|
-
rangeObj = new Range(range, options);
|
|
5886
|
-
} catch (er) {
|
|
5887
|
-
return null;
|
|
5002
|
+
});
|
|
5003
|
+
}
|
|
5004
|
+
function expandComparator(comparator, options) {
|
|
5005
|
+
return replaceXRanges(replaceTildes(replaceCarets(comparator.replace(BUILD_SAFE, ""), options), options), options).trim().replace(STAR, "");
|
|
5006
|
+
}
|
|
5007
|
+
function parseSimpleRange(input, options) {
|
|
5008
|
+
let parts = replaceHyphenRange(input.replace(BUILD_STRIP, ""), options).replace(COMPARATOR_TRIM, "$1$2$3").replace(TILDE_TRIM, "$1~").replace(CARET_TRIM, "$1^").split(" ").map((part) => expandComparator(part, options)).join(" ").split(/\s+/).map((part) => part.trim().replace(options.includePrerelease ? GTE_ZERO_PRERELEASE : GTE_ZERO, ""));
|
|
5009
|
+
if (options.loose) parts = parts.filter((part) => LOOSE_COMPARATOR.test(part));
|
|
5010
|
+
const unique = /* @__PURE__ */ new Map();
|
|
5011
|
+
for (const comparator of parts.map((part) => parseComparator(part, options))) {
|
|
5012
|
+
if (comparator.value === "<0.0.0-0") return [comparator];
|
|
5013
|
+
unique.set(comparator.value, comparator);
|
|
5014
|
+
}
|
|
5015
|
+
if (unique.size > 1) unique.delete("");
|
|
5016
|
+
return [...unique.values()];
|
|
5017
|
+
}
|
|
5018
|
+
function parseRange(range, options = {}) {
|
|
5019
|
+
if (typeof range !== "string") return range;
|
|
5020
|
+
const parsedOptions = { ...options };
|
|
5021
|
+
const normalizedRange = range.trim().replaceAll(/\s+/g, " ");
|
|
5022
|
+
let sets = normalizedRange.split("||").map((part) => parseSimpleRange(part.trim(), parsedOptions)).filter((set) => set.length);
|
|
5023
|
+
if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${normalizedRange}`);
|
|
5024
|
+
if (sets.length > 1) {
|
|
5025
|
+
const first = sets[0];
|
|
5026
|
+
sets = sets.filter((set) => set[0]?.value !== "<0.0.0-0");
|
|
5027
|
+
if (!sets.length) sets = [first];
|
|
5028
|
+
else if (sets.length > 1) {
|
|
5029
|
+
const any = sets.find((set) => set.length === 1 && set[0]?.value === "");
|
|
5030
|
+
if (any) sets = [any];
|
|
5888
5031
|
}
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
minSV = new SemVer(min, options);
|
|
5894
|
-
}
|
|
5895
|
-
}
|
|
5896
|
-
});
|
|
5897
|
-
return min;
|
|
5032
|
+
}
|
|
5033
|
+
return {
|
|
5034
|
+
options: parsedOptions,
|
|
5035
|
+
sets
|
|
5898
5036
|
};
|
|
5899
|
-
|
|
5900
|
-
})
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
const SemVer = require_semver$1();
|
|
5905
|
-
const Range = require_range();
|
|
5906
|
-
const gt = require_gt();
|
|
5907
|
-
const minVersion = (range, loose) => {
|
|
5908
|
-
range = new Range(range, loose);
|
|
5909
|
-
let minver = new SemVer("0.0.0");
|
|
5910
|
-
if (range.test(minver)) return minver;
|
|
5911
|
-
minver = new SemVer("0.0.0-0");
|
|
5912
|
-
if (range.test(minver)) return minver;
|
|
5913
|
-
minver = null;
|
|
5914
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
5915
|
-
const comparators = range.set[i];
|
|
5916
|
-
let setMin = null;
|
|
5917
|
-
comparators.forEach((comparator) => {
|
|
5918
|
-
const compver = new SemVer(comparator.semver.version);
|
|
5919
|
-
switch (comparator.operator) {
|
|
5920
|
-
case ">":
|
|
5921
|
-
if (compver.prerelease.length === 0) compver.patch++;
|
|
5922
|
-
else compver.prerelease.push(0);
|
|
5923
|
-
compver.raw = compver.format();
|
|
5924
|
-
case "":
|
|
5925
|
-
case ">=":
|
|
5926
|
-
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
5927
|
-
break;
|
|
5928
|
-
case "<":
|
|
5929
|
-
case "<=": break;
|
|
5930
|
-
/* istanbul ignore next */
|
|
5931
|
-
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
5932
|
-
}
|
|
5933
|
-
});
|
|
5934
|
-
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
5935
|
-
}
|
|
5936
|
-
if (minver && range.test(minver)) return minver;
|
|
5037
|
+
}
|
|
5038
|
+
function tryParseRange(range, options = {}) {
|
|
5039
|
+
try {
|
|
5040
|
+
return parseRange(range, options);
|
|
5041
|
+
} catch {
|
|
5937
5042
|
return null;
|
|
5938
|
-
}
|
|
5939
|
-
|
|
5940
|
-
})
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
const Range = require_range();
|
|
5945
|
-
const validRange = (range, options) => {
|
|
5946
|
-
try {
|
|
5947
|
-
return new Range(range, options).range || "*";
|
|
5948
|
-
} catch (er) {
|
|
5949
|
-
return null;
|
|
5950
|
-
}
|
|
5951
|
-
};
|
|
5952
|
-
module.exports = validRange;
|
|
5953
|
-
}));
|
|
5954
|
-
//#endregion
|
|
5955
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
|
|
5956
|
-
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5957
|
-
const SemVer = require_semver$1();
|
|
5958
|
-
const Comparator = require_comparator();
|
|
5959
|
-
const { ANY } = Comparator;
|
|
5960
|
-
const Range = require_range();
|
|
5961
|
-
const satisfies = require_satisfies();
|
|
5962
|
-
const gt = require_gt();
|
|
5963
|
-
const lt = require_lt();
|
|
5964
|
-
const lte = require_lte();
|
|
5965
|
-
const gte = require_gte();
|
|
5966
|
-
const outside = (version, range, hilo, options) => {
|
|
5967
|
-
version = new SemVer(version, options);
|
|
5968
|
-
range = new Range(range, options);
|
|
5969
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
5970
|
-
switch (hilo) {
|
|
5971
|
-
case ">":
|
|
5972
|
-
gtfn = gt;
|
|
5973
|
-
ltefn = lte;
|
|
5974
|
-
ltfn = lt;
|
|
5975
|
-
comp = ">";
|
|
5976
|
-
ecomp = ">=";
|
|
5977
|
-
break;
|
|
5978
|
-
case "<":
|
|
5979
|
-
gtfn = lt;
|
|
5980
|
-
ltefn = gte;
|
|
5981
|
-
ltfn = gt;
|
|
5982
|
-
comp = "<";
|
|
5983
|
-
ecomp = "<=";
|
|
5984
|
-
break;
|
|
5985
|
-
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
5986
|
-
}
|
|
5987
|
-
if (satisfies(version, range, options)) return false;
|
|
5988
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
5989
|
-
const comparators = range.set[i];
|
|
5990
|
-
let high = null;
|
|
5991
|
-
let low = null;
|
|
5992
|
-
comparators.forEach((comparator) => {
|
|
5993
|
-
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
5994
|
-
high = high || comparator;
|
|
5995
|
-
low = low || comparator;
|
|
5996
|
-
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
5997
|
-
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
5998
|
-
});
|
|
5999
|
-
if (high.operator === comp || high.operator === ecomp) return false;
|
|
6000
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
6001
|
-
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
6002
|
-
}
|
|
6003
|
-
return true;
|
|
6004
|
-
};
|
|
6005
|
-
module.exports = outside;
|
|
6006
|
-
}));
|
|
6007
|
-
//#endregion
|
|
6008
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
|
|
6009
|
-
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6010
|
-
const outside = require_outside();
|
|
6011
|
-
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
6012
|
-
module.exports = gtr;
|
|
6013
|
-
}));
|
|
6014
|
-
//#endregion
|
|
6015
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
|
|
6016
|
-
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6017
|
-
const outside = require_outside();
|
|
6018
|
-
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
6019
|
-
module.exports = ltr;
|
|
6020
|
-
}));
|
|
6021
|
-
//#endregion
|
|
6022
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
|
|
6023
|
-
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6024
|
-
const Range = require_range();
|
|
6025
|
-
const intersects = (r1, r2, options) => {
|
|
6026
|
-
r1 = new Range(r1, options);
|
|
6027
|
-
r2 = new Range(r2, options);
|
|
6028
|
-
return r1.intersects(r2, options);
|
|
6029
|
-
};
|
|
6030
|
-
module.exports = intersects;
|
|
6031
|
-
}));
|
|
6032
|
-
//#endregion
|
|
6033
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
|
|
6034
|
-
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6035
|
-
const satisfies = require_satisfies();
|
|
6036
|
-
const compare = require_compare();
|
|
6037
|
-
module.exports = (versions, range, options) => {
|
|
6038
|
-
const set = [];
|
|
6039
|
-
let first = null;
|
|
6040
|
-
let prev = null;
|
|
6041
|
-
const v = versions.sort((a, b) => compare(a, b, options));
|
|
6042
|
-
for (const version of v) if (satisfies(version, range, options)) {
|
|
6043
|
-
prev = version;
|
|
6044
|
-
if (!first) first = version;
|
|
6045
|
-
} else {
|
|
6046
|
-
if (prev) set.push([first, prev]);
|
|
6047
|
-
prev = null;
|
|
6048
|
-
first = null;
|
|
6049
|
-
}
|
|
6050
|
-
if (first) set.push([first, null]);
|
|
6051
|
-
const ranges = [];
|
|
6052
|
-
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
6053
|
-
else if (!max && min === v[0]) ranges.push("*");
|
|
6054
|
-
else if (!max) ranges.push(`>=${min}`);
|
|
6055
|
-
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
6056
|
-
else ranges.push(`${min} - ${max}`);
|
|
6057
|
-
const simplified = ranges.join(" || ");
|
|
6058
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
6059
|
-
return simplified.length < original.length ? simplified : range;
|
|
6060
|
-
};
|
|
6061
|
-
}));
|
|
6062
|
-
//#endregion
|
|
6063
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
|
|
6064
|
-
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6065
|
-
const Range = require_range();
|
|
6066
|
-
const Comparator = require_comparator();
|
|
6067
|
-
const { ANY } = Comparator;
|
|
6068
|
-
const satisfies = require_satisfies();
|
|
6069
|
-
const compare = require_compare();
|
|
6070
|
-
const subset = (sub, dom, options = {}) => {
|
|
6071
|
-
if (sub === dom) return true;
|
|
6072
|
-
sub = new Range(sub, options);
|
|
6073
|
-
dom = new Range(dom, options);
|
|
6074
|
-
let sawNonNull = false;
|
|
6075
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
6076
|
-
for (const simpleDom of dom.set) {
|
|
6077
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
6078
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
6079
|
-
if (isSub) continue OUTER;
|
|
6080
|
-
}
|
|
6081
|
-
if (sawNonNull) return false;
|
|
6082
|
-
}
|
|
6083
|
-
return true;
|
|
6084
|
-
};
|
|
6085
|
-
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
6086
|
-
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
6087
|
-
const simpleSubset = (sub, dom, options) => {
|
|
6088
|
-
if (sub === dom) return true;
|
|
6089
|
-
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
6090
|
-
if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
6091
|
-
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
6092
|
-
else sub = minimumVersion;
|
|
6093
|
-
}
|
|
6094
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
6095
|
-
if (options.includePrerelease) return true;
|
|
6096
|
-
else dom = minimumVersion;
|
|
6097
|
-
}
|
|
6098
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
6099
|
-
let gt, lt;
|
|
6100
|
-
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
6101
|
-
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
6102
|
-
else eqSet.add(c.semver);
|
|
6103
|
-
if (eqSet.size > 1) return null;
|
|
6104
|
-
let gtltComp;
|
|
6105
|
-
if (gt && lt) {
|
|
6106
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
6107
|
-
if (gtltComp > 0) return null;
|
|
6108
|
-
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
6109
|
-
}
|
|
6110
|
-
for (const eq of eqSet) {
|
|
6111
|
-
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
6112
|
-
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
6113
|
-
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
6114
|
-
return true;
|
|
6115
|
-
}
|
|
6116
|
-
let higher, lower;
|
|
6117
|
-
let hasDomLT, hasDomGT;
|
|
6118
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
6119
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
6120
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
6121
|
-
for (const c of dom) {
|
|
6122
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
6123
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
6124
|
-
if (gt) {
|
|
6125
|
-
if (needDomGTPre) {
|
|
6126
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) needDomGTPre = false;
|
|
6127
|
-
}
|
|
6128
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
6129
|
-
higher = higherGT(gt, c, options);
|
|
6130
|
-
if (higher === c && higher !== gt) return false;
|
|
6131
|
-
} else if (gt.operator === ">=" && !c.test(gt.semver)) return false;
|
|
6132
|
-
}
|
|
6133
|
-
if (lt) {
|
|
6134
|
-
if (needDomLTPre) {
|
|
6135
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) needDomLTPre = false;
|
|
6136
|
-
}
|
|
6137
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
6138
|
-
lower = lowerLT(lt, c, options);
|
|
6139
|
-
if (lower === c && lower !== lt) return false;
|
|
6140
|
-
} else if (lt.operator === "<=" && !c.test(lt.semver)) return false;
|
|
6141
|
-
}
|
|
6142
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
6143
|
-
}
|
|
6144
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
6145
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
6146
|
-
if (needDomGTPre || needDomLTPre) return false;
|
|
6147
|
-
return true;
|
|
6148
|
-
};
|
|
6149
|
-
const higherGT = (a, b, options) => {
|
|
6150
|
-
if (!a) return b;
|
|
6151
|
-
const comp = compare(a.semver, b.semver, options);
|
|
6152
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
6153
|
-
};
|
|
6154
|
-
const lowerLT = (a, b, options) => {
|
|
6155
|
-
if (!a) return b;
|
|
6156
|
-
const comp = compare(a.semver, b.semver, options);
|
|
6157
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
6158
|
-
};
|
|
6159
|
-
module.exports = subset;
|
|
6160
|
-
}));
|
|
6161
|
-
//#endregion
|
|
6162
|
-
//#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
|
|
6163
|
-
var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6164
|
-
const internalRe = require_re();
|
|
6165
|
-
const constants = require_constants();
|
|
6166
|
-
const SemVer = require_semver$1();
|
|
6167
|
-
const identifiers = require_identifiers();
|
|
6168
|
-
module.exports = {
|
|
6169
|
-
parse: require_parse(),
|
|
6170
|
-
valid: require_valid$1(),
|
|
6171
|
-
clean: require_clean(),
|
|
6172
|
-
inc: require_inc(),
|
|
6173
|
-
diff: require_diff(),
|
|
6174
|
-
major: require_major(),
|
|
6175
|
-
minor: require_minor(),
|
|
6176
|
-
patch: require_patch(),
|
|
6177
|
-
prerelease: require_prerelease(),
|
|
6178
|
-
compare: require_compare(),
|
|
6179
|
-
rcompare: require_rcompare(),
|
|
6180
|
-
compareLoose: require_compare_loose(),
|
|
6181
|
-
compareBuild: require_compare_build(),
|
|
6182
|
-
sort: require_sort(),
|
|
6183
|
-
rsort: require_rsort(),
|
|
6184
|
-
gt: require_gt(),
|
|
6185
|
-
lt: require_lt(),
|
|
6186
|
-
eq: require_eq(),
|
|
6187
|
-
neq: require_neq(),
|
|
6188
|
-
gte: require_gte(),
|
|
6189
|
-
lte: require_lte(),
|
|
6190
|
-
cmp: require_cmp(),
|
|
6191
|
-
coerce: require_coerce(),
|
|
6192
|
-
truncate: require_truncate(),
|
|
6193
|
-
Comparator: require_comparator(),
|
|
6194
|
-
Range: require_range(),
|
|
6195
|
-
satisfies: require_satisfies(),
|
|
6196
|
-
toComparators: require_to_comparators(),
|
|
6197
|
-
maxSatisfying: require_max_satisfying(),
|
|
6198
|
-
minSatisfying: require_min_satisfying(),
|
|
6199
|
-
minVersion: require_min_version(),
|
|
6200
|
-
validRange: require_valid(),
|
|
6201
|
-
outside: require_outside(),
|
|
6202
|
-
gtr: require_gtr(),
|
|
6203
|
-
ltr: require_ltr(),
|
|
6204
|
-
intersects: require_intersects(),
|
|
6205
|
-
simplifyRange: require_simplify(),
|
|
6206
|
-
subset: require_subset(),
|
|
6207
|
-
SemVer,
|
|
6208
|
-
re: internalRe.re,
|
|
6209
|
-
src: internalRe.src,
|
|
6210
|
-
tokens: internalRe.t,
|
|
6211
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
6212
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
6213
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
6214
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
6215
|
-
};
|
|
6216
|
-
}));
|
|
5043
|
+
}
|
|
5044
|
+
}
|
|
5045
|
+
function normalizeRange(range, options = {}) {
|
|
5046
|
+
const parsed = tryParseRange(range, options);
|
|
5047
|
+
return parsed ? formatRange(parsed) || "*" : null;
|
|
5048
|
+
}
|
|
6217
5049
|
//#endregion
|
|
6218
5050
|
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/identity.js
|
|
6219
5051
|
var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -12819,8 +11651,8 @@ var require_public_api = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12819
11651
|
exports.stringify = stringify;
|
|
12820
11652
|
}));
|
|
12821
11653
|
//#endregion
|
|
12822
|
-
//#region ../../node_modules/.pnpm/
|
|
12823
|
-
var
|
|
11654
|
+
//#region ../../node_modules/.pnpm/detect-indent@7.0.2/node_modules/detect-indent/index.js
|
|
11655
|
+
var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
12824
11656
|
var composer = require_composer();
|
|
12825
11657
|
var Document = require_Document();
|
|
12826
11658
|
var Schema = require_Schema();
|
|
@@ -12865,11 +11697,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
12865
11697
|
exports.stringify = publicApi.stringify;
|
|
12866
11698
|
exports.visit = visit.visit;
|
|
12867
11699
|
exports.visitAsync = visit.visitAsync;
|
|
12868
|
-
}));
|
|
12869
|
-
//#endregion
|
|
12870
|
-
//#region ../../node_modules/.pnpm/detect-indent@7.0.2/node_modules/detect-indent/index.js
|
|
12871
|
-
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
12872
|
-
var import_dist = require_dist();
|
|
11700
|
+
})))();
|
|
12873
11701
|
const INDENT_REGEX = /^(?:( )+|\t+)/;
|
|
12874
11702
|
const INDENT_TYPE_SPACE = "space";
|
|
12875
11703
|
const INDENT_TYPE_TAB = "tab";
|
|
@@ -13099,7 +11927,7 @@ function isRecord(value) {
|
|
|
13099
11927
|
}
|
|
13100
11928
|
function parsePackageJson(contents) {
|
|
13101
11929
|
const errors = [];
|
|
13102
|
-
const parsed = parse(contents, errors, {
|
|
11930
|
+
const parsed = parse$1(contents, errors, {
|
|
13103
11931
|
allowTrailingComma: true,
|
|
13104
11932
|
disallowComments: false
|
|
13105
11933
|
});
|
|
@@ -13117,13 +11945,13 @@ function alignedNpmAlias(current, toolchain) {
|
|
|
13117
11945
|
const packageName = current.slice(4, versionAt);
|
|
13118
11946
|
const currentVersion = current.slice(versionAt + 1);
|
|
13119
11947
|
const target = targetVersion(packageName, toolchain);
|
|
13120
|
-
if (target === void 0 || currentVersion === target ||
|
|
11948
|
+
if (target === void 0 || currentVersion === target || normalizeRange(currentVersion) === null) return current;
|
|
13121
11949
|
return `${current.slice(0, versionAt + 1)}${target}`;
|
|
13122
11950
|
}
|
|
13123
11951
|
function alignedSpec(name, current, toolchain) {
|
|
13124
11952
|
if (current.startsWith("npm:")) return alignedNpmAlias(current, toolchain);
|
|
13125
11953
|
const target = targetVersion(name, toolchain);
|
|
13126
|
-
if (target === void 0 || current === target || current.startsWith("$") || /^[a-z][a-z+.-]*:/i.test(current) ||
|
|
11954
|
+
if (target === void 0 || current === target || current.startsWith("$") || /^[a-z][a-z+.-]*:/i.test(current) || normalizeRange(current) === null) return current;
|
|
13127
11955
|
return target;
|
|
13128
11956
|
}
|
|
13129
11957
|
function replaceJsonValue(contents, location, value) {
|