@angular/core 19.0.0-next.6 → 19.0.0-next.7
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/fesm2022/core.mjs +378 -130
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +25 -4
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +12 -11
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +166 -97
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +3 -1
- package/schematics/bundles/{checker-dcf9a14e.js → checker-637eee78.js} +22 -11
- package/schematics/bundles/{compiler_host-6026cdf8.js → compiler_host-1e62b899.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +3 -3
- package/schematics/bundles/imports-44987700.js +1 -1
- package/schematics/bundles/inject-migration.js +8 -28
- package/schematics/bundles/leading_space-6e7a8ec6.js +30 -0
- package/schematics/bundles/nodes-b12e919a.js +1 -1
- package/schematics/bundles/pending-tasks.js +103 -0
- package/schematics/bundles/{program-4dc8c0fa.js → program-893e3fe7.js} +1810 -1476
- package/schematics/bundles/project_tsconfig_paths-6c9cde78.js +1 -1
- package/schematics/bundles/route-lazy-loading.js +3 -3
- package/schematics/bundles/signal-input-migration.js +516 -283
- package/schematics/bundles/standalone-migration.js +9 -9
- package/schematics/migrations.json +5 -0
- package/schematics/ng-generate/signal-input-migration/schema.json +5 -0
- package/testing/index.d.ts +3 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v19.0.0-next.
|
|
3
|
+
* @license Angular v19.0.0-next.7
|
|
4
4
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
-
var checker = require('./checker-
|
|
9
|
+
var checker = require('./checker-637eee78.js');
|
|
10
10
|
var ts = require('typescript');
|
|
11
11
|
var p = require('path');
|
|
12
12
|
require('os');
|
|
@@ -864,7 +864,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
864
864
|
function compileDeclareClassMetadata(metadata) {
|
|
865
865
|
const definitionMap = new checker.DefinitionMap();
|
|
866
866
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
867
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
867
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
868
868
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
869
869
|
definitionMap.set('type', metadata.type);
|
|
870
870
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -882,7 +882,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
882
882
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? checker.literal(null));
|
|
883
883
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? checker.literal(null));
|
|
884
884
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
885
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
885
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
886
886
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
887
887
|
definitionMap.set('type', metadata.type);
|
|
888
888
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -977,7 +977,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
977
977
|
const definitionMap = new checker.DefinitionMap();
|
|
978
978
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
979
979
|
definitionMap.set('minVersion', checker.literal(minVersion));
|
|
980
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
980
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
981
981
|
// e.g. `type: MyDirective`
|
|
982
982
|
definitionMap.set('type', meta.type.value);
|
|
983
983
|
if (meta.isStandalone) {
|
|
@@ -1396,7 +1396,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
1396
1396
|
function compileDeclareFactoryFunction(meta) {
|
|
1397
1397
|
const definitionMap = new checker.DefinitionMap();
|
|
1398
1398
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
1399
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
1399
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
1400
1400
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1401
1401
|
definitionMap.set('type', meta.type.value);
|
|
1402
1402
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -1431,7 +1431,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
1431
1431
|
function createInjectableDefinitionMap(meta) {
|
|
1432
1432
|
const definitionMap = new checker.DefinitionMap();
|
|
1433
1433
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
1434
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
1434
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
1435
1435
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1436
1436
|
definitionMap.set('type', meta.type.value);
|
|
1437
1437
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -1482,7 +1482,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
1482
1482
|
function createInjectorDefinitionMap(meta) {
|
|
1483
1483
|
const definitionMap = new checker.DefinitionMap();
|
|
1484
1484
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
1485
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
1485
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
1486
1486
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1487
1487
|
definitionMap.set('type', meta.type.value);
|
|
1488
1488
|
definitionMap.set('providers', meta.providers);
|
|
@@ -1515,7 +1515,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
1515
1515
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
1516
1516
|
}
|
|
1517
1517
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
1518
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
1518
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
1519
1519
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1520
1520
|
definitionMap.set('type', meta.type.value);
|
|
1521
1521
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -1566,7 +1566,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
1566
1566
|
function createPipeDefinitionMap(meta) {
|
|
1567
1567
|
const definitionMap = new checker.DefinitionMap();
|
|
1568
1568
|
definitionMap.set('minVersion', checker.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
1569
|
-
definitionMap.set('version', checker.literal('19.0.0-next.
|
|
1569
|
+
definitionMap.set('version', checker.literal('19.0.0-next.7'));
|
|
1570
1570
|
definitionMap.set('ngImport', checker.importExpr(checker.Identifiers.core));
|
|
1571
1571
|
// e.g. `type: MyPipe`
|
|
1572
1572
|
definitionMap.set('type', meta.type.value);
|
|
@@ -1981,7 +1981,7 @@ class DeferredSymbolTracker {
|
|
|
1981
1981
|
* Copyright Google LLC All Rights Reserved.
|
|
1982
1982
|
*
|
|
1983
1983
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1984
|
-
* found in the LICENSE file at https://angular.
|
|
1984
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
1985
1985
|
*/
|
|
1986
1986
|
/**
|
|
1987
1987
|
* Tracks which symbols are imported in specific files and under what names. Allows for efficient
|
|
@@ -3074,7 +3074,7 @@ class ExportedProviderStatusResolver {
|
|
|
3074
3074
|
* Copyright Google LLC All Rights Reserved.
|
|
3075
3075
|
*
|
|
3076
3076
|
* Use of this source code is governed by an MIT-style license that can be
|
|
3077
|
-
* found in the LICENSE file at https://angular.
|
|
3077
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
3078
3078
|
*/
|
|
3079
3079
|
const EMPTY_ARRAY$1 = [];
|
|
3080
3080
|
/** Resolves the host directives of a directive to a flat array of matches. */
|
|
@@ -5275,7 +5275,7 @@ function extractSchemas(rawExpr, evaluator, context) {
|
|
|
5275
5275
|
* Copyright Google LLC All Rights Reserved.
|
|
5276
5276
|
*
|
|
5277
5277
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5278
|
-
* found in the LICENSE file at https://angular.
|
|
5278
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
5279
5279
|
*/
|
|
5280
5280
|
/** Generates additional fields to be added to a class that has inputs with transform functions. */
|
|
5281
5281
|
function compileInputTransformFields(inputs) {
|
|
@@ -12803,7 +12803,7 @@ function extractJsDocDescription(node) {
|
|
|
12803
12803
|
return ts__default["default"].isJSDoc(d) || ts__default["default"].isJSDocParameterTag(d);
|
|
12804
12804
|
});
|
|
12805
12805
|
const comment = commentOrTag?.comment ?? '';
|
|
12806
|
-
const description = typeof comment === 'string' ? comment : ts__default["default"].getTextOfJSDocComment(comment) ?? '';
|
|
12806
|
+
const description = typeof comment === 'string' ? comment : (ts__default["default"].getTextOfJSDocComment(comment) ?? '');
|
|
12807
12807
|
return unescapeAngularDecorators(description);
|
|
12808
12808
|
}
|
|
12809
12809
|
/**
|
|
@@ -15432,7 +15432,7 @@ class StandaloneComponentScopeReader {
|
|
|
15432
15432
|
* Copyright Google LLC All Rights Reserved.
|
|
15433
15433
|
*
|
|
15434
15434
|
* Use of this source code is governed by an MIT-style license that can be
|
|
15435
|
-
* found in the LICENSE file at https://angular.
|
|
15435
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
15436
15436
|
*/
|
|
15437
15437
|
/** Names of known signal functions. */
|
|
15438
15438
|
const SIGNAL_FNS = new Set([
|
|
@@ -16337,7 +16337,7 @@ function unwrapAstWithSource(ast) {
|
|
|
16337
16337
|
* Copyright Google LLC All Rights Reserved.
|
|
16338
16338
|
*
|
|
16339
16339
|
* Use of this source code is governed by an MIT-style license that can be
|
|
16340
|
-
* found in the LICENSE file at https://angular.
|
|
16340
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
16341
16341
|
*/
|
|
16342
16342
|
/** APIs whose usages should be checked by the rule. */
|
|
16343
16343
|
const APIS_TO_CHECK = [
|
|
@@ -16407,7 +16407,7 @@ class InitializerApiUsageRule {
|
|
|
16407
16407
|
* Copyright Google LLC All Rights Reserved.
|
|
16408
16408
|
*
|
|
16409
16409
|
* Use of this source code is governed by an MIT-style license that can be
|
|
16410
|
-
* found in the LICENSE file at https://angular.
|
|
16410
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
16411
16411
|
*/
|
|
16412
16412
|
/**
|
|
16413
16413
|
* Rule that flags unused symbols inside of the `imports` array of a component.
|
|
@@ -16485,7 +16485,7 @@ class UnusedStandaloneImportsRule {
|
|
|
16485
16485
|
* Copyright Google LLC All Rights Reserved.
|
|
16486
16486
|
*
|
|
16487
16487
|
* Use of this source code is governed by an MIT-style license that can be
|
|
16488
|
-
* found in the LICENSE file at https://angular.
|
|
16488
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
16489
16489
|
*/
|
|
16490
16490
|
/**
|
|
16491
16491
|
* Validates that TypeScript files match a specific set of rules set by the Angular compiler.
|
|
@@ -16562,924 +16562,1153 @@ function getDefaultExportFromCjs (x) {
|
|
|
16562
16562
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
16563
16563
|
}
|
|
16564
16564
|
|
|
16565
|
-
var re
|
|
16565
|
+
var re = {exports: {}};
|
|
16566
16566
|
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
const SEMVER_SPEC_VERSION = '2.0.0';
|
|
16567
|
+
var constants;
|
|
16568
|
+
var hasRequiredConstants;
|
|
16570
16569
|
|
|
16571
|
-
|
|
16572
|
-
|
|
16573
|
-
|
|
16570
|
+
function requireConstants () {
|
|
16571
|
+
if (hasRequiredConstants) return constants;
|
|
16572
|
+
hasRequiredConstants = 1;
|
|
16573
|
+
// Note: this is the semver.org version of the spec that it implements
|
|
16574
|
+
// Not necessarily the package version of this code.
|
|
16575
|
+
const SEMVER_SPEC_VERSION = '2.0.0';
|
|
16574
16576
|
|
|
16575
|
-
|
|
16576
|
-
const
|
|
16577
|
+
const MAX_LENGTH = 256;
|
|
16578
|
+
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
|
16579
|
+
/* istanbul ignore next */ 9007199254740991;
|
|
16577
16580
|
|
|
16578
|
-
// Max safe length for
|
|
16579
|
-
|
|
16580
|
-
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;
|
|
16581
|
+
// Max safe segment length for coercion.
|
|
16582
|
+
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
16581
16583
|
|
|
16582
|
-
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
'minor',
|
|
16586
|
-
'preminor',
|
|
16587
|
-
'patch',
|
|
16588
|
-
'prepatch',
|
|
16589
|
-
'prerelease',
|
|
16590
|
-
];
|
|
16584
|
+
// Max safe length for a build identifier. The max length minus 6 characters for
|
|
16585
|
+
// the shortest version with a build 0.0.0+BUILD.
|
|
16586
|
+
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
16591
16587
|
|
|
16592
|
-
|
|
16593
|
-
|
|
16594
|
-
|
|
16595
|
-
|
|
16596
|
-
|
|
16597
|
-
|
|
16598
|
-
|
|
16599
|
-
|
|
16600
|
-
|
|
16601
|
-
};
|
|
16588
|
+
const RELEASE_TYPES = [
|
|
16589
|
+
'major',
|
|
16590
|
+
'premajor',
|
|
16591
|
+
'minor',
|
|
16592
|
+
'preminor',
|
|
16593
|
+
'patch',
|
|
16594
|
+
'prepatch',
|
|
16595
|
+
'prerelease',
|
|
16596
|
+
];
|
|
16602
16597
|
|
|
16603
|
-
|
|
16604
|
-
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
|
|
16609
|
-
|
|
16598
|
+
constants = {
|
|
16599
|
+
MAX_LENGTH,
|
|
16600
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
16601
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
16602
|
+
MAX_SAFE_INTEGER,
|
|
16603
|
+
RELEASE_TYPES,
|
|
16604
|
+
SEMVER_SPEC_VERSION,
|
|
16605
|
+
FLAG_INCLUDE_PRERELEASE: 0b001,
|
|
16606
|
+
FLAG_LOOSE: 0b010,
|
|
16607
|
+
};
|
|
16608
|
+
return constants;
|
|
16609
|
+
}
|
|
16610
|
+
|
|
16611
|
+
var debug_1;
|
|
16612
|
+
var hasRequiredDebug;
|
|
16613
|
+
|
|
16614
|
+
function requireDebug () {
|
|
16615
|
+
if (hasRequiredDebug) return debug_1;
|
|
16616
|
+
hasRequiredDebug = 1;
|
|
16617
|
+
const debug = (
|
|
16618
|
+
typeof process === 'object' &&
|
|
16619
|
+
process.env &&
|
|
16620
|
+
process.env.NODE_DEBUG &&
|
|
16621
|
+
/\bsemver\b/i.test(process.env.NODE_DEBUG)
|
|
16622
|
+
) ? (...args) => console.error('SEMVER', ...args)
|
|
16623
|
+
: () => {};
|
|
16624
|
+
|
|
16625
|
+
debug_1 = debug;
|
|
16626
|
+
return debug_1;
|
|
16627
|
+
}
|
|
16628
|
+
|
|
16629
|
+
re.exports;
|
|
16630
|
+
|
|
16631
|
+
var hasRequiredRe;
|
|
16632
|
+
|
|
16633
|
+
function requireRe () {
|
|
16634
|
+
if (hasRequiredRe) return re.exports;
|
|
16635
|
+
hasRequiredRe = 1;
|
|
16636
|
+
(function (module, exports) {
|
|
16637
|
+
const {
|
|
16638
|
+
MAX_SAFE_COMPONENT_LENGTH,
|
|
16639
|
+
MAX_SAFE_BUILD_LENGTH,
|
|
16640
|
+
MAX_LENGTH,
|
|
16641
|
+
} = requireConstants();
|
|
16642
|
+
const debug = requireDebug();
|
|
16643
|
+
exports = module.exports = {};
|
|
16644
|
+
|
|
16645
|
+
// The actual regexps go on exports.re
|
|
16646
|
+
const re = exports.re = [];
|
|
16647
|
+
const safeRe = exports.safeRe = [];
|
|
16648
|
+
const src = exports.src = [];
|
|
16649
|
+
const t = exports.t = {};
|
|
16650
|
+
let R = 0;
|
|
16651
|
+
|
|
16652
|
+
const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
|
|
16653
|
+
|
|
16654
|
+
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
|
|
16655
|
+
// used internally via the safeRe object since all inputs in this library get
|
|
16656
|
+
// normalized first to trim and collapse all extra whitespace. The original
|
|
16657
|
+
// regexes are exported for userland consumption and lower level usage. A
|
|
16658
|
+
// future breaking change could export the safer regex only with a note that
|
|
16659
|
+
// all input should have extra whitespace removed.
|
|
16660
|
+
const safeRegexReplacements = [
|
|
16661
|
+
['\\s', 1],
|
|
16662
|
+
['\\d', MAX_LENGTH],
|
|
16663
|
+
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
|
|
16664
|
+
];
|
|
16665
|
+
|
|
16666
|
+
const makeSafeRegex = (value) => {
|
|
16667
|
+
for (const [token, max] of safeRegexReplacements) {
|
|
16668
|
+
value = value
|
|
16669
|
+
.split(`${token}*`).join(`${token}{0,${max}}`)
|
|
16670
|
+
.split(`${token}+`).join(`${token}{1,${max}}`);
|
|
16671
|
+
}
|
|
16672
|
+
return value
|
|
16673
|
+
};
|
|
16674
|
+
|
|
16675
|
+
const createToken = (name, value, isGlobal) => {
|
|
16676
|
+
const safe = makeSafeRegex(value);
|
|
16677
|
+
const index = R++;
|
|
16678
|
+
debug(name, index, value);
|
|
16679
|
+
t[name] = index;
|
|
16680
|
+
src[index] = value;
|
|
16681
|
+
re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
|
|
16682
|
+
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
|
|
16683
|
+
};
|
|
16684
|
+
|
|
16685
|
+
// The following Regular Expressions can be used for tokenizing,
|
|
16686
|
+
// validating, and parsing SemVer version strings.
|
|
16687
|
+
|
|
16688
|
+
// ## Numeric Identifier
|
|
16689
|
+
// A single `0`, or a non-zero digit followed by zero or more digits.
|
|
16690
|
+
|
|
16691
|
+
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
|
|
16692
|
+
createToken('NUMERICIDENTIFIERLOOSE', '\\d+');
|
|
16693
|
+
|
|
16694
|
+
// ## Non-numeric Identifier
|
|
16695
|
+
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
|
16696
|
+
// more letters, digits, or hyphens.
|
|
16697
|
+
|
|
16698
|
+
createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
16699
|
+
|
|
16700
|
+
// ## Main Version
|
|
16701
|
+
// Three dot-separated numeric identifiers.
|
|
16702
|
+
|
|
16703
|
+
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
|
|
16704
|
+
`(${src[t.NUMERICIDENTIFIER]})\\.` +
|
|
16705
|
+
`(${src[t.NUMERICIDENTIFIER]})`);
|
|
16706
|
+
|
|
16707
|
+
createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
|
16708
|
+
`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
|
16709
|
+
`(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
16710
|
+
|
|
16711
|
+
// ## Pre-release Version Identifier
|
|
16712
|
+
// A numeric identifier, or a non-numeric identifier.
|
|
16713
|
+
|
|
16714
|
+
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
|
|
16715
|
+
}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
16716
|
+
|
|
16717
|
+
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
|
|
16718
|
+
}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
16719
|
+
|
|
16720
|
+
// ## Pre-release Version
|
|
16721
|
+
// Hyphen, followed by one or more dot-separated pre-release version
|
|
16722
|
+
// identifiers.
|
|
16723
|
+
|
|
16724
|
+
createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
|
|
16725
|
+
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
16726
|
+
|
|
16727
|
+
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
|
|
16728
|
+
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
16729
|
+
|
|
16730
|
+
// ## Build Metadata Identifier
|
|
16731
|
+
// Any combination of digits, letters, or hyphens.
|
|
16732
|
+
|
|
16733
|
+
createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`);
|
|
16734
|
+
|
|
16735
|
+
// ## Build Metadata
|
|
16736
|
+
// Plus sign, followed by one or more period-separated build metadata
|
|
16737
|
+
// identifiers.
|
|
16738
|
+
|
|
16739
|
+
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
|
|
16740
|
+
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
16741
|
+
|
|
16742
|
+
// ## Full Version String
|
|
16743
|
+
// A main version, followed optionally by a pre-release version and
|
|
16744
|
+
// build metadata.
|
|
16745
|
+
|
|
16746
|
+
// Note that the only major, minor, patch, and pre-release sections of
|
|
16747
|
+
// the version string are capturing groups. The build metadata is not a
|
|
16748
|
+
// capturing group, because it should not ever be used in version
|
|
16749
|
+
// comparison.
|
|
16750
|
+
|
|
16751
|
+
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
|
|
16752
|
+
}${src[t.PRERELEASE]}?${
|
|
16753
|
+
src[t.BUILD]}?`);
|
|
16754
|
+
|
|
16755
|
+
createToken('FULL', `^${src[t.FULLPLAIN]}$`);
|
|
16756
|
+
|
|
16757
|
+
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
|
16758
|
+
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
|
16759
|
+
// common in the npm registry.
|
|
16760
|
+
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
|
|
16761
|
+
}${src[t.PRERELEASELOOSE]}?${
|
|
16762
|
+
src[t.BUILD]}?`);
|
|
16763
|
+
|
|
16764
|
+
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);
|
|
16765
|
+
|
|
16766
|
+
createToken('GTLT', '((?:<|>)?=?)');
|
|
16767
|
+
|
|
16768
|
+
// Something like "2.*" or "1.2.x".
|
|
16769
|
+
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
|
16770
|
+
// Only the first item is strictly required.
|
|
16771
|
+
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
16772
|
+
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
16773
|
+
|
|
16774
|
+
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
|
|
16775
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
|
16776
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
|
16777
|
+
`(?:${src[t.PRERELEASE]})?${
|
|
16778
|
+
src[t.BUILD]}?` +
|
|
16779
|
+
`)?)?`);
|
|
16780
|
+
|
|
16781
|
+
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
16782
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
16783
|
+
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
16784
|
+
`(?:${src[t.PRERELEASELOOSE]})?${
|
|
16785
|
+
src[t.BUILD]}?` +
|
|
16786
|
+
`)?)?`);
|
|
16787
|
+
|
|
16788
|
+
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
16789
|
+
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
16790
|
+
|
|
16791
|
+
// Coercion.
|
|
16792
|
+
// Extract anything that could conceivably be a part of a valid semver
|
|
16793
|
+
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
|
|
16794
|
+
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
|
16795
|
+
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
|
16796
|
+
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
16797
|
+
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
16798
|
+
createToken('COERCEFULL', src[t.COERCEPLAIN] +
|
|
16799
|
+
`(?:${src[t.PRERELEASE]})?` +
|
|
16800
|
+
`(?:${src[t.BUILD]})?` +
|
|
16801
|
+
`(?:$|[^\\d])`);
|
|
16802
|
+
createToken('COERCERTL', src[t.COERCE], true);
|
|
16803
|
+
createToken('COERCERTLFULL', src[t.COERCEFULL], true);
|
|
16804
|
+
|
|
16805
|
+
// Tilde ranges.
|
|
16806
|
+
// Meaning is "reasonably at or greater than"
|
|
16807
|
+
createToken('LONETILDE', '(?:~>?)');
|
|
16808
|
+
|
|
16809
|
+
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
16810
|
+
exports.tildeTrimReplace = '$1~';
|
|
16811
|
+
|
|
16812
|
+
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
16813
|
+
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
16814
|
+
|
|
16815
|
+
// Caret ranges.
|
|
16816
|
+
// Meaning is "at least and backwards compatible with"
|
|
16817
|
+
createToken('LONECARET', '(?:\\^)');
|
|
16818
|
+
|
|
16819
|
+
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
16820
|
+
exports.caretTrimReplace = '$1^';
|
|
16821
|
+
|
|
16822
|
+
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
16823
|
+
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
16824
|
+
|
|
16825
|
+
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
|
16826
|
+
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
16827
|
+
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
16828
|
+
|
|
16829
|
+
// An expression to strip any whitespace between the gtlt and the thing
|
|
16830
|
+
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
|
16831
|
+
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
|
|
16832
|
+
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
16833
|
+
exports.comparatorTrimReplace = '$1$2$3';
|
|
16834
|
+
|
|
16835
|
+
// Something like `1.2.3 - 1.2.4`
|
|
16836
|
+
// Note that these all use the loose form, because they'll be
|
|
16837
|
+
// checked against either the strict or loose comparator form
|
|
16838
|
+
// later.
|
|
16839
|
+
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
|
|
16840
|
+
`\\s+-\\s+` +
|
|
16841
|
+
`(${src[t.XRANGEPLAIN]})` +
|
|
16842
|
+
`\\s*$`);
|
|
16843
|
+
|
|
16844
|
+
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
|
|
16845
|
+
`\\s+-\\s+` +
|
|
16846
|
+
`(${src[t.XRANGEPLAINLOOSE]})` +
|
|
16847
|
+
`\\s*$`);
|
|
16848
|
+
|
|
16849
|
+
// Star ranges basically just allow anything at all.
|
|
16850
|
+
createToken('STAR', '(<|>)?=?\\s*\\*');
|
|
16851
|
+
// >=0.0.0 is like a star
|
|
16852
|
+
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
|
|
16853
|
+
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
|
|
16854
|
+
} (re, re.exports));
|
|
16855
|
+
return re.exports;
|
|
16856
|
+
}
|
|
16857
|
+
|
|
16858
|
+
var parseOptions_1;
|
|
16859
|
+
var hasRequiredParseOptions;
|
|
16860
|
+
|
|
16861
|
+
function requireParseOptions () {
|
|
16862
|
+
if (hasRequiredParseOptions) return parseOptions_1;
|
|
16863
|
+
hasRequiredParseOptions = 1;
|
|
16864
|
+
// parse out just the options we care about
|
|
16865
|
+
const looseOption = Object.freeze({ loose: true });
|
|
16866
|
+
const emptyOpts = Object.freeze({ });
|
|
16867
|
+
const parseOptions = options => {
|
|
16868
|
+
if (!options) {
|
|
16869
|
+
return emptyOpts
|
|
16870
|
+
}
|
|
16610
16871
|
|
|
16611
|
-
|
|
16872
|
+
if (typeof options !== 'object') {
|
|
16873
|
+
return looseOption
|
|
16874
|
+
}
|
|
16612
16875
|
|
|
16613
|
-
|
|
16876
|
+
return options
|
|
16877
|
+
};
|
|
16878
|
+
parseOptions_1 = parseOptions;
|
|
16879
|
+
return parseOptions_1;
|
|
16880
|
+
}
|
|
16614
16881
|
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
const
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
|
-
const re = exports.re = [];
|
|
16626
|
-
const safeRe = exports.safeRe = [];
|
|
16627
|
-
const src = exports.src = [];
|
|
16628
|
-
const t = exports.t = {};
|
|
16629
|
-
let R = 0;
|
|
16630
|
-
|
|
16631
|
-
const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
|
|
16632
|
-
|
|
16633
|
-
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
|
|
16634
|
-
// used internally via the safeRe object since all inputs in this library get
|
|
16635
|
-
// normalized first to trim and collapse all extra whitespace. The original
|
|
16636
|
-
// regexes are exported for userland consumption and lower level usage. A
|
|
16637
|
-
// future breaking change could export the safer regex only with a note that
|
|
16638
|
-
// all input should have extra whitespace removed.
|
|
16639
|
-
const safeRegexReplacements = [
|
|
16640
|
-
['\\s', 1],
|
|
16641
|
-
['\\d', MAX_LENGTH],
|
|
16642
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
|
|
16643
|
-
];
|
|
16882
|
+
var identifiers;
|
|
16883
|
+
var hasRequiredIdentifiers;
|
|
16884
|
+
|
|
16885
|
+
function requireIdentifiers () {
|
|
16886
|
+
if (hasRequiredIdentifiers) return identifiers;
|
|
16887
|
+
hasRequiredIdentifiers = 1;
|
|
16888
|
+
const numeric = /^[0-9]+$/;
|
|
16889
|
+
const compareIdentifiers = (a, b) => {
|
|
16890
|
+
const anum = numeric.test(a);
|
|
16891
|
+
const bnum = numeric.test(b);
|
|
16644
16892
|
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
.split(`${token}*`).join(`${token}{0,${max}}`)
|
|
16649
|
-
.split(`${token}+`).join(`${token}{1,${max}}`);
|
|
16893
|
+
if (anum && bnum) {
|
|
16894
|
+
a = +a;
|
|
16895
|
+
b = +b;
|
|
16650
16896
|
}
|
|
16651
|
-
|
|
16897
|
+
|
|
16898
|
+
return a === b ? 0
|
|
16899
|
+
: (anum && !bnum) ? -1
|
|
16900
|
+
: (bnum && !anum) ? 1
|
|
16901
|
+
: a < b ? -1
|
|
16902
|
+
: 1
|
|
16652
16903
|
};
|
|
16653
16904
|
|
|
16654
|
-
const
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
src[index] = value;
|
|
16660
|
-
re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
|
|
16661
|
-
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined);
|
|
16905
|
+
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
16906
|
+
|
|
16907
|
+
identifiers = {
|
|
16908
|
+
compareIdentifiers,
|
|
16909
|
+
rcompareIdentifiers,
|
|
16662
16910
|
};
|
|
16911
|
+
return identifiers;
|
|
16912
|
+
}
|
|
16663
16913
|
|
|
16664
|
-
|
|
16665
|
-
|
|
16914
|
+
var semver$2;
|
|
16915
|
+
var hasRequiredSemver$1;
|
|
16666
16916
|
|
|
16667
|
-
|
|
16668
|
-
|
|
16917
|
+
function requireSemver$1 () {
|
|
16918
|
+
if (hasRequiredSemver$1) return semver$2;
|
|
16919
|
+
hasRequiredSemver$1 = 1;
|
|
16920
|
+
const debug = requireDebug();
|
|
16921
|
+
const { MAX_LENGTH, MAX_SAFE_INTEGER } = requireConstants();
|
|
16922
|
+
const { safeRe: re, t } = requireRe();
|
|
16669
16923
|
|
|
16670
|
-
|
|
16671
|
-
|
|
16924
|
+
const parseOptions = requireParseOptions();
|
|
16925
|
+
const { compareIdentifiers } = requireIdentifiers();
|
|
16926
|
+
class SemVer {
|
|
16927
|
+
constructor (version, options) {
|
|
16928
|
+
options = parseOptions(options);
|
|
16672
16929
|
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16930
|
+
if (version instanceof SemVer) {
|
|
16931
|
+
if (version.loose === !!options.loose &&
|
|
16932
|
+
version.includePrerelease === !!options.includePrerelease) {
|
|
16933
|
+
return version
|
|
16934
|
+
} else {
|
|
16935
|
+
version = version.version;
|
|
16936
|
+
}
|
|
16937
|
+
} else if (typeof version !== 'string') {
|
|
16938
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
|
|
16939
|
+
}
|
|
16676
16940
|
|
|
16677
|
-
|
|
16941
|
+
if (version.length > MAX_LENGTH) {
|
|
16942
|
+
throw new TypeError(
|
|
16943
|
+
`version is longer than ${MAX_LENGTH} characters`
|
|
16944
|
+
)
|
|
16945
|
+
}
|
|
16678
16946
|
|
|
16679
|
-
|
|
16680
|
-
|
|
16947
|
+
debug('SemVer', version, options);
|
|
16948
|
+
this.options = options;
|
|
16949
|
+
this.loose = !!options.loose;
|
|
16950
|
+
// this isn't actually relevant for versions, but keep it so that we
|
|
16951
|
+
// don't run into trouble passing this.options around.
|
|
16952
|
+
this.includePrerelease = !!options.includePrerelease;
|
|
16681
16953
|
|
|
16682
|
-
|
|
16683
|
-
`(${src[t.NUMERICIDENTIFIER]})\\.` +
|
|
16684
|
-
`(${src[t.NUMERICIDENTIFIER]})`);
|
|
16954
|
+
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
16685
16955
|
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
16956
|
+
if (!m) {
|
|
16957
|
+
throw new TypeError(`Invalid Version: ${version}`)
|
|
16958
|
+
}
|
|
16689
16959
|
|
|
16690
|
-
|
|
16691
|
-
// A numeric identifier, or a non-numeric identifier.
|
|
16960
|
+
this.raw = version;
|
|
16692
16961
|
|
|
16693
|
-
|
|
16694
|
-
|
|
16962
|
+
// these are actually numbers
|
|
16963
|
+
this.major = +m[1];
|
|
16964
|
+
this.minor = +m[2];
|
|
16965
|
+
this.patch = +m[3];
|
|
16695
16966
|
|
|
16696
|
-
|
|
16697
|
-
|
|
16967
|
+
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
16968
|
+
throw new TypeError('Invalid major version')
|
|
16969
|
+
}
|
|
16698
16970
|
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16971
|
+
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
16972
|
+
throw new TypeError('Invalid minor version')
|
|
16973
|
+
}
|
|
16702
16974
|
|
|
16703
|
-
|
|
16704
|
-
|
|
16975
|
+
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
16976
|
+
throw new TypeError('Invalid patch version')
|
|
16977
|
+
}
|
|
16705
16978
|
|
|
16706
|
-
|
|
16707
|
-
|
|
16979
|
+
// numberify any prerelease numeric ids
|
|
16980
|
+
if (!m[4]) {
|
|
16981
|
+
this.prerelease = [];
|
|
16982
|
+
} else {
|
|
16983
|
+
this.prerelease = m[4].split('.').map((id) => {
|
|
16984
|
+
if (/^[0-9]+$/.test(id)) {
|
|
16985
|
+
const num = +id;
|
|
16986
|
+
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
16987
|
+
return num
|
|
16988
|
+
}
|
|
16989
|
+
}
|
|
16990
|
+
return id
|
|
16991
|
+
});
|
|
16992
|
+
}
|
|
16708
16993
|
|
|
16709
|
-
|
|
16710
|
-
|
|
16994
|
+
this.build = m[5] ? m[5].split('.') : [];
|
|
16995
|
+
this.format();
|
|
16996
|
+
}
|
|
16711
16997
|
|
|
16712
|
-
|
|
16998
|
+
format () {
|
|
16999
|
+
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
17000
|
+
if (this.prerelease.length) {
|
|
17001
|
+
this.version += `-${this.prerelease.join('.')}`;
|
|
17002
|
+
}
|
|
17003
|
+
return this.version
|
|
17004
|
+
}
|
|
16713
17005
|
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
17006
|
+
toString () {
|
|
17007
|
+
return this.version
|
|
17008
|
+
}
|
|
16717
17009
|
|
|
16718
|
-
|
|
16719
|
-
|
|
17010
|
+
compare (other) {
|
|
17011
|
+
debug('SemVer.compare', this.version, this.options, other);
|
|
17012
|
+
if (!(other instanceof SemVer)) {
|
|
17013
|
+
if (typeof other === 'string' && other === this.version) {
|
|
17014
|
+
return 0
|
|
17015
|
+
}
|
|
17016
|
+
other = new SemVer(other, this.options);
|
|
17017
|
+
}
|
|
16720
17018
|
|
|
16721
|
-
|
|
16722
|
-
|
|
16723
|
-
|
|
17019
|
+
if (other.version === this.version) {
|
|
17020
|
+
return 0
|
|
17021
|
+
}
|
|
16724
17022
|
|
|
16725
|
-
|
|
16726
|
-
|
|
16727
|
-
// capturing group, because it should not ever be used in version
|
|
16728
|
-
// comparison.
|
|
17023
|
+
return this.compareMain(other) || this.comparePre(other)
|
|
17024
|
+
}
|
|
16729
17025
|
|
|
16730
|
-
|
|
16731
|
-
|
|
16732
|
-
|
|
16733
|
-
|
|
16734
|
-
createToken('FULL', `^${src[t.FULLPLAIN]}$`);
|
|
16735
|
-
|
|
16736
|
-
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
|
16737
|
-
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
|
16738
|
-
// common in the npm registry.
|
|
16739
|
-
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
|
|
16740
|
-
}${src[t.PRERELEASELOOSE]}?${
|
|
16741
|
-
src[t.BUILD]}?`);
|
|
16742
|
-
|
|
16743
|
-
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);
|
|
16744
|
-
|
|
16745
|
-
createToken('GTLT', '((?:<|>)?=?)');
|
|
16746
|
-
|
|
16747
|
-
// Something like "2.*" or "1.2.x".
|
|
16748
|
-
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
|
16749
|
-
// Only the first item is strictly required.
|
|
16750
|
-
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
16751
|
-
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
16752
|
-
|
|
16753
|
-
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
|
|
16754
|
-
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
|
16755
|
-
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
|
16756
|
-
`(?:${src[t.PRERELEASE]})?${
|
|
16757
|
-
src[t.BUILD]}?` +
|
|
16758
|
-
`)?)?`);
|
|
16759
|
-
|
|
16760
|
-
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
16761
|
-
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
16762
|
-
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
|
16763
|
-
`(?:${src[t.PRERELEASELOOSE]})?${
|
|
16764
|
-
src[t.BUILD]}?` +
|
|
16765
|
-
`)?)?`);
|
|
16766
|
-
|
|
16767
|
-
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
16768
|
-
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
16769
|
-
|
|
16770
|
-
// Coercion.
|
|
16771
|
-
// Extract anything that could conceivably be a part of a valid semver
|
|
16772
|
-
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
|
|
16773
|
-
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
|
16774
|
-
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
|
16775
|
-
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
16776
|
-
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
16777
|
-
createToken('COERCEFULL', src[t.COERCEPLAIN] +
|
|
16778
|
-
`(?:${src[t.PRERELEASE]})?` +
|
|
16779
|
-
`(?:${src[t.BUILD]})?` +
|
|
16780
|
-
`(?:$|[^\\d])`);
|
|
16781
|
-
createToken('COERCERTL', src[t.COERCE], true);
|
|
16782
|
-
createToken('COERCERTLFULL', src[t.COERCEFULL], true);
|
|
16783
|
-
|
|
16784
|
-
// Tilde ranges.
|
|
16785
|
-
// Meaning is "reasonably at or greater than"
|
|
16786
|
-
createToken('LONETILDE', '(?:~>?)');
|
|
16787
|
-
|
|
16788
|
-
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
16789
|
-
exports.tildeTrimReplace = '$1~';
|
|
16790
|
-
|
|
16791
|
-
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
16792
|
-
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
16793
|
-
|
|
16794
|
-
// Caret ranges.
|
|
16795
|
-
// Meaning is "at least and backwards compatible with"
|
|
16796
|
-
createToken('LONECARET', '(?:\\^)');
|
|
16797
|
-
|
|
16798
|
-
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
16799
|
-
exports.caretTrimReplace = '$1^';
|
|
16800
|
-
|
|
16801
|
-
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
16802
|
-
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
16803
|
-
|
|
16804
|
-
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
|
16805
|
-
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
16806
|
-
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
16807
|
-
|
|
16808
|
-
// An expression to strip any whitespace between the gtlt and the thing
|
|
16809
|
-
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
|
16810
|
-
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
|
|
16811
|
-
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
16812
|
-
exports.comparatorTrimReplace = '$1$2$3';
|
|
16813
|
-
|
|
16814
|
-
// Something like `1.2.3 - 1.2.4`
|
|
16815
|
-
// Note that these all use the loose form, because they'll be
|
|
16816
|
-
// checked against either the strict or loose comparator form
|
|
16817
|
-
// later.
|
|
16818
|
-
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
|
|
16819
|
-
`\\s+-\\s+` +
|
|
16820
|
-
`(${src[t.XRANGEPLAIN]})` +
|
|
16821
|
-
`\\s*$`);
|
|
16822
|
-
|
|
16823
|
-
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
|
|
16824
|
-
`\\s+-\\s+` +
|
|
16825
|
-
`(${src[t.XRANGEPLAINLOOSE]})` +
|
|
16826
|
-
`\\s*$`);
|
|
16827
|
-
|
|
16828
|
-
// Star ranges basically just allow anything at all.
|
|
16829
|
-
createToken('STAR', '(<|>)?=?\\s*\\*');
|
|
16830
|
-
// >=0.0.0 is like a star
|
|
16831
|
-
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$');
|
|
16832
|
-
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$');
|
|
16833
|
-
} (re$2, re$2.exports));
|
|
16834
|
-
|
|
16835
|
-
var reExports = re$2.exports;
|
|
16836
|
-
|
|
16837
|
-
// parse out just the options we care about
|
|
16838
|
-
const looseOption = Object.freeze({ loose: true });
|
|
16839
|
-
const emptyOpts = Object.freeze({ });
|
|
16840
|
-
const parseOptions$1 = options => {
|
|
16841
|
-
if (!options) {
|
|
16842
|
-
return emptyOpts
|
|
16843
|
-
}
|
|
16844
|
-
|
|
16845
|
-
if (typeof options !== 'object') {
|
|
16846
|
-
return looseOption
|
|
16847
|
-
}
|
|
16848
|
-
|
|
16849
|
-
return options
|
|
16850
|
-
};
|
|
16851
|
-
var parseOptions_1 = parseOptions$1;
|
|
16852
|
-
|
|
16853
|
-
const numeric = /^[0-9]+$/;
|
|
16854
|
-
const compareIdentifiers$1 = (a, b) => {
|
|
16855
|
-
const anum = numeric.test(a);
|
|
16856
|
-
const bnum = numeric.test(b);
|
|
16857
|
-
|
|
16858
|
-
if (anum && bnum) {
|
|
16859
|
-
a = +a;
|
|
16860
|
-
b = +b;
|
|
16861
|
-
}
|
|
16862
|
-
|
|
16863
|
-
return a === b ? 0
|
|
16864
|
-
: (anum && !bnum) ? -1
|
|
16865
|
-
: (bnum && !anum) ? 1
|
|
16866
|
-
: a < b ? -1
|
|
16867
|
-
: 1
|
|
16868
|
-
};
|
|
17026
|
+
compareMain (other) {
|
|
17027
|
+
if (!(other instanceof SemVer)) {
|
|
17028
|
+
other = new SemVer(other, this.options);
|
|
17029
|
+
}
|
|
16869
17030
|
|
|
16870
|
-
|
|
17031
|
+
return (
|
|
17032
|
+
compareIdentifiers(this.major, other.major) ||
|
|
17033
|
+
compareIdentifiers(this.minor, other.minor) ||
|
|
17034
|
+
compareIdentifiers(this.patch, other.patch)
|
|
17035
|
+
)
|
|
17036
|
+
}
|
|
16871
17037
|
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
}
|
|
17038
|
+
comparePre (other) {
|
|
17039
|
+
if (!(other instanceof SemVer)) {
|
|
17040
|
+
other = new SemVer(other, this.options);
|
|
17041
|
+
}
|
|
16876
17042
|
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
17043
|
+
// NOT having a prerelease is > having one
|
|
17044
|
+
if (this.prerelease.length && !other.prerelease.length) {
|
|
17045
|
+
return -1
|
|
17046
|
+
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
17047
|
+
return 1
|
|
17048
|
+
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
17049
|
+
return 0
|
|
17050
|
+
}
|
|
16880
17051
|
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
17052
|
+
let i = 0;
|
|
17053
|
+
do {
|
|
17054
|
+
const a = this.prerelease[i];
|
|
17055
|
+
const b = other.prerelease[i];
|
|
17056
|
+
debug('prerelease compare', i, a, b);
|
|
17057
|
+
if (a === undefined && b === undefined) {
|
|
17058
|
+
return 0
|
|
17059
|
+
} else if (b === undefined) {
|
|
17060
|
+
return 1
|
|
17061
|
+
} else if (a === undefined) {
|
|
17062
|
+
return -1
|
|
17063
|
+
} else if (a === b) {
|
|
17064
|
+
continue
|
|
17065
|
+
} else {
|
|
17066
|
+
return compareIdentifiers(a, b)
|
|
17067
|
+
}
|
|
17068
|
+
} while (++i)
|
|
17069
|
+
}
|
|
16886
17070
|
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16891
|
-
} else {
|
|
16892
|
-
version = version.version;
|
|
16893
|
-
}
|
|
16894
|
-
} else if (typeof version !== 'string') {
|
|
16895
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
|
|
16896
|
-
}
|
|
17071
|
+
compareBuild (other) {
|
|
17072
|
+
if (!(other instanceof SemVer)) {
|
|
17073
|
+
other = new SemVer(other, this.options);
|
|
17074
|
+
}
|
|
16897
17075
|
|
|
16898
|
-
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16902
|
-
|
|
17076
|
+
let i = 0;
|
|
17077
|
+
do {
|
|
17078
|
+
const a = this.build[i];
|
|
17079
|
+
const b = other.build[i];
|
|
17080
|
+
debug('build compare', i, a, b);
|
|
17081
|
+
if (a === undefined && b === undefined) {
|
|
17082
|
+
return 0
|
|
17083
|
+
} else if (b === undefined) {
|
|
17084
|
+
return 1
|
|
17085
|
+
} else if (a === undefined) {
|
|
17086
|
+
return -1
|
|
17087
|
+
} else if (a === b) {
|
|
17088
|
+
continue
|
|
17089
|
+
} else {
|
|
17090
|
+
return compareIdentifiers(a, b)
|
|
17091
|
+
}
|
|
17092
|
+
} while (++i)
|
|
17093
|
+
}
|
|
16903
17094
|
|
|
16904
|
-
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
17095
|
+
// preminor will bump the version up to the next minor release, and immediately
|
|
17096
|
+
// down to pre-release. premajor and prepatch work the same way.
|
|
17097
|
+
inc (release, identifier, identifierBase) {
|
|
17098
|
+
switch (release) {
|
|
17099
|
+
case 'premajor':
|
|
17100
|
+
this.prerelease.length = 0;
|
|
17101
|
+
this.patch = 0;
|
|
17102
|
+
this.minor = 0;
|
|
17103
|
+
this.major++;
|
|
17104
|
+
this.inc('pre', identifier, identifierBase);
|
|
17105
|
+
break
|
|
17106
|
+
case 'preminor':
|
|
17107
|
+
this.prerelease.length = 0;
|
|
17108
|
+
this.patch = 0;
|
|
17109
|
+
this.minor++;
|
|
17110
|
+
this.inc('pre', identifier, identifierBase);
|
|
17111
|
+
break
|
|
17112
|
+
case 'prepatch':
|
|
17113
|
+
// If this is already a prerelease, it will bump to the next version
|
|
17114
|
+
// drop any prereleases that might already exist, since they are not
|
|
17115
|
+
// relevant at this point.
|
|
17116
|
+
this.prerelease.length = 0;
|
|
17117
|
+
this.inc('patch', identifier, identifierBase);
|
|
17118
|
+
this.inc('pre', identifier, identifierBase);
|
|
17119
|
+
break
|
|
17120
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
17121
|
+
// prepatch.
|
|
17122
|
+
case 'prerelease':
|
|
17123
|
+
if (this.prerelease.length === 0) {
|
|
17124
|
+
this.inc('patch', identifier, identifierBase);
|
|
17125
|
+
}
|
|
17126
|
+
this.inc('pre', identifier, identifierBase);
|
|
17127
|
+
break
|
|
17128
|
+
|
|
17129
|
+
case 'major':
|
|
17130
|
+
// If this is a pre-major version, bump up to the same major version.
|
|
17131
|
+
// Otherwise increment major.
|
|
17132
|
+
// 1.0.0-5 bumps to 1.0.0
|
|
17133
|
+
// 1.1.0 bumps to 2.0.0
|
|
17134
|
+
if (
|
|
17135
|
+
this.minor !== 0 ||
|
|
17136
|
+
this.patch !== 0 ||
|
|
17137
|
+
this.prerelease.length === 0
|
|
17138
|
+
) {
|
|
17139
|
+
this.major++;
|
|
17140
|
+
}
|
|
17141
|
+
this.minor = 0;
|
|
17142
|
+
this.patch = 0;
|
|
17143
|
+
this.prerelease = [];
|
|
17144
|
+
break
|
|
17145
|
+
case 'minor':
|
|
17146
|
+
// If this is a pre-minor version, bump up to the same minor version.
|
|
17147
|
+
// Otherwise increment minor.
|
|
17148
|
+
// 1.2.0-5 bumps to 1.2.0
|
|
17149
|
+
// 1.2.1 bumps to 1.3.0
|
|
17150
|
+
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
17151
|
+
this.minor++;
|
|
17152
|
+
}
|
|
17153
|
+
this.patch = 0;
|
|
17154
|
+
this.prerelease = [];
|
|
17155
|
+
break
|
|
17156
|
+
case 'patch':
|
|
17157
|
+
// If this is not a pre-release version, it will increment the patch.
|
|
17158
|
+
// If it is a pre-release it will bump up to the same patch version.
|
|
17159
|
+
// 1.2.0-5 patches to 1.2.0
|
|
17160
|
+
// 1.2.0 patches to 1.2.1
|
|
17161
|
+
if (this.prerelease.length === 0) {
|
|
17162
|
+
this.patch++;
|
|
17163
|
+
}
|
|
17164
|
+
this.prerelease = [];
|
|
17165
|
+
break
|
|
17166
|
+
// This probably shouldn't be used publicly.
|
|
17167
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
17168
|
+
case 'pre': {
|
|
17169
|
+
const base = Number(identifierBase) ? 1 : 0;
|
|
17170
|
+
|
|
17171
|
+
if (!identifier && identifierBase === false) {
|
|
17172
|
+
throw new Error('invalid increment argument: identifier is empty')
|
|
17173
|
+
}
|
|
16910
17174
|
|
|
16911
|
-
|
|
17175
|
+
if (this.prerelease.length === 0) {
|
|
17176
|
+
this.prerelease = [base];
|
|
17177
|
+
} else {
|
|
17178
|
+
let i = this.prerelease.length;
|
|
17179
|
+
while (--i >= 0) {
|
|
17180
|
+
if (typeof this.prerelease[i] === 'number') {
|
|
17181
|
+
this.prerelease[i]++;
|
|
17182
|
+
i = -2;
|
|
17183
|
+
}
|
|
17184
|
+
}
|
|
17185
|
+
if (i === -1) {
|
|
17186
|
+
// didn't increment anything
|
|
17187
|
+
if (identifier === this.prerelease.join('.') && identifierBase === false) {
|
|
17188
|
+
throw new Error('invalid increment argument: identifier already exists')
|
|
17189
|
+
}
|
|
17190
|
+
this.prerelease.push(base);
|
|
17191
|
+
}
|
|
17192
|
+
}
|
|
17193
|
+
if (identifier) {
|
|
17194
|
+
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
|
17195
|
+
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
|
17196
|
+
let prerelease = [identifier, base];
|
|
17197
|
+
if (identifierBase === false) {
|
|
17198
|
+
prerelease = [identifier];
|
|
17199
|
+
}
|
|
17200
|
+
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
17201
|
+
if (isNaN(this.prerelease[1])) {
|
|
17202
|
+
this.prerelease = prerelease;
|
|
17203
|
+
}
|
|
17204
|
+
} else {
|
|
17205
|
+
this.prerelease = prerelease;
|
|
17206
|
+
}
|
|
17207
|
+
}
|
|
17208
|
+
break
|
|
17209
|
+
}
|
|
17210
|
+
default:
|
|
17211
|
+
throw new Error(`invalid increment argument: ${release}`)
|
|
17212
|
+
}
|
|
17213
|
+
this.raw = this.format();
|
|
17214
|
+
if (this.build.length) {
|
|
17215
|
+
this.raw += `+${this.build.join('.')}`;
|
|
17216
|
+
}
|
|
17217
|
+
return this
|
|
17218
|
+
}
|
|
17219
|
+
}
|
|
16912
17220
|
|
|
16913
|
-
|
|
16914
|
-
|
|
16915
|
-
|
|
17221
|
+
semver$2 = SemVer;
|
|
17222
|
+
return semver$2;
|
|
17223
|
+
}
|
|
16916
17224
|
|
|
16917
|
-
|
|
17225
|
+
var parse_1;
|
|
17226
|
+
var hasRequiredParse;
|
|
16918
17227
|
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
|
|
17228
|
+
function requireParse () {
|
|
17229
|
+
if (hasRequiredParse) return parse_1;
|
|
17230
|
+
hasRequiredParse = 1;
|
|
17231
|
+
const SemVer = requireSemver$1();
|
|
17232
|
+
const parse = (version, options, throwErrors = false) => {
|
|
17233
|
+
if (version instanceof SemVer) {
|
|
17234
|
+
return version
|
|
17235
|
+
}
|
|
17236
|
+
try {
|
|
17237
|
+
return new SemVer(version, options)
|
|
17238
|
+
} catch (er) {
|
|
17239
|
+
if (!throwErrors) {
|
|
17240
|
+
return null
|
|
17241
|
+
}
|
|
17242
|
+
throw er
|
|
17243
|
+
}
|
|
17244
|
+
};
|
|
16923
17245
|
|
|
16924
|
-
|
|
16925
|
-
|
|
16926
|
-
|
|
17246
|
+
parse_1 = parse;
|
|
17247
|
+
return parse_1;
|
|
17248
|
+
}
|
|
16927
17249
|
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
}
|
|
17250
|
+
var valid_1;
|
|
17251
|
+
var hasRequiredValid$1;
|
|
16931
17252
|
|
|
16932
|
-
|
|
16933
|
-
|
|
16934
|
-
|
|
17253
|
+
function requireValid$1 () {
|
|
17254
|
+
if (hasRequiredValid$1) return valid_1;
|
|
17255
|
+
hasRequiredValid$1 = 1;
|
|
17256
|
+
const parse = requireParse();
|
|
17257
|
+
const valid = (version, options) => {
|
|
17258
|
+
const v = parse(version, options);
|
|
17259
|
+
return v ? v.version : null
|
|
17260
|
+
};
|
|
17261
|
+
valid_1 = valid;
|
|
17262
|
+
return valid_1;
|
|
17263
|
+
}
|
|
16935
17264
|
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
this.prerelease = [];
|
|
16939
|
-
} else {
|
|
16940
|
-
this.prerelease = m[4].split('.').map((id) => {
|
|
16941
|
-
if (/^[0-9]+$/.test(id)) {
|
|
16942
|
-
const num = +id;
|
|
16943
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
16944
|
-
return num
|
|
16945
|
-
}
|
|
16946
|
-
}
|
|
16947
|
-
return id
|
|
16948
|
-
});
|
|
16949
|
-
}
|
|
17265
|
+
var clean_1;
|
|
17266
|
+
var hasRequiredClean;
|
|
16950
17267
|
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
17268
|
+
function requireClean () {
|
|
17269
|
+
if (hasRequiredClean) return clean_1;
|
|
17270
|
+
hasRequiredClean = 1;
|
|
17271
|
+
const parse = requireParse();
|
|
17272
|
+
const clean = (version, options) => {
|
|
17273
|
+
const s = parse(version.trim().replace(/^[=v]+/, ''), options);
|
|
17274
|
+
return s ? s.version : null
|
|
17275
|
+
};
|
|
17276
|
+
clean_1 = clean;
|
|
17277
|
+
return clean_1;
|
|
17278
|
+
}
|
|
16954
17279
|
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
if (this.prerelease.length) {
|
|
16958
|
-
this.version += `-${this.prerelease.join('.')}`;
|
|
16959
|
-
}
|
|
16960
|
-
return this.version
|
|
16961
|
-
}
|
|
17280
|
+
var inc_1;
|
|
17281
|
+
var hasRequiredInc;
|
|
16962
17282
|
|
|
16963
|
-
|
|
16964
|
-
|
|
16965
|
-
|
|
17283
|
+
function requireInc () {
|
|
17284
|
+
if (hasRequiredInc) return inc_1;
|
|
17285
|
+
hasRequiredInc = 1;
|
|
17286
|
+
const SemVer = requireSemver$1();
|
|
16966
17287
|
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
other = new SemVer$d(other, this.options);
|
|
16974
|
-
}
|
|
17288
|
+
const inc = (version, release, options, identifier, identifierBase) => {
|
|
17289
|
+
if (typeof (options) === 'string') {
|
|
17290
|
+
identifierBase = identifier;
|
|
17291
|
+
identifier = options;
|
|
17292
|
+
options = undefined;
|
|
17293
|
+
}
|
|
16975
17294
|
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
17295
|
+
try {
|
|
17296
|
+
return new SemVer(
|
|
17297
|
+
version instanceof SemVer ? version.version : version,
|
|
17298
|
+
options
|
|
17299
|
+
).inc(release, identifier, identifierBase).version
|
|
17300
|
+
} catch (er) {
|
|
17301
|
+
return null
|
|
17302
|
+
}
|
|
17303
|
+
};
|
|
17304
|
+
inc_1 = inc;
|
|
17305
|
+
return inc_1;
|
|
17306
|
+
}
|
|
16979
17307
|
|
|
16980
|
-
|
|
16981
|
-
|
|
17308
|
+
var diff_1;
|
|
17309
|
+
var hasRequiredDiff;
|
|
16982
17310
|
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
17311
|
+
function requireDiff () {
|
|
17312
|
+
if (hasRequiredDiff) return diff_1;
|
|
17313
|
+
hasRequiredDiff = 1;
|
|
17314
|
+
const parse = requireParse();
|
|
16987
17315
|
|
|
16988
|
-
|
|
16989
|
-
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
)
|
|
16993
|
-
}
|
|
17316
|
+
const diff = (version1, version2) => {
|
|
17317
|
+
const v1 = parse(version1, null, true);
|
|
17318
|
+
const v2 = parse(version2, null, true);
|
|
17319
|
+
const comparison = v1.compare(v2);
|
|
16994
17320
|
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
}
|
|
17321
|
+
if (comparison === 0) {
|
|
17322
|
+
return null
|
|
17323
|
+
}
|
|
16999
17324
|
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17325
|
+
const v1Higher = comparison > 0;
|
|
17326
|
+
const highVersion = v1Higher ? v1 : v2;
|
|
17327
|
+
const lowVersion = v1Higher ? v2 : v1;
|
|
17328
|
+
const highHasPre = !!highVersion.prerelease.length;
|
|
17329
|
+
const lowHasPre = !!lowVersion.prerelease.length;
|
|
17330
|
+
|
|
17331
|
+
if (lowHasPre && !highHasPre) {
|
|
17332
|
+
// Going from prerelease -> no prerelease requires some special casing
|
|
17333
|
+
|
|
17334
|
+
// If the low version has only a major, then it will always be a major
|
|
17335
|
+
// Some examples:
|
|
17336
|
+
// 1.0.0-1 -> 1.0.0
|
|
17337
|
+
// 1.0.0-1 -> 1.1.1
|
|
17338
|
+
// 1.0.0-1 -> 2.0.0
|
|
17339
|
+
if (!lowVersion.patch && !lowVersion.minor) {
|
|
17340
|
+
return 'major'
|
|
17341
|
+
}
|
|
17008
17342
|
|
|
17009
|
-
|
|
17010
|
-
do {
|
|
17011
|
-
const a = this.prerelease[i];
|
|
17012
|
-
const b = other.prerelease[i];
|
|
17013
|
-
debug('prerelease compare', i, a, b);
|
|
17014
|
-
if (a === undefined && b === undefined) {
|
|
17015
|
-
return 0
|
|
17016
|
-
} else if (b === undefined) {
|
|
17017
|
-
return 1
|
|
17018
|
-
} else if (a === undefined) {
|
|
17019
|
-
return -1
|
|
17020
|
-
} else if (a === b) {
|
|
17021
|
-
continue
|
|
17022
|
-
} else {
|
|
17023
|
-
return compareIdentifiers(a, b)
|
|
17024
|
-
}
|
|
17025
|
-
} while (++i)
|
|
17026
|
-
}
|
|
17027
|
-
|
|
17028
|
-
compareBuild (other) {
|
|
17029
|
-
if (!(other instanceof SemVer$d)) {
|
|
17030
|
-
other = new SemVer$d(other, this.options);
|
|
17031
|
-
}
|
|
17032
|
-
|
|
17033
|
-
let i = 0;
|
|
17034
|
-
do {
|
|
17035
|
-
const a = this.build[i];
|
|
17036
|
-
const b = other.build[i];
|
|
17037
|
-
debug('build compare', i, a, b);
|
|
17038
|
-
if (a === undefined && b === undefined) {
|
|
17039
|
-
return 0
|
|
17040
|
-
} else if (b === undefined) {
|
|
17041
|
-
return 1
|
|
17042
|
-
} else if (a === undefined) {
|
|
17043
|
-
return -1
|
|
17044
|
-
} else if (a === b) {
|
|
17045
|
-
continue
|
|
17046
|
-
} else {
|
|
17047
|
-
return compareIdentifiers(a, b)
|
|
17048
|
-
}
|
|
17049
|
-
} while (++i)
|
|
17050
|
-
}
|
|
17051
|
-
|
|
17052
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
17053
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
17054
|
-
inc (release, identifier, identifierBase) {
|
|
17055
|
-
switch (release) {
|
|
17056
|
-
case 'premajor':
|
|
17057
|
-
this.prerelease.length = 0;
|
|
17058
|
-
this.patch = 0;
|
|
17059
|
-
this.minor = 0;
|
|
17060
|
-
this.major++;
|
|
17061
|
-
this.inc('pre', identifier, identifierBase);
|
|
17062
|
-
break
|
|
17063
|
-
case 'preminor':
|
|
17064
|
-
this.prerelease.length = 0;
|
|
17065
|
-
this.patch = 0;
|
|
17066
|
-
this.minor++;
|
|
17067
|
-
this.inc('pre', identifier, identifierBase);
|
|
17068
|
-
break
|
|
17069
|
-
case 'prepatch':
|
|
17070
|
-
// If this is already a prerelease, it will bump to the next version
|
|
17071
|
-
// drop any prereleases that might already exist, since they are not
|
|
17072
|
-
// relevant at this point.
|
|
17073
|
-
this.prerelease.length = 0;
|
|
17074
|
-
this.inc('patch', identifier, identifierBase);
|
|
17075
|
-
this.inc('pre', identifier, identifierBase);
|
|
17076
|
-
break
|
|
17077
|
-
// If the input is a non-prerelease version, this acts the same as
|
|
17078
|
-
// prepatch.
|
|
17079
|
-
case 'prerelease':
|
|
17080
|
-
if (this.prerelease.length === 0) {
|
|
17081
|
-
this.inc('patch', identifier, identifierBase);
|
|
17082
|
-
}
|
|
17083
|
-
this.inc('pre', identifier, identifierBase);
|
|
17084
|
-
break
|
|
17085
|
-
|
|
17086
|
-
case 'major':
|
|
17087
|
-
// If this is a pre-major version, bump up to the same major version.
|
|
17088
|
-
// Otherwise increment major.
|
|
17089
|
-
// 1.0.0-5 bumps to 1.0.0
|
|
17090
|
-
// 1.1.0 bumps to 2.0.0
|
|
17091
|
-
if (
|
|
17092
|
-
this.minor !== 0 ||
|
|
17093
|
-
this.patch !== 0 ||
|
|
17094
|
-
this.prerelease.length === 0
|
|
17095
|
-
) {
|
|
17096
|
-
this.major++;
|
|
17097
|
-
}
|
|
17098
|
-
this.minor = 0;
|
|
17099
|
-
this.patch = 0;
|
|
17100
|
-
this.prerelease = [];
|
|
17101
|
-
break
|
|
17102
|
-
case 'minor':
|
|
17103
|
-
// If this is a pre-minor version, bump up to the same minor version.
|
|
17104
|
-
// Otherwise increment minor.
|
|
17105
|
-
// 1.2.0-5 bumps to 1.2.0
|
|
17106
|
-
// 1.2.1 bumps to 1.3.0
|
|
17107
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
17108
|
-
this.minor++;
|
|
17109
|
-
}
|
|
17110
|
-
this.patch = 0;
|
|
17111
|
-
this.prerelease = [];
|
|
17112
|
-
break
|
|
17113
|
-
case 'patch':
|
|
17114
|
-
// If this is not a pre-release version, it will increment the patch.
|
|
17115
|
-
// If it is a pre-release it will bump up to the same patch version.
|
|
17116
|
-
// 1.2.0-5 patches to 1.2.0
|
|
17117
|
-
// 1.2.0 patches to 1.2.1
|
|
17118
|
-
if (this.prerelease.length === 0) {
|
|
17119
|
-
this.patch++;
|
|
17120
|
-
}
|
|
17121
|
-
this.prerelease = [];
|
|
17122
|
-
break
|
|
17123
|
-
// This probably shouldn't be used publicly.
|
|
17124
|
-
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
17125
|
-
case 'pre': {
|
|
17126
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
17127
|
-
|
|
17128
|
-
if (!identifier && identifierBase === false) {
|
|
17129
|
-
throw new Error('invalid increment argument: identifier is empty')
|
|
17130
|
-
}
|
|
17131
|
-
|
|
17132
|
-
if (this.prerelease.length === 0) {
|
|
17133
|
-
this.prerelease = [base];
|
|
17134
|
-
} else {
|
|
17135
|
-
let i = this.prerelease.length;
|
|
17136
|
-
while (--i >= 0) {
|
|
17137
|
-
if (typeof this.prerelease[i] === 'number') {
|
|
17138
|
-
this.prerelease[i]++;
|
|
17139
|
-
i = -2;
|
|
17140
|
-
}
|
|
17141
|
-
}
|
|
17142
|
-
if (i === -1) {
|
|
17143
|
-
// didn't increment anything
|
|
17144
|
-
if (identifier === this.prerelease.join('.') && identifierBase === false) {
|
|
17145
|
-
throw new Error('invalid increment argument: identifier already exists')
|
|
17146
|
-
}
|
|
17147
|
-
this.prerelease.push(base);
|
|
17148
|
-
}
|
|
17149
|
-
}
|
|
17150
|
-
if (identifier) {
|
|
17151
|
-
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
|
17152
|
-
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
|
17153
|
-
let prerelease = [identifier, base];
|
|
17154
|
-
if (identifierBase === false) {
|
|
17155
|
-
prerelease = [identifier];
|
|
17156
|
-
}
|
|
17157
|
-
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
17158
|
-
if (isNaN(this.prerelease[1])) {
|
|
17159
|
-
this.prerelease = prerelease;
|
|
17160
|
-
}
|
|
17161
|
-
} else {
|
|
17162
|
-
this.prerelease = prerelease;
|
|
17163
|
-
}
|
|
17164
|
-
}
|
|
17165
|
-
break
|
|
17166
|
-
}
|
|
17167
|
-
default:
|
|
17168
|
-
throw new Error(`invalid increment argument: ${release}`)
|
|
17169
|
-
}
|
|
17170
|
-
this.raw = this.format();
|
|
17171
|
-
if (this.build.length) {
|
|
17172
|
-
this.raw += `+${this.build.join('.')}`;
|
|
17173
|
-
}
|
|
17174
|
-
return this
|
|
17175
|
-
}
|
|
17176
|
-
}
|
|
17177
|
-
|
|
17178
|
-
var semver$2 = SemVer$d;
|
|
17179
|
-
|
|
17180
|
-
const SemVer$c = semver$2;
|
|
17181
|
-
const parse$6 = (version, options, throwErrors = false) => {
|
|
17182
|
-
if (version instanceof SemVer$c) {
|
|
17183
|
-
return version
|
|
17184
|
-
}
|
|
17185
|
-
try {
|
|
17186
|
-
return new SemVer$c(version, options)
|
|
17187
|
-
} catch (er) {
|
|
17188
|
-
if (!throwErrors) {
|
|
17189
|
-
return null
|
|
17190
|
-
}
|
|
17191
|
-
throw er
|
|
17192
|
-
}
|
|
17193
|
-
};
|
|
17343
|
+
// Otherwise it can be determined by checking the high version
|
|
17194
17344
|
|
|
17195
|
-
|
|
17345
|
+
if (highVersion.patch) {
|
|
17346
|
+
// anything higher than a patch bump would result in the wrong version
|
|
17347
|
+
return 'patch'
|
|
17348
|
+
}
|
|
17196
17349
|
|
|
17197
|
-
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
};
|
|
17202
|
-
var valid_1 = valid$2;
|
|
17350
|
+
if (highVersion.minor) {
|
|
17351
|
+
// anything higher than a minor bump would result in the wrong version
|
|
17352
|
+
return 'minor'
|
|
17353
|
+
}
|
|
17203
17354
|
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
return s ? s.version : null
|
|
17208
|
-
};
|
|
17209
|
-
var clean_1 = clean$1;
|
|
17210
|
-
|
|
17211
|
-
const SemVer$b = semver$2;
|
|
17212
|
-
|
|
17213
|
-
const inc$1 = (version, release, options, identifier, identifierBase) => {
|
|
17214
|
-
if (typeof (options) === 'string') {
|
|
17215
|
-
identifierBase = identifier;
|
|
17216
|
-
identifier = options;
|
|
17217
|
-
options = undefined;
|
|
17218
|
-
}
|
|
17219
|
-
|
|
17220
|
-
try {
|
|
17221
|
-
return new SemVer$b(
|
|
17222
|
-
version instanceof SemVer$b ? version.version : version,
|
|
17223
|
-
options
|
|
17224
|
-
).inc(release, identifier, identifierBase).version
|
|
17225
|
-
} catch (er) {
|
|
17226
|
-
return null
|
|
17227
|
-
}
|
|
17228
|
-
};
|
|
17229
|
-
var inc_1 = inc$1;
|
|
17355
|
+
// bumping major/minor/patch all have same result
|
|
17356
|
+
return 'major'
|
|
17357
|
+
}
|
|
17230
17358
|
|
|
17231
|
-
|
|
17359
|
+
// add the `pre` prefix if we are going to a prerelease version
|
|
17360
|
+
const prefix = highHasPre ? 'pre' : '';
|
|
17232
17361
|
|
|
17233
|
-
|
|
17234
|
-
|
|
17235
|
-
|
|
17236
|
-
const comparison = v1.compare(v2);
|
|
17362
|
+
if (v1.major !== v2.major) {
|
|
17363
|
+
return prefix + 'major'
|
|
17364
|
+
}
|
|
17237
17365
|
|
|
17238
|
-
|
|
17239
|
-
|
|
17240
|
-
|
|
17366
|
+
if (v1.minor !== v2.minor) {
|
|
17367
|
+
return prefix + 'minor'
|
|
17368
|
+
}
|
|
17241
17369
|
|
|
17242
|
-
|
|
17243
|
-
|
|
17244
|
-
|
|
17245
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
17246
|
-
const lowHasPre = !!lowVersion.prerelease.length;
|
|
17370
|
+
if (v1.patch !== v2.patch) {
|
|
17371
|
+
return prefix + 'patch'
|
|
17372
|
+
}
|
|
17247
17373
|
|
|
17248
|
-
|
|
17249
|
-
|
|
17374
|
+
// high and low are preleases
|
|
17375
|
+
return 'prerelease'
|
|
17376
|
+
};
|
|
17250
17377
|
|
|
17251
|
-
|
|
17252
|
-
|
|
17253
|
-
|
|
17254
|
-
// 1.0.0-1 -> 1.1.1
|
|
17255
|
-
// 1.0.0-1 -> 2.0.0
|
|
17256
|
-
if (!lowVersion.patch && !lowVersion.minor) {
|
|
17257
|
-
return 'major'
|
|
17258
|
-
}
|
|
17378
|
+
diff_1 = diff;
|
|
17379
|
+
return diff_1;
|
|
17380
|
+
}
|
|
17259
17381
|
|
|
17260
|
-
|
|
17382
|
+
var major_1;
|
|
17383
|
+
var hasRequiredMajor;
|
|
17261
17384
|
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17385
|
+
function requireMajor () {
|
|
17386
|
+
if (hasRequiredMajor) return major_1;
|
|
17387
|
+
hasRequiredMajor = 1;
|
|
17388
|
+
const SemVer = requireSemver$1();
|
|
17389
|
+
const major = (a, loose) => new SemVer(a, loose).major;
|
|
17390
|
+
major_1 = major;
|
|
17391
|
+
return major_1;
|
|
17392
|
+
}
|
|
17266
17393
|
|
|
17267
|
-
|
|
17268
|
-
|
|
17269
|
-
return 'minor'
|
|
17270
|
-
}
|
|
17394
|
+
var minor_1;
|
|
17395
|
+
var hasRequiredMinor;
|
|
17271
17396
|
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17397
|
+
function requireMinor () {
|
|
17398
|
+
if (hasRequiredMinor) return minor_1;
|
|
17399
|
+
hasRequiredMinor = 1;
|
|
17400
|
+
const SemVer = requireSemver$1();
|
|
17401
|
+
const minor = (a, loose) => new SemVer(a, loose).minor;
|
|
17402
|
+
minor_1 = minor;
|
|
17403
|
+
return minor_1;
|
|
17404
|
+
}
|
|
17275
17405
|
|
|
17276
|
-
|
|
17277
|
-
|
|
17406
|
+
var patch_1;
|
|
17407
|
+
var hasRequiredPatch;
|
|
17278
17408
|
|
|
17279
|
-
|
|
17280
|
-
|
|
17281
|
-
|
|
17409
|
+
function requirePatch () {
|
|
17410
|
+
if (hasRequiredPatch) return patch_1;
|
|
17411
|
+
hasRequiredPatch = 1;
|
|
17412
|
+
const SemVer = requireSemver$1();
|
|
17413
|
+
const patch = (a, loose) => new SemVer(a, loose).patch;
|
|
17414
|
+
patch_1 = patch;
|
|
17415
|
+
return patch_1;
|
|
17416
|
+
}
|
|
17282
17417
|
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
}
|
|
17418
|
+
var prerelease_1;
|
|
17419
|
+
var hasRequiredPrerelease;
|
|
17286
17420
|
|
|
17287
|
-
|
|
17288
|
-
|
|
17289
|
-
|
|
17421
|
+
function requirePrerelease () {
|
|
17422
|
+
if (hasRequiredPrerelease) return prerelease_1;
|
|
17423
|
+
hasRequiredPrerelease = 1;
|
|
17424
|
+
const parse = requireParse();
|
|
17425
|
+
const prerelease = (version, options) => {
|
|
17426
|
+
const parsed = parse(version, options);
|
|
17427
|
+
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
|
|
17428
|
+
};
|
|
17429
|
+
prerelease_1 = prerelease;
|
|
17430
|
+
return prerelease_1;
|
|
17431
|
+
}
|
|
17290
17432
|
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
};
|
|
17433
|
+
var compare_1;
|
|
17434
|
+
var hasRequiredCompare;
|
|
17294
17435
|
|
|
17295
|
-
|
|
17436
|
+
function requireCompare () {
|
|
17437
|
+
if (hasRequiredCompare) return compare_1;
|
|
17438
|
+
hasRequiredCompare = 1;
|
|
17439
|
+
const SemVer = requireSemver$1();
|
|
17440
|
+
const compare = (a, b, loose) =>
|
|
17441
|
+
new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
17296
17442
|
|
|
17297
|
-
|
|
17298
|
-
|
|
17299
|
-
|
|
17443
|
+
compare_1 = compare;
|
|
17444
|
+
return compare_1;
|
|
17445
|
+
}
|
|
17300
17446
|
|
|
17301
|
-
|
|
17302
|
-
|
|
17303
|
-
var minor_1 = minor$1;
|
|
17447
|
+
var rcompare_1;
|
|
17448
|
+
var hasRequiredRcompare;
|
|
17304
17449
|
|
|
17305
|
-
|
|
17306
|
-
|
|
17307
|
-
|
|
17450
|
+
function requireRcompare () {
|
|
17451
|
+
if (hasRequiredRcompare) return rcompare_1;
|
|
17452
|
+
hasRequiredRcompare = 1;
|
|
17453
|
+
const compare = requireCompare();
|
|
17454
|
+
const rcompare = (a, b, loose) => compare(b, a, loose);
|
|
17455
|
+
rcompare_1 = rcompare;
|
|
17456
|
+
return rcompare_1;
|
|
17457
|
+
}
|
|
17308
17458
|
|
|
17309
|
-
|
|
17310
|
-
|
|
17311
|
-
const parsed = parse$2(version, options);
|
|
17312
|
-
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
|
|
17313
|
-
};
|
|
17314
|
-
var prerelease_1 = prerelease$1;
|
|
17459
|
+
var compareLoose_1;
|
|
17460
|
+
var hasRequiredCompareLoose;
|
|
17315
17461
|
|
|
17316
|
-
|
|
17317
|
-
|
|
17318
|
-
|
|
17462
|
+
function requireCompareLoose () {
|
|
17463
|
+
if (hasRequiredCompareLoose) return compareLoose_1;
|
|
17464
|
+
hasRequiredCompareLoose = 1;
|
|
17465
|
+
const compare = requireCompare();
|
|
17466
|
+
const compareLoose = (a, b) => compare(a, b, true);
|
|
17467
|
+
compareLoose_1 = compareLoose;
|
|
17468
|
+
return compareLoose_1;
|
|
17469
|
+
}
|
|
17319
17470
|
|
|
17320
|
-
var
|
|
17471
|
+
var compareBuild_1;
|
|
17472
|
+
var hasRequiredCompareBuild;
|
|
17321
17473
|
|
|
17322
|
-
|
|
17323
|
-
|
|
17324
|
-
|
|
17474
|
+
function requireCompareBuild () {
|
|
17475
|
+
if (hasRequiredCompareBuild) return compareBuild_1;
|
|
17476
|
+
hasRequiredCompareBuild = 1;
|
|
17477
|
+
const SemVer = requireSemver$1();
|
|
17478
|
+
const compareBuild = (a, b, loose) => {
|
|
17479
|
+
const versionA = new SemVer(a, loose);
|
|
17480
|
+
const versionB = new SemVer(b, loose);
|
|
17481
|
+
return versionA.compare(versionB) || versionA.compareBuild(versionB)
|
|
17482
|
+
};
|
|
17483
|
+
compareBuild_1 = compareBuild;
|
|
17484
|
+
return compareBuild_1;
|
|
17485
|
+
}
|
|
17325
17486
|
|
|
17326
|
-
|
|
17327
|
-
|
|
17328
|
-
var compareLoose_1 = compareLoose$1;
|
|
17487
|
+
var sort_1;
|
|
17488
|
+
var hasRequiredSort;
|
|
17329
17489
|
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
|
|
17334
|
-
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
var
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17344
|
-
|
|
17345
|
-
|
|
17346
|
-
const
|
|
17347
|
-
|
|
17348
|
-
|
|
17349
|
-
|
|
17350
|
-
|
|
17351
|
-
|
|
17352
|
-
var
|
|
17353
|
-
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
const
|
|
17359
|
-
|
|
17360
|
-
|
|
17361
|
-
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
var
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
const
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17382
|
-
|
|
17383
|
-
|
|
17384
|
-
|
|
17385
|
-
|
|
17386
|
-
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
|
|
17394
|
-
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
|
|
17398
|
-
|
|
17399
|
-
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17412
|
-
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17442
|
-
|
|
17443
|
-
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
17450
|
-
|
|
17451
|
-
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
|
|
17481
|
-
|
|
17482
|
-
|
|
17490
|
+
function requireSort () {
|
|
17491
|
+
if (hasRequiredSort) return sort_1;
|
|
17492
|
+
hasRequiredSort = 1;
|
|
17493
|
+
const compareBuild = requireCompareBuild();
|
|
17494
|
+
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
17495
|
+
sort_1 = sort;
|
|
17496
|
+
return sort_1;
|
|
17497
|
+
}
|
|
17498
|
+
|
|
17499
|
+
var rsort_1;
|
|
17500
|
+
var hasRequiredRsort;
|
|
17501
|
+
|
|
17502
|
+
function requireRsort () {
|
|
17503
|
+
if (hasRequiredRsort) return rsort_1;
|
|
17504
|
+
hasRequiredRsort = 1;
|
|
17505
|
+
const compareBuild = requireCompareBuild();
|
|
17506
|
+
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
17507
|
+
rsort_1 = rsort;
|
|
17508
|
+
return rsort_1;
|
|
17509
|
+
}
|
|
17510
|
+
|
|
17511
|
+
var gt_1;
|
|
17512
|
+
var hasRequiredGt;
|
|
17513
|
+
|
|
17514
|
+
function requireGt () {
|
|
17515
|
+
if (hasRequiredGt) return gt_1;
|
|
17516
|
+
hasRequiredGt = 1;
|
|
17517
|
+
const compare = requireCompare();
|
|
17518
|
+
const gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
17519
|
+
gt_1 = gt;
|
|
17520
|
+
return gt_1;
|
|
17521
|
+
}
|
|
17522
|
+
|
|
17523
|
+
var lt_1;
|
|
17524
|
+
var hasRequiredLt;
|
|
17525
|
+
|
|
17526
|
+
function requireLt () {
|
|
17527
|
+
if (hasRequiredLt) return lt_1;
|
|
17528
|
+
hasRequiredLt = 1;
|
|
17529
|
+
const compare = requireCompare();
|
|
17530
|
+
const lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
17531
|
+
lt_1 = lt;
|
|
17532
|
+
return lt_1;
|
|
17533
|
+
}
|
|
17534
|
+
|
|
17535
|
+
var eq_1;
|
|
17536
|
+
var hasRequiredEq;
|
|
17537
|
+
|
|
17538
|
+
function requireEq () {
|
|
17539
|
+
if (hasRequiredEq) return eq_1;
|
|
17540
|
+
hasRequiredEq = 1;
|
|
17541
|
+
const compare = requireCompare();
|
|
17542
|
+
const eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
17543
|
+
eq_1 = eq;
|
|
17544
|
+
return eq_1;
|
|
17545
|
+
}
|
|
17546
|
+
|
|
17547
|
+
var neq_1;
|
|
17548
|
+
var hasRequiredNeq;
|
|
17549
|
+
|
|
17550
|
+
function requireNeq () {
|
|
17551
|
+
if (hasRequiredNeq) return neq_1;
|
|
17552
|
+
hasRequiredNeq = 1;
|
|
17553
|
+
const compare = requireCompare();
|
|
17554
|
+
const neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
17555
|
+
neq_1 = neq;
|
|
17556
|
+
return neq_1;
|
|
17557
|
+
}
|
|
17558
|
+
|
|
17559
|
+
var gte_1;
|
|
17560
|
+
var hasRequiredGte;
|
|
17561
|
+
|
|
17562
|
+
function requireGte () {
|
|
17563
|
+
if (hasRequiredGte) return gte_1;
|
|
17564
|
+
hasRequiredGte = 1;
|
|
17565
|
+
const compare = requireCompare();
|
|
17566
|
+
const gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
17567
|
+
gte_1 = gte;
|
|
17568
|
+
return gte_1;
|
|
17569
|
+
}
|
|
17570
|
+
|
|
17571
|
+
var lte_1;
|
|
17572
|
+
var hasRequiredLte;
|
|
17573
|
+
|
|
17574
|
+
function requireLte () {
|
|
17575
|
+
if (hasRequiredLte) return lte_1;
|
|
17576
|
+
hasRequiredLte = 1;
|
|
17577
|
+
const compare = requireCompare();
|
|
17578
|
+
const lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
17579
|
+
lte_1 = lte;
|
|
17580
|
+
return lte_1;
|
|
17581
|
+
}
|
|
17582
|
+
|
|
17583
|
+
var cmp_1;
|
|
17584
|
+
var hasRequiredCmp;
|
|
17585
|
+
|
|
17586
|
+
function requireCmp () {
|
|
17587
|
+
if (hasRequiredCmp) return cmp_1;
|
|
17588
|
+
hasRequiredCmp = 1;
|
|
17589
|
+
const eq = requireEq();
|
|
17590
|
+
const neq = requireNeq();
|
|
17591
|
+
const gt = requireGt();
|
|
17592
|
+
const gte = requireGte();
|
|
17593
|
+
const lt = requireLt();
|
|
17594
|
+
const lte = requireLte();
|
|
17595
|
+
|
|
17596
|
+
const cmp = (a, op, b, loose) => {
|
|
17597
|
+
switch (op) {
|
|
17598
|
+
case '===':
|
|
17599
|
+
if (typeof a === 'object') {
|
|
17600
|
+
a = a.version;
|
|
17601
|
+
}
|
|
17602
|
+
if (typeof b === 'object') {
|
|
17603
|
+
b = b.version;
|
|
17604
|
+
}
|
|
17605
|
+
return a === b
|
|
17606
|
+
|
|
17607
|
+
case '!==':
|
|
17608
|
+
if (typeof a === 'object') {
|
|
17609
|
+
a = a.version;
|
|
17610
|
+
}
|
|
17611
|
+
if (typeof b === 'object') {
|
|
17612
|
+
b = b.version;
|
|
17613
|
+
}
|
|
17614
|
+
return a !== b
|
|
17615
|
+
|
|
17616
|
+
case '':
|
|
17617
|
+
case '=':
|
|
17618
|
+
case '==':
|
|
17619
|
+
return eq(a, b, loose)
|
|
17620
|
+
|
|
17621
|
+
case '!=':
|
|
17622
|
+
return neq(a, b, loose)
|
|
17623
|
+
|
|
17624
|
+
case '>':
|
|
17625
|
+
return gt(a, b, loose)
|
|
17626
|
+
|
|
17627
|
+
case '>=':
|
|
17628
|
+
return gte(a, b, loose)
|
|
17629
|
+
|
|
17630
|
+
case '<':
|
|
17631
|
+
return lt(a, b, loose)
|
|
17632
|
+
|
|
17633
|
+
case '<=':
|
|
17634
|
+
return lte(a, b, loose)
|
|
17635
|
+
|
|
17636
|
+
default:
|
|
17637
|
+
throw new TypeError(`Invalid operator: ${op}`)
|
|
17638
|
+
}
|
|
17639
|
+
};
|
|
17640
|
+
cmp_1 = cmp;
|
|
17641
|
+
return cmp_1;
|
|
17642
|
+
}
|
|
17643
|
+
|
|
17644
|
+
var coerce_1;
|
|
17645
|
+
var hasRequiredCoerce;
|
|
17646
|
+
|
|
17647
|
+
function requireCoerce () {
|
|
17648
|
+
if (hasRequiredCoerce) return coerce_1;
|
|
17649
|
+
hasRequiredCoerce = 1;
|
|
17650
|
+
const SemVer = requireSemver$1();
|
|
17651
|
+
const parse = requireParse();
|
|
17652
|
+
const { safeRe: re, t } = requireRe();
|
|
17653
|
+
|
|
17654
|
+
const coerce = (version, options) => {
|
|
17655
|
+
if (version instanceof SemVer) {
|
|
17656
|
+
return version
|
|
17657
|
+
}
|
|
17658
|
+
|
|
17659
|
+
if (typeof version === 'number') {
|
|
17660
|
+
version = String(version);
|
|
17661
|
+
}
|
|
17662
|
+
|
|
17663
|
+
if (typeof version !== 'string') {
|
|
17664
|
+
return null
|
|
17665
|
+
}
|
|
17666
|
+
|
|
17667
|
+
options = options || {};
|
|
17668
|
+
|
|
17669
|
+
let match = null;
|
|
17670
|
+
if (!options.rtl) {
|
|
17671
|
+
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
17672
|
+
} else {
|
|
17673
|
+
// Find the right-most coercible string that does not share
|
|
17674
|
+
// a terminus with a more left-ward coercible string.
|
|
17675
|
+
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
|
17676
|
+
// With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
|
|
17677
|
+
//
|
|
17678
|
+
// Walk through the string checking with a /g regexp
|
|
17679
|
+
// Manually set the index so as to pick up overlapping matches.
|
|
17680
|
+
// Stop when we get a match that ends at the string end, since no
|
|
17681
|
+
// coercible string can be more right-ward without the same terminus.
|
|
17682
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
17683
|
+
let next;
|
|
17684
|
+
while ((next = coerceRtlRegex.exec(version)) &&
|
|
17685
|
+
(!match || match.index + match[0].length !== version.length)
|
|
17686
|
+
) {
|
|
17687
|
+
if (!match ||
|
|
17688
|
+
next.index + next[0].length !== match.index + match[0].length) {
|
|
17689
|
+
match = next;
|
|
17690
|
+
}
|
|
17691
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
17692
|
+
}
|
|
17693
|
+
// leave it in a clean state
|
|
17694
|
+
coerceRtlRegex.lastIndex = -1;
|
|
17695
|
+
}
|
|
17696
|
+
|
|
17697
|
+
if (match === null) {
|
|
17698
|
+
return null
|
|
17699
|
+
}
|
|
17700
|
+
|
|
17701
|
+
const major = match[2];
|
|
17702
|
+
const minor = match[3] || '0';
|
|
17703
|
+
const patch = match[4] || '0';
|
|
17704
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '';
|
|
17705
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : '';
|
|
17706
|
+
|
|
17707
|
+
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
|
|
17708
|
+
};
|
|
17709
|
+
coerce_1 = coerce;
|
|
17710
|
+
return coerce_1;
|
|
17711
|
+
}
|
|
17483
17712
|
|
|
17484
17713
|
var lrucache;
|
|
17485
17714
|
var hasRequiredLrucache;
|
|
@@ -17753,18 +17982,18 @@ function requireRange () {
|
|
|
17753
17982
|
const LRU = requireLrucache();
|
|
17754
17983
|
const cache = new LRU();
|
|
17755
17984
|
|
|
17756
|
-
const parseOptions =
|
|
17985
|
+
const parseOptions = requireParseOptions();
|
|
17757
17986
|
const Comparator = requireComparator();
|
|
17758
|
-
const debug =
|
|
17759
|
-
const SemVer =
|
|
17987
|
+
const debug = requireDebug();
|
|
17988
|
+
const SemVer = requireSemver$1();
|
|
17760
17989
|
const {
|
|
17761
17990
|
safeRe: re,
|
|
17762
17991
|
t,
|
|
17763
17992
|
comparatorTrimReplace,
|
|
17764
17993
|
tildeTrimReplace,
|
|
17765
17994
|
caretTrimReplace,
|
|
17766
|
-
} =
|
|
17767
|
-
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } =
|
|
17995
|
+
} = requireRe();
|
|
17996
|
+
const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = requireConstants();
|
|
17768
17997
|
|
|
17769
17998
|
const isNullSet = c => c.value === '<0.0.0-0';
|
|
17770
17999
|
const isAny = c => c.value === '';
|
|
@@ -18234,653 +18463,758 @@ function requireComparator () {
|
|
|
18234
18463
|
|
|
18235
18464
|
comparator = Comparator;
|
|
18236
18465
|
|
|
18237
|
-
const parseOptions =
|
|
18238
|
-
const { safeRe: re, t } =
|
|
18239
|
-
const cmp =
|
|
18240
|
-
const debug =
|
|
18241
|
-
const SemVer =
|
|
18466
|
+
const parseOptions = requireParseOptions();
|
|
18467
|
+
const { safeRe: re, t } = requireRe();
|
|
18468
|
+
const cmp = requireCmp();
|
|
18469
|
+
const debug = requireDebug();
|
|
18470
|
+
const SemVer = requireSemver$1();
|
|
18242
18471
|
const Range = requireRange();
|
|
18243
18472
|
return comparator;
|
|
18244
18473
|
}
|
|
18245
18474
|
|
|
18246
|
-
|
|
18247
|
-
|
|
18248
|
-
try {
|
|
18249
|
-
range = new Range$9(range, options);
|
|
18250
|
-
} catch (er) {
|
|
18251
|
-
return false
|
|
18252
|
-
}
|
|
18253
|
-
return range.test(version)
|
|
18254
|
-
};
|
|
18255
|
-
var satisfies_1 = satisfies$4;
|
|
18256
|
-
|
|
18257
|
-
const Range$8 = requireRange();
|
|
18258
|
-
|
|
18259
|
-
// Mostly just for testing and legacy API reasons
|
|
18260
|
-
const toComparators$1 = (range, options) =>
|
|
18261
|
-
new Range$8(range, options).set
|
|
18262
|
-
.map(comp => comp.map(c => c.value).join(' ').trim().split(' '));
|
|
18263
|
-
|
|
18264
|
-
var toComparators_1 = toComparators$1;
|
|
18265
|
-
|
|
18266
|
-
const SemVer$4 = semver$2;
|
|
18267
|
-
const Range$7 = requireRange();
|
|
18268
|
-
|
|
18269
|
-
const maxSatisfying$1 = (versions, range, options) => {
|
|
18270
|
-
let max = null;
|
|
18271
|
-
let maxSV = null;
|
|
18272
|
-
let rangeObj = null;
|
|
18273
|
-
try {
|
|
18274
|
-
rangeObj = new Range$7(range, options);
|
|
18275
|
-
} catch (er) {
|
|
18276
|
-
return null
|
|
18277
|
-
}
|
|
18278
|
-
versions.forEach((v) => {
|
|
18279
|
-
if (rangeObj.test(v)) {
|
|
18280
|
-
// satisfies(v, range, options)
|
|
18281
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
18282
|
-
// compare(max, v, true)
|
|
18283
|
-
max = v;
|
|
18284
|
-
maxSV = new SemVer$4(max, options);
|
|
18285
|
-
}
|
|
18286
|
-
}
|
|
18287
|
-
});
|
|
18288
|
-
return max
|
|
18289
|
-
};
|
|
18290
|
-
var maxSatisfying_1 = maxSatisfying$1;
|
|
18291
|
-
|
|
18292
|
-
const SemVer$3 = semver$2;
|
|
18293
|
-
const Range$6 = requireRange();
|
|
18294
|
-
const minSatisfying$1 = (versions, range, options) => {
|
|
18295
|
-
let min = null;
|
|
18296
|
-
let minSV = null;
|
|
18297
|
-
let rangeObj = null;
|
|
18298
|
-
try {
|
|
18299
|
-
rangeObj = new Range$6(range, options);
|
|
18300
|
-
} catch (er) {
|
|
18301
|
-
return null
|
|
18302
|
-
}
|
|
18303
|
-
versions.forEach((v) => {
|
|
18304
|
-
if (rangeObj.test(v)) {
|
|
18305
|
-
// satisfies(v, range, options)
|
|
18306
|
-
if (!min || minSV.compare(v) === 1) {
|
|
18307
|
-
// compare(min, v, true)
|
|
18308
|
-
min = v;
|
|
18309
|
-
minSV = new SemVer$3(min, options);
|
|
18310
|
-
}
|
|
18311
|
-
}
|
|
18312
|
-
});
|
|
18313
|
-
return min
|
|
18314
|
-
};
|
|
18315
|
-
var minSatisfying_1 = minSatisfying$1;
|
|
18316
|
-
|
|
18317
|
-
const SemVer$2 = semver$2;
|
|
18318
|
-
const Range$5 = requireRange();
|
|
18319
|
-
const gt$2 = gt_1;
|
|
18320
|
-
|
|
18321
|
-
const minVersion$1 = (range, loose) => {
|
|
18322
|
-
range = new Range$5(range, loose);
|
|
18323
|
-
|
|
18324
|
-
let minver = new SemVer$2('0.0.0');
|
|
18325
|
-
if (range.test(minver)) {
|
|
18326
|
-
return minver
|
|
18327
|
-
}
|
|
18328
|
-
|
|
18329
|
-
minver = new SemVer$2('0.0.0-0');
|
|
18330
|
-
if (range.test(minver)) {
|
|
18331
|
-
return minver
|
|
18332
|
-
}
|
|
18333
|
-
|
|
18334
|
-
minver = null;
|
|
18335
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
18336
|
-
const comparators = range.set[i];
|
|
18337
|
-
|
|
18338
|
-
let setMin = null;
|
|
18339
|
-
comparators.forEach((comparator) => {
|
|
18340
|
-
// Clone to avoid manipulating the comparator's semver object.
|
|
18341
|
-
const compver = new SemVer$2(comparator.semver.version);
|
|
18342
|
-
switch (comparator.operator) {
|
|
18343
|
-
case '>':
|
|
18344
|
-
if (compver.prerelease.length === 0) {
|
|
18345
|
-
compver.patch++;
|
|
18346
|
-
} else {
|
|
18347
|
-
compver.prerelease.push(0);
|
|
18348
|
-
}
|
|
18349
|
-
compver.raw = compver.format();
|
|
18350
|
-
/* fallthrough */
|
|
18351
|
-
case '':
|
|
18352
|
-
case '>=':
|
|
18353
|
-
if (!setMin || gt$2(compver, setMin)) {
|
|
18354
|
-
setMin = compver;
|
|
18355
|
-
}
|
|
18356
|
-
break
|
|
18357
|
-
case '<':
|
|
18358
|
-
case '<=':
|
|
18359
|
-
/* Ignore maximum versions */
|
|
18360
|
-
break
|
|
18361
|
-
/* istanbul ignore next */
|
|
18362
|
-
default:
|
|
18363
|
-
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
|
18364
|
-
}
|
|
18365
|
-
});
|
|
18366
|
-
if (setMin && (!minver || gt$2(minver, setMin))) {
|
|
18367
|
-
minver = setMin;
|
|
18368
|
-
}
|
|
18369
|
-
}
|
|
18475
|
+
var satisfies_1;
|
|
18476
|
+
var hasRequiredSatisfies;
|
|
18370
18477
|
|
|
18371
|
-
|
|
18372
|
-
|
|
18373
|
-
|
|
18478
|
+
function requireSatisfies () {
|
|
18479
|
+
if (hasRequiredSatisfies) return satisfies_1;
|
|
18480
|
+
hasRequiredSatisfies = 1;
|
|
18481
|
+
const Range = requireRange();
|
|
18482
|
+
const satisfies = (version, range, options) => {
|
|
18483
|
+
try {
|
|
18484
|
+
range = new Range(range, options);
|
|
18485
|
+
} catch (er) {
|
|
18486
|
+
return false
|
|
18487
|
+
}
|
|
18488
|
+
return range.test(version)
|
|
18489
|
+
};
|
|
18490
|
+
satisfies_1 = satisfies;
|
|
18491
|
+
return satisfies_1;
|
|
18492
|
+
}
|
|
18374
18493
|
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
var minVersion_1 = minVersion$1;
|
|
18378
|
-
|
|
18379
|
-
const Range$4 = requireRange();
|
|
18380
|
-
const validRange$1 = (range, options) => {
|
|
18381
|
-
try {
|
|
18382
|
-
// Return '*' instead of '' so that truthiness works.
|
|
18383
|
-
// This will throw if it's invalid anyway
|
|
18384
|
-
return new Range$4(range, options).range || '*'
|
|
18385
|
-
} catch (er) {
|
|
18386
|
-
return null
|
|
18387
|
-
}
|
|
18388
|
-
};
|
|
18389
|
-
var valid$1 = validRange$1;
|
|
18390
|
-
|
|
18391
|
-
const SemVer$1 = semver$2;
|
|
18392
|
-
const Comparator$2 = requireComparator();
|
|
18393
|
-
const { ANY: ANY$1 } = Comparator$2;
|
|
18394
|
-
const Range$3 = requireRange();
|
|
18395
|
-
const satisfies$3 = satisfies_1;
|
|
18396
|
-
const gt$1 = gt_1;
|
|
18397
|
-
const lt$1 = lt_1;
|
|
18398
|
-
const lte$1 = lte_1;
|
|
18399
|
-
const gte$1 = gte_1;
|
|
18400
|
-
|
|
18401
|
-
const outside$3 = (version, range, hilo, options) => {
|
|
18402
|
-
version = new SemVer$1(version, options);
|
|
18403
|
-
range = new Range$3(range, options);
|
|
18404
|
-
|
|
18405
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
18406
|
-
switch (hilo) {
|
|
18407
|
-
case '>':
|
|
18408
|
-
gtfn = gt$1;
|
|
18409
|
-
ltefn = lte$1;
|
|
18410
|
-
ltfn = lt$1;
|
|
18411
|
-
comp = '>';
|
|
18412
|
-
ecomp = '>=';
|
|
18413
|
-
break
|
|
18414
|
-
case '<':
|
|
18415
|
-
gtfn = lt$1;
|
|
18416
|
-
ltefn = gte$1;
|
|
18417
|
-
ltfn = gt$1;
|
|
18418
|
-
comp = '<';
|
|
18419
|
-
ecomp = '<=';
|
|
18420
|
-
break
|
|
18421
|
-
default:
|
|
18422
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
|
18423
|
-
}
|
|
18424
|
-
|
|
18425
|
-
// If it satisfies the range it is not outside
|
|
18426
|
-
if (satisfies$3(version, range, options)) {
|
|
18427
|
-
return false
|
|
18428
|
-
}
|
|
18429
|
-
|
|
18430
|
-
// From now on, variable terms are as if we're in "gtr" mode.
|
|
18431
|
-
// but note that everything is flipped for the "ltr" function.
|
|
18432
|
-
|
|
18433
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
18434
|
-
const comparators = range.set[i];
|
|
18435
|
-
|
|
18436
|
-
let high = null;
|
|
18437
|
-
let low = null;
|
|
18438
|
-
|
|
18439
|
-
comparators.forEach((comparator) => {
|
|
18440
|
-
if (comparator.semver === ANY$1) {
|
|
18441
|
-
comparator = new Comparator$2('>=0.0.0');
|
|
18442
|
-
}
|
|
18443
|
-
high = high || comparator;
|
|
18444
|
-
low = low || comparator;
|
|
18445
|
-
if (gtfn(comparator.semver, high.semver, options)) {
|
|
18446
|
-
high = comparator;
|
|
18447
|
-
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
18448
|
-
low = comparator;
|
|
18449
|
-
}
|
|
18450
|
-
});
|
|
18494
|
+
var toComparators_1;
|
|
18495
|
+
var hasRequiredToComparators;
|
|
18451
18496
|
|
|
18452
|
-
|
|
18453
|
-
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
}
|
|
18497
|
+
function requireToComparators () {
|
|
18498
|
+
if (hasRequiredToComparators) return toComparators_1;
|
|
18499
|
+
hasRequiredToComparators = 1;
|
|
18500
|
+
const Range = requireRange();
|
|
18457
18501
|
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
return false
|
|
18463
|
-
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
18464
|
-
return false
|
|
18465
|
-
}
|
|
18466
|
-
}
|
|
18467
|
-
return true
|
|
18468
|
-
};
|
|
18502
|
+
// Mostly just for testing and legacy API reasons
|
|
18503
|
+
const toComparators = (range, options) =>
|
|
18504
|
+
new Range(range, options).set
|
|
18505
|
+
.map(comp => comp.map(c => c.value).join(' ').trim().split(' '));
|
|
18469
18506
|
|
|
18470
|
-
|
|
18507
|
+
toComparators_1 = toComparators;
|
|
18508
|
+
return toComparators_1;
|
|
18509
|
+
}
|
|
18471
18510
|
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
const gtr$1 = (version, range, options) => outside$2(version, range, '>', options);
|
|
18475
|
-
var gtr_1 = gtr$1;
|
|
18511
|
+
var maxSatisfying_1;
|
|
18512
|
+
var hasRequiredMaxSatisfying;
|
|
18476
18513
|
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18514
|
+
function requireMaxSatisfying () {
|
|
18515
|
+
if (hasRequiredMaxSatisfying) return maxSatisfying_1;
|
|
18516
|
+
hasRequiredMaxSatisfying = 1;
|
|
18517
|
+
const SemVer = requireSemver$1();
|
|
18518
|
+
const Range = requireRange();
|
|
18481
18519
|
|
|
18482
|
-
const
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
18491
|
-
|
|
18492
|
-
|
|
18493
|
-
|
|
18494
|
-
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
}
|
|
18507
|
-
} else {
|
|
18508
|
-
if (prev) {
|
|
18509
|
-
set.push([first, prev]);
|
|
18510
|
-
}
|
|
18511
|
-
prev = null;
|
|
18512
|
-
first = null;
|
|
18513
|
-
}
|
|
18514
|
-
}
|
|
18515
|
-
if (first) {
|
|
18516
|
-
set.push([first, null]);
|
|
18517
|
-
}
|
|
18518
|
-
|
|
18519
|
-
const ranges = [];
|
|
18520
|
-
for (const [min, max] of set) {
|
|
18521
|
-
if (min === max) {
|
|
18522
|
-
ranges.push(min);
|
|
18523
|
-
} else if (!max && min === v[0]) {
|
|
18524
|
-
ranges.push('*');
|
|
18525
|
-
} else if (!max) {
|
|
18526
|
-
ranges.push(`>=${min}`);
|
|
18527
|
-
} else if (min === v[0]) {
|
|
18528
|
-
ranges.push(`<=${max}`);
|
|
18529
|
-
} else {
|
|
18530
|
-
ranges.push(`${min} - ${max}`);
|
|
18531
|
-
}
|
|
18532
|
-
}
|
|
18533
|
-
const simplified = ranges.join(' || ');
|
|
18534
|
-
const original = typeof range.raw === 'string' ? range.raw : String(range);
|
|
18535
|
-
return simplified.length < original.length ? simplified : range
|
|
18536
|
-
};
|
|
18520
|
+
const maxSatisfying = (versions, range, options) => {
|
|
18521
|
+
let max = null;
|
|
18522
|
+
let maxSV = null;
|
|
18523
|
+
let rangeObj = null;
|
|
18524
|
+
try {
|
|
18525
|
+
rangeObj = new Range(range, options);
|
|
18526
|
+
} catch (er) {
|
|
18527
|
+
return null
|
|
18528
|
+
}
|
|
18529
|
+
versions.forEach((v) => {
|
|
18530
|
+
if (rangeObj.test(v)) {
|
|
18531
|
+
// satisfies(v, range, options)
|
|
18532
|
+
if (!max || maxSV.compare(v) === -1) {
|
|
18533
|
+
// compare(max, v, true)
|
|
18534
|
+
max = v;
|
|
18535
|
+
maxSV = new SemVer(max, options);
|
|
18536
|
+
}
|
|
18537
|
+
}
|
|
18538
|
+
});
|
|
18539
|
+
return max
|
|
18540
|
+
};
|
|
18541
|
+
maxSatisfying_1 = maxSatisfying;
|
|
18542
|
+
return maxSatisfying_1;
|
|
18543
|
+
}
|
|
18537
18544
|
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
const { ANY } = Comparator$1;
|
|
18541
|
-
const satisfies$1 = satisfies_1;
|
|
18542
|
-
const compare$1 = compare_1;
|
|
18543
|
-
|
|
18544
|
-
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
|
18545
|
-
// - Every simple range `r1, r2, ...` is a null set, OR
|
|
18546
|
-
// - Every simple range `r1, r2, ...` which is not a null set is a subset of
|
|
18547
|
-
// some `R1, R2, ...`
|
|
18548
|
-
//
|
|
18549
|
-
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
|
18550
|
-
// - If c is only the ANY comparator
|
|
18551
|
-
// - If C is only the ANY comparator, return true
|
|
18552
|
-
// - Else if in prerelease mode, return false
|
|
18553
|
-
// - else replace c with `[>=0.0.0]`
|
|
18554
|
-
// - If C is only the ANY comparator
|
|
18555
|
-
// - if in prerelease mode, return true
|
|
18556
|
-
// - else replace C with `[>=0.0.0]`
|
|
18557
|
-
// - Let EQ be the set of = comparators in c
|
|
18558
|
-
// - If EQ is more than one, return true (null set)
|
|
18559
|
-
// - Let GT be the highest > or >= comparator in c
|
|
18560
|
-
// - Let LT be the lowest < or <= comparator in c
|
|
18561
|
-
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
|
18562
|
-
// - If any C is a = range, and GT or LT are set, return false
|
|
18563
|
-
// - If EQ
|
|
18564
|
-
// - If GT, and EQ does not satisfy GT, return true (null set)
|
|
18565
|
-
// - If LT, and EQ does not satisfy LT, return true (null set)
|
|
18566
|
-
// - If EQ satisfies every C, return true
|
|
18567
|
-
// - Else return false
|
|
18568
|
-
// - If GT
|
|
18569
|
-
// - If GT.semver is lower than any > or >= comp in C, return false
|
|
18570
|
-
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
|
18571
|
-
// - If GT.semver has a prerelease, and not in prerelease mode
|
|
18572
|
-
// - If no C has a prerelease and the GT.semver tuple, return false
|
|
18573
|
-
// - If LT
|
|
18574
|
-
// - If LT.semver is greater than any < or <= comp in C, return false
|
|
18575
|
-
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
|
18576
|
-
// - If GT.semver has a prerelease, and not in prerelease mode
|
|
18577
|
-
// - If no C has a prerelease and the LT.semver tuple, return false
|
|
18578
|
-
// - Else return true
|
|
18579
|
-
|
|
18580
|
-
const subset$1 = (sub, dom, options = {}) => {
|
|
18581
|
-
if (sub === dom) {
|
|
18582
|
-
return true
|
|
18583
|
-
}
|
|
18584
|
-
|
|
18585
|
-
sub = new Range$1(sub, options);
|
|
18586
|
-
dom = new Range$1(dom, options);
|
|
18587
|
-
let sawNonNull = false;
|
|
18588
|
-
|
|
18589
|
-
OUTER: for (const simpleSub of sub.set) {
|
|
18590
|
-
for (const simpleDom of dom.set) {
|
|
18591
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
18592
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
18593
|
-
if (isSub) {
|
|
18594
|
-
continue OUTER
|
|
18595
|
-
}
|
|
18596
|
-
}
|
|
18597
|
-
// the null set is a subset of everything, but null simple ranges in
|
|
18598
|
-
// a complex range should be ignored. so if we saw a non-null range,
|
|
18599
|
-
// then we know this isn't a subset, but if EVERY simple range was null,
|
|
18600
|
-
// then it is a subset.
|
|
18601
|
-
if (sawNonNull) {
|
|
18602
|
-
return false
|
|
18603
|
-
}
|
|
18604
|
-
}
|
|
18605
|
-
return true
|
|
18606
|
-
};
|
|
18545
|
+
var minSatisfying_1;
|
|
18546
|
+
var hasRequiredMinSatisfying;
|
|
18607
18547
|
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
const
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
if (c.operator === '>' || c.operator === '>=') {
|
|
18638
|
-
gt = higherGT(gt, c, options);
|
|
18639
|
-
} else if (c.operator === '<' || c.operator === '<=') {
|
|
18640
|
-
lt = lowerLT(lt, c, options);
|
|
18641
|
-
} else {
|
|
18642
|
-
eqSet.add(c.semver);
|
|
18643
|
-
}
|
|
18644
|
-
}
|
|
18645
|
-
|
|
18646
|
-
if (eqSet.size > 1) {
|
|
18647
|
-
return null
|
|
18648
|
-
}
|
|
18649
|
-
|
|
18650
|
-
let gtltComp;
|
|
18651
|
-
if (gt && lt) {
|
|
18652
|
-
gtltComp = compare$1(gt.semver, lt.semver, options);
|
|
18653
|
-
if (gtltComp > 0) {
|
|
18654
|
-
return null
|
|
18655
|
-
} else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
|
|
18656
|
-
return null
|
|
18657
|
-
}
|
|
18658
|
-
}
|
|
18659
|
-
|
|
18660
|
-
// will iterate one or zero times
|
|
18661
|
-
for (const eq of eqSet) {
|
|
18662
|
-
if (gt && !satisfies$1(eq, String(gt), options)) {
|
|
18663
|
-
return null
|
|
18664
|
-
}
|
|
18665
|
-
|
|
18666
|
-
if (lt && !satisfies$1(eq, String(lt), options)) {
|
|
18667
|
-
return null
|
|
18668
|
-
}
|
|
18669
|
-
|
|
18670
|
-
for (const c of dom) {
|
|
18671
|
-
if (!satisfies$1(eq, String(c), options)) {
|
|
18672
|
-
return false
|
|
18673
|
-
}
|
|
18674
|
-
}
|
|
18675
|
-
|
|
18676
|
-
return true
|
|
18677
|
-
}
|
|
18678
|
-
|
|
18679
|
-
let higher, lower;
|
|
18680
|
-
let hasDomLT, hasDomGT;
|
|
18681
|
-
// if the subset has a prerelease, we need a comparator in the superset
|
|
18682
|
-
// with the same tuple and a prerelease, or it's not a subset
|
|
18683
|
-
let needDomLTPre = lt &&
|
|
18684
|
-
!options.includePrerelease &&
|
|
18685
|
-
lt.semver.prerelease.length ? lt.semver : false;
|
|
18686
|
-
let needDomGTPre = gt &&
|
|
18687
|
-
!options.includePrerelease &&
|
|
18688
|
-
gt.semver.prerelease.length ? gt.semver : false;
|
|
18689
|
-
// exception: <1.2.3-0 is the same as <1.2.3
|
|
18690
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
|
18691
|
-
lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
|
|
18692
|
-
needDomLTPre = false;
|
|
18693
|
-
}
|
|
18694
|
-
|
|
18695
|
-
for (const c of dom) {
|
|
18696
|
-
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=';
|
|
18697
|
-
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=';
|
|
18698
|
-
if (gt) {
|
|
18699
|
-
if (needDomGTPre) {
|
|
18700
|
-
if (c.semver.prerelease && c.semver.prerelease.length &&
|
|
18701
|
-
c.semver.major === needDomGTPre.major &&
|
|
18702
|
-
c.semver.minor === needDomGTPre.minor &&
|
|
18703
|
-
c.semver.patch === needDomGTPre.patch) {
|
|
18704
|
-
needDomGTPre = false;
|
|
18705
|
-
}
|
|
18706
|
-
}
|
|
18707
|
-
if (c.operator === '>' || c.operator === '>=') {
|
|
18708
|
-
higher = higherGT(gt, c, options);
|
|
18709
|
-
if (higher === c && higher !== gt) {
|
|
18710
|
-
return false
|
|
18711
|
-
}
|
|
18712
|
-
} else if (gt.operator === '>=' && !satisfies$1(gt.semver, String(c), options)) {
|
|
18713
|
-
return false
|
|
18714
|
-
}
|
|
18715
|
-
}
|
|
18716
|
-
if (lt) {
|
|
18717
|
-
if (needDomLTPre) {
|
|
18718
|
-
if (c.semver.prerelease && c.semver.prerelease.length &&
|
|
18719
|
-
c.semver.major === needDomLTPre.major &&
|
|
18720
|
-
c.semver.minor === needDomLTPre.minor &&
|
|
18721
|
-
c.semver.patch === needDomLTPre.patch) {
|
|
18722
|
-
needDomLTPre = false;
|
|
18723
|
-
}
|
|
18724
|
-
}
|
|
18725
|
-
if (c.operator === '<' || c.operator === '<=') {
|
|
18726
|
-
lower = lowerLT(lt, c, options);
|
|
18727
|
-
if (lower === c && lower !== lt) {
|
|
18728
|
-
return false
|
|
18729
|
-
}
|
|
18730
|
-
} else if (lt.operator === '<=' && !satisfies$1(lt.semver, String(c), options)) {
|
|
18731
|
-
return false
|
|
18732
|
-
}
|
|
18733
|
-
}
|
|
18734
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
18735
|
-
return false
|
|
18736
|
-
}
|
|
18737
|
-
}
|
|
18738
|
-
|
|
18739
|
-
// if there was a < or >, and nothing in the dom, then must be false
|
|
18740
|
-
// UNLESS it was limited by another range in the other direction.
|
|
18741
|
-
// Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
|
|
18742
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
18743
|
-
return false
|
|
18744
|
-
}
|
|
18745
|
-
|
|
18746
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
18747
|
-
return false
|
|
18748
|
-
}
|
|
18749
|
-
|
|
18750
|
-
// we needed a prerelease range in a specific tuple, but didn't get one
|
|
18751
|
-
// then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
|
|
18752
|
-
// because it includes prereleases in the 1.2.3 tuple
|
|
18753
|
-
if (needDomGTPre || needDomLTPre) {
|
|
18754
|
-
return false
|
|
18755
|
-
}
|
|
18756
|
-
|
|
18757
|
-
return true
|
|
18758
|
-
};
|
|
18548
|
+
function requireMinSatisfying () {
|
|
18549
|
+
if (hasRequiredMinSatisfying) return minSatisfying_1;
|
|
18550
|
+
hasRequiredMinSatisfying = 1;
|
|
18551
|
+
const SemVer = requireSemver$1();
|
|
18552
|
+
const Range = requireRange();
|
|
18553
|
+
const minSatisfying = (versions, range, options) => {
|
|
18554
|
+
let min = null;
|
|
18555
|
+
let minSV = null;
|
|
18556
|
+
let rangeObj = null;
|
|
18557
|
+
try {
|
|
18558
|
+
rangeObj = new Range(range, options);
|
|
18559
|
+
} catch (er) {
|
|
18560
|
+
return null
|
|
18561
|
+
}
|
|
18562
|
+
versions.forEach((v) => {
|
|
18563
|
+
if (rangeObj.test(v)) {
|
|
18564
|
+
// satisfies(v, range, options)
|
|
18565
|
+
if (!min || minSV.compare(v) === 1) {
|
|
18566
|
+
// compare(min, v, true)
|
|
18567
|
+
min = v;
|
|
18568
|
+
minSV = new SemVer(min, options);
|
|
18569
|
+
}
|
|
18570
|
+
}
|
|
18571
|
+
});
|
|
18572
|
+
return min
|
|
18573
|
+
};
|
|
18574
|
+
minSatisfying_1 = minSatisfying;
|
|
18575
|
+
return minSatisfying_1;
|
|
18576
|
+
}
|
|
18759
18577
|
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
if (!a) {
|
|
18763
|
-
return b
|
|
18764
|
-
}
|
|
18765
|
-
const comp = compare$1(a.semver, b.semver, options);
|
|
18766
|
-
return comp > 0 ? a
|
|
18767
|
-
: comp < 0 ? b
|
|
18768
|
-
: b.operator === '>' && a.operator === '>=' ? b
|
|
18769
|
-
: a
|
|
18770
|
-
};
|
|
18578
|
+
var minVersion_1;
|
|
18579
|
+
var hasRequiredMinVersion;
|
|
18771
18580
|
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
return comp < 0 ? a
|
|
18779
|
-
: comp > 0 ? b
|
|
18780
|
-
: b.operator === '<' && a.operator === '<=' ? b
|
|
18781
|
-
: a
|
|
18782
|
-
};
|
|
18581
|
+
function requireMinVersion () {
|
|
18582
|
+
if (hasRequiredMinVersion) return minVersion_1;
|
|
18583
|
+
hasRequiredMinVersion = 1;
|
|
18584
|
+
const SemVer = requireSemver$1();
|
|
18585
|
+
const Range = requireRange();
|
|
18586
|
+
const gt = requireGt();
|
|
18783
18587
|
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
const
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
const
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
|
|
18866
|
-
|
|
18867
|
-
|
|
18868
|
-
|
|
18869
|
-
|
|
18870
|
-
|
|
18871
|
-
|
|
18872
|
-
|
|
18873
|
-
|
|
18874
|
-
|
|
18588
|
+
const minVersion = (range, loose) => {
|
|
18589
|
+
range = new Range(range, loose);
|
|
18590
|
+
|
|
18591
|
+
let minver = new SemVer('0.0.0');
|
|
18592
|
+
if (range.test(minver)) {
|
|
18593
|
+
return minver
|
|
18594
|
+
}
|
|
18595
|
+
|
|
18596
|
+
minver = new SemVer('0.0.0-0');
|
|
18597
|
+
if (range.test(minver)) {
|
|
18598
|
+
return minver
|
|
18599
|
+
}
|
|
18600
|
+
|
|
18601
|
+
minver = null;
|
|
18602
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
18603
|
+
const comparators = range.set[i];
|
|
18604
|
+
|
|
18605
|
+
let setMin = null;
|
|
18606
|
+
comparators.forEach((comparator) => {
|
|
18607
|
+
// Clone to avoid manipulating the comparator's semver object.
|
|
18608
|
+
const compver = new SemVer(comparator.semver.version);
|
|
18609
|
+
switch (comparator.operator) {
|
|
18610
|
+
case '>':
|
|
18611
|
+
if (compver.prerelease.length === 0) {
|
|
18612
|
+
compver.patch++;
|
|
18613
|
+
} else {
|
|
18614
|
+
compver.prerelease.push(0);
|
|
18615
|
+
}
|
|
18616
|
+
compver.raw = compver.format();
|
|
18617
|
+
/* fallthrough */
|
|
18618
|
+
case '':
|
|
18619
|
+
case '>=':
|
|
18620
|
+
if (!setMin || gt(compver, setMin)) {
|
|
18621
|
+
setMin = compver;
|
|
18622
|
+
}
|
|
18623
|
+
break
|
|
18624
|
+
case '<':
|
|
18625
|
+
case '<=':
|
|
18626
|
+
/* Ignore maximum versions */
|
|
18627
|
+
break
|
|
18628
|
+
/* istanbul ignore next */
|
|
18629
|
+
default:
|
|
18630
|
+
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
|
18631
|
+
}
|
|
18632
|
+
});
|
|
18633
|
+
if (setMin && (!minver || gt(minver, setMin))) {
|
|
18634
|
+
minver = setMin;
|
|
18635
|
+
}
|
|
18636
|
+
}
|
|
18637
|
+
|
|
18638
|
+
if (minver && range.test(minver)) {
|
|
18639
|
+
return minver
|
|
18640
|
+
}
|
|
18641
|
+
|
|
18642
|
+
return null
|
|
18643
|
+
};
|
|
18644
|
+
minVersion_1 = minVersion;
|
|
18645
|
+
return minVersion_1;
|
|
18646
|
+
}
|
|
18647
|
+
|
|
18648
|
+
var valid;
|
|
18649
|
+
var hasRequiredValid;
|
|
18650
|
+
|
|
18651
|
+
function requireValid () {
|
|
18652
|
+
if (hasRequiredValid) return valid;
|
|
18653
|
+
hasRequiredValid = 1;
|
|
18654
|
+
const Range = requireRange();
|
|
18655
|
+
const validRange = (range, options) => {
|
|
18656
|
+
try {
|
|
18657
|
+
// Return '*' instead of '' so that truthiness works.
|
|
18658
|
+
// This will throw if it's invalid anyway
|
|
18659
|
+
return new Range(range, options).range || '*'
|
|
18660
|
+
} catch (er) {
|
|
18661
|
+
return null
|
|
18662
|
+
}
|
|
18663
|
+
};
|
|
18664
|
+
valid = validRange;
|
|
18665
|
+
return valid;
|
|
18666
|
+
}
|
|
18667
|
+
|
|
18668
|
+
var outside_1;
|
|
18669
|
+
var hasRequiredOutside;
|
|
18670
|
+
|
|
18671
|
+
function requireOutside () {
|
|
18672
|
+
if (hasRequiredOutside) return outside_1;
|
|
18673
|
+
hasRequiredOutside = 1;
|
|
18674
|
+
const SemVer = requireSemver$1();
|
|
18675
|
+
const Comparator = requireComparator();
|
|
18676
|
+
const { ANY } = Comparator;
|
|
18677
|
+
const Range = requireRange();
|
|
18678
|
+
const satisfies = requireSatisfies();
|
|
18679
|
+
const gt = requireGt();
|
|
18680
|
+
const lt = requireLt();
|
|
18681
|
+
const lte = requireLte();
|
|
18682
|
+
const gte = requireGte();
|
|
18683
|
+
|
|
18684
|
+
const outside = (version, range, hilo, options) => {
|
|
18685
|
+
version = new SemVer(version, options);
|
|
18686
|
+
range = new Range(range, options);
|
|
18687
|
+
|
|
18688
|
+
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
18689
|
+
switch (hilo) {
|
|
18690
|
+
case '>':
|
|
18691
|
+
gtfn = gt;
|
|
18692
|
+
ltefn = lte;
|
|
18693
|
+
ltfn = lt;
|
|
18694
|
+
comp = '>';
|
|
18695
|
+
ecomp = '>=';
|
|
18696
|
+
break
|
|
18697
|
+
case '<':
|
|
18698
|
+
gtfn = lt;
|
|
18699
|
+
ltefn = gte;
|
|
18700
|
+
ltfn = gt;
|
|
18701
|
+
comp = '<';
|
|
18702
|
+
ecomp = '<=';
|
|
18703
|
+
break
|
|
18704
|
+
default:
|
|
18705
|
+
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
|
18706
|
+
}
|
|
18707
|
+
|
|
18708
|
+
// If it satisfies the range it is not outside
|
|
18709
|
+
if (satisfies(version, range, options)) {
|
|
18710
|
+
return false
|
|
18711
|
+
}
|
|
18712
|
+
|
|
18713
|
+
// From now on, variable terms are as if we're in "gtr" mode.
|
|
18714
|
+
// but note that everything is flipped for the "ltr" function.
|
|
18715
|
+
|
|
18716
|
+
for (let i = 0; i < range.set.length; ++i) {
|
|
18717
|
+
const comparators = range.set[i];
|
|
18718
|
+
|
|
18719
|
+
let high = null;
|
|
18720
|
+
let low = null;
|
|
18721
|
+
|
|
18722
|
+
comparators.forEach((comparator) => {
|
|
18723
|
+
if (comparator.semver === ANY) {
|
|
18724
|
+
comparator = new Comparator('>=0.0.0');
|
|
18725
|
+
}
|
|
18726
|
+
high = high || comparator;
|
|
18727
|
+
low = low || comparator;
|
|
18728
|
+
if (gtfn(comparator.semver, high.semver, options)) {
|
|
18729
|
+
high = comparator;
|
|
18730
|
+
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
18731
|
+
low = comparator;
|
|
18732
|
+
}
|
|
18733
|
+
});
|
|
18734
|
+
|
|
18735
|
+
// If the edge version comparator has a operator then our version
|
|
18736
|
+
// isn't outside it
|
|
18737
|
+
if (high.operator === comp || high.operator === ecomp) {
|
|
18738
|
+
return false
|
|
18739
|
+
}
|
|
18740
|
+
|
|
18741
|
+
// If the lowest version comparator has an operator and our version
|
|
18742
|
+
// is less than it then it isn't higher than the range
|
|
18743
|
+
if ((!low.operator || low.operator === comp) &&
|
|
18744
|
+
ltefn(version, low.semver)) {
|
|
18745
|
+
return false
|
|
18746
|
+
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
18747
|
+
return false
|
|
18748
|
+
}
|
|
18749
|
+
}
|
|
18750
|
+
return true
|
|
18751
|
+
};
|
|
18752
|
+
|
|
18753
|
+
outside_1 = outside;
|
|
18754
|
+
return outside_1;
|
|
18755
|
+
}
|
|
18756
|
+
|
|
18757
|
+
var gtr_1;
|
|
18758
|
+
var hasRequiredGtr;
|
|
18759
|
+
|
|
18760
|
+
function requireGtr () {
|
|
18761
|
+
if (hasRequiredGtr) return gtr_1;
|
|
18762
|
+
hasRequiredGtr = 1;
|
|
18763
|
+
// Determine if version is greater than all the versions possible in the range.
|
|
18764
|
+
const outside = requireOutside();
|
|
18765
|
+
const gtr = (version, range, options) => outside(version, range, '>', options);
|
|
18766
|
+
gtr_1 = gtr;
|
|
18767
|
+
return gtr_1;
|
|
18768
|
+
}
|
|
18769
|
+
|
|
18770
|
+
var ltr_1;
|
|
18771
|
+
var hasRequiredLtr;
|
|
18772
|
+
|
|
18773
|
+
function requireLtr () {
|
|
18774
|
+
if (hasRequiredLtr) return ltr_1;
|
|
18775
|
+
hasRequiredLtr = 1;
|
|
18776
|
+
const outside = requireOutside();
|
|
18777
|
+
// Determine if version is less than all the versions possible in the range
|
|
18778
|
+
const ltr = (version, range, options) => outside(version, range, '<', options);
|
|
18779
|
+
ltr_1 = ltr;
|
|
18780
|
+
return ltr_1;
|
|
18781
|
+
}
|
|
18782
|
+
|
|
18783
|
+
var intersects_1;
|
|
18784
|
+
var hasRequiredIntersects;
|
|
18785
|
+
|
|
18786
|
+
function requireIntersects () {
|
|
18787
|
+
if (hasRequiredIntersects) return intersects_1;
|
|
18788
|
+
hasRequiredIntersects = 1;
|
|
18789
|
+
const Range = requireRange();
|
|
18790
|
+
const intersects = (r1, r2, options) => {
|
|
18791
|
+
r1 = new Range(r1, options);
|
|
18792
|
+
r2 = new Range(r2, options);
|
|
18793
|
+
return r1.intersects(r2, options)
|
|
18794
|
+
};
|
|
18795
|
+
intersects_1 = intersects;
|
|
18796
|
+
return intersects_1;
|
|
18797
|
+
}
|
|
18798
|
+
|
|
18799
|
+
var simplify;
|
|
18800
|
+
var hasRequiredSimplify;
|
|
18801
|
+
|
|
18802
|
+
function requireSimplify () {
|
|
18803
|
+
if (hasRequiredSimplify) return simplify;
|
|
18804
|
+
hasRequiredSimplify = 1;
|
|
18805
|
+
// given a set of versions and a range, create a "simplified" range
|
|
18806
|
+
// that includes the same versions that the original range does
|
|
18807
|
+
// If the original range is shorter than the simplified one, return that.
|
|
18808
|
+
const satisfies = requireSatisfies();
|
|
18809
|
+
const compare = requireCompare();
|
|
18810
|
+
simplify = (versions, range, options) => {
|
|
18811
|
+
const set = [];
|
|
18812
|
+
let first = null;
|
|
18813
|
+
let prev = null;
|
|
18814
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
18815
|
+
for (const version of v) {
|
|
18816
|
+
const included = satisfies(version, range, options);
|
|
18817
|
+
if (included) {
|
|
18818
|
+
prev = version;
|
|
18819
|
+
if (!first) {
|
|
18820
|
+
first = version;
|
|
18821
|
+
}
|
|
18822
|
+
} else {
|
|
18823
|
+
if (prev) {
|
|
18824
|
+
set.push([first, prev]);
|
|
18825
|
+
}
|
|
18826
|
+
prev = null;
|
|
18827
|
+
first = null;
|
|
18828
|
+
}
|
|
18829
|
+
}
|
|
18830
|
+
if (first) {
|
|
18831
|
+
set.push([first, null]);
|
|
18832
|
+
}
|
|
18833
|
+
|
|
18834
|
+
const ranges = [];
|
|
18835
|
+
for (const [min, max] of set) {
|
|
18836
|
+
if (min === max) {
|
|
18837
|
+
ranges.push(min);
|
|
18838
|
+
} else if (!max && min === v[0]) {
|
|
18839
|
+
ranges.push('*');
|
|
18840
|
+
} else if (!max) {
|
|
18841
|
+
ranges.push(`>=${min}`);
|
|
18842
|
+
} else if (min === v[0]) {
|
|
18843
|
+
ranges.push(`<=${max}`);
|
|
18844
|
+
} else {
|
|
18845
|
+
ranges.push(`${min} - ${max}`);
|
|
18846
|
+
}
|
|
18847
|
+
}
|
|
18848
|
+
const simplified = ranges.join(' || ');
|
|
18849
|
+
const original = typeof range.raw === 'string' ? range.raw : String(range);
|
|
18850
|
+
return simplified.length < original.length ? simplified : range
|
|
18851
|
+
};
|
|
18852
|
+
return simplify;
|
|
18853
|
+
}
|
|
18854
|
+
|
|
18855
|
+
var subset_1;
|
|
18856
|
+
var hasRequiredSubset;
|
|
18857
|
+
|
|
18858
|
+
function requireSubset () {
|
|
18859
|
+
if (hasRequiredSubset) return subset_1;
|
|
18860
|
+
hasRequiredSubset = 1;
|
|
18861
|
+
const Range = requireRange();
|
|
18862
|
+
const Comparator = requireComparator();
|
|
18863
|
+
const { ANY } = Comparator;
|
|
18864
|
+
const satisfies = requireSatisfies();
|
|
18865
|
+
const compare = requireCompare();
|
|
18866
|
+
|
|
18867
|
+
// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
|
|
18868
|
+
// - Every simple range `r1, r2, ...` is a null set, OR
|
|
18869
|
+
// - Every simple range `r1, r2, ...` which is not a null set is a subset of
|
|
18870
|
+
// some `R1, R2, ...`
|
|
18871
|
+
//
|
|
18872
|
+
// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
|
|
18873
|
+
// - If c is only the ANY comparator
|
|
18874
|
+
// - If C is only the ANY comparator, return true
|
|
18875
|
+
// - Else if in prerelease mode, return false
|
|
18876
|
+
// - else replace c with `[>=0.0.0]`
|
|
18877
|
+
// - If C is only the ANY comparator
|
|
18878
|
+
// - if in prerelease mode, return true
|
|
18879
|
+
// - else replace C with `[>=0.0.0]`
|
|
18880
|
+
// - Let EQ be the set of = comparators in c
|
|
18881
|
+
// - If EQ is more than one, return true (null set)
|
|
18882
|
+
// - Let GT be the highest > or >= comparator in c
|
|
18883
|
+
// - Let LT be the lowest < or <= comparator in c
|
|
18884
|
+
// - If GT and LT, and GT.semver > LT.semver, return true (null set)
|
|
18885
|
+
// - If any C is a = range, and GT or LT are set, return false
|
|
18886
|
+
// - If EQ
|
|
18887
|
+
// - If GT, and EQ does not satisfy GT, return true (null set)
|
|
18888
|
+
// - If LT, and EQ does not satisfy LT, return true (null set)
|
|
18889
|
+
// - If EQ satisfies every C, return true
|
|
18890
|
+
// - Else return false
|
|
18891
|
+
// - If GT
|
|
18892
|
+
// - If GT.semver is lower than any > or >= comp in C, return false
|
|
18893
|
+
// - If GT is >=, and GT.semver does not satisfy every C, return false
|
|
18894
|
+
// - If GT.semver has a prerelease, and not in prerelease mode
|
|
18895
|
+
// - If no C has a prerelease and the GT.semver tuple, return false
|
|
18896
|
+
// - If LT
|
|
18897
|
+
// - If LT.semver is greater than any < or <= comp in C, return false
|
|
18898
|
+
// - If LT is <=, and LT.semver does not satisfy every C, return false
|
|
18899
|
+
// - If GT.semver has a prerelease, and not in prerelease mode
|
|
18900
|
+
// - If no C has a prerelease and the LT.semver tuple, return false
|
|
18901
|
+
// - Else return true
|
|
18902
|
+
|
|
18903
|
+
const subset = (sub, dom, options = {}) => {
|
|
18904
|
+
if (sub === dom) {
|
|
18905
|
+
return true
|
|
18906
|
+
}
|
|
18907
|
+
|
|
18908
|
+
sub = new Range(sub, options);
|
|
18909
|
+
dom = new Range(dom, options);
|
|
18910
|
+
let sawNonNull = false;
|
|
18911
|
+
|
|
18912
|
+
OUTER: for (const simpleSub of sub.set) {
|
|
18913
|
+
for (const simpleDom of dom.set) {
|
|
18914
|
+
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
18915
|
+
sawNonNull = sawNonNull || isSub !== null;
|
|
18916
|
+
if (isSub) {
|
|
18917
|
+
continue OUTER
|
|
18918
|
+
}
|
|
18919
|
+
}
|
|
18920
|
+
// the null set is a subset of everything, but null simple ranges in
|
|
18921
|
+
// a complex range should be ignored. so if we saw a non-null range,
|
|
18922
|
+
// then we know this isn't a subset, but if EVERY simple range was null,
|
|
18923
|
+
// then it is a subset.
|
|
18924
|
+
if (sawNonNull) {
|
|
18925
|
+
return false
|
|
18926
|
+
}
|
|
18927
|
+
}
|
|
18928
|
+
return true
|
|
18929
|
+
};
|
|
18930
|
+
|
|
18931
|
+
const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')];
|
|
18932
|
+
const minimumVersion = [new Comparator('>=0.0.0')];
|
|
18933
|
+
|
|
18934
|
+
const simpleSubset = (sub, dom, options) => {
|
|
18935
|
+
if (sub === dom) {
|
|
18936
|
+
return true
|
|
18937
|
+
}
|
|
18938
|
+
|
|
18939
|
+
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
18940
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
18941
|
+
return true
|
|
18942
|
+
} else if (options.includePrerelease) {
|
|
18943
|
+
sub = minimumVersionWithPreRelease;
|
|
18944
|
+
} else {
|
|
18945
|
+
sub = minimumVersion;
|
|
18946
|
+
}
|
|
18947
|
+
}
|
|
18948
|
+
|
|
18949
|
+
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
18950
|
+
if (options.includePrerelease) {
|
|
18951
|
+
return true
|
|
18952
|
+
} else {
|
|
18953
|
+
dom = minimumVersion;
|
|
18954
|
+
}
|
|
18955
|
+
}
|
|
18956
|
+
|
|
18957
|
+
const eqSet = new Set();
|
|
18958
|
+
let gt, lt;
|
|
18959
|
+
for (const c of sub) {
|
|
18960
|
+
if (c.operator === '>' || c.operator === '>=') {
|
|
18961
|
+
gt = higherGT(gt, c, options);
|
|
18962
|
+
} else if (c.operator === '<' || c.operator === '<=') {
|
|
18963
|
+
lt = lowerLT(lt, c, options);
|
|
18964
|
+
} else {
|
|
18965
|
+
eqSet.add(c.semver);
|
|
18966
|
+
}
|
|
18967
|
+
}
|
|
18968
|
+
|
|
18969
|
+
if (eqSet.size > 1) {
|
|
18970
|
+
return null
|
|
18971
|
+
}
|
|
18972
|
+
|
|
18973
|
+
let gtltComp;
|
|
18974
|
+
if (gt && lt) {
|
|
18975
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
18976
|
+
if (gtltComp > 0) {
|
|
18977
|
+
return null
|
|
18978
|
+
} else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
|
|
18979
|
+
return null
|
|
18980
|
+
}
|
|
18981
|
+
}
|
|
18982
|
+
|
|
18983
|
+
// will iterate one or zero times
|
|
18984
|
+
for (const eq of eqSet) {
|
|
18985
|
+
if (gt && !satisfies(eq, String(gt), options)) {
|
|
18986
|
+
return null
|
|
18987
|
+
}
|
|
18988
|
+
|
|
18989
|
+
if (lt && !satisfies(eq, String(lt), options)) {
|
|
18990
|
+
return null
|
|
18991
|
+
}
|
|
18992
|
+
|
|
18993
|
+
for (const c of dom) {
|
|
18994
|
+
if (!satisfies(eq, String(c), options)) {
|
|
18995
|
+
return false
|
|
18996
|
+
}
|
|
18997
|
+
}
|
|
18998
|
+
|
|
18999
|
+
return true
|
|
19000
|
+
}
|
|
19001
|
+
|
|
19002
|
+
let higher, lower;
|
|
19003
|
+
let hasDomLT, hasDomGT;
|
|
19004
|
+
// if the subset has a prerelease, we need a comparator in the superset
|
|
19005
|
+
// with the same tuple and a prerelease, or it's not a subset
|
|
19006
|
+
let needDomLTPre = lt &&
|
|
19007
|
+
!options.includePrerelease &&
|
|
19008
|
+
lt.semver.prerelease.length ? lt.semver : false;
|
|
19009
|
+
let needDomGTPre = gt &&
|
|
19010
|
+
!options.includePrerelease &&
|
|
19011
|
+
gt.semver.prerelease.length ? gt.semver : false;
|
|
19012
|
+
// exception: <1.2.3-0 is the same as <1.2.3
|
|
19013
|
+
if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
|
|
19014
|
+
lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
|
|
19015
|
+
needDomLTPre = false;
|
|
19016
|
+
}
|
|
19017
|
+
|
|
19018
|
+
for (const c of dom) {
|
|
19019
|
+
hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=';
|
|
19020
|
+
hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=';
|
|
19021
|
+
if (gt) {
|
|
19022
|
+
if (needDomGTPre) {
|
|
19023
|
+
if (c.semver.prerelease && c.semver.prerelease.length &&
|
|
19024
|
+
c.semver.major === needDomGTPre.major &&
|
|
19025
|
+
c.semver.minor === needDomGTPre.minor &&
|
|
19026
|
+
c.semver.patch === needDomGTPre.patch) {
|
|
19027
|
+
needDomGTPre = false;
|
|
19028
|
+
}
|
|
19029
|
+
}
|
|
19030
|
+
if (c.operator === '>' || c.operator === '>=') {
|
|
19031
|
+
higher = higherGT(gt, c, options);
|
|
19032
|
+
if (higher === c && higher !== gt) {
|
|
19033
|
+
return false
|
|
19034
|
+
}
|
|
19035
|
+
} else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
|
|
19036
|
+
return false
|
|
19037
|
+
}
|
|
19038
|
+
}
|
|
19039
|
+
if (lt) {
|
|
19040
|
+
if (needDomLTPre) {
|
|
19041
|
+
if (c.semver.prerelease && c.semver.prerelease.length &&
|
|
19042
|
+
c.semver.major === needDomLTPre.major &&
|
|
19043
|
+
c.semver.minor === needDomLTPre.minor &&
|
|
19044
|
+
c.semver.patch === needDomLTPre.patch) {
|
|
19045
|
+
needDomLTPre = false;
|
|
19046
|
+
}
|
|
19047
|
+
}
|
|
19048
|
+
if (c.operator === '<' || c.operator === '<=') {
|
|
19049
|
+
lower = lowerLT(lt, c, options);
|
|
19050
|
+
if (lower === c && lower !== lt) {
|
|
19051
|
+
return false
|
|
19052
|
+
}
|
|
19053
|
+
} else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
|
|
19054
|
+
return false
|
|
19055
|
+
}
|
|
19056
|
+
}
|
|
19057
|
+
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
19058
|
+
return false
|
|
19059
|
+
}
|
|
19060
|
+
}
|
|
19061
|
+
|
|
19062
|
+
// if there was a < or >, and nothing in the dom, then must be false
|
|
19063
|
+
// UNLESS it was limited by another range in the other direction.
|
|
19064
|
+
// Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
|
|
19065
|
+
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
19066
|
+
return false
|
|
19067
|
+
}
|
|
19068
|
+
|
|
19069
|
+
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
19070
|
+
return false
|
|
19071
|
+
}
|
|
19072
|
+
|
|
19073
|
+
// we needed a prerelease range in a specific tuple, but didn't get one
|
|
19074
|
+
// then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
|
|
19075
|
+
// because it includes prereleases in the 1.2.3 tuple
|
|
19076
|
+
if (needDomGTPre || needDomLTPre) {
|
|
19077
|
+
return false
|
|
19078
|
+
}
|
|
19079
|
+
|
|
19080
|
+
return true
|
|
19081
|
+
};
|
|
19082
|
+
|
|
19083
|
+
// >=1.2.3 is lower than >1.2.3
|
|
19084
|
+
const higherGT = (a, b, options) => {
|
|
19085
|
+
if (!a) {
|
|
19086
|
+
return b
|
|
19087
|
+
}
|
|
19088
|
+
const comp = compare(a.semver, b.semver, options);
|
|
19089
|
+
return comp > 0 ? a
|
|
19090
|
+
: comp < 0 ? b
|
|
19091
|
+
: b.operator === '>' && a.operator === '>=' ? b
|
|
19092
|
+
: a
|
|
19093
|
+
};
|
|
19094
|
+
|
|
19095
|
+
// <=1.2.3 is higher than <1.2.3
|
|
19096
|
+
const lowerLT = (a, b, options) => {
|
|
19097
|
+
if (!a) {
|
|
19098
|
+
return b
|
|
19099
|
+
}
|
|
19100
|
+
const comp = compare(a.semver, b.semver, options);
|
|
19101
|
+
return comp < 0 ? a
|
|
19102
|
+
: comp > 0 ? b
|
|
19103
|
+
: b.operator === '<' && a.operator === '<=' ? b
|
|
19104
|
+
: a
|
|
19105
|
+
};
|
|
19106
|
+
|
|
19107
|
+
subset_1 = subset;
|
|
19108
|
+
return subset_1;
|
|
19109
|
+
}
|
|
19110
|
+
|
|
19111
|
+
var semver$1;
|
|
19112
|
+
var hasRequiredSemver;
|
|
19113
|
+
|
|
19114
|
+
function requireSemver () {
|
|
19115
|
+
if (hasRequiredSemver) return semver$1;
|
|
19116
|
+
hasRequiredSemver = 1;
|
|
19117
|
+
// just pre-load all the stuff that index.js lazily exports
|
|
19118
|
+
const internalRe = requireRe();
|
|
19119
|
+
const constants = requireConstants();
|
|
19120
|
+
const SemVer = requireSemver$1();
|
|
19121
|
+
const identifiers = requireIdentifiers();
|
|
19122
|
+
const parse = requireParse();
|
|
19123
|
+
const valid = requireValid$1();
|
|
19124
|
+
const clean = requireClean();
|
|
19125
|
+
const inc = requireInc();
|
|
19126
|
+
const diff = requireDiff();
|
|
19127
|
+
const major = requireMajor();
|
|
19128
|
+
const minor = requireMinor();
|
|
19129
|
+
const patch = requirePatch();
|
|
19130
|
+
const prerelease = requirePrerelease();
|
|
19131
|
+
const compare = requireCompare();
|
|
19132
|
+
const rcompare = requireRcompare();
|
|
19133
|
+
const compareLoose = requireCompareLoose();
|
|
19134
|
+
const compareBuild = requireCompareBuild();
|
|
19135
|
+
const sort = requireSort();
|
|
19136
|
+
const rsort = requireRsort();
|
|
19137
|
+
const gt = requireGt();
|
|
19138
|
+
const lt = requireLt();
|
|
19139
|
+
const eq = requireEq();
|
|
19140
|
+
const neq = requireNeq();
|
|
19141
|
+
const gte = requireGte();
|
|
19142
|
+
const lte = requireLte();
|
|
19143
|
+
const cmp = requireCmp();
|
|
19144
|
+
const coerce = requireCoerce();
|
|
19145
|
+
const Comparator = requireComparator();
|
|
19146
|
+
const Range = requireRange();
|
|
19147
|
+
const satisfies = requireSatisfies();
|
|
19148
|
+
const toComparators = requireToComparators();
|
|
19149
|
+
const maxSatisfying = requireMaxSatisfying();
|
|
19150
|
+
const minSatisfying = requireMinSatisfying();
|
|
19151
|
+
const minVersion = requireMinVersion();
|
|
19152
|
+
const validRange = requireValid();
|
|
19153
|
+
const outside = requireOutside();
|
|
19154
|
+
const gtr = requireGtr();
|
|
19155
|
+
const ltr = requireLtr();
|
|
19156
|
+
const intersects = requireIntersects();
|
|
19157
|
+
const simplifyRange = requireSimplify();
|
|
19158
|
+
const subset = requireSubset();
|
|
19159
|
+
semver$1 = {
|
|
19160
|
+
parse,
|
|
19161
|
+
valid,
|
|
19162
|
+
clean,
|
|
19163
|
+
inc,
|
|
19164
|
+
diff,
|
|
19165
|
+
major,
|
|
19166
|
+
minor,
|
|
19167
|
+
patch,
|
|
19168
|
+
prerelease,
|
|
19169
|
+
compare,
|
|
19170
|
+
rcompare,
|
|
19171
|
+
compareLoose,
|
|
19172
|
+
compareBuild,
|
|
19173
|
+
sort,
|
|
19174
|
+
rsort,
|
|
19175
|
+
gt,
|
|
19176
|
+
lt,
|
|
19177
|
+
eq,
|
|
19178
|
+
neq,
|
|
19179
|
+
gte,
|
|
19180
|
+
lte,
|
|
19181
|
+
cmp,
|
|
19182
|
+
coerce,
|
|
19183
|
+
Comparator,
|
|
19184
|
+
Range,
|
|
19185
|
+
satisfies,
|
|
19186
|
+
toComparators,
|
|
19187
|
+
maxSatisfying,
|
|
19188
|
+
minSatisfying,
|
|
19189
|
+
minVersion,
|
|
19190
|
+
validRange,
|
|
19191
|
+
outside,
|
|
19192
|
+
gtr,
|
|
19193
|
+
ltr,
|
|
19194
|
+
intersects,
|
|
19195
|
+
simplifyRange,
|
|
19196
|
+
subset,
|
|
19197
|
+
SemVer,
|
|
19198
|
+
re: internalRe.re,
|
|
19199
|
+
src: internalRe.src,
|
|
19200
|
+
tokens: internalRe.t,
|
|
19201
|
+
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
19202
|
+
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
19203
|
+
compareIdentifiers: identifiers.compareIdentifiers,
|
|
19204
|
+
rcompareIdentifiers: identifiers.rcompareIdentifiers,
|
|
19205
|
+
};
|
|
19206
|
+
return semver$1;
|
|
19207
|
+
}
|
|
18875
19208
|
|
|
18876
|
-
var
|
|
19209
|
+
var semverExports = requireSemver();
|
|
19210
|
+
var semver = /*@__PURE__*/getDefaultExportFromCjs(semverExports);
|
|
18877
19211
|
|
|
18878
19212
|
/*!
|
|
18879
19213
|
* @license
|
|
18880
19214
|
* Copyright Google LLC All Rights Reserved.
|
|
18881
19215
|
*
|
|
18882
19216
|
* Use of this source code is governed by an MIT-style license that can be
|
|
18883
|
-
* found in the LICENSE file at https://angular.
|
|
19217
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
18884
19218
|
*/
|
|
18885
19219
|
/**
|
|
18886
19220
|
* Whether a version of `@angular/core` supports a specific feature.
|
|
@@ -18888,13 +19222,13 @@ var semver$1 = /*@__PURE__*/getDefaultExportFromCjs(semver);
|
|
|
18888
19222
|
* @param minVersion Minimum required version for the feature.
|
|
18889
19223
|
*/
|
|
18890
19224
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
18891
|
-
// A version of `19.0.0-next.
|
|
19225
|
+
// A version of `19.0.0-next.7` usually means that core is at head so it supports
|
|
18892
19226
|
// all features. Use string interpolation prevent the placeholder from being replaced
|
|
18893
19227
|
// with the current version during build time.
|
|
18894
19228
|
if (coreVersion === `0.0.0-${'PLACEHOLDER'}`) {
|
|
18895
19229
|
return true;
|
|
18896
19230
|
}
|
|
18897
|
-
return semver
|
|
19231
|
+
return semver.satisfies(coreVersion, minVersion);
|
|
18898
19232
|
}
|
|
18899
19233
|
|
|
18900
19234
|
/**
|