@varlock/bumpy 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +13 -0
- package/dist/add-u5V9V3L7.mjs +131 -0
- package/dist/ai-B8ZL2x8z.mjs +82 -0
- package/dist/apply-release-plan-DtU3rVyL.mjs +132 -0
- package/dist/changelog-github-n-3zV1p9.mjs +59 -0
- package/dist/changeset-ClCYsChu.mjs +75 -0
- package/dist/check-CkRubvuk.mjs +57 -0
- package/dist/ci-8KWWhjXl.mjs +224 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +210 -0
- package/dist/config-CJ2orhTL.mjs +215 -0
- package/dist/dep-graph-DiLeAhl9.mjs +64 -0
- package/dist/fs-DbNNEyzq.mjs +51 -0
- package/dist/generate-oOFD9ABC.mjs +158 -0
- package/dist/index.d.mts +254 -0
- package/dist/index.mjs +9 -0
- package/dist/init-Blw2GfC_.mjs +22 -0
- package/dist/js-yaml-DpZfOoD4.mjs +2031 -0
- package/dist/logger-ZqggsyGZ.mjs +176 -0
- package/dist/migrate-DvOrXSw0.mjs +114 -0
- package/dist/names-C-u50ofE.mjs +143 -0
- package/dist/prompt-BP8toAOI.mjs +46 -0
- package/dist/publish-DZ3m7qkX.mjs +197 -0
- package/dist/publish-pipeline-1M5GmbdP.mjs +291 -0
- package/dist/release-plan-CFnutSHD.mjs +173 -0
- package/dist/semver-DWO6NFKN.mjs +1360 -0
- package/dist/shell-DPlltpzb.mjs +44 -0
- package/dist/status-DRpq_Mha.mjs +106 -0
- package/dist/version-CJwf8XIA.mjs +81 -0
- package/dist/workspace-mVjawG8g.mjs +183 -0
- package/package.json +36 -6
- package/skills/add-change/SKILL.md +108 -0
|
@@ -0,0 +1,1360 @@
|
|
|
1
|
+
import { a as __toESM, r as __commonJSMin } from "./logger-ZqggsyGZ.mjs";
|
|
2
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/constants.js
|
|
3
|
+
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
5
|
+
const MAX_LENGTH = 256;
|
|
6
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
7
|
+
module.exports = {
|
|
8
|
+
MAX_LENGTH,
|
|
9
|
+
MAX_SAFE_COMPONENT_LENGTH: 16,
|
|
10
|
+
MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
|
|
11
|
+
MAX_SAFE_INTEGER,
|
|
12
|
+
RELEASE_TYPES: [
|
|
13
|
+
"major",
|
|
14
|
+
"premajor",
|
|
15
|
+
"minor",
|
|
16
|
+
"preminor",
|
|
17
|
+
"patch",
|
|
18
|
+
"prepatch",
|
|
19
|
+
"prerelease"
|
|
20
|
+
],
|
|
21
|
+
SEMVER_SPEC_VERSION,
|
|
22
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
23
|
+
FLAG_LOOSE: 2
|
|
24
|
+
};
|
|
25
|
+
}));
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/debug.js
|
|
28
|
+
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
29
|
+
module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
|
|
30
|
+
}));
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/re.js
|
|
33
|
+
var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
34
|
+
const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
|
|
35
|
+
const debug = require_debug();
|
|
36
|
+
exports = module.exports = {};
|
|
37
|
+
const re = exports.re = [];
|
|
38
|
+
const safeRe = exports.safeRe = [];
|
|
39
|
+
const src = exports.src = [];
|
|
40
|
+
const safeSrc = exports.safeSrc = [];
|
|
41
|
+
const t = exports.t = {};
|
|
42
|
+
let R = 0;
|
|
43
|
+
const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
44
|
+
const safeRegexReplacements = [
|
|
45
|
+
["\\s", 1],
|
|
46
|
+
["\\d", MAX_LENGTH],
|
|
47
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
48
|
+
];
|
|
49
|
+
const makeSafeRegex = (value) => {
|
|
50
|
+
for (const [token, max] of safeRegexReplacements) value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
51
|
+
return value;
|
|
52
|
+
};
|
|
53
|
+
const createToken = (name, value, isGlobal) => {
|
|
54
|
+
const safe = makeSafeRegex(value);
|
|
55
|
+
const index = R++;
|
|
56
|
+
debug(name, index, value);
|
|
57
|
+
t[name] = index;
|
|
58
|
+
src[index] = value;
|
|
59
|
+
safeSrc[index] = safe;
|
|
60
|
+
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
61
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
62
|
+
};
|
|
63
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
64
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
65
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
66
|
+
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
67
|
+
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
68
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
|
|
69
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
70
|
+
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
71
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
72
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
73
|
+
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
74
|
+
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
75
|
+
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
76
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
77
|
+
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
78
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
79
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
80
|
+
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
81
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
82
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
83
|
+
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
84
|
+
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
85
|
+
createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
86
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
87
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
88
|
+
createToken("COERCERTL", src[t.COERCE], true);
|
|
89
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
90
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
91
|
+
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
92
|
+
exports.tildeTrimReplace = "$1~";
|
|
93
|
+
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
94
|
+
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
95
|
+
createToken("LONECARET", "(?:\\^)");
|
|
96
|
+
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
97
|
+
exports.caretTrimReplace = "$1^";
|
|
98
|
+
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
99
|
+
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
100
|
+
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
101
|
+
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
102
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
103
|
+
exports.comparatorTrimReplace = "$1$2$3";
|
|
104
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
105
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
106
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
107
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
108
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
109
|
+
}));
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/parse-options.js
|
|
112
|
+
var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
113
|
+
const looseOption = Object.freeze({ loose: true });
|
|
114
|
+
const emptyOpts = Object.freeze({});
|
|
115
|
+
const parseOptions = (options) => {
|
|
116
|
+
if (!options) return emptyOpts;
|
|
117
|
+
if (typeof options !== "object") return looseOption;
|
|
118
|
+
return options;
|
|
119
|
+
};
|
|
120
|
+
module.exports = parseOptions;
|
|
121
|
+
}));
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/identifiers.js
|
|
124
|
+
var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
125
|
+
const numeric = /^[0-9]+$/;
|
|
126
|
+
const compareIdentifiers = (a, b) => {
|
|
127
|
+
if (typeof a === "number" && typeof b === "number") return a === b ? 0 : a < b ? -1 : 1;
|
|
128
|
+
const anum = numeric.test(a);
|
|
129
|
+
const bnum = numeric.test(b);
|
|
130
|
+
if (anum && bnum) {
|
|
131
|
+
a = +a;
|
|
132
|
+
b = +b;
|
|
133
|
+
}
|
|
134
|
+
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
135
|
+
};
|
|
136
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
137
|
+
module.exports = {
|
|
138
|
+
compareIdentifiers,
|
|
139
|
+
rcompareIdentifiers
|
|
140
|
+
};
|
|
141
|
+
}));
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/semver.js
|
|
144
|
+
var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
145
|
+
const debug = require_debug();
|
|
146
|
+
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
147
|
+
const { safeRe: re, t } = require_re();
|
|
148
|
+
const parseOptions = require_parse_options();
|
|
149
|
+
const { compareIdentifiers } = require_identifiers();
|
|
150
|
+
module.exports = class SemVer {
|
|
151
|
+
constructor(version, options) {
|
|
152
|
+
options = parseOptions(options);
|
|
153
|
+
if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
|
|
154
|
+
else version = version.version;
|
|
155
|
+
else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
156
|
+
if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
|
|
157
|
+
debug("SemVer", version, options);
|
|
158
|
+
this.options = options;
|
|
159
|
+
this.loose = !!options.loose;
|
|
160
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
161
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
162
|
+
if (!m) throw new TypeError(`Invalid Version: ${version}`);
|
|
163
|
+
this.raw = version;
|
|
164
|
+
this.major = +m[1];
|
|
165
|
+
this.minor = +m[2];
|
|
166
|
+
this.patch = +m[3];
|
|
167
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
|
|
168
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
|
|
169
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
|
|
170
|
+
if (!m[4]) this.prerelease = [];
|
|
171
|
+
else this.prerelease = m[4].split(".").map((id) => {
|
|
172
|
+
if (/^[0-9]+$/.test(id)) {
|
|
173
|
+
const num = +id;
|
|
174
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) return num;
|
|
175
|
+
}
|
|
176
|
+
return id;
|
|
177
|
+
});
|
|
178
|
+
this.build = m[5] ? m[5].split(".") : [];
|
|
179
|
+
this.format();
|
|
180
|
+
}
|
|
181
|
+
format() {
|
|
182
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
183
|
+
if (this.prerelease.length) this.version += `-${this.prerelease.join(".")}`;
|
|
184
|
+
return this.version;
|
|
185
|
+
}
|
|
186
|
+
toString() {
|
|
187
|
+
return this.version;
|
|
188
|
+
}
|
|
189
|
+
compare(other) {
|
|
190
|
+
debug("SemVer.compare", this.version, this.options, other);
|
|
191
|
+
if (!(other instanceof SemVer)) {
|
|
192
|
+
if (typeof other === "string" && other === this.version) return 0;
|
|
193
|
+
other = new SemVer(other, this.options);
|
|
194
|
+
}
|
|
195
|
+
if (other.version === this.version) return 0;
|
|
196
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
197
|
+
}
|
|
198
|
+
compareMain(other) {
|
|
199
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
200
|
+
if (this.major < other.major) return -1;
|
|
201
|
+
if (this.major > other.major) return 1;
|
|
202
|
+
if (this.minor < other.minor) return -1;
|
|
203
|
+
if (this.minor > other.minor) return 1;
|
|
204
|
+
if (this.patch < other.patch) return -1;
|
|
205
|
+
if (this.patch > other.patch) return 1;
|
|
206
|
+
return 0;
|
|
207
|
+
}
|
|
208
|
+
comparePre(other) {
|
|
209
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
210
|
+
if (this.prerelease.length && !other.prerelease.length) return -1;
|
|
211
|
+
else if (!this.prerelease.length && other.prerelease.length) return 1;
|
|
212
|
+
else if (!this.prerelease.length && !other.prerelease.length) return 0;
|
|
213
|
+
let i = 0;
|
|
214
|
+
do {
|
|
215
|
+
const a = this.prerelease[i];
|
|
216
|
+
const b = other.prerelease[i];
|
|
217
|
+
debug("prerelease compare", i, a, b);
|
|
218
|
+
if (a === void 0 && b === void 0) return 0;
|
|
219
|
+
else if (b === void 0) return 1;
|
|
220
|
+
else if (a === void 0) return -1;
|
|
221
|
+
else if (a === b) continue;
|
|
222
|
+
else return compareIdentifiers(a, b);
|
|
223
|
+
} while (++i);
|
|
224
|
+
}
|
|
225
|
+
compareBuild(other) {
|
|
226
|
+
if (!(other instanceof SemVer)) other = new SemVer(other, this.options);
|
|
227
|
+
let i = 0;
|
|
228
|
+
do {
|
|
229
|
+
const a = this.build[i];
|
|
230
|
+
const b = other.build[i];
|
|
231
|
+
debug("build compare", i, a, b);
|
|
232
|
+
if (a === void 0 && b === void 0) return 0;
|
|
233
|
+
else if (b === void 0) return 1;
|
|
234
|
+
else if (a === void 0) return -1;
|
|
235
|
+
else if (a === b) continue;
|
|
236
|
+
else return compareIdentifiers(a, b);
|
|
237
|
+
} while (++i);
|
|
238
|
+
}
|
|
239
|
+
inc(release, identifier, identifierBase) {
|
|
240
|
+
if (release.startsWith("pre")) {
|
|
241
|
+
if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
|
|
242
|
+
if (identifier) {
|
|
243
|
+
const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
|
|
244
|
+
if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
switch (release) {
|
|
248
|
+
case "premajor":
|
|
249
|
+
this.prerelease.length = 0;
|
|
250
|
+
this.patch = 0;
|
|
251
|
+
this.minor = 0;
|
|
252
|
+
this.major++;
|
|
253
|
+
this.inc("pre", identifier, identifierBase);
|
|
254
|
+
break;
|
|
255
|
+
case "preminor":
|
|
256
|
+
this.prerelease.length = 0;
|
|
257
|
+
this.patch = 0;
|
|
258
|
+
this.minor++;
|
|
259
|
+
this.inc("pre", identifier, identifierBase);
|
|
260
|
+
break;
|
|
261
|
+
case "prepatch":
|
|
262
|
+
this.prerelease.length = 0;
|
|
263
|
+
this.inc("patch", identifier, identifierBase);
|
|
264
|
+
this.inc("pre", identifier, identifierBase);
|
|
265
|
+
break;
|
|
266
|
+
case "prerelease":
|
|
267
|
+
if (this.prerelease.length === 0) this.inc("patch", identifier, identifierBase);
|
|
268
|
+
this.inc("pre", identifier, identifierBase);
|
|
269
|
+
break;
|
|
270
|
+
case "release":
|
|
271
|
+
if (this.prerelease.length === 0) throw new Error(`version ${this.raw} is not a prerelease`);
|
|
272
|
+
this.prerelease.length = 0;
|
|
273
|
+
break;
|
|
274
|
+
case "major":
|
|
275
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) this.major++;
|
|
276
|
+
this.minor = 0;
|
|
277
|
+
this.patch = 0;
|
|
278
|
+
this.prerelease = [];
|
|
279
|
+
break;
|
|
280
|
+
case "minor":
|
|
281
|
+
if (this.patch !== 0 || this.prerelease.length === 0) this.minor++;
|
|
282
|
+
this.patch = 0;
|
|
283
|
+
this.prerelease = [];
|
|
284
|
+
break;
|
|
285
|
+
case "patch":
|
|
286
|
+
if (this.prerelease.length === 0) this.patch++;
|
|
287
|
+
this.prerelease = [];
|
|
288
|
+
break;
|
|
289
|
+
case "pre": {
|
|
290
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
291
|
+
if (this.prerelease.length === 0) this.prerelease = [base];
|
|
292
|
+
else {
|
|
293
|
+
let i = this.prerelease.length;
|
|
294
|
+
while (--i >= 0) if (typeof this.prerelease[i] === "number") {
|
|
295
|
+
this.prerelease[i]++;
|
|
296
|
+
i = -2;
|
|
297
|
+
}
|
|
298
|
+
if (i === -1) {
|
|
299
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) throw new Error("invalid increment argument: identifier already exists");
|
|
300
|
+
this.prerelease.push(base);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (identifier) {
|
|
304
|
+
let prerelease = [identifier, base];
|
|
305
|
+
if (identifierBase === false) prerelease = [identifier];
|
|
306
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
307
|
+
if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
|
|
308
|
+
} else this.prerelease = prerelease;
|
|
309
|
+
}
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
default: throw new Error(`invalid increment argument: ${release}`);
|
|
313
|
+
}
|
|
314
|
+
this.raw = this.format();
|
|
315
|
+
if (this.build.length) this.raw += `+${this.build.join(".")}`;
|
|
316
|
+
return this;
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
}));
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/parse.js
|
|
322
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
323
|
+
const SemVer = require_semver$1();
|
|
324
|
+
const parse = (version, options, throwErrors = false) => {
|
|
325
|
+
if (version instanceof SemVer) return version;
|
|
326
|
+
try {
|
|
327
|
+
return new SemVer(version, options);
|
|
328
|
+
} catch (er) {
|
|
329
|
+
if (!throwErrors) return null;
|
|
330
|
+
throw er;
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
module.exports = parse;
|
|
334
|
+
}));
|
|
335
|
+
//#endregion
|
|
336
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/valid.js
|
|
337
|
+
var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
338
|
+
const parse = require_parse();
|
|
339
|
+
const valid = (version, options) => {
|
|
340
|
+
const v = parse(version, options);
|
|
341
|
+
return v ? v.version : null;
|
|
342
|
+
};
|
|
343
|
+
module.exports = valid;
|
|
344
|
+
}));
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/clean.js
|
|
347
|
+
var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
348
|
+
const parse = require_parse();
|
|
349
|
+
const clean = (version, options) => {
|
|
350
|
+
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
351
|
+
return s ? s.version : null;
|
|
352
|
+
};
|
|
353
|
+
module.exports = clean;
|
|
354
|
+
}));
|
|
355
|
+
//#endregion
|
|
356
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/inc.js
|
|
357
|
+
var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
358
|
+
const SemVer = require_semver$1();
|
|
359
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
360
|
+
if (typeof options === "string") {
|
|
361
|
+
identifierBase = identifier;
|
|
362
|
+
identifier = options;
|
|
363
|
+
options = void 0;
|
|
364
|
+
}
|
|
365
|
+
try {
|
|
366
|
+
return new SemVer(version instanceof SemVer ? version.version : version, options).inc(release, identifier, identifierBase).version;
|
|
367
|
+
} catch (er) {
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
module.exports = inc;
|
|
372
|
+
}));
|
|
373
|
+
//#endregion
|
|
374
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/diff.js
|
|
375
|
+
var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
376
|
+
const parse = require_parse();
|
|
377
|
+
const diff = (version1, version2) => {
|
|
378
|
+
const v1 = parse(version1, null, true);
|
|
379
|
+
const v2 = parse(version2, null, true);
|
|
380
|
+
const comparison = v1.compare(v2);
|
|
381
|
+
if (comparison === 0) return null;
|
|
382
|
+
const v1Higher = comparison > 0;
|
|
383
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
384
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
385
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
386
|
+
if (!!lowVersion.prerelease.length && !highHasPre) {
|
|
387
|
+
if (!lowVersion.patch && !lowVersion.minor) return "major";
|
|
388
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
389
|
+
if (lowVersion.minor && !lowVersion.patch) return "minor";
|
|
390
|
+
return "patch";
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
const prefix = highHasPre ? "pre" : "";
|
|
394
|
+
if (v1.major !== v2.major) return prefix + "major";
|
|
395
|
+
if (v1.minor !== v2.minor) return prefix + "minor";
|
|
396
|
+
if (v1.patch !== v2.patch) return prefix + "patch";
|
|
397
|
+
return "prerelease";
|
|
398
|
+
};
|
|
399
|
+
module.exports = diff;
|
|
400
|
+
}));
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/major.js
|
|
403
|
+
var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
404
|
+
const SemVer = require_semver$1();
|
|
405
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
406
|
+
module.exports = major;
|
|
407
|
+
}));
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/minor.js
|
|
410
|
+
var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
411
|
+
const SemVer = require_semver$1();
|
|
412
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
413
|
+
module.exports = minor;
|
|
414
|
+
}));
|
|
415
|
+
//#endregion
|
|
416
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/patch.js
|
|
417
|
+
var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
418
|
+
const SemVer = require_semver$1();
|
|
419
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
420
|
+
module.exports = patch;
|
|
421
|
+
}));
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/prerelease.js
|
|
424
|
+
var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
425
|
+
const parse = require_parse();
|
|
426
|
+
const prerelease = (version, options) => {
|
|
427
|
+
const parsed = parse(version, options);
|
|
428
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
429
|
+
};
|
|
430
|
+
module.exports = prerelease;
|
|
431
|
+
}));
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare.js
|
|
434
|
+
var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
435
|
+
const SemVer = require_semver$1();
|
|
436
|
+
const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
437
|
+
module.exports = compare;
|
|
438
|
+
}));
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/rcompare.js
|
|
441
|
+
var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
442
|
+
const compare = require_compare();
|
|
443
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
444
|
+
module.exports = rcompare;
|
|
445
|
+
}));
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare-loose.js
|
|
448
|
+
var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
449
|
+
const compare = require_compare();
|
|
450
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
451
|
+
module.exports = compareLoose;
|
|
452
|
+
}));
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/compare-build.js
|
|
455
|
+
var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
456
|
+
const SemVer = require_semver$1();
|
|
457
|
+
const compareBuild = (a, b, loose) => {
|
|
458
|
+
const versionA = new SemVer(a, loose);
|
|
459
|
+
const versionB = new SemVer(b, loose);
|
|
460
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
461
|
+
};
|
|
462
|
+
module.exports = compareBuild;
|
|
463
|
+
}));
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/sort.js
|
|
466
|
+
var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
467
|
+
const compareBuild = require_compare_build();
|
|
468
|
+
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
469
|
+
module.exports = sort;
|
|
470
|
+
}));
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/rsort.js
|
|
473
|
+
var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
474
|
+
const compareBuild = require_compare_build();
|
|
475
|
+
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
476
|
+
module.exports = rsort;
|
|
477
|
+
}));
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gt.js
|
|
480
|
+
var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
481
|
+
const compare = require_compare();
|
|
482
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
483
|
+
module.exports = gt;
|
|
484
|
+
}));
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lt.js
|
|
487
|
+
var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
488
|
+
const compare = require_compare();
|
|
489
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
490
|
+
module.exports = lt;
|
|
491
|
+
}));
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/eq.js
|
|
494
|
+
var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
495
|
+
const compare = require_compare();
|
|
496
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
497
|
+
module.exports = eq;
|
|
498
|
+
}));
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/neq.js
|
|
501
|
+
var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
502
|
+
const compare = require_compare();
|
|
503
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
504
|
+
module.exports = neq;
|
|
505
|
+
}));
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/gte.js
|
|
508
|
+
var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
509
|
+
const compare = require_compare();
|
|
510
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
511
|
+
module.exports = gte;
|
|
512
|
+
}));
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/lte.js
|
|
515
|
+
var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
516
|
+
const compare = require_compare();
|
|
517
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
518
|
+
module.exports = lte;
|
|
519
|
+
}));
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/cmp.js
|
|
522
|
+
var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
523
|
+
const eq = require_eq();
|
|
524
|
+
const neq = require_neq();
|
|
525
|
+
const gt = require_gt();
|
|
526
|
+
const gte = require_gte();
|
|
527
|
+
const lt = require_lt();
|
|
528
|
+
const lte = require_lte();
|
|
529
|
+
const cmp = (a, op, b, loose) => {
|
|
530
|
+
switch (op) {
|
|
531
|
+
case "===":
|
|
532
|
+
if (typeof a === "object") a = a.version;
|
|
533
|
+
if (typeof b === "object") b = b.version;
|
|
534
|
+
return a === b;
|
|
535
|
+
case "!==":
|
|
536
|
+
if (typeof a === "object") a = a.version;
|
|
537
|
+
if (typeof b === "object") b = b.version;
|
|
538
|
+
return a !== b;
|
|
539
|
+
case "":
|
|
540
|
+
case "=":
|
|
541
|
+
case "==": return eq(a, b, loose);
|
|
542
|
+
case "!=": return neq(a, b, loose);
|
|
543
|
+
case ">": return gt(a, b, loose);
|
|
544
|
+
case ">=": return gte(a, b, loose);
|
|
545
|
+
case "<": return lt(a, b, loose);
|
|
546
|
+
case "<=": return lte(a, b, loose);
|
|
547
|
+
default: throw new TypeError(`Invalid operator: ${op}`);
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
module.exports = cmp;
|
|
551
|
+
}));
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/coerce.js
|
|
554
|
+
var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
555
|
+
const SemVer = require_semver$1();
|
|
556
|
+
const parse = require_parse();
|
|
557
|
+
const { safeRe: re, t } = require_re();
|
|
558
|
+
const coerce = (version, options) => {
|
|
559
|
+
if (version instanceof SemVer) return version;
|
|
560
|
+
if (typeof version === "number") version = String(version);
|
|
561
|
+
if (typeof version !== "string") return null;
|
|
562
|
+
options = options || {};
|
|
563
|
+
let match = null;
|
|
564
|
+
if (!options.rtl) match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
565
|
+
else {
|
|
566
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
567
|
+
let next;
|
|
568
|
+
while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) {
|
|
569
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
570
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
571
|
+
}
|
|
572
|
+
coerceRtlRegex.lastIndex = -1;
|
|
573
|
+
}
|
|
574
|
+
if (match === null) return null;
|
|
575
|
+
const major = match[2];
|
|
576
|
+
return parse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
577
|
+
};
|
|
578
|
+
module.exports = coerce;
|
|
579
|
+
}));
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/internal/lrucache.js
|
|
582
|
+
var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
583
|
+
var LRUCache = class {
|
|
584
|
+
constructor() {
|
|
585
|
+
this.max = 1e3;
|
|
586
|
+
this.map = /* @__PURE__ */ new Map();
|
|
587
|
+
}
|
|
588
|
+
get(key) {
|
|
589
|
+
const value = this.map.get(key);
|
|
590
|
+
if (value === void 0) return;
|
|
591
|
+
else {
|
|
592
|
+
this.map.delete(key);
|
|
593
|
+
this.map.set(key, value);
|
|
594
|
+
return value;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
delete(key) {
|
|
598
|
+
return this.map.delete(key);
|
|
599
|
+
}
|
|
600
|
+
set(key, value) {
|
|
601
|
+
if (!this.delete(key) && value !== void 0) {
|
|
602
|
+
if (this.map.size >= this.max) {
|
|
603
|
+
const firstKey = this.map.keys().next().value;
|
|
604
|
+
this.delete(firstKey);
|
|
605
|
+
}
|
|
606
|
+
this.map.set(key, value);
|
|
607
|
+
}
|
|
608
|
+
return this;
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
module.exports = LRUCache;
|
|
612
|
+
}));
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/range.js
|
|
615
|
+
var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
616
|
+
const SPACE_CHARACTERS = /\s+/g;
|
|
617
|
+
module.exports = class Range {
|
|
618
|
+
constructor(range, options) {
|
|
619
|
+
options = parseOptions(options);
|
|
620
|
+
if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
|
|
621
|
+
else return new Range(range.raw, options);
|
|
622
|
+
if (range instanceof Comparator) {
|
|
623
|
+
this.raw = range.value;
|
|
624
|
+
this.set = [[range]];
|
|
625
|
+
this.formatted = void 0;
|
|
626
|
+
return this;
|
|
627
|
+
}
|
|
628
|
+
this.options = options;
|
|
629
|
+
this.loose = !!options.loose;
|
|
630
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
631
|
+
this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
|
|
632
|
+
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
633
|
+
if (!this.set.length) throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
634
|
+
if (this.set.length > 1) {
|
|
635
|
+
const first = this.set[0];
|
|
636
|
+
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
637
|
+
if (this.set.length === 0) this.set = [first];
|
|
638
|
+
else if (this.set.length > 1) {
|
|
639
|
+
for (const c of this.set) if (c.length === 1 && isAny(c[0])) {
|
|
640
|
+
this.set = [c];
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
this.formatted = void 0;
|
|
646
|
+
}
|
|
647
|
+
get range() {
|
|
648
|
+
if (this.formatted === void 0) {
|
|
649
|
+
this.formatted = "";
|
|
650
|
+
for (let i = 0; i < this.set.length; i++) {
|
|
651
|
+
if (i > 0) this.formatted += "||";
|
|
652
|
+
const comps = this.set[i];
|
|
653
|
+
for (let k = 0; k < comps.length; k++) {
|
|
654
|
+
if (k > 0) this.formatted += " ";
|
|
655
|
+
this.formatted += comps[k].toString().trim();
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
return this.formatted;
|
|
660
|
+
}
|
|
661
|
+
format() {
|
|
662
|
+
return this.range;
|
|
663
|
+
}
|
|
664
|
+
toString() {
|
|
665
|
+
return this.range;
|
|
666
|
+
}
|
|
667
|
+
parseRange(range) {
|
|
668
|
+
const memoKey = ((this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE)) + ":" + range;
|
|
669
|
+
const cached = cache.get(memoKey);
|
|
670
|
+
if (cached) return cached;
|
|
671
|
+
const loose = this.options.loose;
|
|
672
|
+
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
673
|
+
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
674
|
+
debug("hyphen replace", range);
|
|
675
|
+
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
676
|
+
debug("comparator trim", range);
|
|
677
|
+
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
678
|
+
debug("tilde trim", range);
|
|
679
|
+
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
680
|
+
debug("caret trim", range);
|
|
681
|
+
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
682
|
+
if (loose) rangeList = rangeList.filter((comp) => {
|
|
683
|
+
debug("loose invalid filter", comp, this.options);
|
|
684
|
+
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
685
|
+
});
|
|
686
|
+
debug("range list", rangeList);
|
|
687
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
688
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
689
|
+
for (const comp of comparators) {
|
|
690
|
+
if (isNullSet(comp)) return [comp];
|
|
691
|
+
rangeMap.set(comp.value, comp);
|
|
692
|
+
}
|
|
693
|
+
if (rangeMap.size > 1 && rangeMap.has("")) rangeMap.delete("");
|
|
694
|
+
const result = [...rangeMap.values()];
|
|
695
|
+
cache.set(memoKey, result);
|
|
696
|
+
return result;
|
|
697
|
+
}
|
|
698
|
+
intersects(range, options) {
|
|
699
|
+
if (!(range instanceof Range)) throw new TypeError("a Range is required");
|
|
700
|
+
return this.set.some((thisComparators) => {
|
|
701
|
+
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
702
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
703
|
+
return rangeComparators.every((rangeComparator) => {
|
|
704
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
705
|
+
});
|
|
706
|
+
});
|
|
707
|
+
});
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
test(version) {
|
|
711
|
+
if (!version) return false;
|
|
712
|
+
if (typeof version === "string") try {
|
|
713
|
+
version = new SemVer(version, this.options);
|
|
714
|
+
} catch (er) {
|
|
715
|
+
return false;
|
|
716
|
+
}
|
|
717
|
+
for (let i = 0; i < this.set.length; i++) if (testSet(this.set[i], version, this.options)) return true;
|
|
718
|
+
return false;
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
const cache = new (require_lrucache())();
|
|
722
|
+
const parseOptions = require_parse_options();
|
|
723
|
+
const Comparator = require_comparator();
|
|
724
|
+
const debug = require_debug();
|
|
725
|
+
const SemVer = require_semver$1();
|
|
726
|
+
const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
|
|
727
|
+
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
728
|
+
const isNullSet = (c) => c.value === "<0.0.0-0";
|
|
729
|
+
const isAny = (c) => c.value === "";
|
|
730
|
+
const isSatisfiable = (comparators, options) => {
|
|
731
|
+
let result = true;
|
|
732
|
+
const remainingComparators = comparators.slice();
|
|
733
|
+
let testComparator = remainingComparators.pop();
|
|
734
|
+
while (result && remainingComparators.length) {
|
|
735
|
+
result = remainingComparators.every((otherComparator) => {
|
|
736
|
+
return testComparator.intersects(otherComparator, options);
|
|
737
|
+
});
|
|
738
|
+
testComparator = remainingComparators.pop();
|
|
739
|
+
}
|
|
740
|
+
return result;
|
|
741
|
+
};
|
|
742
|
+
const parseComparator = (comp, options) => {
|
|
743
|
+
comp = comp.replace(re[t.BUILD], "");
|
|
744
|
+
debug("comp", comp, options);
|
|
745
|
+
comp = replaceCarets(comp, options);
|
|
746
|
+
debug("caret", comp);
|
|
747
|
+
comp = replaceTildes(comp, options);
|
|
748
|
+
debug("tildes", comp);
|
|
749
|
+
comp = replaceXRanges(comp, options);
|
|
750
|
+
debug("xrange", comp);
|
|
751
|
+
comp = replaceStars(comp, options);
|
|
752
|
+
debug("stars", comp);
|
|
753
|
+
return comp;
|
|
754
|
+
};
|
|
755
|
+
const isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
756
|
+
const replaceTildes = (comp, options) => {
|
|
757
|
+
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
758
|
+
};
|
|
759
|
+
const replaceTilde = (comp, options) => {
|
|
760
|
+
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
761
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
762
|
+
debug("tilde", comp, _, M, m, p, pr);
|
|
763
|
+
let ret;
|
|
764
|
+
if (isX(M)) ret = "";
|
|
765
|
+
else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
766
|
+
else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
767
|
+
else if (pr) {
|
|
768
|
+
debug("replaceTilde pr", pr);
|
|
769
|
+
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
770
|
+
} else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
771
|
+
debug("tilde return", ret);
|
|
772
|
+
return ret;
|
|
773
|
+
});
|
|
774
|
+
};
|
|
775
|
+
const replaceCarets = (comp, options) => {
|
|
776
|
+
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
777
|
+
};
|
|
778
|
+
const replaceCaret = (comp, options) => {
|
|
779
|
+
debug("caret", comp, options);
|
|
780
|
+
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
781
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
782
|
+
return comp.replace(r, (_, M, m, p, pr) => {
|
|
783
|
+
debug("caret", comp, _, M, m, p, pr);
|
|
784
|
+
let ret;
|
|
785
|
+
if (isX(M)) ret = "";
|
|
786
|
+
else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
787
|
+
else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
788
|
+
else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
789
|
+
else if (pr) {
|
|
790
|
+
debug("replaceCaret pr", pr);
|
|
791
|
+
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
792
|
+
else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
793
|
+
else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
794
|
+
} else {
|
|
795
|
+
debug("no pr");
|
|
796
|
+
if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
797
|
+
else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
798
|
+
else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
799
|
+
}
|
|
800
|
+
debug("caret return", ret);
|
|
801
|
+
return ret;
|
|
802
|
+
});
|
|
803
|
+
};
|
|
804
|
+
const replaceXRanges = (comp, options) => {
|
|
805
|
+
debug("replaceXRanges", comp, options);
|
|
806
|
+
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
807
|
+
};
|
|
808
|
+
const replaceXRange = (comp, options) => {
|
|
809
|
+
comp = comp.trim();
|
|
810
|
+
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
811
|
+
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
812
|
+
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
813
|
+
const xM = isX(M);
|
|
814
|
+
const xm = xM || isX(m);
|
|
815
|
+
const xp = xm || isX(p);
|
|
816
|
+
const anyX = xp;
|
|
817
|
+
if (gtlt === "=" && anyX) gtlt = "";
|
|
818
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
819
|
+
if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
|
|
820
|
+
else ret = "*";
|
|
821
|
+
else if (gtlt && anyX) {
|
|
822
|
+
if (xm) m = 0;
|
|
823
|
+
p = 0;
|
|
824
|
+
if (gtlt === ">") {
|
|
825
|
+
gtlt = ">=";
|
|
826
|
+
if (xm) {
|
|
827
|
+
M = +M + 1;
|
|
828
|
+
m = 0;
|
|
829
|
+
p = 0;
|
|
830
|
+
} else {
|
|
831
|
+
m = +m + 1;
|
|
832
|
+
p = 0;
|
|
833
|
+
}
|
|
834
|
+
} else if (gtlt === "<=") {
|
|
835
|
+
gtlt = "<";
|
|
836
|
+
if (xm) M = +M + 1;
|
|
837
|
+
else m = +m + 1;
|
|
838
|
+
}
|
|
839
|
+
if (gtlt === "<") pr = "-0";
|
|
840
|
+
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
841
|
+
} else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
842
|
+
else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
843
|
+
debug("xRange return", ret);
|
|
844
|
+
return ret;
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
const replaceStars = (comp, options) => {
|
|
848
|
+
debug("replaceStars", comp, options);
|
|
849
|
+
return comp.trim().replace(re[t.STAR], "");
|
|
850
|
+
};
|
|
851
|
+
const replaceGTE0 = (comp, options) => {
|
|
852
|
+
debug("replaceGTE0", comp, options);
|
|
853
|
+
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
854
|
+
};
|
|
855
|
+
const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
856
|
+
if (isX(fM)) from = "";
|
|
857
|
+
else if (isX(fm)) from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
858
|
+
else if (isX(fp)) from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
859
|
+
else if (fpr) from = `>=${from}`;
|
|
860
|
+
else from = `>=${from}${incPr ? "-0" : ""}`;
|
|
861
|
+
if (isX(tM)) to = "";
|
|
862
|
+
else if (isX(tm)) to = `<${+tM + 1}.0.0-0`;
|
|
863
|
+
else if (isX(tp)) to = `<${tM}.${+tm + 1}.0-0`;
|
|
864
|
+
else if (tpr) to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
865
|
+
else if (incPr) to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
866
|
+
else to = `<=${to}`;
|
|
867
|
+
return `${from} ${to}`.trim();
|
|
868
|
+
};
|
|
869
|
+
const testSet = (set, version, options) => {
|
|
870
|
+
for (let i = 0; i < set.length; i++) if (!set[i].test(version)) return false;
|
|
871
|
+
if (version.prerelease.length && !options.includePrerelease) {
|
|
872
|
+
for (let i = 0; i < set.length; i++) {
|
|
873
|
+
debug(set[i].semver);
|
|
874
|
+
if (set[i].semver === Comparator.ANY) continue;
|
|
875
|
+
if (set[i].semver.prerelease.length > 0) {
|
|
876
|
+
const allowed = set[i].semver;
|
|
877
|
+
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) return true;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
return false;
|
|
881
|
+
}
|
|
882
|
+
return true;
|
|
883
|
+
};
|
|
884
|
+
}));
|
|
885
|
+
//#endregion
|
|
886
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/classes/comparator.js
|
|
887
|
+
var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
888
|
+
const ANY = Symbol("SemVer ANY");
|
|
889
|
+
module.exports = class Comparator {
|
|
890
|
+
static get ANY() {
|
|
891
|
+
return ANY;
|
|
892
|
+
}
|
|
893
|
+
constructor(comp, options) {
|
|
894
|
+
options = parseOptions(options);
|
|
895
|
+
if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
|
|
896
|
+
else comp = comp.value;
|
|
897
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
898
|
+
debug("comparator", comp, options);
|
|
899
|
+
this.options = options;
|
|
900
|
+
this.loose = !!options.loose;
|
|
901
|
+
this.parse(comp);
|
|
902
|
+
if (this.semver === ANY) this.value = "";
|
|
903
|
+
else this.value = this.operator + this.semver.version;
|
|
904
|
+
debug("comp", this);
|
|
905
|
+
}
|
|
906
|
+
parse(comp) {
|
|
907
|
+
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
908
|
+
const m = comp.match(r);
|
|
909
|
+
if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
|
|
910
|
+
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
911
|
+
if (this.operator === "=") this.operator = "";
|
|
912
|
+
if (!m[2]) this.semver = ANY;
|
|
913
|
+
else this.semver = new SemVer(m[2], this.options.loose);
|
|
914
|
+
}
|
|
915
|
+
toString() {
|
|
916
|
+
return this.value;
|
|
917
|
+
}
|
|
918
|
+
test(version) {
|
|
919
|
+
debug("Comparator.test", version, this.options.loose);
|
|
920
|
+
if (this.semver === ANY || version === ANY) return true;
|
|
921
|
+
if (typeof version === "string") try {
|
|
922
|
+
version = new SemVer(version, this.options);
|
|
923
|
+
} catch (er) {
|
|
924
|
+
return false;
|
|
925
|
+
}
|
|
926
|
+
return cmp(version, this.operator, this.semver, this.options);
|
|
927
|
+
}
|
|
928
|
+
intersects(comp, options) {
|
|
929
|
+
if (!(comp instanceof Comparator)) throw new TypeError("a Comparator is required");
|
|
930
|
+
if (this.operator === "") {
|
|
931
|
+
if (this.value === "") return true;
|
|
932
|
+
return new Range(comp.value, options).test(this.value);
|
|
933
|
+
} else if (comp.operator === "") {
|
|
934
|
+
if (comp.value === "") return true;
|
|
935
|
+
return new Range(this.value, options).test(comp.semver);
|
|
936
|
+
}
|
|
937
|
+
options = parseOptions(options);
|
|
938
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
|
|
939
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) return false;
|
|
940
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
|
|
941
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
|
|
942
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
|
|
943
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
|
|
944
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
|
|
945
|
+
return false;
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
const parseOptions = require_parse_options();
|
|
949
|
+
const { safeRe: re, t } = require_re();
|
|
950
|
+
const cmp = require_cmp();
|
|
951
|
+
const debug = require_debug();
|
|
952
|
+
const SemVer = require_semver$1();
|
|
953
|
+
const Range = require_range();
|
|
954
|
+
}));
|
|
955
|
+
//#endregion
|
|
956
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/functions/satisfies.js
|
|
957
|
+
var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
958
|
+
const Range = require_range();
|
|
959
|
+
const satisfies = (version, range, options) => {
|
|
960
|
+
try {
|
|
961
|
+
range = new Range(range, options);
|
|
962
|
+
} catch (er) {
|
|
963
|
+
return false;
|
|
964
|
+
}
|
|
965
|
+
return range.test(version);
|
|
966
|
+
};
|
|
967
|
+
module.exports = satisfies;
|
|
968
|
+
}));
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/to-comparators.js
|
|
971
|
+
var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
972
|
+
const Range = require_range();
|
|
973
|
+
const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
974
|
+
module.exports = toComparators;
|
|
975
|
+
}));
|
|
976
|
+
//#endregion
|
|
977
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/max-satisfying.js
|
|
978
|
+
var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
979
|
+
const SemVer = require_semver$1();
|
|
980
|
+
const Range = require_range();
|
|
981
|
+
const maxSatisfying = (versions, range, options) => {
|
|
982
|
+
let max = null;
|
|
983
|
+
let maxSV = null;
|
|
984
|
+
let rangeObj = null;
|
|
985
|
+
try {
|
|
986
|
+
rangeObj = new Range(range, options);
|
|
987
|
+
} catch (er) {
|
|
988
|
+
return null;
|
|
989
|
+
}
|
|
990
|
+
versions.forEach((v) => {
|
|
991
|
+
if (rangeObj.test(v)) {
|
|
992
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
993
|
+
max = v;
|
|
994
|
+
maxSV = new SemVer(max, options);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
return max;
|
|
999
|
+
};
|
|
1000
|
+
module.exports = maxSatisfying;
|
|
1001
|
+
}));
|
|
1002
|
+
//#endregion
|
|
1003
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-satisfying.js
|
|
1004
|
+
var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1005
|
+
const SemVer = require_semver$1();
|
|
1006
|
+
const Range = require_range();
|
|
1007
|
+
const minSatisfying = (versions, range, options) => {
|
|
1008
|
+
let min = null;
|
|
1009
|
+
let minSV = null;
|
|
1010
|
+
let rangeObj = null;
|
|
1011
|
+
try {
|
|
1012
|
+
rangeObj = new Range(range, options);
|
|
1013
|
+
} catch (er) {
|
|
1014
|
+
return null;
|
|
1015
|
+
}
|
|
1016
|
+
versions.forEach((v) => {
|
|
1017
|
+
if (rangeObj.test(v)) {
|
|
1018
|
+
if (!min || minSV.compare(v) === 1) {
|
|
1019
|
+
min = v;
|
|
1020
|
+
minSV = new SemVer(min, options);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
});
|
|
1024
|
+
return min;
|
|
1025
|
+
};
|
|
1026
|
+
module.exports = minSatisfying;
|
|
1027
|
+
}));
|
|
1028
|
+
//#endregion
|
|
1029
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/min-version.js
|
|
1030
|
+
var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1031
|
+
const SemVer = require_semver$1();
|
|
1032
|
+
const Range = require_range();
|
|
1033
|
+
const gt = require_gt();
|
|
1034
|
+
const minVersion = (range, loose) => {
|
|
1035
|
+
range = new Range(range, loose);
|
|
1036
|
+
let minver = new SemVer("0.0.0");
|
|
1037
|
+
if (range.test(minver)) return minver;
|
|
1038
|
+
minver = new SemVer("0.0.0-0");
|
|
1039
|
+
if (range.test(minver)) return minver;
|
|
1040
|
+
minver = null;
|
|
1041
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
1042
|
+
const comparators = range.set[i];
|
|
1043
|
+
let setMin = null;
|
|
1044
|
+
comparators.forEach((comparator) => {
|
|
1045
|
+
const compver = new SemVer(comparator.semver.version);
|
|
1046
|
+
switch (comparator.operator) {
|
|
1047
|
+
case ">":
|
|
1048
|
+
if (compver.prerelease.length === 0) compver.patch++;
|
|
1049
|
+
else compver.prerelease.push(0);
|
|
1050
|
+
compver.raw = compver.format();
|
|
1051
|
+
case "":
|
|
1052
|
+
case ">=":
|
|
1053
|
+
if (!setMin || gt(compver, setMin)) setMin = compver;
|
|
1054
|
+
break;
|
|
1055
|
+
case "<":
|
|
1056
|
+
case "<=": break;
|
|
1057
|
+
/* istanbul ignore next */
|
|
1058
|
+
default: throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
if (setMin && (!minver || gt(minver, setMin))) minver = setMin;
|
|
1062
|
+
}
|
|
1063
|
+
if (minver && range.test(minver)) return minver;
|
|
1064
|
+
return null;
|
|
1065
|
+
};
|
|
1066
|
+
module.exports = minVersion;
|
|
1067
|
+
}));
|
|
1068
|
+
//#endregion
|
|
1069
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/valid.js
|
|
1070
|
+
var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1071
|
+
const Range = require_range();
|
|
1072
|
+
const validRange = (range, options) => {
|
|
1073
|
+
try {
|
|
1074
|
+
return new Range(range, options).range || "*";
|
|
1075
|
+
} catch (er) {
|
|
1076
|
+
return null;
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
module.exports = validRange;
|
|
1080
|
+
}));
|
|
1081
|
+
//#endregion
|
|
1082
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/outside.js
|
|
1083
|
+
var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1084
|
+
const SemVer = require_semver$1();
|
|
1085
|
+
const Comparator = require_comparator();
|
|
1086
|
+
const { ANY } = Comparator;
|
|
1087
|
+
const Range = require_range();
|
|
1088
|
+
const satisfies = require_satisfies();
|
|
1089
|
+
const gt = require_gt();
|
|
1090
|
+
const lt = require_lt();
|
|
1091
|
+
const lte = require_lte();
|
|
1092
|
+
const gte = require_gte();
|
|
1093
|
+
const outside = (version, range, hilo, options) => {
|
|
1094
|
+
version = new SemVer(version, options);
|
|
1095
|
+
range = new Range(range, options);
|
|
1096
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
1097
|
+
switch (hilo) {
|
|
1098
|
+
case ">":
|
|
1099
|
+
gtfn = gt;
|
|
1100
|
+
ltefn = lte;
|
|
1101
|
+
ltfn = lt;
|
|
1102
|
+
comp = ">";
|
|
1103
|
+
ecomp = ">=";
|
|
1104
|
+
break;
|
|
1105
|
+
case "<":
|
|
1106
|
+
gtfn = lt;
|
|
1107
|
+
ltefn = gte;
|
|
1108
|
+
ltfn = gt;
|
|
1109
|
+
comp = "<";
|
|
1110
|
+
ecomp = "<=";
|
|
1111
|
+
break;
|
|
1112
|
+
default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
|
|
1113
|
+
}
|
|
1114
|
+
if (satisfies(version, range, options)) return false;
|
|
1115
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
1116
|
+
const comparators = range.set[i];
|
|
1117
|
+
let high = null;
|
|
1118
|
+
let low = null;
|
|
1119
|
+
comparators.forEach((comparator) => {
|
|
1120
|
+
if (comparator.semver === ANY) comparator = new Comparator(">=0.0.0");
|
|
1121
|
+
high = high || comparator;
|
|
1122
|
+
low = low || comparator;
|
|
1123
|
+
if (gtfn(comparator.semver, high.semver, options)) high = comparator;
|
|
1124
|
+
else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
|
|
1125
|
+
});
|
|
1126
|
+
if (high.operator === comp || high.operator === ecomp) return false;
|
|
1127
|
+
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) return false;
|
|
1128
|
+
else if (low.operator === ecomp && ltfn(version, low.semver)) return false;
|
|
1129
|
+
}
|
|
1130
|
+
return true;
|
|
1131
|
+
};
|
|
1132
|
+
module.exports = outside;
|
|
1133
|
+
}));
|
|
1134
|
+
//#endregion
|
|
1135
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/gtr.js
|
|
1136
|
+
var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1137
|
+
const outside = require_outside();
|
|
1138
|
+
const gtr = (version, range, options) => outside(version, range, ">", options);
|
|
1139
|
+
module.exports = gtr;
|
|
1140
|
+
}));
|
|
1141
|
+
//#endregion
|
|
1142
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/ltr.js
|
|
1143
|
+
var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1144
|
+
const outside = require_outside();
|
|
1145
|
+
const ltr = (version, range, options) => outside(version, range, "<", options);
|
|
1146
|
+
module.exports = ltr;
|
|
1147
|
+
}));
|
|
1148
|
+
//#endregion
|
|
1149
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/intersects.js
|
|
1150
|
+
var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1151
|
+
const Range = require_range();
|
|
1152
|
+
const intersects = (r1, r2, options) => {
|
|
1153
|
+
r1 = new Range(r1, options);
|
|
1154
|
+
r2 = new Range(r2, options);
|
|
1155
|
+
return r1.intersects(r2, options);
|
|
1156
|
+
};
|
|
1157
|
+
module.exports = intersects;
|
|
1158
|
+
}));
|
|
1159
|
+
//#endregion
|
|
1160
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/simplify.js
|
|
1161
|
+
var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1162
|
+
const satisfies = require_satisfies();
|
|
1163
|
+
const compare = require_compare();
|
|
1164
|
+
module.exports = (versions, range, options) => {
|
|
1165
|
+
const set = [];
|
|
1166
|
+
let first = null;
|
|
1167
|
+
let prev = null;
|
|
1168
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
1169
|
+
for (const version of v) if (satisfies(version, range, options)) {
|
|
1170
|
+
prev = version;
|
|
1171
|
+
if (!first) first = version;
|
|
1172
|
+
} else {
|
|
1173
|
+
if (prev) set.push([first, prev]);
|
|
1174
|
+
prev = null;
|
|
1175
|
+
first = null;
|
|
1176
|
+
}
|
|
1177
|
+
if (first) set.push([first, null]);
|
|
1178
|
+
const ranges = [];
|
|
1179
|
+
for (const [min, max] of set) if (min === max) ranges.push(min);
|
|
1180
|
+
else if (!max && min === v[0]) ranges.push("*");
|
|
1181
|
+
else if (!max) ranges.push(`>=${min}`);
|
|
1182
|
+
else if (min === v[0]) ranges.push(`<=${max}`);
|
|
1183
|
+
else ranges.push(`${min} - ${max}`);
|
|
1184
|
+
const simplified = ranges.join(" || ");
|
|
1185
|
+
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
1186
|
+
return simplified.length < original.length ? simplified : range;
|
|
1187
|
+
};
|
|
1188
|
+
}));
|
|
1189
|
+
//#endregion
|
|
1190
|
+
//#region ../../node_modules/.bun/semver@7.7.4/node_modules/semver/ranges/subset.js
|
|
1191
|
+
var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1192
|
+
const Range = require_range();
|
|
1193
|
+
const Comparator = require_comparator();
|
|
1194
|
+
const { ANY } = Comparator;
|
|
1195
|
+
const satisfies = require_satisfies();
|
|
1196
|
+
const compare = require_compare();
|
|
1197
|
+
const subset = (sub, dom, options = {}) => {
|
|
1198
|
+
if (sub === dom) return true;
|
|
1199
|
+
sub = new Range(sub, options);
|
|
1200
|
+
dom = new Range(dom, options);
|
|
1201
|
+
let sawNonNull = false;
|
|
1202
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
1203
|
+
for (const simpleDom of dom.set) {
|
|
1204
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
1205
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
1206
|
+
if (isSub) continue OUTER;
|
|
1207
|
+
}
|
|
1208
|
+
if (sawNonNull) return false;
|
|
1209
|
+
}
|
|
1210
|
+
return true;
|
|
1211
|
+
};
|
|
1212
|
+
const minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
1213
|
+
const minimumVersion = [new Comparator(">=0.0.0")];
|
|
1214
|
+
const simpleSubset = (sub, dom, options) => {
|
|
1215
|
+
if (sub === dom) return true;
|
|
1216
|
+
if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
|
|
1217
|
+
else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
|
|
1218
|
+
else sub = minimumVersion;
|
|
1219
|
+
if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
|
|
1220
|
+
else dom = minimumVersion;
|
|
1221
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
1222
|
+
let gt, lt;
|
|
1223
|
+
for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
|
|
1224
|
+
else if (c.operator === "<" || c.operator === "<=") lt = lowerLT(lt, c, options);
|
|
1225
|
+
else eqSet.add(c.semver);
|
|
1226
|
+
if (eqSet.size > 1) return null;
|
|
1227
|
+
let gtltComp;
|
|
1228
|
+
if (gt && lt) {
|
|
1229
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
1230
|
+
if (gtltComp > 0) return null;
|
|
1231
|
+
else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) return null;
|
|
1232
|
+
}
|
|
1233
|
+
for (const eq of eqSet) {
|
|
1234
|
+
if (gt && !satisfies(eq, String(gt), options)) return null;
|
|
1235
|
+
if (lt && !satisfies(eq, String(lt), options)) return null;
|
|
1236
|
+
for (const c of dom) if (!satisfies(eq, String(c), options)) return false;
|
|
1237
|
+
return true;
|
|
1238
|
+
}
|
|
1239
|
+
let higher, lower;
|
|
1240
|
+
let hasDomLT, hasDomGT;
|
|
1241
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
1242
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
1243
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
|
|
1244
|
+
for (const c of dom) {
|
|
1245
|
+
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
1246
|
+
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
1247
|
+
if (gt) {
|
|
1248
|
+
if (needDomGTPre) {
|
|
1249
|
+
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;
|
|
1250
|
+
}
|
|
1251
|
+
if (c.operator === ">" || c.operator === ">=") {
|
|
1252
|
+
higher = higherGT(gt, c, options);
|
|
1253
|
+
if (higher === c && higher !== gt) return false;
|
|
1254
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) return false;
|
|
1255
|
+
}
|
|
1256
|
+
if (lt) {
|
|
1257
|
+
if (needDomLTPre) {
|
|
1258
|
+
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;
|
|
1259
|
+
}
|
|
1260
|
+
if (c.operator === "<" || c.operator === "<=") {
|
|
1261
|
+
lower = lowerLT(lt, c, options);
|
|
1262
|
+
if (lower === c && lower !== lt) return false;
|
|
1263
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) return false;
|
|
1264
|
+
}
|
|
1265
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
|
|
1266
|
+
}
|
|
1267
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
|
|
1268
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
|
|
1269
|
+
if (needDomGTPre || needDomLTPre) return false;
|
|
1270
|
+
return true;
|
|
1271
|
+
};
|
|
1272
|
+
const higherGT = (a, b, options) => {
|
|
1273
|
+
if (!a) return b;
|
|
1274
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1275
|
+
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
1276
|
+
};
|
|
1277
|
+
const lowerLT = (a, b, options) => {
|
|
1278
|
+
if (!a) return b;
|
|
1279
|
+
const comp = compare(a.semver, b.semver, options);
|
|
1280
|
+
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
1281
|
+
};
|
|
1282
|
+
module.exports = subset;
|
|
1283
|
+
}));
|
|
1284
|
+
//#endregion
|
|
1285
|
+
//#region src/core/semver.ts
|
|
1286
|
+
var import_semver = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1287
|
+
const internalRe = require_re();
|
|
1288
|
+
const constants = require_constants();
|
|
1289
|
+
const SemVer = require_semver$1();
|
|
1290
|
+
const identifiers = require_identifiers();
|
|
1291
|
+
module.exports = {
|
|
1292
|
+
parse: require_parse(),
|
|
1293
|
+
valid: require_valid$1(),
|
|
1294
|
+
clean: require_clean(),
|
|
1295
|
+
inc: require_inc(),
|
|
1296
|
+
diff: require_diff(),
|
|
1297
|
+
major: require_major(),
|
|
1298
|
+
minor: require_minor(),
|
|
1299
|
+
patch: require_patch(),
|
|
1300
|
+
prerelease: require_prerelease(),
|
|
1301
|
+
compare: require_compare(),
|
|
1302
|
+
rcompare: require_rcompare(),
|
|
1303
|
+
compareLoose: require_compare_loose(),
|
|
1304
|
+
compareBuild: require_compare_build(),
|
|
1305
|
+
sort: require_sort(),
|
|
1306
|
+
rsort: require_rsort(),
|
|
1307
|
+
gt: require_gt(),
|
|
1308
|
+
lt: require_lt(),
|
|
1309
|
+
eq: require_eq(),
|
|
1310
|
+
neq: require_neq(),
|
|
1311
|
+
gte: require_gte(),
|
|
1312
|
+
lte: require_lte(),
|
|
1313
|
+
cmp: require_cmp(),
|
|
1314
|
+
coerce: require_coerce(),
|
|
1315
|
+
Comparator: require_comparator(),
|
|
1316
|
+
Range: require_range(),
|
|
1317
|
+
satisfies: require_satisfies(),
|
|
1318
|
+
toComparators: require_to_comparators(),
|
|
1319
|
+
maxSatisfying: require_max_satisfying(),
|
|
1320
|
+
minSatisfying: require_min_satisfying(),
|
|
1321
|
+
minVersion: require_min_version(),
|
|
1322
|
+
validRange: require_valid(),
|
|
1323
|
+
outside: require_outside(),
|
|
1324
|
+
gtr: require_gtr(),
|
|
1325
|
+
ltr: require_ltr(),
|
|
1326
|
+
intersects: require_intersects(),
|
|
1327
|
+
simplifyRange: require_simplify(),
|
|
1328
|
+
subset: require_subset(),
|
|
1329
|
+
SemVer,
|
|
1330
|
+
re: internalRe.re,
|
|
1331
|
+
src: internalRe.src,
|
|
1332
|
+
tokens: internalRe.t,
|
|
1333
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
1334
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
1335
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
1336
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
1337
|
+
};
|
|
1338
|
+
})))(), 1);
|
|
1339
|
+
function bumpVersion(version, type) {
|
|
1340
|
+
const result = import_semver.default.inc(version, type);
|
|
1341
|
+
if (!result) throw new Error(`Failed to bump ${version} by ${type}`);
|
|
1342
|
+
return result;
|
|
1343
|
+
}
|
|
1344
|
+
/** Check if a version satisfies a range */
|
|
1345
|
+
function satisfies(version, range) {
|
|
1346
|
+
if (range.startsWith("workspace:")) {
|
|
1347
|
+
const cleanRange = range.slice(10);
|
|
1348
|
+
if (!cleanRange || cleanRange === "*" || cleanRange === "^" || cleanRange === "~") return true;
|
|
1349
|
+
return import_semver.default.satisfies(version, cleanRange);
|
|
1350
|
+
}
|
|
1351
|
+
if (range.startsWith("catalog:")) return true;
|
|
1352
|
+
if (!range || range === "*") return true;
|
|
1353
|
+
return import_semver.default.satisfies(version, range);
|
|
1354
|
+
}
|
|
1355
|
+
/** Strip workspace: protocol from version ranges */
|
|
1356
|
+
function stripProtocol(range) {
|
|
1357
|
+
return range.replace(/^workspace:/, "");
|
|
1358
|
+
}
|
|
1359
|
+
//#endregion
|
|
1360
|
+
export { satisfies as n, stripProtocol as r, bumpVersion as t };
|