@sentry/craft 2.13.1 → 2.14.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/README.md +223 -25
- package/dist/craft +2500 -71
- package/dist/craft.map +4 -4
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -61802,7 +61802,7 @@ var require_package = __commonJS({
|
|
|
61802
61802
|
"package.json"(exports2, module2) {
|
|
61803
61803
|
module2.exports = {
|
|
61804
61804
|
name: "@sentry/craft",
|
|
61805
|
-
version: "2.
|
|
61805
|
+
version: "2.14.1",
|
|
61806
61806
|
description: "The universal sentry workflow CLI",
|
|
61807
61807
|
main: "dist/craft",
|
|
61808
61808
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -61968,7 +61968,7 @@ function getPackage() {
|
|
|
61968
61968
|
}
|
|
61969
61969
|
function getPackageVersion() {
|
|
61970
61970
|
const { version: version2 } = getPackage();
|
|
61971
|
-
const buildInfo = "
|
|
61971
|
+
const buildInfo = "114a419301b8f047629567f8cdf2c1d902581ce7";
|
|
61972
61972
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
61973
61973
|
}
|
|
61974
61974
|
function semVerToString(s3) {
|
|
@@ -70890,7 +70890,7 @@ var require_path_reservations = __commonJS({
|
|
|
70890
70890
|
var assert = require("assert");
|
|
70891
70891
|
var normalize5 = require_normalize_unicode();
|
|
70892
70892
|
var stripSlashes = require_strip_trailing_slashes();
|
|
70893
|
-
var { join:
|
|
70893
|
+
var { join: join26 } = require("path");
|
|
70894
70894
|
var platform4 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
70895
70895
|
var isWindows = platform4 === "win32";
|
|
70896
70896
|
module2.exports = () => {
|
|
@@ -70899,7 +70899,7 @@ var require_path_reservations = __commonJS({
|
|
|
70899
70899
|
const getDirs = (path17) => {
|
|
70900
70900
|
const dirs = path17.split("/").slice(0, -1).reduce((set2, path18) => {
|
|
70901
70901
|
if (set2.length) {
|
|
70902
|
-
path18 =
|
|
70902
|
+
path18 = join26(set2[set2.length - 1], path18);
|
|
70903
70903
|
}
|
|
70904
70904
|
set2.push(path18 || "/");
|
|
70905
70905
|
return set2;
|
|
@@ -70967,7 +70967,7 @@ var require_path_reservations = __commonJS({
|
|
|
70967
70967
|
};
|
|
70968
70968
|
const reserve = (paths, fn) => {
|
|
70969
70969
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p3) => {
|
|
70970
|
-
return stripSlashes(
|
|
70970
|
+
return stripSlashes(join26(normalize5(p3))).toLowerCase();
|
|
70971
70971
|
});
|
|
70972
70972
|
const dirs = new Set(
|
|
70973
70973
|
paths.map((path17) => getDirs(path17)).reduce((a3, b3) => a3.concat(b3))
|
|
@@ -73591,11 +73591,19 @@ async function spawnProcess(command9, args = [], options = {}, spawnProcessOptio
|
|
|
73591
73591
|
const processedArgs = args.map(
|
|
73592
73592
|
(arg) => replaceEnvVariable(arg, { ...process.env, ...options.env })
|
|
73593
73593
|
);
|
|
73594
|
-
options.stdio = [
|
|
73594
|
+
options.stdio = [
|
|
73595
|
+
spawnProcessOptions.stdin !== void 0 ? "pipe" : "inherit",
|
|
73596
|
+
"pipe",
|
|
73597
|
+
"pipe"
|
|
73598
|
+
];
|
|
73595
73599
|
child = (0, import_child_process2.spawn)(command9, processedArgs, options);
|
|
73596
73600
|
if (!child.stdout || !child.stderr) {
|
|
73597
73601
|
throw new Error("Invalid standard output or error for child process");
|
|
73598
73602
|
}
|
|
73603
|
+
if (spawnProcessOptions.stdin !== void 0 && child.stdin) {
|
|
73604
|
+
child.stdin.write(spawnProcessOptions.stdin);
|
|
73605
|
+
child.stdin.end();
|
|
73606
|
+
}
|
|
73599
73607
|
child.on("exit", (code) => code === 0 ? succeed() : fail({ code }));
|
|
73600
73608
|
child.on("error", fail);
|
|
73601
73609
|
child.stdout.on("data", (chunk) => stdoutChunks.push(chunk));
|
|
@@ -113713,7 +113721,7 @@ var require_buffer_list = __commonJS({
|
|
|
113713
113721
|
}
|
|
113714
113722
|
}, {
|
|
113715
113723
|
key: "join",
|
|
113716
|
-
value: function
|
|
113724
|
+
value: function join26(s3) {
|
|
113717
113725
|
if (this.length === 0) return "";
|
|
113718
113726
|
var p3 = this.head;
|
|
113719
113727
|
var ret = "" + p3.data;
|
|
@@ -138982,8 +138990,8 @@ var require_semver2 = __commonJS({
|
|
|
138982
138990
|
this.raw = this.version;
|
|
138983
138991
|
return this;
|
|
138984
138992
|
};
|
|
138985
|
-
exports2.inc =
|
|
138986
|
-
function
|
|
138993
|
+
exports2.inc = inc2;
|
|
138994
|
+
function inc2(version2, release3, loose, identifier) {
|
|
138987
138995
|
if (typeof loose === "string") {
|
|
138988
138996
|
identifier = loose;
|
|
138989
138997
|
loose = void 0;
|
|
@@ -139756,8 +139764,8 @@ var require_make_dir = __commonJS({
|
|
|
139756
139764
|
var fs11 = require("fs");
|
|
139757
139765
|
var path17 = require("path");
|
|
139758
139766
|
var { promisify: promisify4 } = require("util");
|
|
139759
|
-
var
|
|
139760
|
-
var useNativeRecursiveOption =
|
|
139767
|
+
var semver2 = require_semver2();
|
|
139768
|
+
var useNativeRecursiveOption = semver2.satisfies(process.version, ">=10.12.0");
|
|
139761
139769
|
var checkPath = (pth) => {
|
|
139762
139770
|
if (process.platform === "win32") {
|
|
139763
139771
|
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path17.parse(pth).root, ""));
|
|
@@ -157354,16 +157362,125 @@ var init_crates = __esm({
|
|
|
157354
157362
|
});
|
|
157355
157363
|
|
|
157356
157364
|
// src/targets/docker.ts
|
|
157357
|
-
|
|
157365
|
+
function isGoogleCloudRegistry(registry) {
|
|
157366
|
+
if (!registry) return false;
|
|
157367
|
+
return GCR_REGISTRY_PATTERNS.some((pattern) => pattern.test(registry));
|
|
157368
|
+
}
|
|
157369
|
+
function hasGcloudCredentials() {
|
|
157370
|
+
const credPaths = [
|
|
157371
|
+
process.env.GOOGLE_APPLICATION_CREDENTIALS,
|
|
157372
|
+
process.env.GOOGLE_GHA_CREDS_PATH,
|
|
157373
|
+
process.env.CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE
|
|
157374
|
+
];
|
|
157375
|
+
for (const credPath of credPaths) {
|
|
157376
|
+
if (credPath && (0, import_node_fs5.existsSync)(credPath)) {
|
|
157377
|
+
return true;
|
|
157378
|
+
}
|
|
157379
|
+
}
|
|
157380
|
+
const defaultAdcPath = (0, import_node_path5.join)(
|
|
157381
|
+
(0, import_node_os.homedir)(),
|
|
157382
|
+
".config",
|
|
157383
|
+
"gcloud",
|
|
157384
|
+
"application_default_credentials.json"
|
|
157385
|
+
);
|
|
157386
|
+
if ((0, import_node_fs5.existsSync)(defaultAdcPath)) {
|
|
157387
|
+
return true;
|
|
157388
|
+
}
|
|
157389
|
+
return false;
|
|
157390
|
+
}
|
|
157391
|
+
async function isGcloudAvailable() {
|
|
157392
|
+
try {
|
|
157393
|
+
await spawnProcess("gcloud", ["--version"], {}, {});
|
|
157394
|
+
return true;
|
|
157395
|
+
} catch {
|
|
157396
|
+
return false;
|
|
157397
|
+
}
|
|
157398
|
+
}
|
|
157399
|
+
function extractRegistry(imagePath) {
|
|
157400
|
+
const parts = imagePath.split("/");
|
|
157401
|
+
if (parts.length >= 2 && (parts[0].includes(".") || parts[0].includes(":"))) {
|
|
157402
|
+
const registry = parts[0];
|
|
157403
|
+
if (DOCKER_HUB_REGISTRIES.includes(registry)) {
|
|
157404
|
+
return void 0;
|
|
157405
|
+
}
|
|
157406
|
+
return registry;
|
|
157407
|
+
}
|
|
157408
|
+
return void 0;
|
|
157409
|
+
}
|
|
157410
|
+
function registryToEnvPrefix(registry) {
|
|
157411
|
+
return registry.toUpperCase().replace(/[.\-:]/g, "_");
|
|
157412
|
+
}
|
|
157413
|
+
function normalizeImageRef(config3, type2) {
|
|
157414
|
+
const ref = config3[type2];
|
|
157415
|
+
if (ref === void 0 || ref === null) {
|
|
157416
|
+
throw new ConfigurationError(
|
|
157417
|
+
`Docker target requires a '${type2}' property. Please specify the ${type2} image.`
|
|
157418
|
+
);
|
|
157419
|
+
}
|
|
157420
|
+
const keys = LEGACY_KEYS[type2];
|
|
157421
|
+
const legacyFormat = config3[keys.format];
|
|
157422
|
+
const legacyRegistry = config3[keys.registry];
|
|
157423
|
+
const legacyUsernameVar = config3[keys.usernameVar];
|
|
157424
|
+
const legacyPasswordVar = config3[keys.passwordVar];
|
|
157425
|
+
const legacySkipLogin = config3[keys.skipLogin];
|
|
157426
|
+
if (typeof ref === "string") {
|
|
157427
|
+
return {
|
|
157428
|
+
image: ref,
|
|
157429
|
+
format: legacyFormat,
|
|
157430
|
+
registry: legacyRegistry,
|
|
157431
|
+
usernameVar: legacyUsernameVar,
|
|
157432
|
+
passwordVar: legacyPasswordVar,
|
|
157433
|
+
skipLogin: legacySkipLogin
|
|
157434
|
+
};
|
|
157435
|
+
}
|
|
157436
|
+
return {
|
|
157437
|
+
image: ref.image,
|
|
157438
|
+
format: ref.format ?? legacyFormat,
|
|
157439
|
+
registry: ref.registry ?? legacyRegistry,
|
|
157440
|
+
usernameVar: ref.usernameVar ?? legacyUsernameVar,
|
|
157441
|
+
passwordVar: ref.passwordVar ?? legacyPasswordVar,
|
|
157442
|
+
skipLogin: ref.skipLogin ?? legacySkipLogin
|
|
157443
|
+
};
|
|
157444
|
+
}
|
|
157445
|
+
var import_node_fs5, import_node_os, import_node_path5, DEFAULT_DOCKER_BIN, DOCKER_BIN, DOCKER_HUB_REGISTRIES, GCR_REGISTRY_PATTERNS, LEGACY_KEYS, DockerTarget;
|
|
157358
157446
|
var init_docker = __esm({
|
|
157359
157447
|
"src/targets/docker.ts"() {
|
|
157360
157448
|
init_import_meta_url();
|
|
157449
|
+
import_node_fs5 = require("node:fs");
|
|
157450
|
+
import_node_os = require("node:os");
|
|
157451
|
+
import_node_path5 = require("node:path");
|
|
157361
157452
|
init_errors2();
|
|
157362
157453
|
init_strings();
|
|
157363
157454
|
init_system();
|
|
157364
157455
|
init_base5();
|
|
157365
157456
|
DEFAULT_DOCKER_BIN = "docker";
|
|
157366
157457
|
DOCKER_BIN = process.env.DOCKER_BIN || DEFAULT_DOCKER_BIN;
|
|
157458
|
+
DOCKER_HUB_REGISTRIES = ["docker.io", "index.docker.io", "registry-1.docker.io"];
|
|
157459
|
+
GCR_REGISTRY_PATTERNS = [
|
|
157460
|
+
/^gcr\.io$/,
|
|
157461
|
+
/^[a-z]+-gcr\.io$/,
|
|
157462
|
+
// us-gcr.io, eu-gcr.io, asia-gcr.io, etc.
|
|
157463
|
+
/^[a-z]+\.gcr\.io$/,
|
|
157464
|
+
// us.gcr.io, eu.gcr.io, asia.gcr.io, etc.
|
|
157465
|
+
/^[a-z][a-z0-9-]*-docker\.pkg\.dev$/
|
|
157466
|
+
// us-docker.pkg.dev, us-west1-docker.pkg.dev, europe-west1-docker.pkg.dev, etc.
|
|
157467
|
+
];
|
|
157468
|
+
LEGACY_KEYS = {
|
|
157469
|
+
source: {
|
|
157470
|
+
format: "sourceFormat",
|
|
157471
|
+
registry: "sourceRegistry",
|
|
157472
|
+
usernameVar: "sourceUsernameVar",
|
|
157473
|
+
passwordVar: "sourcePasswordVar",
|
|
157474
|
+
skipLogin: "sourceSkipLogin"
|
|
157475
|
+
},
|
|
157476
|
+
target: {
|
|
157477
|
+
format: "targetFormat",
|
|
157478
|
+
registry: "registry",
|
|
157479
|
+
usernameVar: "usernameVar",
|
|
157480
|
+
passwordVar: "passwordVar",
|
|
157481
|
+
skipLogin: "skipLogin"
|
|
157482
|
+
}
|
|
157483
|
+
};
|
|
157367
157484
|
DockerTarget = class extends BaseTarget {
|
|
157368
157485
|
/** Target name */
|
|
157369
157486
|
name = "docker";
|
|
@@ -157375,39 +157492,221 @@ var init_docker = __esm({
|
|
|
157375
157492
|
checkExecutableIsPresent(DOCKER_BIN);
|
|
157376
157493
|
}
|
|
157377
157494
|
/**
|
|
157378
|
-
*
|
|
157495
|
+
* Resolves credentials for a registry.
|
|
157496
|
+
*
|
|
157497
|
+
* Credential resolution follows two modes:
|
|
157498
|
+
*
|
|
157499
|
+
* Mode A (explicit env vars): If usernameVar and passwordVar are provided,
|
|
157500
|
+
* only those env vars are used. Throws if either is missing.
|
|
157501
|
+
*
|
|
157502
|
+
* Mode B (automatic resolution): Tries in order:
|
|
157503
|
+
* 1. Registry-derived env vars: DOCKER_<REGISTRY>_USERNAME / DOCKER_<REGISTRY>_PASSWORD
|
|
157504
|
+
* 2. Built-in defaults for known registries (GHCR: GITHUB_ACTOR / GITHUB_TOKEN)
|
|
157505
|
+
* 3. Default: DOCKER_USERNAME / DOCKER_PASSWORD (only if useDefaultFallback is true)
|
|
157506
|
+
*
|
|
157507
|
+
* @param registry The registry host (e.g., "ghcr.io"), undefined for Docker Hub
|
|
157508
|
+
* @param usernameVar Optional explicit env var name for username
|
|
157509
|
+
* @param passwordVar Optional explicit env var name for password
|
|
157510
|
+
* @param required Whether credentials are required (throws if missing)
|
|
157511
|
+
* @param useDefaultFallback Whether to fall back to DOCKER_USERNAME/PASSWORD defaults
|
|
157512
|
+
* @returns Credentials if found, undefined if not required and not found
|
|
157513
|
+
*/
|
|
157514
|
+
resolveCredentials(registry, usernameVar, passwordVar, required = true, useDefaultFallback = true) {
|
|
157515
|
+
let username;
|
|
157516
|
+
let password;
|
|
157517
|
+
if (usernameVar || passwordVar) {
|
|
157518
|
+
if (!usernameVar || !passwordVar) {
|
|
157519
|
+
throw new ConfigurationError(
|
|
157520
|
+
"Both usernameVar and passwordVar must be specified together"
|
|
157521
|
+
);
|
|
157522
|
+
}
|
|
157523
|
+
username = process.env[usernameVar];
|
|
157524
|
+
password = process.env[passwordVar];
|
|
157525
|
+
if (!username || !password) {
|
|
157526
|
+
if (required) {
|
|
157527
|
+
throw new ConfigurationError(
|
|
157528
|
+
`Missing credentials: ${usernameVar} and/or ${passwordVar} environment variable(s) not set`
|
|
157529
|
+
);
|
|
157530
|
+
}
|
|
157531
|
+
return void 0;
|
|
157532
|
+
}
|
|
157533
|
+
} else {
|
|
157534
|
+
if (registry) {
|
|
157535
|
+
const prefix = `DOCKER_${registryToEnvPrefix(registry)}_`;
|
|
157536
|
+
username = process.env[`${prefix}USERNAME`];
|
|
157537
|
+
password = process.env[`${prefix}PASSWORD`];
|
|
157538
|
+
}
|
|
157539
|
+
if (!username || !password) {
|
|
157540
|
+
if (registry === "ghcr.io") {
|
|
157541
|
+
username = username ?? process.env.GITHUB_ACTOR;
|
|
157542
|
+
password = password ?? process.env.GITHUB_TOKEN;
|
|
157543
|
+
}
|
|
157544
|
+
}
|
|
157545
|
+
if (useDefaultFallback) {
|
|
157546
|
+
username = username ?? process.env.DOCKER_USERNAME;
|
|
157547
|
+
password = password ?? process.env.DOCKER_PASSWORD;
|
|
157548
|
+
}
|
|
157549
|
+
}
|
|
157550
|
+
if (!username || !password) {
|
|
157551
|
+
if (required) {
|
|
157552
|
+
const registryHint = registry ? `DOCKER_${registryToEnvPrefix(registry)}_USERNAME/PASSWORD or ` : "";
|
|
157553
|
+
throw new ConfigurationError(
|
|
157554
|
+
`Cannot perform Docker release: missing credentials.
|
|
157555
|
+
Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variables.`.replace(
|
|
157556
|
+
/^\s+/gm,
|
|
157557
|
+
""
|
|
157558
|
+
)
|
|
157559
|
+
);
|
|
157560
|
+
}
|
|
157561
|
+
return void 0;
|
|
157562
|
+
}
|
|
157563
|
+
return { username, password, registry };
|
|
157564
|
+
}
|
|
157565
|
+
/**
|
|
157566
|
+
* Extracts Docker target options from the environment.
|
|
157567
|
+
*
|
|
157568
|
+
* Supports both new nested config format and legacy flat format:
|
|
157569
|
+
*
|
|
157570
|
+
* New format:
|
|
157571
|
+
* source: { image: "ghcr.io/org/image", registry: "ghcr.io", usernameVar: "X" }
|
|
157572
|
+
* target: "getsentry/craft" # string shorthand
|
|
157573
|
+
*
|
|
157574
|
+
* Legacy format:
|
|
157575
|
+
* source: "ghcr.io/org/image"
|
|
157576
|
+
* sourceRegistry: "ghcr.io"
|
|
157577
|
+
* sourceUsernameVar: "X"
|
|
157379
157578
|
*/
|
|
157380
157579
|
getDockerConfig() {
|
|
157381
|
-
|
|
157382
|
-
|
|
157383
|
-
|
|
157384
|
-
|
|
157385
|
-
|
|
157386
|
-
|
|
157387
|
-
|
|
157580
|
+
const source = normalizeImageRef(this.config, "source");
|
|
157581
|
+
const target = normalizeImageRef(this.config, "target");
|
|
157582
|
+
const targetRegistry = target.registry ?? extractRegistry(target.image);
|
|
157583
|
+
const sourceRegistry = source.registry ?? extractRegistry(source.image);
|
|
157584
|
+
let targetCredentials;
|
|
157585
|
+
if (!target.skipLogin) {
|
|
157586
|
+
const isGcrTarget = isGoogleCloudRegistry(targetRegistry);
|
|
157587
|
+
targetCredentials = this.resolveCredentials(
|
|
157588
|
+
targetRegistry,
|
|
157589
|
+
target.usernameVar,
|
|
157590
|
+
target.passwordVar,
|
|
157591
|
+
// Required unless it's a GCR registry (which can use gcloud auth)
|
|
157592
|
+
!isGcrTarget
|
|
157593
|
+
);
|
|
157594
|
+
}
|
|
157595
|
+
let sourceCredentials;
|
|
157596
|
+
if (!source.skipLogin && sourceRegistry !== targetRegistry) {
|
|
157597
|
+
sourceCredentials = this.resolveCredentials(
|
|
157598
|
+
sourceRegistry,
|
|
157599
|
+
source.usernameVar,
|
|
157600
|
+
source.passwordVar,
|
|
157601
|
+
// Only required if explicit source env vars are specified
|
|
157602
|
+
!!(source.usernameVar || source.passwordVar),
|
|
157603
|
+
// Don't fall back to DOCKER_USERNAME/PASSWORD for source
|
|
157604
|
+
false
|
|
157388
157605
|
);
|
|
157389
157606
|
}
|
|
157390
157607
|
return {
|
|
157391
|
-
|
|
157392
|
-
|
|
157393
|
-
|
|
157394
|
-
|
|
157395
|
-
|
|
157396
|
-
|
|
157608
|
+
source: {
|
|
157609
|
+
...source,
|
|
157610
|
+
format: source.format || "{{{source}}}:{{{revision}}}",
|
|
157611
|
+
credentials: sourceCredentials
|
|
157612
|
+
},
|
|
157613
|
+
target: {
|
|
157614
|
+
...target,
|
|
157615
|
+
format: target.format || "{{{target}}}:{{{version}}}",
|
|
157616
|
+
credentials: targetCredentials
|
|
157617
|
+
}
|
|
157397
157618
|
};
|
|
157398
157619
|
}
|
|
157399
157620
|
/**
|
|
157400
|
-
* Logs into
|
|
157621
|
+
* Logs into a Docker registry with the provided credentials.
|
|
157401
157622
|
*
|
|
157402
157623
|
* NOTE: This may change the globally logged in Docker user on the system
|
|
157624
|
+
*
|
|
157625
|
+
* @param credentials The registry credentials to use
|
|
157626
|
+
*/
|
|
157627
|
+
async loginToRegistry(credentials) {
|
|
157628
|
+
const { username, password, registry } = credentials;
|
|
157629
|
+
const args = ["login", `--username=${username}`, "--password-stdin"];
|
|
157630
|
+
if (registry) {
|
|
157631
|
+
args.push(registry);
|
|
157632
|
+
}
|
|
157633
|
+
const registryName = registry || "Docker Hub";
|
|
157634
|
+
this.logger.debug(`Logging into ${registryName}...`);
|
|
157635
|
+
await spawnProcess(DOCKER_BIN, args, {}, { stdin: password });
|
|
157636
|
+
}
|
|
157637
|
+
/**
|
|
157638
|
+
* Configures Docker to use gcloud for authentication to Google Cloud registries.
|
|
157639
|
+
* This runs `gcloud auth configure-docker` which sets up the credential helper.
|
|
157640
|
+
*
|
|
157641
|
+
* @param registries List of Google Cloud registries to configure
|
|
157642
|
+
* @returns true if configuration was successful, false otherwise
|
|
157643
|
+
*/
|
|
157644
|
+
async configureGcloudDocker(registries) {
|
|
157645
|
+
if (registries.length === 0) {
|
|
157646
|
+
return false;
|
|
157647
|
+
}
|
|
157648
|
+
if (!hasGcloudCredentials()) {
|
|
157649
|
+
this.logger.debug("No gcloud credentials detected, skipping gcloud auth configure-docker");
|
|
157650
|
+
return false;
|
|
157651
|
+
}
|
|
157652
|
+
if (!await isGcloudAvailable()) {
|
|
157653
|
+
this.logger.debug("gcloud CLI not available, skipping gcloud auth configure-docker");
|
|
157654
|
+
return false;
|
|
157655
|
+
}
|
|
157656
|
+
const registryList = registries.join(",");
|
|
157657
|
+
this.logger.debug(`Configuring Docker for Google Cloud registries: ${registryList}`);
|
|
157658
|
+
try {
|
|
157659
|
+
await spawnProcess("gcloud", ["auth", "configure-docker", registryList, "--quiet"], {}, {});
|
|
157660
|
+
this.logger.info(`Configured Docker authentication for: ${registryList}`);
|
|
157661
|
+
return true;
|
|
157662
|
+
} catch (error3) {
|
|
157663
|
+
this.logger.warn(`Failed to configure gcloud Docker auth: ${error3}`);
|
|
157664
|
+
return false;
|
|
157665
|
+
}
|
|
157666
|
+
}
|
|
157667
|
+
/**
|
|
157668
|
+
* Logs into all required Docker registries (source and target).
|
|
157669
|
+
*
|
|
157670
|
+
* For Google Cloud registries (gcr.io, *.pkg.dev), automatically uses
|
|
157671
|
+
* `gcloud auth configure-docker` if gcloud credentials are available.
|
|
157672
|
+
*
|
|
157673
|
+
* If the source registry differs from target and has credentials configured,
|
|
157674
|
+
* logs into both. Otherwise, only logs into the target registry.
|
|
157403
157675
|
*/
|
|
157404
157676
|
async login() {
|
|
157405
|
-
const {
|
|
157406
|
-
|
|
157407
|
-
|
|
157408
|
-
|
|
157409
|
-
|
|
157410
|
-
|
|
157677
|
+
const { source, target } = this.dockerConfig;
|
|
157678
|
+
const sourceRegistry = source.registry ?? extractRegistry(source.image);
|
|
157679
|
+
const targetRegistry = target.registry ?? extractRegistry(target.image);
|
|
157680
|
+
const gcrRegistries = [];
|
|
157681
|
+
const gcrConfiguredRegistries = /* @__PURE__ */ new Set();
|
|
157682
|
+
if (!source.skipLogin && !source.credentials && sourceRegistry && isGoogleCloudRegistry(sourceRegistry)) {
|
|
157683
|
+
gcrRegistries.push(sourceRegistry);
|
|
157684
|
+
}
|
|
157685
|
+
if (!target.skipLogin && !target.credentials && targetRegistry && isGoogleCloudRegistry(targetRegistry)) {
|
|
157686
|
+
if (!gcrRegistries.includes(targetRegistry)) {
|
|
157687
|
+
gcrRegistries.push(targetRegistry);
|
|
157688
|
+
}
|
|
157689
|
+
}
|
|
157690
|
+
if (gcrRegistries.length > 0) {
|
|
157691
|
+
const configured = await this.configureGcloudDocker(gcrRegistries);
|
|
157692
|
+
if (configured) {
|
|
157693
|
+
gcrRegistries.forEach((r3) => gcrConfiguredRegistries.add(r3));
|
|
157694
|
+
}
|
|
157695
|
+
}
|
|
157696
|
+
if (source.credentials) {
|
|
157697
|
+
await this.loginToRegistry(source.credentials);
|
|
157698
|
+
} else if (sourceRegistry && !source.skipLogin && !gcrConfiguredRegistries.has(sourceRegistry)) {
|
|
157699
|
+
this.logger.debug(`No credentials for source registry ${sourceRegistry}, assuming public`);
|
|
157700
|
+
}
|
|
157701
|
+
if (target.credentials) {
|
|
157702
|
+
await this.loginToRegistry(target.credentials);
|
|
157703
|
+
} else if (!target.skipLogin && !gcrConfiguredRegistries.has(targetRegistry || "")) {
|
|
157704
|
+
if (targetRegistry) {
|
|
157705
|
+
this.logger.warn(
|
|
157706
|
+
`No credentials for target registry ${targetRegistry}. Push may fail.`
|
|
157707
|
+
);
|
|
157708
|
+
}
|
|
157709
|
+
}
|
|
157411
157710
|
}
|
|
157412
157711
|
/**
|
|
157413
157712
|
* Copies an existing local or remote docker image to a new destination.
|
|
@@ -157418,12 +157717,15 @@ var init_docker = __esm({
|
|
|
157418
157717
|
* @param version The release version for the target image
|
|
157419
157718
|
*/
|
|
157420
157719
|
async copy(sourceRevision, version2) {
|
|
157421
|
-
const
|
|
157422
|
-
|
|
157720
|
+
const { source, target } = this.dockerConfig;
|
|
157721
|
+
const sourceImage = renderTemplateSafe(source.format, {
|
|
157722
|
+
source: source.image,
|
|
157723
|
+
target: target.image,
|
|
157423
157724
|
revision: sourceRevision
|
|
157424
157725
|
});
|
|
157425
|
-
const targetImage = renderTemplateSafe(
|
|
157426
|
-
|
|
157726
|
+
const targetImage = renderTemplateSafe(target.format, {
|
|
157727
|
+
source: source.image,
|
|
157728
|
+
target: target.image,
|
|
157427
157729
|
version: version2
|
|
157428
157730
|
});
|
|
157429
157731
|
this.logger.debug(`Copying image from ${sourceImage} to ${targetImage}...`);
|
|
@@ -157435,7 +157737,7 @@ var init_docker = __esm({
|
|
|
157435
157737
|
);
|
|
157436
157738
|
}
|
|
157437
157739
|
/**
|
|
157438
|
-
*
|
|
157740
|
+
* Publishes a source image to the target registry
|
|
157439
157741
|
*
|
|
157440
157742
|
* @param version The new version
|
|
157441
157743
|
* @param revision The SHA revision of the new version
|
|
@@ -157935,6 +158237,9 @@ var init_git = __esm({
|
|
|
157935
158237
|
});
|
|
157936
158238
|
|
|
157937
158239
|
// src/utils/changelog.ts
|
|
158240
|
+
function isBumpType(value) {
|
|
158241
|
+
return BUMP_TYPES.has(value);
|
|
158242
|
+
}
|
|
157938
158243
|
function escapeMarkdownPound(text) {
|
|
157939
158244
|
return text.replace(/#/g, "#");
|
|
157940
158245
|
}
|
|
@@ -158092,6 +158397,7 @@ function normalizeReleaseConfig(config3) {
|
|
|
158092
158397
|
return null;
|
|
158093
158398
|
}
|
|
158094
158399
|
}).filter((r3) => r3 !== null),
|
|
158400
|
+
semver: category.semver,
|
|
158095
158401
|
exclude: {
|
|
158096
158402
|
labels: /* @__PURE__ */ new Set(),
|
|
158097
158403
|
authors: /* @__PURE__ */ new Set()
|
|
@@ -158143,7 +158449,7 @@ function isCategoryExcluded(category, labels, author) {
|
|
|
158143
158449
|
}
|
|
158144
158450
|
return false;
|
|
158145
158451
|
}
|
|
158146
|
-
function
|
|
158452
|
+
function matchCommitToCategory(labels, author, title, config3) {
|
|
158147
158453
|
if (!config3?.changelog || config3.changelog.categories.length === 0) {
|
|
158148
158454
|
return null;
|
|
158149
158455
|
}
|
|
@@ -158163,7 +158469,7 @@ function matchPRToCategory(labels, author, title, config3) {
|
|
|
158163
158469
|
for (const category of regularCategories) {
|
|
158164
158470
|
const matchesCategory = category.labels.some((label) => labels.has(label));
|
|
158165
158471
|
if (matchesCategory && !isCategoryExcluded(category, labels, author)) {
|
|
158166
|
-
return category
|
|
158472
|
+
return category;
|
|
158167
158473
|
}
|
|
158168
158474
|
}
|
|
158169
158475
|
}
|
|
@@ -158172,14 +158478,14 @@ function matchPRToCategory(labels, author, title, config3) {
|
|
|
158172
158478
|
(re2) => re2.test(title)
|
|
158173
158479
|
);
|
|
158174
158480
|
if (matchesPattern && !isCategoryExcluded(category, labels, author)) {
|
|
158175
|
-
return category
|
|
158481
|
+
return category;
|
|
158176
158482
|
}
|
|
158177
158483
|
}
|
|
158178
158484
|
if (wildcardCategory) {
|
|
158179
158485
|
if (isCategoryExcluded(wildcardCategory, labels, author)) {
|
|
158180
158486
|
return null;
|
|
158181
158487
|
}
|
|
158182
|
-
return wildcardCategory
|
|
158488
|
+
return wildcardCategory;
|
|
158183
158489
|
}
|
|
158184
158490
|
return null;
|
|
158185
158491
|
}
|
|
@@ -158218,7 +158524,20 @@ function formatChangelogEntry(entry) {
|
|
|
158218
158524
|
}
|
|
158219
158525
|
return text;
|
|
158220
158526
|
}
|
|
158527
|
+
function getChangesetCacheKey(rev, maxLeftovers) {
|
|
158528
|
+
return `${rev}:${maxLeftovers}`;
|
|
158529
|
+
}
|
|
158221
158530
|
async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS) {
|
|
158531
|
+
const cacheKey = getChangesetCacheKey(rev, maxLeftovers);
|
|
158532
|
+
const cached = changesetCache.get(cacheKey);
|
|
158533
|
+
if (cached) {
|
|
158534
|
+
return cached;
|
|
158535
|
+
}
|
|
158536
|
+
const promise = generateChangesetFromGitImpl(git, rev, maxLeftovers);
|
|
158537
|
+
changesetCache.set(cacheKey, promise);
|
|
158538
|
+
return promise;
|
|
158539
|
+
}
|
|
158540
|
+
async function generateChangesetFromGitImpl(git, rev, maxLeftovers) {
|
|
158222
158541
|
const rawConfig = readReleaseConfig();
|
|
158223
158542
|
const releaseConfig = normalizeReleaseConfig(rawConfig);
|
|
158224
158543
|
const gitCommits = (await getChangesSince(git, rev)).filter(
|
|
@@ -158231,6 +158550,8 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158231
158550
|
const commits = {};
|
|
158232
158551
|
const leftovers = [];
|
|
158233
158552
|
const missing = [];
|
|
158553
|
+
let bumpPriority = null;
|
|
158554
|
+
let matchedCommitsWithSemver = 0;
|
|
158234
158555
|
for (const gitCommit of gitCommits) {
|
|
158235
158556
|
const hash = gitCommit.hash;
|
|
158236
158557
|
const githubCommit = githubCommits[hash];
|
|
@@ -158243,13 +158564,21 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158243
158564
|
if (shouldExcludePR(labels, author, releaseConfig)) {
|
|
158244
158565
|
continue;
|
|
158245
158566
|
}
|
|
158246
|
-
const titleForMatching = githubCommit?.prTitle ?? gitCommit.title;
|
|
158247
|
-
const
|
|
158567
|
+
const titleForMatching = (githubCommit?.prTitle ?? gitCommit.title).trim();
|
|
158568
|
+
const matchedCategory = matchCommitToCategory(
|
|
158248
158569
|
labels,
|
|
158249
158570
|
author,
|
|
158250
158571
|
titleForMatching,
|
|
158251
158572
|
releaseConfig
|
|
158252
158573
|
);
|
|
158574
|
+
const categoryTitle = matchedCategory?.title ?? null;
|
|
158575
|
+
if (matchedCategory?.semver) {
|
|
158576
|
+
const priority = BUMP_TYPES.get(matchedCategory.semver);
|
|
158577
|
+
if (priority !== void 0) {
|
|
158578
|
+
matchedCommitsWithSemver++;
|
|
158579
|
+
bumpPriority = Math.min(bumpPriority ?? priority, priority);
|
|
158580
|
+
}
|
|
158581
|
+
}
|
|
158253
158582
|
const commit = {
|
|
158254
158583
|
author,
|
|
158255
158584
|
hash,
|
|
@@ -158281,7 +158610,7 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158281
158610
|
};
|
|
158282
158611
|
categories.set(categoryTitle, category);
|
|
158283
158612
|
}
|
|
158284
|
-
const prTitle = commit.prTitle ?? commit.title;
|
|
158613
|
+
const prTitle = (commit.prTitle ?? commit.title).trim();
|
|
158285
158614
|
const scope = extractScope(prTitle);
|
|
158286
158615
|
let scopeGroup = category.scopeGroups.get(scope);
|
|
158287
158616
|
if (!scopeGroup) {
|
|
@@ -158298,6 +158627,15 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158298
158627
|
}
|
|
158299
158628
|
}
|
|
158300
158629
|
}
|
|
158630
|
+
let bumpType = null;
|
|
158631
|
+
if (bumpPriority !== null) {
|
|
158632
|
+
for (const [type2, priority] of BUMP_TYPES) {
|
|
158633
|
+
if (priority === bumpPriority) {
|
|
158634
|
+
bumpType = type2;
|
|
158635
|
+
break;
|
|
158636
|
+
}
|
|
158637
|
+
}
|
|
158638
|
+
}
|
|
158301
158639
|
if (missing.length > 0) {
|
|
158302
158640
|
logger.warn(
|
|
158303
158641
|
"The following commits were not found on GitHub:",
|
|
@@ -158336,12 +158674,11 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158336
158674
|
if (scopeB === null) return -1;
|
|
158337
158675
|
return scopeA.localeCompare(scopeB);
|
|
158338
158676
|
});
|
|
158677
|
+
const hasScopeHeaders = [...category.scopeGroups.entries()].some(
|
|
158678
|
+
([s3, entries]) => s3 !== null && entries.length > 1
|
|
158679
|
+
);
|
|
158680
|
+
const entriesWithoutHeaders = [];
|
|
158339
158681
|
for (const [scope, prs] of sortedScopes) {
|
|
158340
|
-
if (scopeGroupingEnabled && scope !== null && prs.length > 1) {
|
|
158341
|
-
changelogSections.push(
|
|
158342
|
-
markdownHeader(SCOPE_HEADER_LEVEL, formatScopeTitle(scope))
|
|
158343
|
-
);
|
|
158344
|
-
}
|
|
158345
158682
|
const prEntries = prs.map(
|
|
158346
158683
|
(pr) => formatChangelogEntry({
|
|
158347
158684
|
title: pr.title,
|
|
@@ -158352,7 +158689,23 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158352
158689
|
repoUrl
|
|
158353
158690
|
})
|
|
158354
158691
|
);
|
|
158355
|
-
|
|
158692
|
+
let scopeHeader = null;
|
|
158693
|
+
if (scopeGroupingEnabled) {
|
|
158694
|
+
if (scope !== null && prs.length > 1) {
|
|
158695
|
+
scopeHeader = formatScopeTitle(scope);
|
|
158696
|
+
} else if (scope === null && hasScopeHeaders) {
|
|
158697
|
+
scopeHeader = "Other";
|
|
158698
|
+
}
|
|
158699
|
+
}
|
|
158700
|
+
if (scopeHeader) {
|
|
158701
|
+
changelogSections.push(markdownHeader(SCOPE_HEADER_LEVEL, scopeHeader));
|
|
158702
|
+
changelogSections.push(prEntries.join("\n"));
|
|
158703
|
+
} else {
|
|
158704
|
+
entriesWithoutHeaders.push(...prEntries);
|
|
158705
|
+
}
|
|
158706
|
+
}
|
|
158707
|
+
if (entriesWithoutHeaders.length > 0) {
|
|
158708
|
+
changelogSections.push(entriesWithoutHeaders.join("\n"));
|
|
158356
158709
|
}
|
|
158357
158710
|
}
|
|
158358
158711
|
const nLeftovers = leftovers.length;
|
|
@@ -158363,7 +158716,7 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158363
158716
|
changelogSections.push(
|
|
158364
158717
|
leftovers.slice(0, maxLeftovers).map(
|
|
158365
158718
|
(commit) => formatChangelogEntry({
|
|
158366
|
-
title: commit.prTitle ?? commit.title,
|
|
158719
|
+
title: (commit.prTitle ?? commit.title).trim(),
|
|
158367
158720
|
author: commit.author,
|
|
158368
158721
|
prNumber: commit.pr ?? void 0,
|
|
158369
158722
|
hash: commit.hash,
|
|
@@ -158377,7 +158730,12 @@ async function generateChangesetFromGit(git, rev, maxLeftovers = MAX_LEFTOVERS)
|
|
|
158377
158730
|
changelogSections.push(`_Plus ${nLeftovers - maxLeftovers} more_`);
|
|
158378
158731
|
}
|
|
158379
158732
|
}
|
|
158380
|
-
return
|
|
158733
|
+
return {
|
|
158734
|
+
changelog: changelogSections.join("\n\n"),
|
|
158735
|
+
bumpType,
|
|
158736
|
+
totalCommits: gitCommits.length,
|
|
158737
|
+
matchedCommitsWithSemver
|
|
158738
|
+
};
|
|
158381
158739
|
}
|
|
158382
158740
|
async function getPRAndLabelsFromCommit(hashes) {
|
|
158383
158741
|
if (hashes.length === 0) {
|
|
@@ -158448,7 +158806,7 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
158448
158806
|
})
|
|
158449
158807
|
);
|
|
158450
158808
|
}
|
|
158451
|
-
var import_fs4, import_path7, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, BODY_IN_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, SHORT_SHA_LENGTH;
|
|
158809
|
+
var import_fs4, import_path7, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, BODY_IN_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, SHORT_SHA_LENGTH, changesetCache;
|
|
158452
158810
|
var init_changelog = __esm({
|
|
158453
158811
|
"src/utils/changelog.ts"() {
|
|
158454
158812
|
init_import_meta_url();
|
|
@@ -158460,6 +158818,11 @@ var init_changelog = __esm({
|
|
|
158460
158818
|
init_git();
|
|
158461
158819
|
init_githubApi();
|
|
158462
158820
|
init_version4();
|
|
158821
|
+
BUMP_TYPES = /* @__PURE__ */ new Map([
|
|
158822
|
+
["major", 0],
|
|
158823
|
+
["minor", 1],
|
|
158824
|
+
["patch", 2]
|
|
158825
|
+
]);
|
|
158463
158826
|
DEFAULT_CHANGELOG_PATH = "CHANGELOG.md";
|
|
158464
158827
|
DEFAULT_UNRELEASED_TITLE = "Unreleased";
|
|
158465
158828
|
SKIP_CHANGELOG_MAGIC_WORD = "#skip-changelog";
|
|
@@ -158475,31 +158838,40 @@ var init_changelog = __esm({
|
|
|
158475
158838
|
}
|
|
158476
158839
|
DEFAULT_RELEASE_CONFIG = {
|
|
158477
158840
|
changelog: {
|
|
158841
|
+
exclude: {
|
|
158842
|
+
labels: ["skip-changelog"]
|
|
158843
|
+
},
|
|
158478
158844
|
categories: [
|
|
158479
158845
|
{
|
|
158480
158846
|
title: "Breaking Changes \u{1F6E0}",
|
|
158481
|
-
commit_patterns: ["^\\w+(?:\\([^)]+\\))?!:"]
|
|
158847
|
+
commit_patterns: ["^\\w+(?:\\([^)]+\\))?!:"],
|
|
158848
|
+
semver: "major"
|
|
158482
158849
|
},
|
|
158483
158850
|
{
|
|
158484
158851
|
title: "New Features \u2728",
|
|
158485
|
-
commit_patterns: ["^feat\\b"]
|
|
158852
|
+
commit_patterns: ["^feat\\b"],
|
|
158853
|
+
semver: "minor"
|
|
158486
158854
|
},
|
|
158487
158855
|
{
|
|
158488
158856
|
title: "Bug Fixes \u{1F41B}",
|
|
158489
|
-
commit_patterns: ["^fix\\b"]
|
|
158857
|
+
commit_patterns: ["^fix\\b"],
|
|
158858
|
+
semver: "patch"
|
|
158490
158859
|
},
|
|
158491
158860
|
{
|
|
158492
158861
|
title: "Documentation \u{1F4DA}",
|
|
158493
|
-
commit_patterns: ["^docs?\\b"]
|
|
158862
|
+
commit_patterns: ["^docs?\\b"],
|
|
158863
|
+
semver: "patch"
|
|
158494
158864
|
},
|
|
158495
158865
|
{
|
|
158496
158866
|
title: "Build / dependencies / internal \u{1F527}",
|
|
158497
|
-
commit_patterns: ["^(?:build|refactor|meta|chore|ci)\\b"]
|
|
158867
|
+
commit_patterns: ["^(?:build|refactor|meta|chore|ci|ref|perf)\\b"],
|
|
158868
|
+
semver: "patch"
|
|
158498
158869
|
}
|
|
158499
158870
|
]
|
|
158500
158871
|
}
|
|
158501
158872
|
};
|
|
158502
158873
|
SHORT_SHA_LENGTH = 8;
|
|
158874
|
+
changesetCache = /* @__PURE__ */ new Map();
|
|
158503
158875
|
}
|
|
158504
158876
|
});
|
|
158505
158877
|
|
|
@@ -162735,12 +163107,12 @@ var init_esm13 = __esm({
|
|
|
162735
163107
|
});
|
|
162736
163108
|
|
|
162737
163109
|
// node_modules/path-scurry/dist/esm/index.js
|
|
162738
|
-
var
|
|
163110
|
+
var import_node_path6, import_node_url, import_fs6, actualFS, import_promises, realpathSync, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize4, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
|
|
162739
163111
|
var init_esm14 = __esm({
|
|
162740
163112
|
"node_modules/path-scurry/dist/esm/index.js"() {
|
|
162741
163113
|
init_import_meta_url();
|
|
162742
163114
|
init_esm12();
|
|
162743
|
-
|
|
163115
|
+
import_node_path6 = require("node:path");
|
|
162744
163116
|
import_node_url = require("node:url");
|
|
162745
163117
|
import_fs6 = require("fs");
|
|
162746
163118
|
actualFS = __toESM(require("node:fs"), 1);
|
|
@@ -163770,7 +164142,7 @@ var init_esm14 = __esm({
|
|
|
163770
164142
|
* @internal
|
|
163771
164143
|
*/
|
|
163772
164144
|
getRootString(path17) {
|
|
163773
|
-
return
|
|
164145
|
+
return import_node_path6.win32.parse(path17).root;
|
|
163774
164146
|
}
|
|
163775
164147
|
/**
|
|
163776
164148
|
* @internal
|
|
@@ -164410,7 +164782,7 @@ var init_esm14 = __esm({
|
|
|
164410
164782
|
sep = "\\";
|
|
164411
164783
|
constructor(cwd = process.cwd(), opts = {}) {
|
|
164412
164784
|
const { nocase = true } = opts;
|
|
164413
|
-
super(cwd,
|
|
164785
|
+
super(cwd, import_node_path6.win32, "\\", { ...opts, nocase });
|
|
164414
164786
|
this.nocase = nocase;
|
|
164415
164787
|
for (let p3 = this.cwd; p3; p3 = p3.parent) {
|
|
164416
164788
|
p3.nocase = this.nocase;
|
|
@@ -164420,7 +164792,7 @@ var init_esm14 = __esm({
|
|
|
164420
164792
|
* @internal
|
|
164421
164793
|
*/
|
|
164422
164794
|
parseRootPath(dir) {
|
|
164423
|
-
return
|
|
164795
|
+
return import_node_path6.win32.parse(dir).root.toUpperCase();
|
|
164424
164796
|
}
|
|
164425
164797
|
/**
|
|
164426
164798
|
* @internal
|
|
@@ -164442,7 +164814,7 @@ var init_esm14 = __esm({
|
|
|
164442
164814
|
sep = "/";
|
|
164443
164815
|
constructor(cwd = process.cwd(), opts = {}) {
|
|
164444
164816
|
const { nocase = false } = opts;
|
|
164445
|
-
super(cwd,
|
|
164817
|
+
super(cwd, import_node_path6.posix, "/", { ...opts, nocase });
|
|
164446
164818
|
this.nocase = nocase;
|
|
164447
164819
|
}
|
|
164448
164820
|
/**
|
|
@@ -197345,6 +197717,19 @@ function checkMinimalConfigVersion(config3) {
|
|
|
197345
197717
|
);
|
|
197346
197718
|
}
|
|
197347
197719
|
}
|
|
197720
|
+
function requiresMinVersion(requiredVersion) {
|
|
197721
|
+
const config3 = getConfiguration();
|
|
197722
|
+
const minVersionRaw = config3.minVersion;
|
|
197723
|
+
if (!minVersionRaw) {
|
|
197724
|
+
return false;
|
|
197725
|
+
}
|
|
197726
|
+
const configuredMinVersion = parseVersion(minVersionRaw);
|
|
197727
|
+
const required = parseVersion(requiredVersion);
|
|
197728
|
+
if (!configuredMinVersion || !required) {
|
|
197729
|
+
return false;
|
|
197730
|
+
}
|
|
197731
|
+
return versionGreaterOrEqualThan(configuredMinVersion, required);
|
|
197732
|
+
}
|
|
197348
197733
|
async function getGlobalGitHubConfig(clearCache = false) {
|
|
197349
197734
|
if (!clearCache && _globalGitHubConfigCache !== void 0) {
|
|
197350
197735
|
if (_globalGitHubConfigCache === null) {
|
|
@@ -197779,6 +198164,1981 @@ var require_shell_quote = __commonJS({
|
|
|
197779
198164
|
}
|
|
197780
198165
|
});
|
|
197781
198166
|
|
|
198167
|
+
// node_modules/semver/internal/constants.js
|
|
198168
|
+
var require_constants3 = __commonJS({
|
|
198169
|
+
"node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
198170
|
+
"use strict";
|
|
198171
|
+
init_import_meta_url();
|
|
198172
|
+
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
198173
|
+
var MAX_LENGTH = 256;
|
|
198174
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
198175
|
+
9007199254740991;
|
|
198176
|
+
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
198177
|
+
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
198178
|
+
var RELEASE_TYPES = [
|
|
198179
|
+
"major",
|
|
198180
|
+
"premajor",
|
|
198181
|
+
"minor",
|
|
198182
|
+
"preminor",
|
|
198183
|
+
"patch",
|
|
198184
|
+
"prepatch",
|
|
198185
|
+
"prerelease"
|
|
198186
|
+
];
|
|
198187
|
+
module2.exports = {
|
|
198188
|
+
MAX_LENGTH,
|
|
198189
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
198190
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
198191
|
+
MAX_SAFE_INTEGER,
|
|
198192
|
+
RELEASE_TYPES,
|
|
198193
|
+
SEMVER_SPEC_VERSION,
|
|
198194
|
+
FLAG_INCLUDE_PRERELEASE: 1,
|
|
198195
|
+
FLAG_LOOSE: 2
|
|
198196
|
+
};
|
|
198197
|
+
}
|
|
198198
|
+
});
|
|
198199
|
+
|
|
198200
|
+
// node_modules/semver/internal/debug.js
|
|
198201
|
+
var require_debug = __commonJS({
|
|
198202
|
+
"node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
198203
|
+
"use strict";
|
|
198204
|
+
init_import_meta_url();
|
|
198205
|
+
var debug3 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
198206
|
+
};
|
|
198207
|
+
module2.exports = debug3;
|
|
198208
|
+
}
|
|
198209
|
+
});
|
|
198210
|
+
|
|
198211
|
+
// node_modules/semver/internal/re.js
|
|
198212
|
+
var require_re = __commonJS({
|
|
198213
|
+
"node_modules/semver/internal/re.js"(exports2, module2) {
|
|
198214
|
+
"use strict";
|
|
198215
|
+
init_import_meta_url();
|
|
198216
|
+
var {
|
|
198217
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
198218
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
198219
|
+
MAX_LENGTH
|
|
198220
|
+
} = require_constants3();
|
|
198221
|
+
var debug3 = require_debug();
|
|
198222
|
+
exports2 = module2.exports = {};
|
|
198223
|
+
var re2 = exports2.re = [];
|
|
198224
|
+
var safeRe = exports2.safeRe = [];
|
|
198225
|
+
var src = exports2.src = [];
|
|
198226
|
+
var safeSrc = exports2.safeSrc = [];
|
|
198227
|
+
var t3 = exports2.t = {};
|
|
198228
|
+
var R = 0;
|
|
198229
|
+
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
198230
|
+
var safeRegexReplacements = [
|
|
198231
|
+
["\\s", 1],
|
|
198232
|
+
["\\d", MAX_LENGTH],
|
|
198233
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
198234
|
+
];
|
|
198235
|
+
var makeSafeRegex = (value) => {
|
|
198236
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
198237
|
+
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
198238
|
+
}
|
|
198239
|
+
return value;
|
|
198240
|
+
};
|
|
198241
|
+
var createToken = (name, value, isGlobal) => {
|
|
198242
|
+
const safe = makeSafeRegex(value);
|
|
198243
|
+
const index = R++;
|
|
198244
|
+
debug3(name, index, value);
|
|
198245
|
+
t3[name] = index;
|
|
198246
|
+
src[index] = value;
|
|
198247
|
+
safeSrc[index] = safe;
|
|
198248
|
+
re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
198249
|
+
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
198250
|
+
};
|
|
198251
|
+
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
198252
|
+
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
198253
|
+
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
198254
|
+
createToken("MAINVERSION", `(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})`);
|
|
198255
|
+
createToken("MAINVERSIONLOOSE", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);
|
|
198256
|
+
createToken("PRERELEASEIDENTIFIER", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);
|
|
198257
|
+
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);
|
|
198258
|
+
createToken("PRERELEASE", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);
|
|
198259
|
+
createToken("PRERELEASELOOSE", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
198260
|
+
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
198261
|
+
createToken("BUILD", `(?:\\+(${src[t3.BUILDIDENTIFIER]}(?:\\.${src[t3.BUILDIDENTIFIER]})*))`);
|
|
198262
|
+
createToken("FULLPLAIN", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);
|
|
198263
|
+
createToken("FULL", `^${src[t3.FULLPLAIN]}$`);
|
|
198264
|
+
createToken("LOOSEPLAIN", `[v=\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);
|
|
198265
|
+
createToken("LOOSE", `^${src[t3.LOOSEPLAIN]}$`);
|
|
198266
|
+
createToken("GTLT", "((?:<|>)?=?)");
|
|
198267
|
+
createToken("XRANGEIDENTIFIERLOOSE", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
198268
|
+
createToken("XRANGEIDENTIFIER", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
198269
|
+
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);
|
|
198270
|
+
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);
|
|
198271
|
+
createToken("XRANGE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAIN]}$`);
|
|
198272
|
+
createToken("XRANGELOOSE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAINLOOSE]}$`);
|
|
198273
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
198274
|
+
createToken("COERCE", `${src[t3.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
198275
|
+
createToken("COERCEFULL", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\d])`);
|
|
198276
|
+
createToken("COERCERTL", src[t3.COERCE], true);
|
|
198277
|
+
createToken("COERCERTLFULL", src[t3.COERCEFULL], true);
|
|
198278
|
+
createToken("LONETILDE", "(?:~>?)");
|
|
198279
|
+
createToken("TILDETRIM", `(\\s*)${src[t3.LONETILDE]}\\s+`, true);
|
|
198280
|
+
exports2.tildeTrimReplace = "$1~";
|
|
198281
|
+
createToken("TILDE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);
|
|
198282
|
+
createToken("TILDELOOSE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);
|
|
198283
|
+
createToken("LONECARET", "(?:\\^)");
|
|
198284
|
+
createToken("CARETTRIM", `(\\s*)${src[t3.LONECARET]}\\s+`, true);
|
|
198285
|
+
exports2.caretTrimReplace = "$1^";
|
|
198286
|
+
createToken("CARET", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);
|
|
198287
|
+
createToken("CARETLOOSE", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);
|
|
198288
|
+
createToken("COMPARATORLOOSE", `^${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]})$|^$`);
|
|
198289
|
+
createToken("COMPARATOR", `^${src[t3.GTLT]}\\s*(${src[t3.FULLPLAIN]})$|^$`);
|
|
198290
|
+
createToken("COMPARATORTRIM", `(\\s*)${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);
|
|
198291
|
+
exports2.comparatorTrimReplace = "$1$2$3";
|
|
198292
|
+
createToken("HYPHENRANGE", `^\\s*(${src[t3.XRANGEPLAIN]})\\s+-\\s+(${src[t3.XRANGEPLAIN]})\\s*$`);
|
|
198293
|
+
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t3.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t3.XRANGEPLAINLOOSE]})\\s*$`);
|
|
198294
|
+
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
198295
|
+
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
198296
|
+
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
198297
|
+
}
|
|
198298
|
+
});
|
|
198299
|
+
|
|
198300
|
+
// node_modules/semver/internal/parse-options.js
|
|
198301
|
+
var require_parse_options = __commonJS({
|
|
198302
|
+
"node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
198303
|
+
"use strict";
|
|
198304
|
+
init_import_meta_url();
|
|
198305
|
+
var looseOption = Object.freeze({ loose: true });
|
|
198306
|
+
var emptyOpts = Object.freeze({});
|
|
198307
|
+
var parseOptions = (options) => {
|
|
198308
|
+
if (!options) {
|
|
198309
|
+
return emptyOpts;
|
|
198310
|
+
}
|
|
198311
|
+
if (typeof options !== "object") {
|
|
198312
|
+
return looseOption;
|
|
198313
|
+
}
|
|
198314
|
+
return options;
|
|
198315
|
+
};
|
|
198316
|
+
module2.exports = parseOptions;
|
|
198317
|
+
}
|
|
198318
|
+
});
|
|
198319
|
+
|
|
198320
|
+
// node_modules/semver/internal/identifiers.js
|
|
198321
|
+
var require_identifiers = __commonJS({
|
|
198322
|
+
"node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
198323
|
+
"use strict";
|
|
198324
|
+
init_import_meta_url();
|
|
198325
|
+
var numeric2 = /^[0-9]+$/;
|
|
198326
|
+
var compareIdentifiers = (a3, b3) => {
|
|
198327
|
+
if (typeof a3 === "number" && typeof b3 === "number") {
|
|
198328
|
+
return a3 === b3 ? 0 : a3 < b3 ? -1 : 1;
|
|
198329
|
+
}
|
|
198330
|
+
const anum = numeric2.test(a3);
|
|
198331
|
+
const bnum = numeric2.test(b3);
|
|
198332
|
+
if (anum && bnum) {
|
|
198333
|
+
a3 = +a3;
|
|
198334
|
+
b3 = +b3;
|
|
198335
|
+
}
|
|
198336
|
+
return a3 === b3 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a3 < b3 ? -1 : 1;
|
|
198337
|
+
};
|
|
198338
|
+
var rcompareIdentifiers = (a3, b3) => compareIdentifiers(b3, a3);
|
|
198339
|
+
module2.exports = {
|
|
198340
|
+
compareIdentifiers,
|
|
198341
|
+
rcompareIdentifiers
|
|
198342
|
+
};
|
|
198343
|
+
}
|
|
198344
|
+
});
|
|
198345
|
+
|
|
198346
|
+
// node_modules/semver/classes/semver.js
|
|
198347
|
+
var require_semver3 = __commonJS({
|
|
198348
|
+
"node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
198349
|
+
"use strict";
|
|
198350
|
+
init_import_meta_url();
|
|
198351
|
+
var debug3 = require_debug();
|
|
198352
|
+
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
|
|
198353
|
+
var { safeRe: re2, t: t3 } = require_re();
|
|
198354
|
+
var parseOptions = require_parse_options();
|
|
198355
|
+
var { compareIdentifiers } = require_identifiers();
|
|
198356
|
+
var SemVer2 = class _SemVer {
|
|
198357
|
+
constructor(version2, options) {
|
|
198358
|
+
options = parseOptions(options);
|
|
198359
|
+
if (version2 instanceof _SemVer) {
|
|
198360
|
+
if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
|
|
198361
|
+
return version2;
|
|
198362
|
+
} else {
|
|
198363
|
+
version2 = version2.version;
|
|
198364
|
+
}
|
|
198365
|
+
} else if (typeof version2 !== "string") {
|
|
198366
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
|
|
198367
|
+
}
|
|
198368
|
+
if (version2.length > MAX_LENGTH) {
|
|
198369
|
+
throw new TypeError(
|
|
198370
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
198371
|
+
);
|
|
198372
|
+
}
|
|
198373
|
+
debug3("SemVer", version2, options);
|
|
198374
|
+
this.options = options;
|
|
198375
|
+
this.loose = !!options.loose;
|
|
198376
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
198377
|
+
const m3 = version2.trim().match(options.loose ? re2[t3.LOOSE] : re2[t3.FULL]);
|
|
198378
|
+
if (!m3) {
|
|
198379
|
+
throw new TypeError(`Invalid Version: ${version2}`);
|
|
198380
|
+
}
|
|
198381
|
+
this.raw = version2;
|
|
198382
|
+
this.major = +m3[1];
|
|
198383
|
+
this.minor = +m3[2];
|
|
198384
|
+
this.patch = +m3[3];
|
|
198385
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
198386
|
+
throw new TypeError("Invalid major version");
|
|
198387
|
+
}
|
|
198388
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
198389
|
+
throw new TypeError("Invalid minor version");
|
|
198390
|
+
}
|
|
198391
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
198392
|
+
throw new TypeError("Invalid patch version");
|
|
198393
|
+
}
|
|
198394
|
+
if (!m3[4]) {
|
|
198395
|
+
this.prerelease = [];
|
|
198396
|
+
} else {
|
|
198397
|
+
this.prerelease = m3[4].split(".").map((id) => {
|
|
198398
|
+
if (/^[0-9]+$/.test(id)) {
|
|
198399
|
+
const num = +id;
|
|
198400
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
198401
|
+
return num;
|
|
198402
|
+
}
|
|
198403
|
+
}
|
|
198404
|
+
return id;
|
|
198405
|
+
});
|
|
198406
|
+
}
|
|
198407
|
+
this.build = m3[5] ? m3[5].split(".") : [];
|
|
198408
|
+
this.format();
|
|
198409
|
+
}
|
|
198410
|
+
format() {
|
|
198411
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
198412
|
+
if (this.prerelease.length) {
|
|
198413
|
+
this.version += `-${this.prerelease.join(".")}`;
|
|
198414
|
+
}
|
|
198415
|
+
return this.version;
|
|
198416
|
+
}
|
|
198417
|
+
toString() {
|
|
198418
|
+
return this.version;
|
|
198419
|
+
}
|
|
198420
|
+
compare(other) {
|
|
198421
|
+
debug3("SemVer.compare", this.version, this.options, other);
|
|
198422
|
+
if (!(other instanceof _SemVer)) {
|
|
198423
|
+
if (typeof other === "string" && other === this.version) {
|
|
198424
|
+
return 0;
|
|
198425
|
+
}
|
|
198426
|
+
other = new _SemVer(other, this.options);
|
|
198427
|
+
}
|
|
198428
|
+
if (other.version === this.version) {
|
|
198429
|
+
return 0;
|
|
198430
|
+
}
|
|
198431
|
+
return this.compareMain(other) || this.comparePre(other);
|
|
198432
|
+
}
|
|
198433
|
+
compareMain(other) {
|
|
198434
|
+
if (!(other instanceof _SemVer)) {
|
|
198435
|
+
other = new _SemVer(other, this.options);
|
|
198436
|
+
}
|
|
198437
|
+
if (this.major < other.major) {
|
|
198438
|
+
return -1;
|
|
198439
|
+
}
|
|
198440
|
+
if (this.major > other.major) {
|
|
198441
|
+
return 1;
|
|
198442
|
+
}
|
|
198443
|
+
if (this.minor < other.minor) {
|
|
198444
|
+
return -1;
|
|
198445
|
+
}
|
|
198446
|
+
if (this.minor > other.minor) {
|
|
198447
|
+
return 1;
|
|
198448
|
+
}
|
|
198449
|
+
if (this.patch < other.patch) {
|
|
198450
|
+
return -1;
|
|
198451
|
+
}
|
|
198452
|
+
if (this.patch > other.patch) {
|
|
198453
|
+
return 1;
|
|
198454
|
+
}
|
|
198455
|
+
return 0;
|
|
198456
|
+
}
|
|
198457
|
+
comparePre(other) {
|
|
198458
|
+
if (!(other instanceof _SemVer)) {
|
|
198459
|
+
other = new _SemVer(other, this.options);
|
|
198460
|
+
}
|
|
198461
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
198462
|
+
return -1;
|
|
198463
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
198464
|
+
return 1;
|
|
198465
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
198466
|
+
return 0;
|
|
198467
|
+
}
|
|
198468
|
+
let i3 = 0;
|
|
198469
|
+
do {
|
|
198470
|
+
const a3 = this.prerelease[i3];
|
|
198471
|
+
const b3 = other.prerelease[i3];
|
|
198472
|
+
debug3("prerelease compare", i3, a3, b3);
|
|
198473
|
+
if (a3 === void 0 && b3 === void 0) {
|
|
198474
|
+
return 0;
|
|
198475
|
+
} else if (b3 === void 0) {
|
|
198476
|
+
return 1;
|
|
198477
|
+
} else if (a3 === void 0) {
|
|
198478
|
+
return -1;
|
|
198479
|
+
} else if (a3 === b3) {
|
|
198480
|
+
continue;
|
|
198481
|
+
} else {
|
|
198482
|
+
return compareIdentifiers(a3, b3);
|
|
198483
|
+
}
|
|
198484
|
+
} while (++i3);
|
|
198485
|
+
}
|
|
198486
|
+
compareBuild(other) {
|
|
198487
|
+
if (!(other instanceof _SemVer)) {
|
|
198488
|
+
other = new _SemVer(other, this.options);
|
|
198489
|
+
}
|
|
198490
|
+
let i3 = 0;
|
|
198491
|
+
do {
|
|
198492
|
+
const a3 = this.build[i3];
|
|
198493
|
+
const b3 = other.build[i3];
|
|
198494
|
+
debug3("build compare", i3, a3, b3);
|
|
198495
|
+
if (a3 === void 0 && b3 === void 0) {
|
|
198496
|
+
return 0;
|
|
198497
|
+
} else if (b3 === void 0) {
|
|
198498
|
+
return 1;
|
|
198499
|
+
} else if (a3 === void 0) {
|
|
198500
|
+
return -1;
|
|
198501
|
+
} else if (a3 === b3) {
|
|
198502
|
+
continue;
|
|
198503
|
+
} else {
|
|
198504
|
+
return compareIdentifiers(a3, b3);
|
|
198505
|
+
}
|
|
198506
|
+
} while (++i3);
|
|
198507
|
+
}
|
|
198508
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
198509
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
198510
|
+
inc(release3, identifier, identifierBase) {
|
|
198511
|
+
if (release3.startsWith("pre")) {
|
|
198512
|
+
if (!identifier && identifierBase === false) {
|
|
198513
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
198514
|
+
}
|
|
198515
|
+
if (identifier) {
|
|
198516
|
+
const match3 = `-${identifier}`.match(this.options.loose ? re2[t3.PRERELEASELOOSE] : re2[t3.PRERELEASE]);
|
|
198517
|
+
if (!match3 || match3[1] !== identifier) {
|
|
198518
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
198519
|
+
}
|
|
198520
|
+
}
|
|
198521
|
+
}
|
|
198522
|
+
switch (release3) {
|
|
198523
|
+
case "premajor":
|
|
198524
|
+
this.prerelease.length = 0;
|
|
198525
|
+
this.patch = 0;
|
|
198526
|
+
this.minor = 0;
|
|
198527
|
+
this.major++;
|
|
198528
|
+
this.inc("pre", identifier, identifierBase);
|
|
198529
|
+
break;
|
|
198530
|
+
case "preminor":
|
|
198531
|
+
this.prerelease.length = 0;
|
|
198532
|
+
this.patch = 0;
|
|
198533
|
+
this.minor++;
|
|
198534
|
+
this.inc("pre", identifier, identifierBase);
|
|
198535
|
+
break;
|
|
198536
|
+
case "prepatch":
|
|
198537
|
+
this.prerelease.length = 0;
|
|
198538
|
+
this.inc("patch", identifier, identifierBase);
|
|
198539
|
+
this.inc("pre", identifier, identifierBase);
|
|
198540
|
+
break;
|
|
198541
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
198542
|
+
// prepatch.
|
|
198543
|
+
case "prerelease":
|
|
198544
|
+
if (this.prerelease.length === 0) {
|
|
198545
|
+
this.inc("patch", identifier, identifierBase);
|
|
198546
|
+
}
|
|
198547
|
+
this.inc("pre", identifier, identifierBase);
|
|
198548
|
+
break;
|
|
198549
|
+
case "release":
|
|
198550
|
+
if (this.prerelease.length === 0) {
|
|
198551
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
198552
|
+
}
|
|
198553
|
+
this.prerelease.length = 0;
|
|
198554
|
+
break;
|
|
198555
|
+
case "major":
|
|
198556
|
+
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
198557
|
+
this.major++;
|
|
198558
|
+
}
|
|
198559
|
+
this.minor = 0;
|
|
198560
|
+
this.patch = 0;
|
|
198561
|
+
this.prerelease = [];
|
|
198562
|
+
break;
|
|
198563
|
+
case "minor":
|
|
198564
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
198565
|
+
this.minor++;
|
|
198566
|
+
}
|
|
198567
|
+
this.patch = 0;
|
|
198568
|
+
this.prerelease = [];
|
|
198569
|
+
break;
|
|
198570
|
+
case "patch":
|
|
198571
|
+
if (this.prerelease.length === 0) {
|
|
198572
|
+
this.patch++;
|
|
198573
|
+
}
|
|
198574
|
+
this.prerelease = [];
|
|
198575
|
+
break;
|
|
198576
|
+
// This probably shouldn't be used publicly.
|
|
198577
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
198578
|
+
case "pre": {
|
|
198579
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
198580
|
+
if (this.prerelease.length === 0) {
|
|
198581
|
+
this.prerelease = [base];
|
|
198582
|
+
} else {
|
|
198583
|
+
let i3 = this.prerelease.length;
|
|
198584
|
+
while (--i3 >= 0) {
|
|
198585
|
+
if (typeof this.prerelease[i3] === "number") {
|
|
198586
|
+
this.prerelease[i3]++;
|
|
198587
|
+
i3 = -2;
|
|
198588
|
+
}
|
|
198589
|
+
}
|
|
198590
|
+
if (i3 === -1) {
|
|
198591
|
+
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
198592
|
+
throw new Error("invalid increment argument: identifier already exists");
|
|
198593
|
+
}
|
|
198594
|
+
this.prerelease.push(base);
|
|
198595
|
+
}
|
|
198596
|
+
}
|
|
198597
|
+
if (identifier) {
|
|
198598
|
+
let prerelease = [identifier, base];
|
|
198599
|
+
if (identifierBase === false) {
|
|
198600
|
+
prerelease = [identifier];
|
|
198601
|
+
}
|
|
198602
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
198603
|
+
if (isNaN(this.prerelease[1])) {
|
|
198604
|
+
this.prerelease = prerelease;
|
|
198605
|
+
}
|
|
198606
|
+
} else {
|
|
198607
|
+
this.prerelease = prerelease;
|
|
198608
|
+
}
|
|
198609
|
+
}
|
|
198610
|
+
break;
|
|
198611
|
+
}
|
|
198612
|
+
default:
|
|
198613
|
+
throw new Error(`invalid increment argument: ${release3}`);
|
|
198614
|
+
}
|
|
198615
|
+
this.raw = this.format();
|
|
198616
|
+
if (this.build.length) {
|
|
198617
|
+
this.raw += `+${this.build.join(".")}`;
|
|
198618
|
+
}
|
|
198619
|
+
return this;
|
|
198620
|
+
}
|
|
198621
|
+
};
|
|
198622
|
+
module2.exports = SemVer2;
|
|
198623
|
+
}
|
|
198624
|
+
});
|
|
198625
|
+
|
|
198626
|
+
// node_modules/semver/functions/parse.js
|
|
198627
|
+
var require_parse3 = __commonJS({
|
|
198628
|
+
"node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
198629
|
+
"use strict";
|
|
198630
|
+
init_import_meta_url();
|
|
198631
|
+
var SemVer2 = require_semver3();
|
|
198632
|
+
var parse4 = (version2, options, throwErrors = false) => {
|
|
198633
|
+
if (version2 instanceof SemVer2) {
|
|
198634
|
+
return version2;
|
|
198635
|
+
}
|
|
198636
|
+
try {
|
|
198637
|
+
return new SemVer2(version2, options);
|
|
198638
|
+
} catch (er) {
|
|
198639
|
+
if (!throwErrors) {
|
|
198640
|
+
return null;
|
|
198641
|
+
}
|
|
198642
|
+
throw er;
|
|
198643
|
+
}
|
|
198644
|
+
};
|
|
198645
|
+
module2.exports = parse4;
|
|
198646
|
+
}
|
|
198647
|
+
});
|
|
198648
|
+
|
|
198649
|
+
// node_modules/semver/functions/valid.js
|
|
198650
|
+
var require_valid = __commonJS({
|
|
198651
|
+
"node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
198652
|
+
"use strict";
|
|
198653
|
+
init_import_meta_url();
|
|
198654
|
+
var parse4 = require_parse3();
|
|
198655
|
+
var valid = (version2, options) => {
|
|
198656
|
+
const v6 = parse4(version2, options);
|
|
198657
|
+
return v6 ? v6.version : null;
|
|
198658
|
+
};
|
|
198659
|
+
module2.exports = valid;
|
|
198660
|
+
}
|
|
198661
|
+
});
|
|
198662
|
+
|
|
198663
|
+
// node_modules/semver/functions/clean.js
|
|
198664
|
+
var require_clean = __commonJS({
|
|
198665
|
+
"node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
198666
|
+
"use strict";
|
|
198667
|
+
init_import_meta_url();
|
|
198668
|
+
var parse4 = require_parse3();
|
|
198669
|
+
var clean = (version2, options) => {
|
|
198670
|
+
const s3 = parse4(version2.trim().replace(/^[=v]+/, ""), options);
|
|
198671
|
+
return s3 ? s3.version : null;
|
|
198672
|
+
};
|
|
198673
|
+
module2.exports = clean;
|
|
198674
|
+
}
|
|
198675
|
+
});
|
|
198676
|
+
|
|
198677
|
+
// node_modules/semver/functions/inc.js
|
|
198678
|
+
var require_inc = __commonJS({
|
|
198679
|
+
"node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
198680
|
+
"use strict";
|
|
198681
|
+
init_import_meta_url();
|
|
198682
|
+
var SemVer2 = require_semver3();
|
|
198683
|
+
var inc2 = (version2, release3, options, identifier, identifierBase) => {
|
|
198684
|
+
if (typeof options === "string") {
|
|
198685
|
+
identifierBase = identifier;
|
|
198686
|
+
identifier = options;
|
|
198687
|
+
options = void 0;
|
|
198688
|
+
}
|
|
198689
|
+
try {
|
|
198690
|
+
return new SemVer2(
|
|
198691
|
+
version2 instanceof SemVer2 ? version2.version : version2,
|
|
198692
|
+
options
|
|
198693
|
+
).inc(release3, identifier, identifierBase).version;
|
|
198694
|
+
} catch (er) {
|
|
198695
|
+
return null;
|
|
198696
|
+
}
|
|
198697
|
+
};
|
|
198698
|
+
module2.exports = inc2;
|
|
198699
|
+
}
|
|
198700
|
+
});
|
|
198701
|
+
|
|
198702
|
+
// node_modules/semver/functions/diff.js
|
|
198703
|
+
var require_diff = __commonJS({
|
|
198704
|
+
"node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
198705
|
+
"use strict";
|
|
198706
|
+
init_import_meta_url();
|
|
198707
|
+
var parse4 = require_parse3();
|
|
198708
|
+
var diff = (version1, version2) => {
|
|
198709
|
+
const v12 = parse4(version1, null, true);
|
|
198710
|
+
const v22 = parse4(version2, null, true);
|
|
198711
|
+
const comparison = v12.compare(v22);
|
|
198712
|
+
if (comparison === 0) {
|
|
198713
|
+
return null;
|
|
198714
|
+
}
|
|
198715
|
+
const v1Higher = comparison > 0;
|
|
198716
|
+
const highVersion = v1Higher ? v12 : v22;
|
|
198717
|
+
const lowVersion = v1Higher ? v22 : v12;
|
|
198718
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
198719
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
198720
|
+
if (lowHasPre && !highHasPre) {
|
|
198721
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
198722
|
+
return "major";
|
|
198723
|
+
}
|
|
198724
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
198725
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
198726
|
+
return "minor";
|
|
198727
|
+
}
|
|
198728
|
+
return "patch";
|
|
198729
|
+
}
|
|
198730
|
+
}
|
|
198731
|
+
const prefix = highHasPre ? "pre" : "";
|
|
198732
|
+
if (v12.major !== v22.major) {
|
|
198733
|
+
return prefix + "major";
|
|
198734
|
+
}
|
|
198735
|
+
if (v12.minor !== v22.minor) {
|
|
198736
|
+
return prefix + "minor";
|
|
198737
|
+
}
|
|
198738
|
+
if (v12.patch !== v22.patch) {
|
|
198739
|
+
return prefix + "patch";
|
|
198740
|
+
}
|
|
198741
|
+
return "prerelease";
|
|
198742
|
+
};
|
|
198743
|
+
module2.exports = diff;
|
|
198744
|
+
}
|
|
198745
|
+
});
|
|
198746
|
+
|
|
198747
|
+
// node_modules/semver/functions/major.js
|
|
198748
|
+
var require_major = __commonJS({
|
|
198749
|
+
"node_modules/semver/functions/major.js"(exports2, module2) {
|
|
198750
|
+
"use strict";
|
|
198751
|
+
init_import_meta_url();
|
|
198752
|
+
var SemVer2 = require_semver3();
|
|
198753
|
+
var major2 = (a3, loose) => new SemVer2(a3, loose).major;
|
|
198754
|
+
module2.exports = major2;
|
|
198755
|
+
}
|
|
198756
|
+
});
|
|
198757
|
+
|
|
198758
|
+
// node_modules/semver/functions/minor.js
|
|
198759
|
+
var require_minor = __commonJS({
|
|
198760
|
+
"node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
198761
|
+
"use strict";
|
|
198762
|
+
init_import_meta_url();
|
|
198763
|
+
var SemVer2 = require_semver3();
|
|
198764
|
+
var minor = (a3, loose) => new SemVer2(a3, loose).minor;
|
|
198765
|
+
module2.exports = minor;
|
|
198766
|
+
}
|
|
198767
|
+
});
|
|
198768
|
+
|
|
198769
|
+
// node_modules/semver/functions/patch.js
|
|
198770
|
+
var require_patch = __commonJS({
|
|
198771
|
+
"node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
198772
|
+
"use strict";
|
|
198773
|
+
init_import_meta_url();
|
|
198774
|
+
var SemVer2 = require_semver3();
|
|
198775
|
+
var patch = (a3, loose) => new SemVer2(a3, loose).patch;
|
|
198776
|
+
module2.exports = patch;
|
|
198777
|
+
}
|
|
198778
|
+
});
|
|
198779
|
+
|
|
198780
|
+
// node_modules/semver/functions/prerelease.js
|
|
198781
|
+
var require_prerelease = __commonJS({
|
|
198782
|
+
"node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
198783
|
+
"use strict";
|
|
198784
|
+
init_import_meta_url();
|
|
198785
|
+
var parse4 = require_parse3();
|
|
198786
|
+
var prerelease = (version2, options) => {
|
|
198787
|
+
const parsed = parse4(version2, options);
|
|
198788
|
+
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
198789
|
+
};
|
|
198790
|
+
module2.exports = prerelease;
|
|
198791
|
+
}
|
|
198792
|
+
});
|
|
198793
|
+
|
|
198794
|
+
// node_modules/semver/functions/compare.js
|
|
198795
|
+
var require_compare = __commonJS({
|
|
198796
|
+
"node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
198797
|
+
"use strict";
|
|
198798
|
+
init_import_meta_url();
|
|
198799
|
+
var SemVer2 = require_semver3();
|
|
198800
|
+
var compare = (a3, b3, loose) => new SemVer2(a3, loose).compare(new SemVer2(b3, loose));
|
|
198801
|
+
module2.exports = compare;
|
|
198802
|
+
}
|
|
198803
|
+
});
|
|
198804
|
+
|
|
198805
|
+
// node_modules/semver/functions/rcompare.js
|
|
198806
|
+
var require_rcompare = __commonJS({
|
|
198807
|
+
"node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
198808
|
+
"use strict";
|
|
198809
|
+
init_import_meta_url();
|
|
198810
|
+
var compare = require_compare();
|
|
198811
|
+
var rcompare = (a3, b3, loose) => compare(b3, a3, loose);
|
|
198812
|
+
module2.exports = rcompare;
|
|
198813
|
+
}
|
|
198814
|
+
});
|
|
198815
|
+
|
|
198816
|
+
// node_modules/semver/functions/compare-loose.js
|
|
198817
|
+
var require_compare_loose = __commonJS({
|
|
198818
|
+
"node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
198819
|
+
"use strict";
|
|
198820
|
+
init_import_meta_url();
|
|
198821
|
+
var compare = require_compare();
|
|
198822
|
+
var compareLoose = (a3, b3) => compare(a3, b3, true);
|
|
198823
|
+
module2.exports = compareLoose;
|
|
198824
|
+
}
|
|
198825
|
+
});
|
|
198826
|
+
|
|
198827
|
+
// node_modules/semver/functions/compare-build.js
|
|
198828
|
+
var require_compare_build = __commonJS({
|
|
198829
|
+
"node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
198830
|
+
"use strict";
|
|
198831
|
+
init_import_meta_url();
|
|
198832
|
+
var SemVer2 = require_semver3();
|
|
198833
|
+
var compareBuild = (a3, b3, loose) => {
|
|
198834
|
+
const versionA = new SemVer2(a3, loose);
|
|
198835
|
+
const versionB = new SemVer2(b3, loose);
|
|
198836
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
198837
|
+
};
|
|
198838
|
+
module2.exports = compareBuild;
|
|
198839
|
+
}
|
|
198840
|
+
});
|
|
198841
|
+
|
|
198842
|
+
// node_modules/semver/functions/sort.js
|
|
198843
|
+
var require_sort = __commonJS({
|
|
198844
|
+
"node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
198845
|
+
"use strict";
|
|
198846
|
+
init_import_meta_url();
|
|
198847
|
+
var compareBuild = require_compare_build();
|
|
198848
|
+
var sort = (list2, loose) => list2.sort((a3, b3) => compareBuild(a3, b3, loose));
|
|
198849
|
+
module2.exports = sort;
|
|
198850
|
+
}
|
|
198851
|
+
});
|
|
198852
|
+
|
|
198853
|
+
// node_modules/semver/functions/rsort.js
|
|
198854
|
+
var require_rsort = __commonJS({
|
|
198855
|
+
"node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
198856
|
+
"use strict";
|
|
198857
|
+
init_import_meta_url();
|
|
198858
|
+
var compareBuild = require_compare_build();
|
|
198859
|
+
var rsort = (list2, loose) => list2.sort((a3, b3) => compareBuild(b3, a3, loose));
|
|
198860
|
+
module2.exports = rsort;
|
|
198861
|
+
}
|
|
198862
|
+
});
|
|
198863
|
+
|
|
198864
|
+
// node_modules/semver/functions/gt.js
|
|
198865
|
+
var require_gt = __commonJS({
|
|
198866
|
+
"node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
198867
|
+
"use strict";
|
|
198868
|
+
init_import_meta_url();
|
|
198869
|
+
var compare = require_compare();
|
|
198870
|
+
var gt = (a3, b3, loose) => compare(a3, b3, loose) > 0;
|
|
198871
|
+
module2.exports = gt;
|
|
198872
|
+
}
|
|
198873
|
+
});
|
|
198874
|
+
|
|
198875
|
+
// node_modules/semver/functions/lt.js
|
|
198876
|
+
var require_lt = __commonJS({
|
|
198877
|
+
"node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
198878
|
+
"use strict";
|
|
198879
|
+
init_import_meta_url();
|
|
198880
|
+
var compare = require_compare();
|
|
198881
|
+
var lt = (a3, b3, loose) => compare(a3, b3, loose) < 0;
|
|
198882
|
+
module2.exports = lt;
|
|
198883
|
+
}
|
|
198884
|
+
});
|
|
198885
|
+
|
|
198886
|
+
// node_modules/semver/functions/eq.js
|
|
198887
|
+
var require_eq = __commonJS({
|
|
198888
|
+
"node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
198889
|
+
"use strict";
|
|
198890
|
+
init_import_meta_url();
|
|
198891
|
+
var compare = require_compare();
|
|
198892
|
+
var eq = (a3, b3, loose) => compare(a3, b3, loose) === 0;
|
|
198893
|
+
module2.exports = eq;
|
|
198894
|
+
}
|
|
198895
|
+
});
|
|
198896
|
+
|
|
198897
|
+
// node_modules/semver/functions/neq.js
|
|
198898
|
+
var require_neq = __commonJS({
|
|
198899
|
+
"node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
198900
|
+
"use strict";
|
|
198901
|
+
init_import_meta_url();
|
|
198902
|
+
var compare = require_compare();
|
|
198903
|
+
var neq = (a3, b3, loose) => compare(a3, b3, loose) !== 0;
|
|
198904
|
+
module2.exports = neq;
|
|
198905
|
+
}
|
|
198906
|
+
});
|
|
198907
|
+
|
|
198908
|
+
// node_modules/semver/functions/gte.js
|
|
198909
|
+
var require_gte = __commonJS({
|
|
198910
|
+
"node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
198911
|
+
"use strict";
|
|
198912
|
+
init_import_meta_url();
|
|
198913
|
+
var compare = require_compare();
|
|
198914
|
+
var gte2 = (a3, b3, loose) => compare(a3, b3, loose) >= 0;
|
|
198915
|
+
module2.exports = gte2;
|
|
198916
|
+
}
|
|
198917
|
+
});
|
|
198918
|
+
|
|
198919
|
+
// node_modules/semver/functions/lte.js
|
|
198920
|
+
var require_lte = __commonJS({
|
|
198921
|
+
"node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
198922
|
+
"use strict";
|
|
198923
|
+
init_import_meta_url();
|
|
198924
|
+
var compare = require_compare();
|
|
198925
|
+
var lte2 = (a3, b3, loose) => compare(a3, b3, loose) <= 0;
|
|
198926
|
+
module2.exports = lte2;
|
|
198927
|
+
}
|
|
198928
|
+
});
|
|
198929
|
+
|
|
198930
|
+
// node_modules/semver/functions/cmp.js
|
|
198931
|
+
var require_cmp = __commonJS({
|
|
198932
|
+
"node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
198933
|
+
"use strict";
|
|
198934
|
+
init_import_meta_url();
|
|
198935
|
+
var eq = require_eq();
|
|
198936
|
+
var neq = require_neq();
|
|
198937
|
+
var gt = require_gt();
|
|
198938
|
+
var gte2 = require_gte();
|
|
198939
|
+
var lt = require_lt();
|
|
198940
|
+
var lte2 = require_lte();
|
|
198941
|
+
var cmp = (a3, op2, b3, loose) => {
|
|
198942
|
+
switch (op2) {
|
|
198943
|
+
case "===":
|
|
198944
|
+
if (typeof a3 === "object") {
|
|
198945
|
+
a3 = a3.version;
|
|
198946
|
+
}
|
|
198947
|
+
if (typeof b3 === "object") {
|
|
198948
|
+
b3 = b3.version;
|
|
198949
|
+
}
|
|
198950
|
+
return a3 === b3;
|
|
198951
|
+
case "!==":
|
|
198952
|
+
if (typeof a3 === "object") {
|
|
198953
|
+
a3 = a3.version;
|
|
198954
|
+
}
|
|
198955
|
+
if (typeof b3 === "object") {
|
|
198956
|
+
b3 = b3.version;
|
|
198957
|
+
}
|
|
198958
|
+
return a3 !== b3;
|
|
198959
|
+
case "":
|
|
198960
|
+
case "=":
|
|
198961
|
+
case "==":
|
|
198962
|
+
return eq(a3, b3, loose);
|
|
198963
|
+
case "!=":
|
|
198964
|
+
return neq(a3, b3, loose);
|
|
198965
|
+
case ">":
|
|
198966
|
+
return gt(a3, b3, loose);
|
|
198967
|
+
case ">=":
|
|
198968
|
+
return gte2(a3, b3, loose);
|
|
198969
|
+
case "<":
|
|
198970
|
+
return lt(a3, b3, loose);
|
|
198971
|
+
case "<=":
|
|
198972
|
+
return lte2(a3, b3, loose);
|
|
198973
|
+
default:
|
|
198974
|
+
throw new TypeError(`Invalid operator: ${op2}`);
|
|
198975
|
+
}
|
|
198976
|
+
};
|
|
198977
|
+
module2.exports = cmp;
|
|
198978
|
+
}
|
|
198979
|
+
});
|
|
198980
|
+
|
|
198981
|
+
// node_modules/semver/functions/coerce.js
|
|
198982
|
+
var require_coerce = __commonJS({
|
|
198983
|
+
"node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
198984
|
+
"use strict";
|
|
198985
|
+
init_import_meta_url();
|
|
198986
|
+
var SemVer2 = require_semver3();
|
|
198987
|
+
var parse4 = require_parse3();
|
|
198988
|
+
var { safeRe: re2, t: t3 } = require_re();
|
|
198989
|
+
var coerce = (version2, options) => {
|
|
198990
|
+
if (version2 instanceof SemVer2) {
|
|
198991
|
+
return version2;
|
|
198992
|
+
}
|
|
198993
|
+
if (typeof version2 === "number") {
|
|
198994
|
+
version2 = String(version2);
|
|
198995
|
+
}
|
|
198996
|
+
if (typeof version2 !== "string") {
|
|
198997
|
+
return null;
|
|
198998
|
+
}
|
|
198999
|
+
options = options || {};
|
|
199000
|
+
let match3 = null;
|
|
199001
|
+
if (!options.rtl) {
|
|
199002
|
+
match3 = version2.match(options.includePrerelease ? re2[t3.COERCEFULL] : re2[t3.COERCE]);
|
|
199003
|
+
} else {
|
|
199004
|
+
const coerceRtlRegex = options.includePrerelease ? re2[t3.COERCERTLFULL] : re2[t3.COERCERTL];
|
|
199005
|
+
let next;
|
|
199006
|
+
while ((next = coerceRtlRegex.exec(version2)) && (!match3 || match3.index + match3[0].length !== version2.length)) {
|
|
199007
|
+
if (!match3 || next.index + next[0].length !== match3.index + match3[0].length) {
|
|
199008
|
+
match3 = next;
|
|
199009
|
+
}
|
|
199010
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
199011
|
+
}
|
|
199012
|
+
coerceRtlRegex.lastIndex = -1;
|
|
199013
|
+
}
|
|
199014
|
+
if (match3 === null) {
|
|
199015
|
+
return null;
|
|
199016
|
+
}
|
|
199017
|
+
const major2 = match3[2];
|
|
199018
|
+
const minor = match3[3] || "0";
|
|
199019
|
+
const patch = match3[4] || "0";
|
|
199020
|
+
const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
|
|
199021
|
+
const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
|
|
199022
|
+
return parse4(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
|
|
199023
|
+
};
|
|
199024
|
+
module2.exports = coerce;
|
|
199025
|
+
}
|
|
199026
|
+
});
|
|
199027
|
+
|
|
199028
|
+
// node_modules/semver/internal/lrucache.js
|
|
199029
|
+
var require_lrucache = __commonJS({
|
|
199030
|
+
"node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
199031
|
+
"use strict";
|
|
199032
|
+
init_import_meta_url();
|
|
199033
|
+
var LRUCache2 = class {
|
|
199034
|
+
constructor() {
|
|
199035
|
+
this.max = 1e3;
|
|
199036
|
+
this.map = /* @__PURE__ */ new Map();
|
|
199037
|
+
}
|
|
199038
|
+
get(key) {
|
|
199039
|
+
const value = this.map.get(key);
|
|
199040
|
+
if (value === void 0) {
|
|
199041
|
+
return void 0;
|
|
199042
|
+
} else {
|
|
199043
|
+
this.map.delete(key);
|
|
199044
|
+
this.map.set(key, value);
|
|
199045
|
+
return value;
|
|
199046
|
+
}
|
|
199047
|
+
}
|
|
199048
|
+
delete(key) {
|
|
199049
|
+
return this.map.delete(key);
|
|
199050
|
+
}
|
|
199051
|
+
set(key, value) {
|
|
199052
|
+
const deleted = this.delete(key);
|
|
199053
|
+
if (!deleted && value !== void 0) {
|
|
199054
|
+
if (this.map.size >= this.max) {
|
|
199055
|
+
const firstKey = this.map.keys().next().value;
|
|
199056
|
+
this.delete(firstKey);
|
|
199057
|
+
}
|
|
199058
|
+
this.map.set(key, value);
|
|
199059
|
+
}
|
|
199060
|
+
return this;
|
|
199061
|
+
}
|
|
199062
|
+
};
|
|
199063
|
+
module2.exports = LRUCache2;
|
|
199064
|
+
}
|
|
199065
|
+
});
|
|
199066
|
+
|
|
199067
|
+
// node_modules/semver/classes/range.js
|
|
199068
|
+
var require_range2 = __commonJS({
|
|
199069
|
+
"node_modules/semver/classes/range.js"(exports2, module2) {
|
|
199070
|
+
"use strict";
|
|
199071
|
+
init_import_meta_url();
|
|
199072
|
+
var SPACE_CHARACTERS = /\s+/g;
|
|
199073
|
+
var Range = class _Range {
|
|
199074
|
+
constructor(range3, options) {
|
|
199075
|
+
options = parseOptions(options);
|
|
199076
|
+
if (range3 instanceof _Range) {
|
|
199077
|
+
if (range3.loose === !!options.loose && range3.includePrerelease === !!options.includePrerelease) {
|
|
199078
|
+
return range3;
|
|
199079
|
+
} else {
|
|
199080
|
+
return new _Range(range3.raw, options);
|
|
199081
|
+
}
|
|
199082
|
+
}
|
|
199083
|
+
if (range3 instanceof Comparator) {
|
|
199084
|
+
this.raw = range3.value;
|
|
199085
|
+
this.set = [[range3]];
|
|
199086
|
+
this.formatted = void 0;
|
|
199087
|
+
return this;
|
|
199088
|
+
}
|
|
199089
|
+
this.options = options;
|
|
199090
|
+
this.loose = !!options.loose;
|
|
199091
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
199092
|
+
this.raw = range3.trim().replace(SPACE_CHARACTERS, " ");
|
|
199093
|
+
this.set = this.raw.split("||").map((r3) => this.parseRange(r3.trim())).filter((c3) => c3.length);
|
|
199094
|
+
if (!this.set.length) {
|
|
199095
|
+
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
199096
|
+
}
|
|
199097
|
+
if (this.set.length > 1) {
|
|
199098
|
+
const first2 = this.set[0];
|
|
199099
|
+
this.set = this.set.filter((c3) => !isNullSet(c3[0]));
|
|
199100
|
+
if (this.set.length === 0) {
|
|
199101
|
+
this.set = [first2];
|
|
199102
|
+
} else if (this.set.length > 1) {
|
|
199103
|
+
for (const c3 of this.set) {
|
|
199104
|
+
if (c3.length === 1 && isAny(c3[0])) {
|
|
199105
|
+
this.set = [c3];
|
|
199106
|
+
break;
|
|
199107
|
+
}
|
|
199108
|
+
}
|
|
199109
|
+
}
|
|
199110
|
+
}
|
|
199111
|
+
this.formatted = void 0;
|
|
199112
|
+
}
|
|
199113
|
+
get range() {
|
|
199114
|
+
if (this.formatted === void 0) {
|
|
199115
|
+
this.formatted = "";
|
|
199116
|
+
for (let i3 = 0; i3 < this.set.length; i3++) {
|
|
199117
|
+
if (i3 > 0) {
|
|
199118
|
+
this.formatted += "||";
|
|
199119
|
+
}
|
|
199120
|
+
const comps = this.set[i3];
|
|
199121
|
+
for (let k3 = 0; k3 < comps.length; k3++) {
|
|
199122
|
+
if (k3 > 0) {
|
|
199123
|
+
this.formatted += " ";
|
|
199124
|
+
}
|
|
199125
|
+
this.formatted += comps[k3].toString().trim();
|
|
199126
|
+
}
|
|
199127
|
+
}
|
|
199128
|
+
}
|
|
199129
|
+
return this.formatted;
|
|
199130
|
+
}
|
|
199131
|
+
format() {
|
|
199132
|
+
return this.range;
|
|
199133
|
+
}
|
|
199134
|
+
toString() {
|
|
199135
|
+
return this.range;
|
|
199136
|
+
}
|
|
199137
|
+
parseRange(range3) {
|
|
199138
|
+
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
199139
|
+
const memoKey = memoOpts + ":" + range3;
|
|
199140
|
+
const cached = cache4.get(memoKey);
|
|
199141
|
+
if (cached) {
|
|
199142
|
+
return cached;
|
|
199143
|
+
}
|
|
199144
|
+
const loose = this.options.loose;
|
|
199145
|
+
const hr = loose ? re2[t3.HYPHENRANGELOOSE] : re2[t3.HYPHENRANGE];
|
|
199146
|
+
range3 = range3.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
199147
|
+
debug3("hyphen replace", range3);
|
|
199148
|
+
range3 = range3.replace(re2[t3.COMPARATORTRIM], comparatorTrimReplace);
|
|
199149
|
+
debug3("comparator trim", range3);
|
|
199150
|
+
range3 = range3.replace(re2[t3.TILDETRIM], tildeTrimReplace);
|
|
199151
|
+
debug3("tilde trim", range3);
|
|
199152
|
+
range3 = range3.replace(re2[t3.CARETTRIM], caretTrimReplace);
|
|
199153
|
+
debug3("caret trim", range3);
|
|
199154
|
+
let rangeList = range3.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
199155
|
+
if (loose) {
|
|
199156
|
+
rangeList = rangeList.filter((comp) => {
|
|
199157
|
+
debug3("loose invalid filter", comp, this.options);
|
|
199158
|
+
return !!comp.match(re2[t3.COMPARATORLOOSE]);
|
|
199159
|
+
});
|
|
199160
|
+
}
|
|
199161
|
+
debug3("range list", rangeList);
|
|
199162
|
+
const rangeMap = /* @__PURE__ */ new Map();
|
|
199163
|
+
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
199164
|
+
for (const comp of comparators) {
|
|
199165
|
+
if (isNullSet(comp)) {
|
|
199166
|
+
return [comp];
|
|
199167
|
+
}
|
|
199168
|
+
rangeMap.set(comp.value, comp);
|
|
199169
|
+
}
|
|
199170
|
+
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
199171
|
+
rangeMap.delete("");
|
|
199172
|
+
}
|
|
199173
|
+
const result = [...rangeMap.values()];
|
|
199174
|
+
cache4.set(memoKey, result);
|
|
199175
|
+
return result;
|
|
199176
|
+
}
|
|
199177
|
+
intersects(range3, options) {
|
|
199178
|
+
if (!(range3 instanceof _Range)) {
|
|
199179
|
+
throw new TypeError("a Range is required");
|
|
199180
|
+
}
|
|
199181
|
+
return this.set.some((thisComparators) => {
|
|
199182
|
+
return isSatisfiable(thisComparators, options) && range3.set.some((rangeComparators) => {
|
|
199183
|
+
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
199184
|
+
return rangeComparators.every((rangeComparator) => {
|
|
199185
|
+
return thisComparator.intersects(rangeComparator, options);
|
|
199186
|
+
});
|
|
199187
|
+
});
|
|
199188
|
+
});
|
|
199189
|
+
});
|
|
199190
|
+
}
|
|
199191
|
+
// if ANY of the sets match ALL of its comparators, then pass
|
|
199192
|
+
test(version2) {
|
|
199193
|
+
if (!version2) {
|
|
199194
|
+
return false;
|
|
199195
|
+
}
|
|
199196
|
+
if (typeof version2 === "string") {
|
|
199197
|
+
try {
|
|
199198
|
+
version2 = new SemVer2(version2, this.options);
|
|
199199
|
+
} catch (er) {
|
|
199200
|
+
return false;
|
|
199201
|
+
}
|
|
199202
|
+
}
|
|
199203
|
+
for (let i3 = 0; i3 < this.set.length; i3++) {
|
|
199204
|
+
if (testSet(this.set[i3], version2, this.options)) {
|
|
199205
|
+
return true;
|
|
199206
|
+
}
|
|
199207
|
+
}
|
|
199208
|
+
return false;
|
|
199209
|
+
}
|
|
199210
|
+
};
|
|
199211
|
+
module2.exports = Range;
|
|
199212
|
+
var LRU = require_lrucache();
|
|
199213
|
+
var cache4 = new LRU();
|
|
199214
|
+
var parseOptions = require_parse_options();
|
|
199215
|
+
var Comparator = require_comparator();
|
|
199216
|
+
var debug3 = require_debug();
|
|
199217
|
+
var SemVer2 = require_semver3();
|
|
199218
|
+
var {
|
|
199219
|
+
safeRe: re2,
|
|
199220
|
+
t: t3,
|
|
199221
|
+
comparatorTrimReplace,
|
|
199222
|
+
tildeTrimReplace,
|
|
199223
|
+
caretTrimReplace
|
|
199224
|
+
} = require_re();
|
|
199225
|
+
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants3();
|
|
199226
|
+
var isNullSet = (c3) => c3.value === "<0.0.0-0";
|
|
199227
|
+
var isAny = (c3) => c3.value === "";
|
|
199228
|
+
var isSatisfiable = (comparators, options) => {
|
|
199229
|
+
let result = true;
|
|
199230
|
+
const remainingComparators = comparators.slice();
|
|
199231
|
+
let testComparator = remainingComparators.pop();
|
|
199232
|
+
while (result && remainingComparators.length) {
|
|
199233
|
+
result = remainingComparators.every((otherComparator) => {
|
|
199234
|
+
return testComparator.intersects(otherComparator, options);
|
|
199235
|
+
});
|
|
199236
|
+
testComparator = remainingComparators.pop();
|
|
199237
|
+
}
|
|
199238
|
+
return result;
|
|
199239
|
+
};
|
|
199240
|
+
var parseComparator = (comp, options) => {
|
|
199241
|
+
comp = comp.replace(re2[t3.BUILD], "");
|
|
199242
|
+
debug3("comp", comp, options);
|
|
199243
|
+
comp = replaceCarets(comp, options);
|
|
199244
|
+
debug3("caret", comp);
|
|
199245
|
+
comp = replaceTildes(comp, options);
|
|
199246
|
+
debug3("tildes", comp);
|
|
199247
|
+
comp = replaceXRanges(comp, options);
|
|
199248
|
+
debug3("xrange", comp);
|
|
199249
|
+
comp = replaceStars(comp, options);
|
|
199250
|
+
debug3("stars", comp);
|
|
199251
|
+
return comp;
|
|
199252
|
+
};
|
|
199253
|
+
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
199254
|
+
var replaceTildes = (comp, options) => {
|
|
199255
|
+
return comp.trim().split(/\s+/).map((c3) => replaceTilde(c3, options)).join(" ");
|
|
199256
|
+
};
|
|
199257
|
+
var replaceTilde = (comp, options) => {
|
|
199258
|
+
const r3 = options.loose ? re2[t3.TILDELOOSE] : re2[t3.TILDE];
|
|
199259
|
+
return comp.replace(r3, (_, M, m3, p3, pr) => {
|
|
199260
|
+
debug3("tilde", comp, _, M, m3, p3, pr);
|
|
199261
|
+
let ret;
|
|
199262
|
+
if (isX(M)) {
|
|
199263
|
+
ret = "";
|
|
199264
|
+
} else if (isX(m3)) {
|
|
199265
|
+
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
199266
|
+
} else if (isX(p3)) {
|
|
199267
|
+
ret = `>=${M}.${m3}.0 <${M}.${+m3 + 1}.0-0`;
|
|
199268
|
+
} else if (pr) {
|
|
199269
|
+
debug3("replaceTilde pr", pr);
|
|
199270
|
+
ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${+m3 + 1}.0-0`;
|
|
199271
|
+
} else {
|
|
199272
|
+
ret = `>=${M}.${m3}.${p3} <${M}.${+m3 + 1}.0-0`;
|
|
199273
|
+
}
|
|
199274
|
+
debug3("tilde return", ret);
|
|
199275
|
+
return ret;
|
|
199276
|
+
});
|
|
199277
|
+
};
|
|
199278
|
+
var replaceCarets = (comp, options) => {
|
|
199279
|
+
return comp.trim().split(/\s+/).map((c3) => replaceCaret(c3, options)).join(" ");
|
|
199280
|
+
};
|
|
199281
|
+
var replaceCaret = (comp, options) => {
|
|
199282
|
+
debug3("caret", comp, options);
|
|
199283
|
+
const r3 = options.loose ? re2[t3.CARETLOOSE] : re2[t3.CARET];
|
|
199284
|
+
const z2 = options.includePrerelease ? "-0" : "";
|
|
199285
|
+
return comp.replace(r3, (_, M, m3, p3, pr) => {
|
|
199286
|
+
debug3("caret", comp, _, M, m3, p3, pr);
|
|
199287
|
+
let ret;
|
|
199288
|
+
if (isX(M)) {
|
|
199289
|
+
ret = "";
|
|
199290
|
+
} else if (isX(m3)) {
|
|
199291
|
+
ret = `>=${M}.0.0${z2} <${+M + 1}.0.0-0`;
|
|
199292
|
+
} else if (isX(p3)) {
|
|
199293
|
+
if (M === "0") {
|
|
199294
|
+
ret = `>=${M}.${m3}.0${z2} <${M}.${+m3 + 1}.0-0`;
|
|
199295
|
+
} else {
|
|
199296
|
+
ret = `>=${M}.${m3}.0${z2} <${+M + 1}.0.0-0`;
|
|
199297
|
+
}
|
|
199298
|
+
} else if (pr) {
|
|
199299
|
+
debug3("replaceCaret pr", pr);
|
|
199300
|
+
if (M === "0") {
|
|
199301
|
+
if (m3 === "0") {
|
|
199302
|
+
ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${m3}.${+p3 + 1}-0`;
|
|
199303
|
+
} else {
|
|
199304
|
+
ret = `>=${M}.${m3}.${p3}-${pr} <${M}.${+m3 + 1}.0-0`;
|
|
199305
|
+
}
|
|
199306
|
+
} else {
|
|
199307
|
+
ret = `>=${M}.${m3}.${p3}-${pr} <${+M + 1}.0.0-0`;
|
|
199308
|
+
}
|
|
199309
|
+
} else {
|
|
199310
|
+
debug3("no pr");
|
|
199311
|
+
if (M === "0") {
|
|
199312
|
+
if (m3 === "0") {
|
|
199313
|
+
ret = `>=${M}.${m3}.${p3}${z2} <${M}.${m3}.${+p3 + 1}-0`;
|
|
199314
|
+
} else {
|
|
199315
|
+
ret = `>=${M}.${m3}.${p3}${z2} <${M}.${+m3 + 1}.0-0`;
|
|
199316
|
+
}
|
|
199317
|
+
} else {
|
|
199318
|
+
ret = `>=${M}.${m3}.${p3} <${+M + 1}.0.0-0`;
|
|
199319
|
+
}
|
|
199320
|
+
}
|
|
199321
|
+
debug3("caret return", ret);
|
|
199322
|
+
return ret;
|
|
199323
|
+
});
|
|
199324
|
+
};
|
|
199325
|
+
var replaceXRanges = (comp, options) => {
|
|
199326
|
+
debug3("replaceXRanges", comp, options);
|
|
199327
|
+
return comp.split(/\s+/).map((c3) => replaceXRange(c3, options)).join(" ");
|
|
199328
|
+
};
|
|
199329
|
+
var replaceXRange = (comp, options) => {
|
|
199330
|
+
comp = comp.trim();
|
|
199331
|
+
const r3 = options.loose ? re2[t3.XRANGELOOSE] : re2[t3.XRANGE];
|
|
199332
|
+
return comp.replace(r3, (ret, gtlt, M, m3, p3, pr) => {
|
|
199333
|
+
debug3("xRange", comp, ret, gtlt, M, m3, p3, pr);
|
|
199334
|
+
const xM = isX(M);
|
|
199335
|
+
const xm = xM || isX(m3);
|
|
199336
|
+
const xp = xm || isX(p3);
|
|
199337
|
+
const anyX = xp;
|
|
199338
|
+
if (gtlt === "=" && anyX) {
|
|
199339
|
+
gtlt = "";
|
|
199340
|
+
}
|
|
199341
|
+
pr = options.includePrerelease ? "-0" : "";
|
|
199342
|
+
if (xM) {
|
|
199343
|
+
if (gtlt === ">" || gtlt === "<") {
|
|
199344
|
+
ret = "<0.0.0-0";
|
|
199345
|
+
} else {
|
|
199346
|
+
ret = "*";
|
|
199347
|
+
}
|
|
199348
|
+
} else if (gtlt && anyX) {
|
|
199349
|
+
if (xm) {
|
|
199350
|
+
m3 = 0;
|
|
199351
|
+
}
|
|
199352
|
+
p3 = 0;
|
|
199353
|
+
if (gtlt === ">") {
|
|
199354
|
+
gtlt = ">=";
|
|
199355
|
+
if (xm) {
|
|
199356
|
+
M = +M + 1;
|
|
199357
|
+
m3 = 0;
|
|
199358
|
+
p3 = 0;
|
|
199359
|
+
} else {
|
|
199360
|
+
m3 = +m3 + 1;
|
|
199361
|
+
p3 = 0;
|
|
199362
|
+
}
|
|
199363
|
+
} else if (gtlt === "<=") {
|
|
199364
|
+
gtlt = "<";
|
|
199365
|
+
if (xm) {
|
|
199366
|
+
M = +M + 1;
|
|
199367
|
+
} else {
|
|
199368
|
+
m3 = +m3 + 1;
|
|
199369
|
+
}
|
|
199370
|
+
}
|
|
199371
|
+
if (gtlt === "<") {
|
|
199372
|
+
pr = "-0";
|
|
199373
|
+
}
|
|
199374
|
+
ret = `${gtlt + M}.${m3}.${p3}${pr}`;
|
|
199375
|
+
} else if (xm) {
|
|
199376
|
+
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
199377
|
+
} else if (xp) {
|
|
199378
|
+
ret = `>=${M}.${m3}.0${pr} <${M}.${+m3 + 1}.0-0`;
|
|
199379
|
+
}
|
|
199380
|
+
debug3("xRange return", ret);
|
|
199381
|
+
return ret;
|
|
199382
|
+
});
|
|
199383
|
+
};
|
|
199384
|
+
var replaceStars = (comp, options) => {
|
|
199385
|
+
debug3("replaceStars", comp, options);
|
|
199386
|
+
return comp.trim().replace(re2[t3.STAR], "");
|
|
199387
|
+
};
|
|
199388
|
+
var replaceGTE0 = (comp, options) => {
|
|
199389
|
+
debug3("replaceGTE0", comp, options);
|
|
199390
|
+
return comp.trim().replace(re2[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], "");
|
|
199391
|
+
};
|
|
199392
|
+
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
|
|
199393
|
+
if (isX(fM)) {
|
|
199394
|
+
from = "";
|
|
199395
|
+
} else if (isX(fm)) {
|
|
199396
|
+
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
199397
|
+
} else if (isX(fp)) {
|
|
199398
|
+
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
199399
|
+
} else if (fpr) {
|
|
199400
|
+
from = `>=${from}`;
|
|
199401
|
+
} else {
|
|
199402
|
+
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
199403
|
+
}
|
|
199404
|
+
if (isX(tM)) {
|
|
199405
|
+
to = "";
|
|
199406
|
+
} else if (isX(tm)) {
|
|
199407
|
+
to = `<${+tM + 1}.0.0-0`;
|
|
199408
|
+
} else if (isX(tp)) {
|
|
199409
|
+
to = `<${tM}.${+tm + 1}.0-0`;
|
|
199410
|
+
} else if (tpr) {
|
|
199411
|
+
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
199412
|
+
} else if (incPr) {
|
|
199413
|
+
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
199414
|
+
} else {
|
|
199415
|
+
to = `<=${to}`;
|
|
199416
|
+
}
|
|
199417
|
+
return `${from} ${to}`.trim();
|
|
199418
|
+
};
|
|
199419
|
+
var testSet = (set2, version2, options) => {
|
|
199420
|
+
for (let i3 = 0; i3 < set2.length; i3++) {
|
|
199421
|
+
if (!set2[i3].test(version2)) {
|
|
199422
|
+
return false;
|
|
199423
|
+
}
|
|
199424
|
+
}
|
|
199425
|
+
if (version2.prerelease.length && !options.includePrerelease) {
|
|
199426
|
+
for (let i3 = 0; i3 < set2.length; i3++) {
|
|
199427
|
+
debug3(set2[i3].semver);
|
|
199428
|
+
if (set2[i3].semver === Comparator.ANY) {
|
|
199429
|
+
continue;
|
|
199430
|
+
}
|
|
199431
|
+
if (set2[i3].semver.prerelease.length > 0) {
|
|
199432
|
+
const allowed = set2[i3].semver;
|
|
199433
|
+
if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) {
|
|
199434
|
+
return true;
|
|
199435
|
+
}
|
|
199436
|
+
}
|
|
199437
|
+
}
|
|
199438
|
+
return false;
|
|
199439
|
+
}
|
|
199440
|
+
return true;
|
|
199441
|
+
};
|
|
199442
|
+
}
|
|
199443
|
+
});
|
|
199444
|
+
|
|
199445
|
+
// node_modules/semver/classes/comparator.js
|
|
199446
|
+
var require_comparator = __commonJS({
|
|
199447
|
+
"node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
199448
|
+
"use strict";
|
|
199449
|
+
init_import_meta_url();
|
|
199450
|
+
var ANY = Symbol("SemVer ANY");
|
|
199451
|
+
var Comparator = class _Comparator {
|
|
199452
|
+
static get ANY() {
|
|
199453
|
+
return ANY;
|
|
199454
|
+
}
|
|
199455
|
+
constructor(comp, options) {
|
|
199456
|
+
options = parseOptions(options);
|
|
199457
|
+
if (comp instanceof _Comparator) {
|
|
199458
|
+
if (comp.loose === !!options.loose) {
|
|
199459
|
+
return comp;
|
|
199460
|
+
} else {
|
|
199461
|
+
comp = comp.value;
|
|
199462
|
+
}
|
|
199463
|
+
}
|
|
199464
|
+
comp = comp.trim().split(/\s+/).join(" ");
|
|
199465
|
+
debug3("comparator", comp, options);
|
|
199466
|
+
this.options = options;
|
|
199467
|
+
this.loose = !!options.loose;
|
|
199468
|
+
this.parse(comp);
|
|
199469
|
+
if (this.semver === ANY) {
|
|
199470
|
+
this.value = "";
|
|
199471
|
+
} else {
|
|
199472
|
+
this.value = this.operator + this.semver.version;
|
|
199473
|
+
}
|
|
199474
|
+
debug3("comp", this);
|
|
199475
|
+
}
|
|
199476
|
+
parse(comp) {
|
|
199477
|
+
const r3 = this.options.loose ? re2[t3.COMPARATORLOOSE] : re2[t3.COMPARATOR];
|
|
199478
|
+
const m3 = comp.match(r3);
|
|
199479
|
+
if (!m3) {
|
|
199480
|
+
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
199481
|
+
}
|
|
199482
|
+
this.operator = m3[1] !== void 0 ? m3[1] : "";
|
|
199483
|
+
if (this.operator === "=") {
|
|
199484
|
+
this.operator = "";
|
|
199485
|
+
}
|
|
199486
|
+
if (!m3[2]) {
|
|
199487
|
+
this.semver = ANY;
|
|
199488
|
+
} else {
|
|
199489
|
+
this.semver = new SemVer2(m3[2], this.options.loose);
|
|
199490
|
+
}
|
|
199491
|
+
}
|
|
199492
|
+
toString() {
|
|
199493
|
+
return this.value;
|
|
199494
|
+
}
|
|
199495
|
+
test(version2) {
|
|
199496
|
+
debug3("Comparator.test", version2, this.options.loose);
|
|
199497
|
+
if (this.semver === ANY || version2 === ANY) {
|
|
199498
|
+
return true;
|
|
199499
|
+
}
|
|
199500
|
+
if (typeof version2 === "string") {
|
|
199501
|
+
try {
|
|
199502
|
+
version2 = new SemVer2(version2, this.options);
|
|
199503
|
+
} catch (er) {
|
|
199504
|
+
return false;
|
|
199505
|
+
}
|
|
199506
|
+
}
|
|
199507
|
+
return cmp(version2, this.operator, this.semver, this.options);
|
|
199508
|
+
}
|
|
199509
|
+
intersects(comp, options) {
|
|
199510
|
+
if (!(comp instanceof _Comparator)) {
|
|
199511
|
+
throw new TypeError("a Comparator is required");
|
|
199512
|
+
}
|
|
199513
|
+
if (this.operator === "") {
|
|
199514
|
+
if (this.value === "") {
|
|
199515
|
+
return true;
|
|
199516
|
+
}
|
|
199517
|
+
return new Range(comp.value, options).test(this.value);
|
|
199518
|
+
} else if (comp.operator === "") {
|
|
199519
|
+
if (comp.value === "") {
|
|
199520
|
+
return true;
|
|
199521
|
+
}
|
|
199522
|
+
return new Range(this.value, options).test(comp.semver);
|
|
199523
|
+
}
|
|
199524
|
+
options = parseOptions(options);
|
|
199525
|
+
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
199526
|
+
return false;
|
|
199527
|
+
}
|
|
199528
|
+
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
199529
|
+
return false;
|
|
199530
|
+
}
|
|
199531
|
+
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
199532
|
+
return true;
|
|
199533
|
+
}
|
|
199534
|
+
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
199535
|
+
return true;
|
|
199536
|
+
}
|
|
199537
|
+
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
199538
|
+
return true;
|
|
199539
|
+
}
|
|
199540
|
+
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
199541
|
+
return true;
|
|
199542
|
+
}
|
|
199543
|
+
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
199544
|
+
return true;
|
|
199545
|
+
}
|
|
199546
|
+
return false;
|
|
199547
|
+
}
|
|
199548
|
+
};
|
|
199549
|
+
module2.exports = Comparator;
|
|
199550
|
+
var parseOptions = require_parse_options();
|
|
199551
|
+
var { safeRe: re2, t: t3 } = require_re();
|
|
199552
|
+
var cmp = require_cmp();
|
|
199553
|
+
var debug3 = require_debug();
|
|
199554
|
+
var SemVer2 = require_semver3();
|
|
199555
|
+
var Range = require_range2();
|
|
199556
|
+
}
|
|
199557
|
+
});
|
|
199558
|
+
|
|
199559
|
+
// node_modules/semver/functions/satisfies.js
|
|
199560
|
+
var require_satisfies = __commonJS({
|
|
199561
|
+
"node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
199562
|
+
"use strict";
|
|
199563
|
+
init_import_meta_url();
|
|
199564
|
+
var Range = require_range2();
|
|
199565
|
+
var satisfies = (version2, range3, options) => {
|
|
199566
|
+
try {
|
|
199567
|
+
range3 = new Range(range3, options);
|
|
199568
|
+
} catch (er) {
|
|
199569
|
+
return false;
|
|
199570
|
+
}
|
|
199571
|
+
return range3.test(version2);
|
|
199572
|
+
};
|
|
199573
|
+
module2.exports = satisfies;
|
|
199574
|
+
}
|
|
199575
|
+
});
|
|
199576
|
+
|
|
199577
|
+
// node_modules/semver/ranges/to-comparators.js
|
|
199578
|
+
var require_to_comparators = __commonJS({
|
|
199579
|
+
"node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
199580
|
+
"use strict";
|
|
199581
|
+
init_import_meta_url();
|
|
199582
|
+
var Range = require_range2();
|
|
199583
|
+
var toComparators = (range3, options) => new Range(range3, options).set.map((comp) => comp.map((c3) => c3.value).join(" ").trim().split(" "));
|
|
199584
|
+
module2.exports = toComparators;
|
|
199585
|
+
}
|
|
199586
|
+
});
|
|
199587
|
+
|
|
199588
|
+
// node_modules/semver/ranges/max-satisfying.js
|
|
199589
|
+
var require_max_satisfying = __commonJS({
|
|
199590
|
+
"node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
199591
|
+
"use strict";
|
|
199592
|
+
init_import_meta_url();
|
|
199593
|
+
var SemVer2 = require_semver3();
|
|
199594
|
+
var Range = require_range2();
|
|
199595
|
+
var maxSatisfying = (versions, range3, options) => {
|
|
199596
|
+
let max = null;
|
|
199597
|
+
let maxSV = null;
|
|
199598
|
+
let rangeObj = null;
|
|
199599
|
+
try {
|
|
199600
|
+
rangeObj = new Range(range3, options);
|
|
199601
|
+
} catch (er) {
|
|
199602
|
+
return null;
|
|
199603
|
+
}
|
|
199604
|
+
versions.forEach((v6) => {
|
|
199605
|
+
if (rangeObj.test(v6)) {
|
|
199606
|
+
if (!max || maxSV.compare(v6) === -1) {
|
|
199607
|
+
max = v6;
|
|
199608
|
+
maxSV = new SemVer2(max, options);
|
|
199609
|
+
}
|
|
199610
|
+
}
|
|
199611
|
+
});
|
|
199612
|
+
return max;
|
|
199613
|
+
};
|
|
199614
|
+
module2.exports = maxSatisfying;
|
|
199615
|
+
}
|
|
199616
|
+
});
|
|
199617
|
+
|
|
199618
|
+
// node_modules/semver/ranges/min-satisfying.js
|
|
199619
|
+
var require_min_satisfying = __commonJS({
|
|
199620
|
+
"node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
199621
|
+
"use strict";
|
|
199622
|
+
init_import_meta_url();
|
|
199623
|
+
var SemVer2 = require_semver3();
|
|
199624
|
+
var Range = require_range2();
|
|
199625
|
+
var minSatisfying = (versions, range3, options) => {
|
|
199626
|
+
let min = null;
|
|
199627
|
+
let minSV = null;
|
|
199628
|
+
let rangeObj = null;
|
|
199629
|
+
try {
|
|
199630
|
+
rangeObj = new Range(range3, options);
|
|
199631
|
+
} catch (er) {
|
|
199632
|
+
return null;
|
|
199633
|
+
}
|
|
199634
|
+
versions.forEach((v6) => {
|
|
199635
|
+
if (rangeObj.test(v6)) {
|
|
199636
|
+
if (!min || minSV.compare(v6) === 1) {
|
|
199637
|
+
min = v6;
|
|
199638
|
+
minSV = new SemVer2(min, options);
|
|
199639
|
+
}
|
|
199640
|
+
}
|
|
199641
|
+
});
|
|
199642
|
+
return min;
|
|
199643
|
+
};
|
|
199644
|
+
module2.exports = minSatisfying;
|
|
199645
|
+
}
|
|
199646
|
+
});
|
|
199647
|
+
|
|
199648
|
+
// node_modules/semver/ranges/min-version.js
|
|
199649
|
+
var require_min_version = __commonJS({
|
|
199650
|
+
"node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
199651
|
+
"use strict";
|
|
199652
|
+
init_import_meta_url();
|
|
199653
|
+
var SemVer2 = require_semver3();
|
|
199654
|
+
var Range = require_range2();
|
|
199655
|
+
var gt = require_gt();
|
|
199656
|
+
var minVersion = (range3, loose) => {
|
|
199657
|
+
range3 = new Range(range3, loose);
|
|
199658
|
+
let minver = new SemVer2("0.0.0");
|
|
199659
|
+
if (range3.test(minver)) {
|
|
199660
|
+
return minver;
|
|
199661
|
+
}
|
|
199662
|
+
minver = new SemVer2("0.0.0-0");
|
|
199663
|
+
if (range3.test(minver)) {
|
|
199664
|
+
return minver;
|
|
199665
|
+
}
|
|
199666
|
+
minver = null;
|
|
199667
|
+
for (let i3 = 0; i3 < range3.set.length; ++i3) {
|
|
199668
|
+
const comparators = range3.set[i3];
|
|
199669
|
+
let setMin = null;
|
|
199670
|
+
comparators.forEach((comparator) => {
|
|
199671
|
+
const compver = new SemVer2(comparator.semver.version);
|
|
199672
|
+
switch (comparator.operator) {
|
|
199673
|
+
case ">":
|
|
199674
|
+
if (compver.prerelease.length === 0) {
|
|
199675
|
+
compver.patch++;
|
|
199676
|
+
} else {
|
|
199677
|
+
compver.prerelease.push(0);
|
|
199678
|
+
}
|
|
199679
|
+
compver.raw = compver.format();
|
|
199680
|
+
/* fallthrough */
|
|
199681
|
+
case "":
|
|
199682
|
+
case ">=":
|
|
199683
|
+
if (!setMin || gt(compver, setMin)) {
|
|
199684
|
+
setMin = compver;
|
|
199685
|
+
}
|
|
199686
|
+
break;
|
|
199687
|
+
case "<":
|
|
199688
|
+
case "<=":
|
|
199689
|
+
break;
|
|
199690
|
+
/* istanbul ignore next */
|
|
199691
|
+
default:
|
|
199692
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
199693
|
+
}
|
|
199694
|
+
});
|
|
199695
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
199696
|
+
minver = setMin;
|
|
199697
|
+
}
|
|
199698
|
+
}
|
|
199699
|
+
if (minver && range3.test(minver)) {
|
|
199700
|
+
return minver;
|
|
199701
|
+
}
|
|
199702
|
+
return null;
|
|
199703
|
+
};
|
|
199704
|
+
module2.exports = minVersion;
|
|
199705
|
+
}
|
|
199706
|
+
});
|
|
199707
|
+
|
|
199708
|
+
// node_modules/semver/ranges/valid.js
|
|
199709
|
+
var require_valid2 = __commonJS({
|
|
199710
|
+
"node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
199711
|
+
"use strict";
|
|
199712
|
+
init_import_meta_url();
|
|
199713
|
+
var Range = require_range2();
|
|
199714
|
+
var validRange = (range3, options) => {
|
|
199715
|
+
try {
|
|
199716
|
+
return new Range(range3, options).range || "*";
|
|
199717
|
+
} catch (er) {
|
|
199718
|
+
return null;
|
|
199719
|
+
}
|
|
199720
|
+
};
|
|
199721
|
+
module2.exports = validRange;
|
|
199722
|
+
}
|
|
199723
|
+
});
|
|
199724
|
+
|
|
199725
|
+
// node_modules/semver/ranges/outside.js
|
|
199726
|
+
var require_outside = __commonJS({
|
|
199727
|
+
"node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
199728
|
+
"use strict";
|
|
199729
|
+
init_import_meta_url();
|
|
199730
|
+
var SemVer2 = require_semver3();
|
|
199731
|
+
var Comparator = require_comparator();
|
|
199732
|
+
var { ANY } = Comparator;
|
|
199733
|
+
var Range = require_range2();
|
|
199734
|
+
var satisfies = require_satisfies();
|
|
199735
|
+
var gt = require_gt();
|
|
199736
|
+
var lt = require_lt();
|
|
199737
|
+
var lte2 = require_lte();
|
|
199738
|
+
var gte2 = require_gte();
|
|
199739
|
+
var outside = (version2, range3, hilo, options) => {
|
|
199740
|
+
version2 = new SemVer2(version2, options);
|
|
199741
|
+
range3 = new Range(range3, options);
|
|
199742
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
199743
|
+
switch (hilo) {
|
|
199744
|
+
case ">":
|
|
199745
|
+
gtfn = gt;
|
|
199746
|
+
ltefn = lte2;
|
|
199747
|
+
ltfn = lt;
|
|
199748
|
+
comp = ">";
|
|
199749
|
+
ecomp = ">=";
|
|
199750
|
+
break;
|
|
199751
|
+
case "<":
|
|
199752
|
+
gtfn = lt;
|
|
199753
|
+
ltefn = gte2;
|
|
199754
|
+
ltfn = gt;
|
|
199755
|
+
comp = "<";
|
|
199756
|
+
ecomp = "<=";
|
|
199757
|
+
break;
|
|
199758
|
+
default:
|
|
199759
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
199760
|
+
}
|
|
199761
|
+
if (satisfies(version2, range3, options)) {
|
|
199762
|
+
return false;
|
|
199763
|
+
}
|
|
199764
|
+
for (let i3 = 0; i3 < range3.set.length; ++i3) {
|
|
199765
|
+
const comparators = range3.set[i3];
|
|
199766
|
+
let high = null;
|
|
199767
|
+
let low = null;
|
|
199768
|
+
comparators.forEach((comparator) => {
|
|
199769
|
+
if (comparator.semver === ANY) {
|
|
199770
|
+
comparator = new Comparator(">=0.0.0");
|
|
199771
|
+
}
|
|
199772
|
+
high = high || comparator;
|
|
199773
|
+
low = low || comparator;
|
|
199774
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
199775
|
+
high = comparator;
|
|
199776
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
199777
|
+
low = comparator;
|
|
199778
|
+
}
|
|
199779
|
+
});
|
|
199780
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
199781
|
+
return false;
|
|
199782
|
+
}
|
|
199783
|
+
if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) {
|
|
199784
|
+
return false;
|
|
199785
|
+
} else if (low.operator === ecomp && ltfn(version2, low.semver)) {
|
|
199786
|
+
return false;
|
|
199787
|
+
}
|
|
199788
|
+
}
|
|
199789
|
+
return true;
|
|
199790
|
+
};
|
|
199791
|
+
module2.exports = outside;
|
|
199792
|
+
}
|
|
199793
|
+
});
|
|
199794
|
+
|
|
199795
|
+
// node_modules/semver/ranges/gtr.js
|
|
199796
|
+
var require_gtr = __commonJS({
|
|
199797
|
+
"node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
199798
|
+
"use strict";
|
|
199799
|
+
init_import_meta_url();
|
|
199800
|
+
var outside = require_outside();
|
|
199801
|
+
var gtr = (version2, range3, options) => outside(version2, range3, ">", options);
|
|
199802
|
+
module2.exports = gtr;
|
|
199803
|
+
}
|
|
199804
|
+
});
|
|
199805
|
+
|
|
199806
|
+
// node_modules/semver/ranges/ltr.js
|
|
199807
|
+
var require_ltr = __commonJS({
|
|
199808
|
+
"node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
199809
|
+
"use strict";
|
|
199810
|
+
init_import_meta_url();
|
|
199811
|
+
var outside = require_outside();
|
|
199812
|
+
var ltr = (version2, range3, options) => outside(version2, range3, "<", options);
|
|
199813
|
+
module2.exports = ltr;
|
|
199814
|
+
}
|
|
199815
|
+
});
|
|
199816
|
+
|
|
199817
|
+
// node_modules/semver/ranges/intersects.js
|
|
199818
|
+
var require_intersects = __commonJS({
|
|
199819
|
+
"node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
199820
|
+
"use strict";
|
|
199821
|
+
init_import_meta_url();
|
|
199822
|
+
var Range = require_range2();
|
|
199823
|
+
var intersects = (r1, r22, options) => {
|
|
199824
|
+
r1 = new Range(r1, options);
|
|
199825
|
+
r22 = new Range(r22, options);
|
|
199826
|
+
return r1.intersects(r22, options);
|
|
199827
|
+
};
|
|
199828
|
+
module2.exports = intersects;
|
|
199829
|
+
}
|
|
199830
|
+
});
|
|
199831
|
+
|
|
199832
|
+
// node_modules/semver/ranges/simplify.js
|
|
199833
|
+
var require_simplify = __commonJS({
|
|
199834
|
+
"node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
199835
|
+
"use strict";
|
|
199836
|
+
init_import_meta_url();
|
|
199837
|
+
var satisfies = require_satisfies();
|
|
199838
|
+
var compare = require_compare();
|
|
199839
|
+
module2.exports = (versions, range3, options) => {
|
|
199840
|
+
const set2 = [];
|
|
199841
|
+
let first2 = null;
|
|
199842
|
+
let prev = null;
|
|
199843
|
+
const v6 = versions.sort((a3, b3) => compare(a3, b3, options));
|
|
199844
|
+
for (const version2 of v6) {
|
|
199845
|
+
const included = satisfies(version2, range3, options);
|
|
199846
|
+
if (included) {
|
|
199847
|
+
prev = version2;
|
|
199848
|
+
if (!first2) {
|
|
199849
|
+
first2 = version2;
|
|
199850
|
+
}
|
|
199851
|
+
} else {
|
|
199852
|
+
if (prev) {
|
|
199853
|
+
set2.push([first2, prev]);
|
|
199854
|
+
}
|
|
199855
|
+
prev = null;
|
|
199856
|
+
first2 = null;
|
|
199857
|
+
}
|
|
199858
|
+
}
|
|
199859
|
+
if (first2) {
|
|
199860
|
+
set2.push([first2, null]);
|
|
199861
|
+
}
|
|
199862
|
+
const ranges = [];
|
|
199863
|
+
for (const [min, max] of set2) {
|
|
199864
|
+
if (min === max) {
|
|
199865
|
+
ranges.push(min);
|
|
199866
|
+
} else if (!max && min === v6[0]) {
|
|
199867
|
+
ranges.push("*");
|
|
199868
|
+
} else if (!max) {
|
|
199869
|
+
ranges.push(`>=${min}`);
|
|
199870
|
+
} else if (min === v6[0]) {
|
|
199871
|
+
ranges.push(`<=${max}`);
|
|
199872
|
+
} else {
|
|
199873
|
+
ranges.push(`${min} - ${max}`);
|
|
199874
|
+
}
|
|
199875
|
+
}
|
|
199876
|
+
const simplified = ranges.join(" || ");
|
|
199877
|
+
const original = typeof range3.raw === "string" ? range3.raw : String(range3);
|
|
199878
|
+
return simplified.length < original.length ? simplified : range3;
|
|
199879
|
+
};
|
|
199880
|
+
}
|
|
199881
|
+
});
|
|
199882
|
+
|
|
199883
|
+
// node_modules/semver/ranges/subset.js
|
|
199884
|
+
var require_subset = __commonJS({
|
|
199885
|
+
"node_modules/semver/ranges/subset.js"(exports2, module2) {
|
|
199886
|
+
"use strict";
|
|
199887
|
+
init_import_meta_url();
|
|
199888
|
+
var Range = require_range2();
|
|
199889
|
+
var Comparator = require_comparator();
|
|
199890
|
+
var { ANY } = Comparator;
|
|
199891
|
+
var satisfies = require_satisfies();
|
|
199892
|
+
var compare = require_compare();
|
|
199893
|
+
var subset = (sub, dom, options = {}) => {
|
|
199894
|
+
if (sub === dom) {
|
|
199895
|
+
return true;
|
|
199896
|
+
}
|
|
199897
|
+
sub = new Range(sub, options);
|
|
199898
|
+
dom = new Range(dom, options);
|
|
199899
|
+
let sawNonNull = false;
|
|
199900
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
199901
|
+
for (const simpleDom of dom.set) {
|
|
199902
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
199903
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
199904
|
+
if (isSub) {
|
|
199905
|
+
continue OUTER;
|
|
199906
|
+
}
|
|
199907
|
+
}
|
|
199908
|
+
if (sawNonNull) {
|
|
199909
|
+
return false;
|
|
199910
|
+
}
|
|
199911
|
+
}
|
|
199912
|
+
return true;
|
|
199913
|
+
};
|
|
199914
|
+
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
199915
|
+
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
199916
|
+
var simpleSubset = (sub, dom, options) => {
|
|
199917
|
+
if (sub === dom) {
|
|
199918
|
+
return true;
|
|
199919
|
+
}
|
|
199920
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
199921
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
199922
|
+
return true;
|
|
199923
|
+
} else if (options.includePrerelease) {
|
|
199924
|
+
sub = minimumVersionWithPreRelease;
|
|
199925
|
+
} else {
|
|
199926
|
+
sub = minimumVersion;
|
|
199927
|
+
}
|
|
199928
|
+
}
|
|
199929
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
199930
|
+
if (options.includePrerelease) {
|
|
199931
|
+
return true;
|
|
199932
|
+
} else {
|
|
199933
|
+
dom = minimumVersion;
|
|
199934
|
+
}
|
|
199935
|
+
}
|
|
199936
|
+
const eqSet = /* @__PURE__ */ new Set();
|
|
199937
|
+
let gt, lt;
|
|
199938
|
+
for (const c3 of sub) {
|
|
199939
|
+
if (c3.operator === ">" || c3.operator === ">=") {
|
|
199940
|
+
gt = higherGT(gt, c3, options);
|
|
199941
|
+
} else if (c3.operator === "<" || c3.operator === "<=") {
|
|
199942
|
+
lt = lowerLT(lt, c3, options);
|
|
199943
|
+
} else {
|
|
199944
|
+
eqSet.add(c3.semver);
|
|
199945
|
+
}
|
|
199946
|
+
}
|
|
199947
|
+
if (eqSet.size > 1) {
|
|
199948
|
+
return null;
|
|
199949
|
+
}
|
|
199950
|
+
let gtltComp;
|
|
199951
|
+
if (gt && lt) {
|
|
199952
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
199953
|
+
if (gtltComp > 0) {
|
|
199954
|
+
return null;
|
|
199955
|
+
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
199956
|
+
return null;
|
|
199957
|
+
}
|
|
199958
|
+
}
|
|
199959
|
+
for (const eq of eqSet) {
|
|
199960
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
199961
|
+
return null;
|
|
199962
|
+
}
|
|
199963
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
199964
|
+
return null;
|
|
199965
|
+
}
|
|
199966
|
+
for (const c3 of dom) {
|
|
199967
|
+
if (!satisfies(eq, String(c3), options)) {
|
|
199968
|
+
return false;
|
|
199969
|
+
}
|
|
199970
|
+
}
|
|
199971
|
+
return true;
|
|
199972
|
+
}
|
|
199973
|
+
let higher, lower;
|
|
199974
|
+
let hasDomLT, hasDomGT;
|
|
199975
|
+
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
199976
|
+
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
199977
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
199978
|
+
needDomLTPre = false;
|
|
199979
|
+
}
|
|
199980
|
+
for (const c3 of dom) {
|
|
199981
|
+
hasDomGT = hasDomGT || c3.operator === ">" || c3.operator === ">=";
|
|
199982
|
+
hasDomLT = hasDomLT || c3.operator === "<" || c3.operator === "<=";
|
|
199983
|
+
if (gt) {
|
|
199984
|
+
if (needDomGTPre) {
|
|
199985
|
+
if (c3.semver.prerelease && c3.semver.prerelease.length && c3.semver.major === needDomGTPre.major && c3.semver.minor === needDomGTPre.minor && c3.semver.patch === needDomGTPre.patch) {
|
|
199986
|
+
needDomGTPre = false;
|
|
199987
|
+
}
|
|
199988
|
+
}
|
|
199989
|
+
if (c3.operator === ">" || c3.operator === ">=") {
|
|
199990
|
+
higher = higherGT(gt, c3, options);
|
|
199991
|
+
if (higher === c3 && higher !== gt) {
|
|
199992
|
+
return false;
|
|
199993
|
+
}
|
|
199994
|
+
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c3), options)) {
|
|
199995
|
+
return false;
|
|
199996
|
+
}
|
|
199997
|
+
}
|
|
199998
|
+
if (lt) {
|
|
199999
|
+
if (needDomLTPre) {
|
|
200000
|
+
if (c3.semver.prerelease && c3.semver.prerelease.length && c3.semver.major === needDomLTPre.major && c3.semver.minor === needDomLTPre.minor && c3.semver.patch === needDomLTPre.patch) {
|
|
200001
|
+
needDomLTPre = false;
|
|
200002
|
+
}
|
|
200003
|
+
}
|
|
200004
|
+
if (c3.operator === "<" || c3.operator === "<=") {
|
|
200005
|
+
lower = lowerLT(lt, c3, options);
|
|
200006
|
+
if (lower === c3 && lower !== lt) {
|
|
200007
|
+
return false;
|
|
200008
|
+
}
|
|
200009
|
+
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c3), options)) {
|
|
200010
|
+
return false;
|
|
200011
|
+
}
|
|
200012
|
+
}
|
|
200013
|
+
if (!c3.operator && (lt || gt) && gtltComp !== 0) {
|
|
200014
|
+
return false;
|
|
200015
|
+
}
|
|
200016
|
+
}
|
|
200017
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
200018
|
+
return false;
|
|
200019
|
+
}
|
|
200020
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
200021
|
+
return false;
|
|
200022
|
+
}
|
|
200023
|
+
if (needDomGTPre || needDomLTPre) {
|
|
200024
|
+
return false;
|
|
200025
|
+
}
|
|
200026
|
+
return true;
|
|
200027
|
+
};
|
|
200028
|
+
var higherGT = (a3, b3, options) => {
|
|
200029
|
+
if (!a3) {
|
|
200030
|
+
return b3;
|
|
200031
|
+
}
|
|
200032
|
+
const comp = compare(a3.semver, b3.semver, options);
|
|
200033
|
+
return comp > 0 ? a3 : comp < 0 ? b3 : b3.operator === ">" && a3.operator === ">=" ? b3 : a3;
|
|
200034
|
+
};
|
|
200035
|
+
var lowerLT = (a3, b3, options) => {
|
|
200036
|
+
if (!a3) {
|
|
200037
|
+
return b3;
|
|
200038
|
+
}
|
|
200039
|
+
const comp = compare(a3.semver, b3.semver, options);
|
|
200040
|
+
return comp < 0 ? a3 : comp > 0 ? b3 : b3.operator === "<" && a3.operator === "<=" ? b3 : a3;
|
|
200041
|
+
};
|
|
200042
|
+
module2.exports = subset;
|
|
200043
|
+
}
|
|
200044
|
+
});
|
|
200045
|
+
|
|
200046
|
+
// node_modules/semver/index.js
|
|
200047
|
+
var require_semver4 = __commonJS({
|
|
200048
|
+
"node_modules/semver/index.js"(exports2, module2) {
|
|
200049
|
+
"use strict";
|
|
200050
|
+
init_import_meta_url();
|
|
200051
|
+
var internalRe = require_re();
|
|
200052
|
+
var constants3 = require_constants3();
|
|
200053
|
+
var SemVer2 = require_semver3();
|
|
200054
|
+
var identifiers = require_identifiers();
|
|
200055
|
+
var parse4 = require_parse3();
|
|
200056
|
+
var valid = require_valid();
|
|
200057
|
+
var clean = require_clean();
|
|
200058
|
+
var inc2 = require_inc();
|
|
200059
|
+
var diff = require_diff();
|
|
200060
|
+
var major2 = require_major();
|
|
200061
|
+
var minor = require_minor();
|
|
200062
|
+
var patch = require_patch();
|
|
200063
|
+
var prerelease = require_prerelease();
|
|
200064
|
+
var compare = require_compare();
|
|
200065
|
+
var rcompare = require_rcompare();
|
|
200066
|
+
var compareLoose = require_compare_loose();
|
|
200067
|
+
var compareBuild = require_compare_build();
|
|
200068
|
+
var sort = require_sort();
|
|
200069
|
+
var rsort = require_rsort();
|
|
200070
|
+
var gt = require_gt();
|
|
200071
|
+
var lt = require_lt();
|
|
200072
|
+
var eq = require_eq();
|
|
200073
|
+
var neq = require_neq();
|
|
200074
|
+
var gte2 = require_gte();
|
|
200075
|
+
var lte2 = require_lte();
|
|
200076
|
+
var cmp = require_cmp();
|
|
200077
|
+
var coerce = require_coerce();
|
|
200078
|
+
var Comparator = require_comparator();
|
|
200079
|
+
var Range = require_range2();
|
|
200080
|
+
var satisfies = require_satisfies();
|
|
200081
|
+
var toComparators = require_to_comparators();
|
|
200082
|
+
var maxSatisfying = require_max_satisfying();
|
|
200083
|
+
var minSatisfying = require_min_satisfying();
|
|
200084
|
+
var minVersion = require_min_version();
|
|
200085
|
+
var validRange = require_valid2();
|
|
200086
|
+
var outside = require_outside();
|
|
200087
|
+
var gtr = require_gtr();
|
|
200088
|
+
var ltr = require_ltr();
|
|
200089
|
+
var intersects = require_intersects();
|
|
200090
|
+
var simplifyRange = require_simplify();
|
|
200091
|
+
var subset = require_subset();
|
|
200092
|
+
module2.exports = {
|
|
200093
|
+
parse: parse4,
|
|
200094
|
+
valid,
|
|
200095
|
+
clean,
|
|
200096
|
+
inc: inc2,
|
|
200097
|
+
diff,
|
|
200098
|
+
major: major2,
|
|
200099
|
+
minor,
|
|
200100
|
+
patch,
|
|
200101
|
+
prerelease,
|
|
200102
|
+
compare,
|
|
200103
|
+
rcompare,
|
|
200104
|
+
compareLoose,
|
|
200105
|
+
compareBuild,
|
|
200106
|
+
sort,
|
|
200107
|
+
rsort,
|
|
200108
|
+
gt,
|
|
200109
|
+
lt,
|
|
200110
|
+
eq,
|
|
200111
|
+
neq,
|
|
200112
|
+
gte: gte2,
|
|
200113
|
+
lte: lte2,
|
|
200114
|
+
cmp,
|
|
200115
|
+
coerce,
|
|
200116
|
+
Comparator,
|
|
200117
|
+
Range,
|
|
200118
|
+
satisfies,
|
|
200119
|
+
toComparators,
|
|
200120
|
+
maxSatisfying,
|
|
200121
|
+
minSatisfying,
|
|
200122
|
+
minVersion,
|
|
200123
|
+
validRange,
|
|
200124
|
+
outside,
|
|
200125
|
+
gtr,
|
|
200126
|
+
ltr,
|
|
200127
|
+
intersects,
|
|
200128
|
+
simplifyRange,
|
|
200129
|
+
subset,
|
|
200130
|
+
SemVer: SemVer2,
|
|
200131
|
+
re: internalRe.re,
|
|
200132
|
+
src: internalRe.src,
|
|
200133
|
+
tokens: internalRe.t,
|
|
200134
|
+
SEMVER_SPEC_VERSION: constants3.SEMVER_SPEC_VERSION,
|
|
200135
|
+
RELEASE_TYPES: constants3.RELEASE_TYPES,
|
|
200136
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
200137
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
200138
|
+
};
|
|
200139
|
+
}
|
|
200140
|
+
});
|
|
200141
|
+
|
|
197782
200142
|
// node_modules/string-length/node_modules/strip-ansi/index.js
|
|
197783
200143
|
var require_strip_ansi2 = __commonJS({
|
|
197784
200144
|
"node_modules/string-length/node_modules/strip-ansi/index.js"(exports2, module2) {
|
|
@@ -203343,6 +205703,48 @@ init_async();
|
|
|
203343
205703
|
init_changelog();
|
|
203344
205704
|
init_errors2();
|
|
203345
205705
|
init_git();
|
|
205706
|
+
|
|
205707
|
+
// src/utils/autoVersion.ts
|
|
205708
|
+
init_import_meta_url();
|
|
205709
|
+
var semver = __toESM(require_semver4());
|
|
205710
|
+
init_logger2();
|
|
205711
|
+
init_changelog();
|
|
205712
|
+
function calculateNextVersion(currentVersion, bumpType) {
|
|
205713
|
+
const versionToBump = currentVersion || "0.0.0";
|
|
205714
|
+
const newVersion = semver.inc(versionToBump, bumpType);
|
|
205715
|
+
if (!newVersion) {
|
|
205716
|
+
throw new Error(
|
|
205717
|
+
`Failed to increment version "${versionToBump}" with bump type "${bumpType}"`
|
|
205718
|
+
);
|
|
205719
|
+
}
|
|
205720
|
+
return newVersion;
|
|
205721
|
+
}
|
|
205722
|
+
async function getChangelogWithBumpType(git, rev) {
|
|
205723
|
+
logger.info(
|
|
205724
|
+
`Analyzing commits since ${rev || "(beginning of history)"} for auto-versioning...`
|
|
205725
|
+
);
|
|
205726
|
+
const result = await generateChangesetFromGit(git, rev);
|
|
205727
|
+
if (result.bumpType) {
|
|
205728
|
+
logger.info(
|
|
205729
|
+
`Auto-version: determined ${result.bumpType} bump (${result.matchedCommitsWithSemver}/${result.totalCommits} commits matched)`
|
|
205730
|
+
);
|
|
205731
|
+
}
|
|
205732
|
+
return result;
|
|
205733
|
+
}
|
|
205734
|
+
function validateBumpType(result) {
|
|
205735
|
+
if (result.totalCommits === 0) {
|
|
205736
|
+
throw new Error(
|
|
205737
|
+
"Cannot determine version automatically: no commits found since the last release."
|
|
205738
|
+
);
|
|
205739
|
+
}
|
|
205740
|
+
if (result.bumpType === null) {
|
|
205741
|
+
throw new Error(
|
|
205742
|
+
`Cannot determine version automatically: ${result.totalCommits} commit(s) found, but none matched a category with a "semver" field in the release configuration. Please ensure your .github/release.yml categories have "semver" fields defined, or specify the version explicitly.`
|
|
205743
|
+
);
|
|
205744
|
+
}
|
|
205745
|
+
}
|
|
205746
|
+
|
|
205747
|
+
// src/commands/prepare.ts
|
|
203346
205748
|
init_helpers();
|
|
203347
205749
|
init_strings();
|
|
203348
205750
|
init_system();
|
|
@@ -203746,8 +206148,9 @@ var command3 = ["prepare NEW-VERSION"];
|
|
|
203746
206148
|
var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
|
|
203747
206149
|
var description2 = "\u{1F6A2} Prepare a new release branch";
|
|
203748
206150
|
var DEFAULT_BUMP_VERSION_PATH = (0, import_path17.join)("scripts", "bump-version.sh");
|
|
206151
|
+
var AUTO_VERSION_MIN_VERSION = "2.14.0";
|
|
203749
206152
|
var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
|
|
203750
|
-
description:
|
|
206153
|
+
description: 'The new version to release. Can be: a semver string (e.g., "1.2.3"), a bump type ("major", "minor", or "patch"), or "auto" to determine automatically from conventional commits. Bump types and "auto" require minVersion >= 2.14.0 in .craft.yml',
|
|
203751
206154
|
type: "string"
|
|
203752
206155
|
}).option("rev", {
|
|
203753
206156
|
alias: "r",
|
|
@@ -203777,9 +206180,13 @@ var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
|
|
|
203777
206180
|
var SLEEP_BEFORE_PUBLISH_SECONDS = 30;
|
|
203778
206181
|
function checkVersionOrPart(argv, _opt) {
|
|
203779
206182
|
const version2 = argv.newVersion;
|
|
203780
|
-
if (
|
|
203781
|
-
|
|
203782
|
-
}
|
|
206183
|
+
if (version2 === "auto") {
|
|
206184
|
+
return true;
|
|
206185
|
+
}
|
|
206186
|
+
if (isBumpType(version2)) {
|
|
206187
|
+
return true;
|
|
206188
|
+
}
|
|
206189
|
+
if (isValidVersion(version2)) {
|
|
203783
206190
|
return true;
|
|
203784
206191
|
} else {
|
|
203785
206192
|
let errMsg = `Invalid version or version part specified: "${version2}"`;
|
|
@@ -203947,7 +206354,8 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
203947
206354
|
}
|
|
203948
206355
|
if (!changeset.body) {
|
|
203949
206356
|
replaceSection = changeset.name;
|
|
203950
|
-
|
|
206357
|
+
const result = await generateChangesetFromGit(git, oldVersion);
|
|
206358
|
+
changeset.body = result.changelog;
|
|
203951
206359
|
}
|
|
203952
206360
|
if (changeset.name === DEFAULT_UNRELEASED_TITLE) {
|
|
203953
206361
|
replaceSection = changeset.name;
|
|
@@ -203993,7 +206401,7 @@ async function switchToDefaultBranch(git, defaultBranch) {
|
|
|
203993
206401
|
async function prepareMain(argv) {
|
|
203994
206402
|
const config3 = getConfiguration();
|
|
203995
206403
|
const githubConfig = await getGlobalGitHubConfig();
|
|
203996
|
-
|
|
206404
|
+
let newVersion = argv.newVersion;
|
|
203997
206405
|
const git = await getGitClient();
|
|
203998
206406
|
const defaultBranch = await getDefaultBranch(git, argv.remote);
|
|
203999
206407
|
logger.debug(`Default branch for the repo:`, defaultBranch);
|
|
@@ -204004,6 +206412,27 @@ async function prepareMain(argv) {
|
|
|
204004
206412
|
} else {
|
|
204005
206413
|
checkGitStatus(repoStatus, rev);
|
|
204006
206414
|
}
|
|
206415
|
+
const isVersionBumpType = isBumpType(newVersion);
|
|
206416
|
+
if (newVersion === "auto" || isVersionBumpType) {
|
|
206417
|
+
if (!requiresMinVersion(AUTO_VERSION_MIN_VERSION)) {
|
|
206418
|
+
const featureName = isVersionBumpType ? "Version bump types" : "Auto-versioning";
|
|
206419
|
+
throw new ConfigurationError(
|
|
206420
|
+
`${featureName} requires minVersion >= ${AUTO_VERSION_MIN_VERSION} in .craft.yml. Please update your configuration or specify the version explicitly.`
|
|
206421
|
+
);
|
|
206422
|
+
}
|
|
206423
|
+
const latestTag = await getLatestTag(git);
|
|
206424
|
+
let bumpType;
|
|
206425
|
+
if (newVersion === "auto") {
|
|
206426
|
+
const changelogResult = await getChangelogWithBumpType(git, latestTag);
|
|
206427
|
+
validateBumpType(changelogResult);
|
|
206428
|
+
bumpType = changelogResult.bumpType;
|
|
206429
|
+
} else {
|
|
206430
|
+
bumpType = newVersion;
|
|
206431
|
+
}
|
|
206432
|
+
const currentVersion = latestTag && latestTag.replace(/^v/, "").match(/^\d/) ? latestTag.replace(/^v/, "") : "0.0.0";
|
|
206433
|
+
newVersion = calculateNextVersion(currentVersion, bumpType);
|
|
206434
|
+
logger.info(`Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump)`);
|
|
206435
|
+
}
|
|
204007
206436
|
logger.info(`Releasing version ${newVersion} from ${rev}`);
|
|
204008
206437
|
if (!argv.rev && rev !== defaultBranch) {
|
|
204009
206438
|
logger.warn("You're not on your default branch, so I have to ask...");
|