progress on migrating to heex templates and font-icons
This commit is contained in:
parent
d43daafdb7
commit
3eff955672
21793 changed files with 2161968 additions and 16895 deletions
assets_old/node_modules/core-js-compat
LICENSEREADME.mdcompat.jsdata.jsonentries.jsonexternal.jsonget-modules-list-for-target-version.jshelpers.jsindex.jsmodules-by-versions.jsonmodules.jsonpackage.jsontargets-parser.js
node_modules
.bin
semver
19
assets_old/node_modules/core-js-compat/LICENSE
generated
vendored
Normal file
19
assets_old/node_modules/core-js-compat/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2014-2021 Denis Pushkarev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
73
assets_old/node_modules/core-js-compat/README.md
generated
vendored
Normal file
73
assets_old/node_modules/core-js-compat/README.md
generated
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
[`core-js-compat` package](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) contains data about the necessity of [`core-js`](https://github.com/zloirock/core-js) modules and API for getting a list of required core-js modules by browserslist query.
|
||||
|
||||
```js
|
||||
const {
|
||||
list, // array of required modules
|
||||
targets, // object with targets for each module
|
||||
} = require('core-js-compat')({
|
||||
targets: '> 2.5%', // browserslist query or object of minimum environment versions to support
|
||||
filter: /^(es|web)\./, // optional filter - string-prefix, regexp or list of modules
|
||||
version: '3.4', // used `core-js` version, by default - the latest
|
||||
});
|
||||
|
||||
console.log(targets);
|
||||
/* =>
|
||||
{
|
||||
'es.symbol.match-all': { ios: '12.2-12.4' },
|
||||
'es.array.unscopables.flat': { ios: '12.2-12.4' },
|
||||
'es.array.unscopables.flat-map': { ios: '12.2-12.4' },
|
||||
'es.math.hypot': { chrome: '77' },
|
||||
'es.promise.all-settled': { firefox: '69', ios: '12.2-12.4' },
|
||||
'es.promise.finally': { ios: '12.2-12.4' },
|
||||
'es.string.match-all': { chrome: '77', firefox: '69', ios: '12.2-12.4' },
|
||||
'es.string.replace': { firefox: '69', ios: '12.2-12.4' },
|
||||
'es.typed-array.float32-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.float64-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.int8-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.int16-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.int32-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.uint8-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.uint8-clamped-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.uint16-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.uint32-array': { ios: '12.2-12.4' },
|
||||
'es.typed-array.from': { ios: '12.2-12.4' },
|
||||
'es.typed-array.of': { ios: '12.2-12.4' },
|
||||
'web.dom-collections.iterator': { ios: '12.2-12.4' },
|
||||
'web.immediate': { chrome: '77', firefox: '69', ios: '12.2-12.4' },
|
||||
'web.url': { ios: '12.2-12.4' },
|
||||
'web.url.to-json': { ios: '12.2-12.4' },
|
||||
'web.url-search-params': { ios: '12.2-12.4' }
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
Additional API:
|
||||
|
||||
```js
|
||||
// equals of of the method from the example above
|
||||
require('core-js-compat/compat')({ targets, filter, version }); // => { list: Array<ModuleName>, targets: { [ModuleName]: { [EngineName]: EngineVersion } } }
|
||||
// or
|
||||
require('core-js-compat').compat({ targets, filter, version }); // => { list: Array<ModuleName>, targets: { [ModuleName]: { [EngineName]: EngineVersion } } }
|
||||
|
||||
// full compat data:
|
||||
require('core-js-compat/data'); // => { [ModuleName]: { [EngineName]: EngineVersion } }
|
||||
// or
|
||||
require('core-js-compat').data; // => { [ModuleName]: { [EngineName]: EngineVersion } }
|
||||
|
||||
// map of modules by `core-js` entry points:
|
||||
require('core-js-compat/entries'); // => { [EntryPoint]: Array<ModuleName> }
|
||||
// or
|
||||
require('core-js-compat').entries; // => { [EntryPoint]: Array<ModuleName> }
|
||||
|
||||
// full list of modules:
|
||||
require('core-js-compat/modules'); // => Array<ModuleName>
|
||||
// or
|
||||
require('core-js-compat').modules; // => Array<ModuleName>
|
||||
|
||||
// the subset of modules which available in the passed `core-js` version:
|
||||
require('core-js-compat/get-modules-list-for-target-version')('3.3'); // => Array<ModuleName>
|
||||
// or
|
||||
require('core-js-compat').getModulesListForTargetVersion('3.3'); // => Array<ModuleName>
|
||||
```
|
||||
|
||||
If you want to add new / update data about modules required for target engines, [follow this instruction](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md#updating-core-js-compat-data).
|
56
assets_old/node_modules/core-js-compat/compat.js
generated
vendored
Normal file
56
assets_old/node_modules/core-js-compat/compat.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
'use strict';
|
||||
const { compare, has, intersection } = require('./helpers');
|
||||
const data = require('./data');
|
||||
const getModulesListForTargetVersion = require('./get-modules-list-for-target-version');
|
||||
const modules = require('./modules');
|
||||
const targetsParser = require('./targets-parser');
|
||||
|
||||
function checkModule(name, targets) {
|
||||
if (!has(data, name)) throw new TypeError(`Incorrect module: ${ name }`);
|
||||
|
||||
const requirements = data[name];
|
||||
const result = {
|
||||
required: false,
|
||||
targets: {},
|
||||
};
|
||||
|
||||
for (const [engine, version] of targets) {
|
||||
if (!has(requirements, engine) || compare(version, '<', requirements[engine])) {
|
||||
result.required = true;
|
||||
result.targets[engine] = version;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = function ({ targets, filter, version }) {
|
||||
const parsedTargets = targetsParser(targets);
|
||||
|
||||
const result = {
|
||||
list: [],
|
||||
targets: {},
|
||||
};
|
||||
|
||||
let $modules = Array.isArray(filter) ? filter : modules;
|
||||
|
||||
if (filter instanceof RegExp) {
|
||||
$modules = $modules.filter(it => filter.test(it));
|
||||
} else if (typeof filter == 'string') {
|
||||
$modules = $modules.filter(it => it.startsWith(filter));
|
||||
}
|
||||
|
||||
if (version) {
|
||||
$modules = intersection($modules, getModulesListForTargetVersion(version));
|
||||
}
|
||||
|
||||
for (const key of $modules) {
|
||||
const check = checkModule(key, parsedTargets);
|
||||
if (check.required) {
|
||||
result.list.push(key);
|
||||
result.targets[key] = check.targets;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
3080
assets_old/node_modules/core-js-compat/data.json
generated
vendored
Normal file
3080
assets_old/node_modules/core-js-compat/data.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
8747
assets_old/node_modules/core-js-compat/entries.json
generated
vendored
Normal file
8747
assets_old/node_modules/core-js-compat/entries.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
13
assets_old/node_modules/core-js-compat/external.json
generated
vendored
Normal file
13
assets_old/node_modules/core-js-compat/external.json
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"modules": {
|
||||
"android": "61",
|
||||
"chrome": "61",
|
||||
"edge": "16",
|
||||
"firefox": "60",
|
||||
"ios": "10.3",
|
||||
"opera": "48",
|
||||
"opera_mobile": "45",
|
||||
"safari": "10.1",
|
||||
"samsung": "8.0"
|
||||
}
|
||||
}
|
18
assets_old/node_modules/core-js-compat/get-modules-list-for-target-version.js
generated
vendored
Normal file
18
assets_old/node_modules/core-js-compat/get-modules-list-for-target-version.js
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
const { compare, intersection, semver } = require('./helpers');
|
||||
const modulesByVersions = require('./modules-by-versions');
|
||||
const modules = require('./modules');
|
||||
|
||||
module.exports = function (raw) {
|
||||
const corejs = semver(raw);
|
||||
if (corejs.major !== 3) {
|
||||
throw RangeError('This version of `core-js-compat` works only with `core-js@3`.');
|
||||
}
|
||||
const result = [];
|
||||
for (const version of Object.keys(modulesByVersions)) {
|
||||
if (compare(version, '<=', corejs)) {
|
||||
result.push(...modulesByVersions[version]);
|
||||
}
|
||||
}
|
||||
return intersection(result, modules);
|
||||
};
|
29
assets_old/node_modules/core-js-compat/helpers.js
generated
vendored
Normal file
29
assets_old/node_modules/core-js-compat/helpers.js
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
const cmp = require('semver/functions/cmp');
|
||||
const semver = require('semver/functions/coerce');
|
||||
|
||||
const has = Function.call.bind({}.hasOwnProperty);
|
||||
|
||||
function compare(a, operator, b) {
|
||||
return cmp(semver(a), operator, semver(b));
|
||||
}
|
||||
|
||||
function intersection(list, order) {
|
||||
const set = list instanceof Set ? list : new Set(list);
|
||||
return order.filter(name => set.has(name));
|
||||
}
|
||||
|
||||
function sortObjectByKey(object, fn) {
|
||||
return Object.keys(object).sort(fn).reduce((memo, key) => {
|
||||
memo[key] = object[key];
|
||||
return memo;
|
||||
}, {});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
compare,
|
||||
has,
|
||||
intersection,
|
||||
semver,
|
||||
sortObjectByKey,
|
||||
};
|
14
assets_old/node_modules/core-js-compat/index.js
generated
vendored
Normal file
14
assets_old/node_modules/core-js-compat/index.js
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
const compat = require('./compat');
|
||||
const data = require('./data');
|
||||
const entries = require('./entries');
|
||||
const getModulesListForTargetVersion = require('./get-modules-list-for-target-version');
|
||||
const modules = require('./modules');
|
||||
|
||||
module.exports = Object.assign(compat, {
|
||||
compat,
|
||||
data,
|
||||
entries,
|
||||
getModulesListForTargetVersion,
|
||||
modules,
|
||||
});
|
374
assets_old/node_modules/core-js-compat/modules-by-versions.json
generated
vendored
Normal file
374
assets_old/node_modules/core-js-compat/modules-by-versions.json
generated
vendored
Normal file
|
@ -0,0 +1,374 @@
|
|||
{
|
||||
"3.0": [
|
||||
"es.symbol",
|
||||
"es.symbol.description",
|
||||
"es.symbol.async-iterator",
|
||||
"es.symbol.has-instance",
|
||||
"es.symbol.is-concat-spreadable",
|
||||
"es.symbol.iterator",
|
||||
"es.symbol.match",
|
||||
"es.symbol.replace",
|
||||
"es.symbol.search",
|
||||
"es.symbol.species",
|
||||
"es.symbol.split",
|
||||
"es.symbol.to-primitive",
|
||||
"es.symbol.to-string-tag",
|
||||
"es.symbol.unscopables",
|
||||
"es.array.concat",
|
||||
"es.array.copy-within",
|
||||
"es.array.every",
|
||||
"es.array.fill",
|
||||
"es.array.filter",
|
||||
"es.array.find",
|
||||
"es.array.find-index",
|
||||
"es.array.flat",
|
||||
"es.array.flat-map",
|
||||
"es.array.for-each",
|
||||
"es.array.from",
|
||||
"es.array.includes",
|
||||
"es.array.index-of",
|
||||
"es.array.is-array",
|
||||
"es.array.iterator",
|
||||
"es.array.join",
|
||||
"es.array.last-index-of",
|
||||
"es.array.map",
|
||||
"es.array.of",
|
||||
"es.array.reduce",
|
||||
"es.array.reduce-right",
|
||||
"es.array.reverse",
|
||||
"es.array.slice",
|
||||
"es.array.some",
|
||||
"es.array.sort",
|
||||
"es.array.species",
|
||||
"es.array.splice",
|
||||
"es.array.unscopables.flat",
|
||||
"es.array.unscopables.flat-map",
|
||||
"es.array-buffer.constructor",
|
||||
"es.array-buffer.is-view",
|
||||
"es.array-buffer.slice",
|
||||
"es.data-view",
|
||||
"es.date.now",
|
||||
"es.date.to-iso-string",
|
||||
"es.date.to-json",
|
||||
"es.date.to-primitive",
|
||||
"es.date.to-string",
|
||||
"es.function.bind",
|
||||
"es.function.has-instance",
|
||||
"es.function.name",
|
||||
"es.json.to-string-tag",
|
||||
"es.map",
|
||||
"es.math.acosh",
|
||||
"es.math.asinh",
|
||||
"es.math.atanh",
|
||||
"es.math.cbrt",
|
||||
"es.math.clz32",
|
||||
"es.math.cosh",
|
||||
"es.math.expm1",
|
||||
"es.math.fround",
|
||||
"es.math.hypot",
|
||||
"es.math.imul",
|
||||
"es.math.log10",
|
||||
"es.math.log1p",
|
||||
"es.math.log2",
|
||||
"es.math.sign",
|
||||
"es.math.sinh",
|
||||
"es.math.tanh",
|
||||
"es.math.to-string-tag",
|
||||
"es.math.trunc",
|
||||
"es.number.constructor",
|
||||
"es.number.epsilon",
|
||||
"es.number.is-finite",
|
||||
"es.number.is-integer",
|
||||
"es.number.is-nan",
|
||||
"es.number.is-safe-integer",
|
||||
"es.number.max-safe-integer",
|
||||
"es.number.min-safe-integer",
|
||||
"es.number.parse-float",
|
||||
"es.number.parse-int",
|
||||
"es.number.to-fixed",
|
||||
"es.number.to-precision",
|
||||
"es.object.assign",
|
||||
"es.object.create",
|
||||
"es.object.define-getter",
|
||||
"es.object.define-properties",
|
||||
"es.object.define-property",
|
||||
"es.object.define-setter",
|
||||
"es.object.entries",
|
||||
"es.object.freeze",
|
||||
"es.object.from-entries",
|
||||
"es.object.get-own-property-descriptor",
|
||||
"es.object.get-own-property-descriptors",
|
||||
"es.object.get-own-property-names",
|
||||
"es.object.get-prototype-of",
|
||||
"es.object.is",
|
||||
"es.object.is-extensible",
|
||||
"es.object.is-frozen",
|
||||
"es.object.is-sealed",
|
||||
"es.object.keys",
|
||||
"es.object.lookup-getter",
|
||||
"es.object.lookup-setter",
|
||||
"es.object.prevent-extensions",
|
||||
"es.object.seal",
|
||||
"es.object.set-prototype-of",
|
||||
"es.object.to-string",
|
||||
"es.object.values",
|
||||
"es.parse-float",
|
||||
"es.parse-int",
|
||||
"es.promise",
|
||||
"es.promise.finally",
|
||||
"es.reflect.apply",
|
||||
"es.reflect.construct",
|
||||
"es.reflect.define-property",
|
||||
"es.reflect.delete-property",
|
||||
"es.reflect.get",
|
||||
"es.reflect.get-own-property-descriptor",
|
||||
"es.reflect.get-prototype-of",
|
||||
"es.reflect.has",
|
||||
"es.reflect.is-extensible",
|
||||
"es.reflect.own-keys",
|
||||
"es.reflect.prevent-extensions",
|
||||
"es.reflect.set",
|
||||
"es.reflect.set-prototype-of",
|
||||
"es.regexp.constructor",
|
||||
"es.regexp.exec",
|
||||
"es.regexp.flags",
|
||||
"es.regexp.to-string",
|
||||
"es.set",
|
||||
"es.string.code-point-at",
|
||||
"es.string.ends-with",
|
||||
"es.string.from-code-point",
|
||||
"es.string.includes",
|
||||
"es.string.iterator",
|
||||
"es.string.match",
|
||||
"es.string.pad-end",
|
||||
"es.string.pad-start",
|
||||
"es.string.raw",
|
||||
"es.string.repeat",
|
||||
"es.string.replace",
|
||||
"es.string.search",
|
||||
"es.string.split",
|
||||
"es.string.starts-with",
|
||||
"es.string.trim",
|
||||
"es.string.trim-end",
|
||||
"es.string.trim-start",
|
||||
"es.string.anchor",
|
||||
"es.string.big",
|
||||
"es.string.blink",
|
||||
"es.string.bold",
|
||||
"es.string.fixed",
|
||||
"es.string.fontcolor",
|
||||
"es.string.fontsize",
|
||||
"es.string.italics",
|
||||
"es.string.link",
|
||||
"es.string.small",
|
||||
"es.string.strike",
|
||||
"es.string.sub",
|
||||
"es.string.sup",
|
||||
"es.typed-array.float32-array",
|
||||
"es.typed-array.float64-array",
|
||||
"es.typed-array.int8-array",
|
||||
"es.typed-array.int16-array",
|
||||
"es.typed-array.int32-array",
|
||||
"es.typed-array.uint8-array",
|
||||
"es.typed-array.uint8-clamped-array",
|
||||
"es.typed-array.uint16-array",
|
||||
"es.typed-array.uint32-array",
|
||||
"es.typed-array.copy-within",
|
||||
"es.typed-array.every",
|
||||
"es.typed-array.fill",
|
||||
"es.typed-array.filter",
|
||||
"es.typed-array.find",
|
||||
"es.typed-array.find-index",
|
||||
"es.typed-array.for-each",
|
||||
"es.typed-array.from",
|
||||
"es.typed-array.includes",
|
||||
"es.typed-array.index-of",
|
||||
"es.typed-array.iterator",
|
||||
"es.typed-array.join",
|
||||
"es.typed-array.last-index-of",
|
||||
"es.typed-array.map",
|
||||
"es.typed-array.of",
|
||||
"es.typed-array.reduce",
|
||||
"es.typed-array.reduce-right",
|
||||
"es.typed-array.reverse",
|
||||
"es.typed-array.set",
|
||||
"es.typed-array.slice",
|
||||
"es.typed-array.some",
|
||||
"es.typed-array.sort",
|
||||
"es.typed-array.subarray",
|
||||
"es.typed-array.to-locale-string",
|
||||
"es.typed-array.to-string",
|
||||
"es.weak-map",
|
||||
"es.weak-set",
|
||||
"esnext.aggregate-error",
|
||||
"esnext.array.last-index",
|
||||
"esnext.array.last-item",
|
||||
"esnext.composite-key",
|
||||
"esnext.composite-symbol",
|
||||
"esnext.global-this",
|
||||
"esnext.map.delete-all",
|
||||
"esnext.map.every",
|
||||
"esnext.map.filter",
|
||||
"esnext.map.find",
|
||||
"esnext.map.find-key",
|
||||
"esnext.map.from",
|
||||
"esnext.map.group-by",
|
||||
"esnext.map.includes",
|
||||
"esnext.map.key-by",
|
||||
"esnext.map.key-of",
|
||||
"esnext.map.map-keys",
|
||||
"esnext.map.map-values",
|
||||
"esnext.map.merge",
|
||||
"esnext.map.of",
|
||||
"esnext.map.reduce",
|
||||
"esnext.map.some",
|
||||
"esnext.map.update",
|
||||
"esnext.math.clamp",
|
||||
"esnext.math.deg-per-rad",
|
||||
"esnext.math.degrees",
|
||||
"esnext.math.fscale",
|
||||
"esnext.math.iaddh",
|
||||
"esnext.math.imulh",
|
||||
"esnext.math.isubh",
|
||||
"esnext.math.rad-per-deg",
|
||||
"esnext.math.radians",
|
||||
"esnext.math.scale",
|
||||
"esnext.math.seeded-prng",
|
||||
"esnext.math.signbit",
|
||||
"esnext.math.umulh",
|
||||
"esnext.number.from-string",
|
||||
"esnext.observable",
|
||||
"esnext.promise.all-settled",
|
||||
"esnext.promise.any",
|
||||
"esnext.promise.try",
|
||||
"esnext.reflect.define-metadata",
|
||||
"esnext.reflect.delete-metadata",
|
||||
"esnext.reflect.get-metadata",
|
||||
"esnext.reflect.get-metadata-keys",
|
||||
"esnext.reflect.get-own-metadata",
|
||||
"esnext.reflect.get-own-metadata-keys",
|
||||
"esnext.reflect.has-metadata",
|
||||
"esnext.reflect.has-own-metadata",
|
||||
"esnext.reflect.metadata",
|
||||
"esnext.set.add-all",
|
||||
"esnext.set.delete-all",
|
||||
"esnext.set.difference",
|
||||
"esnext.set.every",
|
||||
"esnext.set.filter",
|
||||
"esnext.set.find",
|
||||
"esnext.set.from",
|
||||
"esnext.set.intersection",
|
||||
"esnext.set.is-disjoint-from",
|
||||
"esnext.set.is-subset-of",
|
||||
"esnext.set.is-superset-of",
|
||||
"esnext.set.join",
|
||||
"esnext.set.map",
|
||||
"esnext.set.of",
|
||||
"esnext.set.reduce",
|
||||
"esnext.set.some",
|
||||
"esnext.set.symmetric-difference",
|
||||
"esnext.set.union",
|
||||
"esnext.string.at",
|
||||
"esnext.string.code-points",
|
||||
"esnext.string.match-all",
|
||||
"esnext.string.replace-all",
|
||||
"esnext.symbol.dispose",
|
||||
"esnext.symbol.observable",
|
||||
"esnext.symbol.pattern-match",
|
||||
"esnext.weak-map.delete-all",
|
||||
"esnext.weak-map.from",
|
||||
"esnext.weak-map.of",
|
||||
"esnext.weak-set.add-all",
|
||||
"esnext.weak-set.delete-all",
|
||||
"esnext.weak-set.from",
|
||||
"esnext.weak-set.of",
|
||||
"web.dom-collections.for-each",
|
||||
"web.dom-collections.iterator",
|
||||
"web.immediate",
|
||||
"web.queue-microtask",
|
||||
"web.timers",
|
||||
"web.url",
|
||||
"web.url.to-json",
|
||||
"web.url-search-params"
|
||||
],
|
||||
"3.1": [
|
||||
"es.string.match-all",
|
||||
"es.symbol.match-all",
|
||||
"esnext.symbol.replace-all"
|
||||
],
|
||||
"3.2": [
|
||||
"es.promise.all-settled",
|
||||
"esnext.array.is-template-object",
|
||||
"esnext.map.update-or-insert",
|
||||
"esnext.symbol.async-dispose"
|
||||
],
|
||||
"3.3": [
|
||||
"es.global-this",
|
||||
"esnext.async-iterator.constructor",
|
||||
"esnext.async-iterator.as-indexed-pairs",
|
||||
"esnext.async-iterator.drop",
|
||||
"esnext.async-iterator.every",
|
||||
"esnext.async-iterator.filter",
|
||||
"esnext.async-iterator.find",
|
||||
"esnext.async-iterator.flat-map",
|
||||
"esnext.async-iterator.for-each",
|
||||
"esnext.async-iterator.from",
|
||||
"esnext.async-iterator.map",
|
||||
"esnext.async-iterator.reduce",
|
||||
"esnext.async-iterator.some",
|
||||
"esnext.async-iterator.take",
|
||||
"esnext.async-iterator.to-array",
|
||||
"esnext.iterator.constructor",
|
||||
"esnext.iterator.as-indexed-pairs",
|
||||
"esnext.iterator.drop",
|
||||
"esnext.iterator.every",
|
||||
"esnext.iterator.filter",
|
||||
"esnext.iterator.find",
|
||||
"esnext.iterator.flat-map",
|
||||
"esnext.iterator.for-each",
|
||||
"esnext.iterator.from",
|
||||
"esnext.iterator.map",
|
||||
"esnext.iterator.reduce",
|
||||
"esnext.iterator.some",
|
||||
"esnext.iterator.take",
|
||||
"esnext.iterator.to-array",
|
||||
"esnext.map.upsert",
|
||||
"esnext.weak-map.upsert"
|
||||
],
|
||||
"3.4": [
|
||||
"es.json.stringify"
|
||||
],
|
||||
"3.5": [
|
||||
"esnext.object.iterate-entries",
|
||||
"esnext.object.iterate-keys",
|
||||
"esnext.object.iterate-values"
|
||||
],
|
||||
"3.6": [
|
||||
"es.regexp.sticky",
|
||||
"es.regexp.test"
|
||||
],
|
||||
"3.7": [
|
||||
"es.aggregate-error",
|
||||
"es.promise.any",
|
||||
"es.reflect.to-string-tag",
|
||||
"es.string.replace-all",
|
||||
"esnext.map.emplace",
|
||||
"esnext.weak-map.emplace"
|
||||
],
|
||||
"3.8": [
|
||||
"esnext.array.at",
|
||||
"esnext.array.filter-out",
|
||||
"esnext.array.unique-by",
|
||||
"esnext.bigint.range",
|
||||
"esnext.number.range",
|
||||
"esnext.typed-array.at",
|
||||
"esnext.typed-array.filter-out"
|
||||
],
|
||||
"3.9": [
|
||||
"esnext.array.find-last",
|
||||
"esnext.array.find-last-index",
|
||||
"esnext.typed-array.find-last",
|
||||
"esnext.typed-array.find-last-index",
|
||||
"esnext.typed-array.unique-by"
|
||||
]
|
||||
}
|
354
assets_old/node_modules/core-js-compat/modules.json
generated
vendored
Normal file
354
assets_old/node_modules/core-js-compat/modules.json
generated
vendored
Normal file
|
@ -0,0 +1,354 @@
|
|||
[
|
||||
"es.symbol",
|
||||
"es.symbol.description",
|
||||
"es.symbol.async-iterator",
|
||||
"es.symbol.has-instance",
|
||||
"es.symbol.is-concat-spreadable",
|
||||
"es.symbol.iterator",
|
||||
"es.symbol.match",
|
||||
"es.symbol.match-all",
|
||||
"es.symbol.replace",
|
||||
"es.symbol.search",
|
||||
"es.symbol.species",
|
||||
"es.symbol.split",
|
||||
"es.symbol.to-primitive",
|
||||
"es.symbol.to-string-tag",
|
||||
"es.symbol.unscopables",
|
||||
"es.aggregate-error",
|
||||
"es.array.concat",
|
||||
"es.array.copy-within",
|
||||
"es.array.every",
|
||||
"es.array.fill",
|
||||
"es.array.filter",
|
||||
"es.array.find",
|
||||
"es.array.find-index",
|
||||
"es.array.flat",
|
||||
"es.array.flat-map",
|
||||
"es.array.for-each",
|
||||
"es.array.from",
|
||||
"es.array.includes",
|
||||
"es.array.index-of",
|
||||
"es.array.is-array",
|
||||
"es.array.iterator",
|
||||
"es.array.join",
|
||||
"es.array.last-index-of",
|
||||
"es.array.map",
|
||||
"es.array.of",
|
||||
"es.array.reduce",
|
||||
"es.array.reduce-right",
|
||||
"es.array.reverse",
|
||||
"es.array.slice",
|
||||
"es.array.some",
|
||||
"es.array.sort",
|
||||
"es.array.species",
|
||||
"es.array.splice",
|
||||
"es.array.unscopables.flat",
|
||||
"es.array.unscopables.flat-map",
|
||||
"es.array-buffer.constructor",
|
||||
"es.array-buffer.is-view",
|
||||
"es.array-buffer.slice",
|
||||
"es.data-view",
|
||||
"es.date.now",
|
||||
"es.date.to-iso-string",
|
||||
"es.date.to-json",
|
||||
"es.date.to-primitive",
|
||||
"es.date.to-string",
|
||||
"es.function.bind",
|
||||
"es.function.has-instance",
|
||||
"es.function.name",
|
||||
"es.global-this",
|
||||
"es.json.stringify",
|
||||
"es.json.to-string-tag",
|
||||
"es.map",
|
||||
"es.math.acosh",
|
||||
"es.math.asinh",
|
||||
"es.math.atanh",
|
||||
"es.math.cbrt",
|
||||
"es.math.clz32",
|
||||
"es.math.cosh",
|
||||
"es.math.expm1",
|
||||
"es.math.fround",
|
||||
"es.math.hypot",
|
||||
"es.math.imul",
|
||||
"es.math.log10",
|
||||
"es.math.log1p",
|
||||
"es.math.log2",
|
||||
"es.math.sign",
|
||||
"es.math.sinh",
|
||||
"es.math.tanh",
|
||||
"es.math.to-string-tag",
|
||||
"es.math.trunc",
|
||||
"es.number.constructor",
|
||||
"es.number.epsilon",
|
||||
"es.number.is-finite",
|
||||
"es.number.is-integer",
|
||||
"es.number.is-nan",
|
||||
"es.number.is-safe-integer",
|
||||
"es.number.max-safe-integer",
|
||||
"es.number.min-safe-integer",
|
||||
"es.number.parse-float",
|
||||
"es.number.parse-int",
|
||||
"es.number.to-fixed",
|
||||
"es.number.to-precision",
|
||||
"es.object.assign",
|
||||
"es.object.create",
|
||||
"es.object.define-getter",
|
||||
"es.object.define-properties",
|
||||
"es.object.define-property",
|
||||
"es.object.define-setter",
|
||||
"es.object.entries",
|
||||
"es.object.freeze",
|
||||
"es.object.from-entries",
|
||||
"es.object.get-own-property-descriptor",
|
||||
"es.object.get-own-property-descriptors",
|
||||
"es.object.get-own-property-names",
|
||||
"es.object.get-prototype-of",
|
||||
"es.object.is",
|
||||
"es.object.is-extensible",
|
||||
"es.object.is-frozen",
|
||||
"es.object.is-sealed",
|
||||
"es.object.keys",
|
||||
"es.object.lookup-getter",
|
||||
"es.object.lookup-setter",
|
||||
"es.object.prevent-extensions",
|
||||
"es.object.seal",
|
||||
"es.object.set-prototype-of",
|
||||
"es.object.to-string",
|
||||
"es.object.values",
|
||||
"es.parse-float",
|
||||
"es.parse-int",
|
||||
"es.promise",
|
||||
"es.promise.all-settled",
|
||||
"es.promise.any",
|
||||
"es.promise.finally",
|
||||
"es.reflect.apply",
|
||||
"es.reflect.construct",
|
||||
"es.reflect.define-property",
|
||||
"es.reflect.delete-property",
|
||||
"es.reflect.get",
|
||||
"es.reflect.get-own-property-descriptor",
|
||||
"es.reflect.get-prototype-of",
|
||||
"es.reflect.has",
|
||||
"es.reflect.is-extensible",
|
||||
"es.reflect.own-keys",
|
||||
"es.reflect.prevent-extensions",
|
||||
"es.reflect.set",
|
||||
"es.reflect.set-prototype-of",
|
||||
"es.reflect.to-string-tag",
|
||||
"es.regexp.constructor",
|
||||
"es.regexp.exec",
|
||||
"es.regexp.flags",
|
||||
"es.regexp.sticky",
|
||||
"es.regexp.test",
|
||||
"es.regexp.to-string",
|
||||
"es.set",
|
||||
"es.string.code-point-at",
|
||||
"es.string.ends-with",
|
||||
"es.string.from-code-point",
|
||||
"es.string.includes",
|
||||
"es.string.iterator",
|
||||
"es.string.match",
|
||||
"es.string.match-all",
|
||||
"es.string.pad-end",
|
||||
"es.string.pad-start",
|
||||
"es.string.raw",
|
||||
"es.string.repeat",
|
||||
"es.string.replace",
|
||||
"es.string.replace-all",
|
||||
"es.string.search",
|
||||
"es.string.split",
|
||||
"es.string.starts-with",
|
||||
"es.string.trim",
|
||||
"es.string.trim-end",
|
||||
"es.string.trim-start",
|
||||
"es.string.anchor",
|
||||
"es.string.big",
|
||||
"es.string.blink",
|
||||
"es.string.bold",
|
||||
"es.string.fixed",
|
||||
"es.string.fontcolor",
|
||||
"es.string.fontsize",
|
||||
"es.string.italics",
|
||||
"es.string.link",
|
||||
"es.string.small",
|
||||
"es.string.strike",
|
||||
"es.string.sub",
|
||||
"es.string.sup",
|
||||
"es.typed-array.float32-array",
|
||||
"es.typed-array.float64-array",
|
||||
"es.typed-array.int8-array",
|
||||
"es.typed-array.int16-array",
|
||||
"es.typed-array.int32-array",
|
||||
"es.typed-array.uint8-array",
|
||||
"es.typed-array.uint8-clamped-array",
|
||||
"es.typed-array.uint16-array",
|
||||
"es.typed-array.uint32-array",
|
||||
"es.typed-array.copy-within",
|
||||
"es.typed-array.every",
|
||||
"es.typed-array.fill",
|
||||
"es.typed-array.filter",
|
||||
"es.typed-array.find",
|
||||
"es.typed-array.find-index",
|
||||
"es.typed-array.for-each",
|
||||
"es.typed-array.from",
|
||||
"es.typed-array.includes",
|
||||
"es.typed-array.index-of",
|
||||
"es.typed-array.iterator",
|
||||
"es.typed-array.join",
|
||||
"es.typed-array.last-index-of",
|
||||
"es.typed-array.map",
|
||||
"es.typed-array.of",
|
||||
"es.typed-array.reduce",
|
||||
"es.typed-array.reduce-right",
|
||||
"es.typed-array.reverse",
|
||||
"es.typed-array.set",
|
||||
"es.typed-array.slice",
|
||||
"es.typed-array.some",
|
||||
"es.typed-array.sort",
|
||||
"es.typed-array.subarray",
|
||||
"es.typed-array.to-locale-string",
|
||||
"es.typed-array.to-string",
|
||||
"es.weak-map",
|
||||
"es.weak-set",
|
||||
"esnext.aggregate-error",
|
||||
"esnext.array.at",
|
||||
"esnext.array.filter-out",
|
||||
"esnext.array.find-last",
|
||||
"esnext.array.find-last-index",
|
||||
"esnext.array.is-template-object",
|
||||
"esnext.array.last-index",
|
||||
"esnext.array.last-item",
|
||||
"esnext.array.unique-by",
|
||||
"esnext.async-iterator.constructor",
|
||||
"esnext.async-iterator.as-indexed-pairs",
|
||||
"esnext.async-iterator.drop",
|
||||
"esnext.async-iterator.every",
|
||||
"esnext.async-iterator.filter",
|
||||
"esnext.async-iterator.find",
|
||||
"esnext.async-iterator.flat-map",
|
||||
"esnext.async-iterator.for-each",
|
||||
"esnext.async-iterator.from",
|
||||
"esnext.async-iterator.map",
|
||||
"esnext.async-iterator.reduce",
|
||||
"esnext.async-iterator.some",
|
||||
"esnext.async-iterator.take",
|
||||
"esnext.async-iterator.to-array",
|
||||
"esnext.bigint.range",
|
||||
"esnext.composite-key",
|
||||
"esnext.composite-symbol",
|
||||
"esnext.global-this",
|
||||
"esnext.iterator.constructor",
|
||||
"esnext.iterator.as-indexed-pairs",
|
||||
"esnext.iterator.drop",
|
||||
"esnext.iterator.every",
|
||||
"esnext.iterator.filter",
|
||||
"esnext.iterator.find",
|
||||
"esnext.iterator.flat-map",
|
||||
"esnext.iterator.for-each",
|
||||
"esnext.iterator.from",
|
||||
"esnext.iterator.map",
|
||||
"esnext.iterator.reduce",
|
||||
"esnext.iterator.some",
|
||||
"esnext.iterator.take",
|
||||
"esnext.iterator.to-array",
|
||||
"esnext.map.delete-all",
|
||||
"esnext.map.emplace",
|
||||
"esnext.map.every",
|
||||
"esnext.map.filter",
|
||||
"esnext.map.find",
|
||||
"esnext.map.find-key",
|
||||
"esnext.map.from",
|
||||
"esnext.map.group-by",
|
||||
"esnext.map.includes",
|
||||
"esnext.map.key-by",
|
||||
"esnext.map.key-of",
|
||||
"esnext.map.map-keys",
|
||||
"esnext.map.map-values",
|
||||
"esnext.map.merge",
|
||||
"esnext.map.of",
|
||||
"esnext.map.reduce",
|
||||
"esnext.map.some",
|
||||
"esnext.map.update",
|
||||
"esnext.map.update-or-insert",
|
||||
"esnext.map.upsert",
|
||||
"esnext.math.clamp",
|
||||
"esnext.math.deg-per-rad",
|
||||
"esnext.math.degrees",
|
||||
"esnext.math.fscale",
|
||||
"esnext.math.iaddh",
|
||||
"esnext.math.imulh",
|
||||
"esnext.math.isubh",
|
||||
"esnext.math.rad-per-deg",
|
||||
"esnext.math.radians",
|
||||
"esnext.math.scale",
|
||||
"esnext.math.seeded-prng",
|
||||
"esnext.math.signbit",
|
||||
"esnext.math.umulh",
|
||||
"esnext.number.from-string",
|
||||
"esnext.number.range",
|
||||
"esnext.object.iterate-entries",
|
||||
"esnext.object.iterate-keys",
|
||||
"esnext.object.iterate-values",
|
||||
"esnext.observable",
|
||||
"esnext.promise.all-settled",
|
||||
"esnext.promise.any",
|
||||
"esnext.promise.try",
|
||||
"esnext.reflect.define-metadata",
|
||||
"esnext.reflect.delete-metadata",
|
||||
"esnext.reflect.get-metadata",
|
||||
"esnext.reflect.get-metadata-keys",
|
||||
"esnext.reflect.get-own-metadata",
|
||||
"esnext.reflect.get-own-metadata-keys",
|
||||
"esnext.reflect.has-metadata",
|
||||
"esnext.reflect.has-own-metadata",
|
||||
"esnext.reflect.metadata",
|
||||
"esnext.set.add-all",
|
||||
"esnext.set.delete-all",
|
||||
"esnext.set.difference",
|
||||
"esnext.set.every",
|
||||
"esnext.set.filter",
|
||||
"esnext.set.find",
|
||||
"esnext.set.from",
|
||||
"esnext.set.intersection",
|
||||
"esnext.set.is-disjoint-from",
|
||||
"esnext.set.is-subset-of",
|
||||
"esnext.set.is-superset-of",
|
||||
"esnext.set.join",
|
||||
"esnext.set.map",
|
||||
"esnext.set.of",
|
||||
"esnext.set.reduce",
|
||||
"esnext.set.some",
|
||||
"esnext.set.symmetric-difference",
|
||||
"esnext.set.union",
|
||||
"esnext.string.at",
|
||||
"esnext.string.code-points",
|
||||
"esnext.string.match-all",
|
||||
"esnext.string.replace-all",
|
||||
"esnext.symbol.async-dispose",
|
||||
"esnext.symbol.dispose",
|
||||
"esnext.symbol.observable",
|
||||
"esnext.symbol.pattern-match",
|
||||
"esnext.symbol.replace-all",
|
||||
"esnext.typed-array.at",
|
||||
"esnext.typed-array.filter-out",
|
||||
"esnext.typed-array.find-last",
|
||||
"esnext.typed-array.find-last-index",
|
||||
"esnext.typed-array.unique-by",
|
||||
"esnext.weak-map.delete-all",
|
||||
"esnext.weak-map.from",
|
||||
"esnext.weak-map.of",
|
||||
"esnext.weak-map.emplace",
|
||||
"esnext.weak-map.upsert",
|
||||
"esnext.weak-set.add-all",
|
||||
"esnext.weak-set.delete-all",
|
||||
"esnext.weak-set.from",
|
||||
"esnext.weak-set.of",
|
||||
"web.dom-collections.for-each",
|
||||
"web.dom-collections.iterator",
|
||||
"web.immediate",
|
||||
"web.queue-microtask",
|
||||
"web.timers",
|
||||
"web.url",
|
||||
"web.url.to-json",
|
||||
"web.url-search-params"
|
||||
]
|
1
assets_old/node_modules/core-js-compat/node_modules/.bin/semver
generated
vendored
Symbolic link
1
assets_old/node_modules/core-js-compat/node_modules/.bin/semver
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../semver/bin/semver.js
|
74
assets_old/node_modules/core-js-compat/node_modules/semver/CHANGELOG.md
generated
vendored
Normal file
74
assets_old/node_modules/core-js-compat/node_modules/semver/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
# changes log
|
||||
|
||||
## 6.3.0
|
||||
|
||||
* Expose the token enum on the exports
|
||||
|
||||
## 6.2.0
|
||||
|
||||
* Coerce numbers to strings when passed to semver.coerce()
|
||||
* Add `rtl` option to coerce from right to left
|
||||
|
||||
## 6.1.3
|
||||
|
||||
* Handle X-ranges properly in includePrerelease mode
|
||||
|
||||
## 6.1.2
|
||||
|
||||
* Do not throw when testing invalid version strings
|
||||
|
||||
## 6.1.1
|
||||
|
||||
* Add options support for semver.coerce()
|
||||
* Handle undefined version passed to Range.test
|
||||
|
||||
## 6.1.0
|
||||
|
||||
* Add semver.compareBuild function
|
||||
* Support `*` in semver.intersects
|
||||
|
||||
## 6.0
|
||||
|
||||
* Fix `intersects` logic.
|
||||
|
||||
This is technically a bug fix, but since it is also a change to behavior
|
||||
that may require users updating their code, it is marked as a major
|
||||
version increment.
|
||||
|
||||
## 5.7
|
||||
|
||||
* Add `minVersion` method
|
||||
|
||||
## 5.6
|
||||
|
||||
* Move boolean `loose` param to an options object, with
|
||||
backwards-compatibility protection.
|
||||
* Add ability to opt out of special prerelease version handling with
|
||||
the `includePrerelease` option flag.
|
||||
|
||||
## 5.5
|
||||
|
||||
* Add version coercion capabilities
|
||||
|
||||
## 5.4
|
||||
|
||||
* Add intersection checking
|
||||
|
||||
## 5.3
|
||||
|
||||
* Add `minSatisfying` method
|
||||
|
||||
## 5.2
|
||||
|
||||
* Add `prerelease(v)` that returns prerelease components
|
||||
|
||||
## 5.1
|
||||
|
||||
* Add Backus-Naur for ranges
|
||||
* Remove excessively cute inspection methods
|
||||
|
||||
## 5.0
|
||||
|
||||
* Remove AMD/Browserified build artifacts
|
||||
* Fix ltr and gtr when using the `*` range
|
||||
* Fix for range `*` with a prerelease identifier
|
15
assets_old/node_modules/core-js-compat/node_modules/semver/LICENSE
generated
vendored
Normal file
15
assets_old/node_modules/core-js-compat/node_modules/semver/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
499
assets_old/node_modules/core-js-compat/node_modules/semver/README.md
generated
vendored
Normal file
499
assets_old/node_modules/core-js-compat/node_modules/semver/README.md
generated
vendored
Normal file
|
@ -0,0 +1,499 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
--rtl
|
||||
Coerce version strings right to left
|
||||
|
||||
--ltr
|
||||
Coerce version strings left to right (default)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero element in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
|
||||
are equal. Sorts in ascending order if passed to `Array.sort()`.
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `coerce(version, options)`: Coerces a string to semver if possible
|
||||
|
||||
This aims to provide a very forgiving translation of a non-semver string to
|
||||
semver. It looks for the first digit in a string, and consumes all
|
||||
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
||||
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
||||
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
||||
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
||||
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
||||
is not valid). The maximum length for any semver component considered for
|
||||
coercion is 16 characters; longer components will be ignored
|
||||
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
||||
semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
||||
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
||||
|
||||
If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||
coercible tuple that does not share an ending index with a longer coercible
|
||||
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||
any other overlapping SemVer tuple.
|
||||
|
||||
### Clean
|
||||
|
||||
* `clean(version)`: Clean a string to be a valid semver if possible
|
||||
|
||||
This will return a cleaned and trimmed semver version. If the provided
|
||||
version is not valid a null will be returned. This does not work for
|
||||
ranges.
|
||||
|
||||
ex.
|
||||
* `s.clean(' = v 2.1.5foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean(' = v 2.1.5-foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean('=v2.1.5')`: `'2.1.5'`
|
||||
* `s.clean(' =v2.1.5')`: `2.1.5`
|
||||
* `s.clean(' 2.1.5 ')`: `'2.1.5'`
|
||||
* `s.clean('~1.0.0')`: `null`
|
||||
|
||||
## Exported Modules
|
||||
|
||||
<!--
|
||||
TODO: Make sure that all of these items are documented (classes aren't,
|
||||
eg), and then pull the module name into the documentation for that specific
|
||||
thing.
|
||||
-->
|
||||
|
||||
You may pull in just the part of this semver utility that you need, if you
|
||||
are sensitive to packing and tree-shaking concerns. The main
|
||||
`require('semver')` export uses getter functions to lazily load the parts
|
||||
of the API that are used.
|
||||
|
||||
The following modules are available:
|
||||
|
||||
* `require('semver')`
|
||||
* `require('semver/classes')`
|
||||
* `require('semver/classes/comparator')`
|
||||
* `require('semver/classes/range')`
|
||||
* `require('semver/classes/semver')`
|
||||
* `require('semver/functions/clean')`
|
||||
* `require('semver/functions/cmp')`
|
||||
* `require('semver/functions/coerce')`
|
||||
* `require('semver/functions/compare')`
|
||||
* `require('semver/functions/compare-build')`
|
||||
* `require('semver/functions/compare-loose')`
|
||||
* `require('semver/functions/diff')`
|
||||
* `require('semver/functions/eq')`
|
||||
* `require('semver/functions/gt')`
|
||||
* `require('semver/functions/gte')`
|
||||
* `require('semver/functions/inc')`
|
||||
* `require('semver/functions/lt')`
|
||||
* `require('semver/functions/lte')`
|
||||
* `require('semver/functions/major')`
|
||||
* `require('semver/functions/minor')`
|
||||
* `require('semver/functions/neq')`
|
||||
* `require('semver/functions/parse')`
|
||||
* `require('semver/functions/patch')`
|
||||
* `require('semver/functions/prerelease')`
|
||||
* `require('semver/functions/rcompare')`
|
||||
* `require('semver/functions/rsort')`
|
||||
* `require('semver/functions/satisfies')`
|
||||
* `require('semver/functions/sort')`
|
||||
* `require('semver/functions/valid')`
|
||||
* `require('semver/ranges/gtr')`
|
||||
* `require('semver/ranges/intersects')`
|
||||
* `require('semver/ranges/ltr')`
|
||||
* `require('semver/ranges/max-satisfying')`
|
||||
* `require('semver/ranges/min-satisfying')`
|
||||
* `require('semver/ranges/min-version')`
|
||||
* `require('semver/ranges/outside')`
|
||||
* `require('semver/ranges/to-comparators')`
|
||||
* `require('semver/ranges/valid')`
|
173
assets_old/node_modules/core-js-compat/node_modules/semver/bin/semver.js
generated
vendored
Executable file
173
assets_old/node_modules/core-js-compat/node_modules/semver/bin/semver.js
generated
vendored
Executable file
|
@ -0,0 +1,173 @@
|
|||
#!/usr/bin/env node
|
||||
// Standalone semver comparison program.
|
||||
// Exits successfully and prints matching version(s) if
|
||||
// any supplied version is valid and passes all tests.
|
||||
|
||||
const argv = process.argv.slice(2)
|
||||
|
||||
let versions = []
|
||||
|
||||
const range = []
|
||||
|
||||
let inc = null
|
||||
|
||||
const version = require('../package.json').version
|
||||
|
||||
let loose = false
|
||||
|
||||
let includePrerelease = false
|
||||
|
||||
let coerce = false
|
||||
|
||||
let rtl = false
|
||||
|
||||
let identifier
|
||||
|
||||
const semver = require('../')
|
||||
|
||||
let reverse = false
|
||||
|
||||
const options = {}
|
||||
|
||||
const main = () => {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
let a = argv.shift()
|
||||
const indexOfEqualSign = a.indexOf('=')
|
||||
if (indexOfEqualSign !== -1) {
|
||||
a = a.slice(0, indexOfEqualSign)
|
||||
argv.unshift(a.slice(indexOfEqualSign + 1))
|
||||
}
|
||||
switch (a) {
|
||||
case '-rv': case '-rev': case '--rev': case '--reverse':
|
||||
reverse = true
|
||||
break
|
||||
case '-l': case '--loose':
|
||||
loose = true
|
||||
break
|
||||
case '-p': case '--include-prerelease':
|
||||
includePrerelease = true
|
||||
break
|
||||
case '-v': case '--version':
|
||||
versions.push(argv.shift())
|
||||
break
|
||||
case '-i': case '--inc': case '--increment':
|
||||
switch (argv[0]) {
|
||||
case 'major': case 'minor': case 'patch': case 'prerelease':
|
||||
case 'premajor': case 'preminor': case 'prepatch':
|
||||
inc = argv.shift()
|
||||
break
|
||||
default:
|
||||
inc = 'patch'
|
||||
break
|
||||
}
|
||||
break
|
||||
case '--preid':
|
||||
identifier = argv.shift()
|
||||
break
|
||||
case '-r': case '--range':
|
||||
range.push(argv.shift())
|
||||
break
|
||||
case '-c': case '--coerce':
|
||||
coerce = true
|
||||
break
|
||||
case '--rtl':
|
||||
rtl = true
|
||||
break
|
||||
case '--ltr':
|
||||
rtl = false
|
||||
break
|
||||
case '-h': case '--help': case '-?':
|
||||
return help()
|
||||
default:
|
||||
versions.push(a)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
|
||||
|
||||
versions = versions.map((v) => {
|
||||
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||
}).filter((v) => {
|
||||
return semver.valid(v)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
|
||||
|
||||
for (let i = 0, l = range.length; i < l; i++) {
|
||||
versions = versions.filter((v) => {
|
||||
return semver.satisfies(v, range[i], options)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
|
||||
const failInc = () => {
|
||||
console.error('--inc can only be used on a single version with no range')
|
||||
fail()
|
||||
}
|
||||
|
||||
const fail = () => process.exit(1)
|
||||
|
||||
const success = () => {
|
||||
const compare = reverse ? 'rcompare' : 'compare'
|
||||
versions.sort((a, b) => {
|
||||
return semver[compare](a, b, options)
|
||||
}).map((v) => {
|
||||
return semver.clean(v, options)
|
||||
}).map((v) => {
|
||||
return inc ? semver.inc(v, inc, options, identifier) : v
|
||||
}).forEach((v, i, _) => { console.log(v) })
|
||||
}
|
||||
|
||||
const help = () => console.log(
|
||||
`SemVer ${version}
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
--rtl
|
||||
Coerce version strings right to left
|
||||
|
||||
--ltr
|
||||
Coerce version strings left to right (default)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.`)
|
||||
|
||||
main()
|
139
assets_old/node_modules/core-js-compat/node_modules/semver/classes/comparator.js
generated
vendored
Normal file
139
assets_old/node_modules/core-js-compat/node_modules/semver/classes/comparator.js
generated
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
const ANY = Symbol('SemVer ANY')
|
||||
// hoisted class for cyclic dependency
|
||||
class Comparator {
|
||||
static get ANY () {
|
||||
return ANY
|
||||
}
|
||||
constructor (comp, options) {
|
||||
if (!options || typeof options !== 'object') {
|
||||
options = {
|
||||
loose: !!options,
|
||||
includePrerelease: false
|
||||
}
|
||||
}
|
||||
|
||||
if (comp instanceof Comparator) {
|
||||
if (comp.loose === !!options.loose) {
|
||||
return comp
|
||||
} else {
|
||||
comp = comp.value
|
||||
}
|
||||
}
|
||||
|
||||
debug('comparator', comp, options)
|
||||
this.options = options
|
||||
this.loose = !!options.loose
|
||||
this.parse(comp)
|
||||
|
||||
if (this.semver === ANY) {
|
||||
this.value = ''
|
||||
} else {
|
||||
this.value = this.operator + this.semver.version
|
||||
}
|
||||
|
||||
debug('comp', this)
|
||||
}
|
||||
|
||||
parse (comp) {
|
||||
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
||||
const m = comp.match(r)
|
||||
|
||||
if (!m) {
|
||||
throw new TypeError(`Invalid comparator: ${comp}`)
|
||||
}
|
||||
|
||||
this.operator = m[1] !== undefined ? m[1] : ''
|
||||
if (this.operator === '=') {
|
||||
this.operator = ''
|
||||
}
|
||||
|
||||
// if it literally is just '>' or '' then allow anything.
|
||||
if (!m[2]) {
|
||||
this.semver = ANY
|
||||
} else {
|
||||
this.semver = new SemVer(m[2], this.options.loose)
|
||||
}
|
||||
}
|
||||
|
||||
toString () {
|
||||
return this.value
|
||||
}
|
||||
|
||||
test (version) {
|
||||
debug('Comparator.test', version, this.options.loose)
|
||||
|
||||
if (this.semver === ANY || version === ANY) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (typeof version === 'string') {
|
||||
try {
|
||||
version = new SemVer(version, this.options)
|
||||
} catch (er) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return cmp(version, this.operator, this.semver, this.options)
|
||||
}
|
||||
|
||||
intersects (comp, options) {
|
||||
if (!(comp instanceof Comparator)) {
|
||||
throw new TypeError('a Comparator is required')
|
||||
}
|
||||
|
||||
if (!options || typeof options !== 'object') {
|
||||
options = {
|
||||
loose: !!options,
|
||||
includePrerelease: false
|
||||
}
|
||||
}
|
||||
|
||||
if (this.operator === '') {
|
||||
if (this.value === '') {
|
||||
return true
|
||||
}
|
||||
return new Range(comp.value, options).test(this.value)
|
||||
} else if (comp.operator === '') {
|
||||
if (comp.value === '') {
|
||||
return true
|
||||
}
|
||||
return new Range(this.value, options).test(comp.semver)
|
||||
}
|
||||
|
||||
const sameDirectionIncreasing =
|
||||
(this.operator === '>=' || this.operator === '>') &&
|
||||
(comp.operator === '>=' || comp.operator === '>')
|
||||
const sameDirectionDecreasing =
|
||||
(this.operator === '<=' || this.operator === '<') &&
|
||||
(comp.operator === '<=' || comp.operator === '<')
|
||||
const sameSemVer = this.semver.version === comp.semver.version
|
||||
const differentDirectionsInclusive =
|
||||
(this.operator === '>=' || this.operator === '<=') &&
|
||||
(comp.operator === '>=' || comp.operator === '<=')
|
||||
const oppositeDirectionsLessThan =
|
||||
cmp(this.semver, '<', comp.semver, options) &&
|
||||
(this.operator === '>=' || this.operator === '>') &&
|
||||
(comp.operator === '<=' || comp.operator === '<')
|
||||
const oppositeDirectionsGreaterThan =
|
||||
cmp(this.semver, '>', comp.semver, options) &&
|
||||
(this.operator === '<=' || this.operator === '<') &&
|
||||
(comp.operator === '>=' || comp.operator === '>')
|
||||
|
||||
return (
|
||||
sameDirectionIncreasing ||
|
||||
sameDirectionDecreasing ||
|
||||
(sameSemVer && differentDirectionsInclusive) ||
|
||||
oppositeDirectionsLessThan ||
|
||||
oppositeDirectionsGreaterThan
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Comparator
|
||||
|
||||
const {re, t} = require('../internal/re')
|
||||
const cmp = require('../functions/cmp')
|
||||
const debug = require('../internal/debug')
|
||||
const SemVer = require('./semver')
|
||||
const Range = require('./range')
|
5
assets_old/node_modules/core-js-compat/node_modules/semver/classes/index.js
generated
vendored
Normal file
5
assets_old/node_modules/core-js-compat/node_modules/semver/classes/index.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
SemVer: require('./semver.js'),
|
||||
Range: require('./range.js'),
|
||||
Comparator: require('./comparator.js')
|
||||
}
|
448
assets_old/node_modules/core-js-compat/node_modules/semver/classes/range.js
generated
vendored
Normal file
448
assets_old/node_modules/core-js-compat/node_modules/semver/classes/range.js
generated
vendored
Normal file
|
@ -0,0 +1,448 @@
|
|||
// hoisted class for cyclic dependency
|
||||
class Range {
|
||||
constructor (range, options) {
|
||||
if (!options || typeof options !== 'object') {
|
||||
options = {
|
||||
loose: !!options,
|
||||
includePrerelease: false
|
||||
}
|
||||
}
|
||||
|
||||
if (range instanceof Range) {
|
||||
if (
|
||||
range.loose === !!options.loose &&
|
||||
range.includePrerelease === !!options.includePrerelease
|
||||
) {
|
||||
return range
|
||||
} else {
|
||||
return new Range(range.raw, options)
|
||||
}
|
||||
}
|
||||
|
||||
if (range instanceof Comparator) {
|
||||
// just put it in the set and return
|
||||
this.raw = range.value
|
||||
this.set = [[range]]
|
||||
this.format()
|
||||
return this
|
||||
}
|
||||
|
||||
this.options = options
|
||||
this.loose = !!options.loose
|
||||
this.includePrerelease = !!options.includePrerelease
|
||||
|
||||
// First, split based on boolean or ||
|
||||
this.raw = range
|
||||
this.set = range
|
||||
.split(/\s*\|\|\s*/)
|
||||
// map the range to a 2d array of comparators
|
||||
.map(range => this.parseRange(range.trim()))
|
||||
// throw out any comparator lists that are empty
|
||||
// this generally means that it was not a valid range, which is allowed
|
||||
// in loose mode, but will still throw if the WHOLE range is invalid.
|
||||
.filter(c => c.length)
|
||||
|
||||
if (!this.set.length) {
|
||||
throw new TypeError(`Invalid SemVer Range: ${range}`)
|
||||
}
|
||||
|
||||
this.format()
|
||||
}
|
||||
|
||||
format () {
|
||||
this.range = this.set
|
||||
.map((comps) => {
|
||||
return comps.join(' ').trim()
|
||||
})
|
||||
.join('||')
|
||||
.trim()
|
||||
return this.range
|
||||
}
|
||||
|
||||
toString () {
|
||||
return this.range
|
||||
}
|
||||
|
||||
parseRange (range) {
|
||||
const loose = this.options.loose
|
||||
range = range.trim()
|
||||
// `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
|
||||
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
|
||||
range = range.replace(hr, hyphenReplace)
|
||||
debug('hyphen replace', range)
|
||||
// `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
|
||||
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
|
||||
debug('comparator trim', range, re[t.COMPARATORTRIM])
|
||||
|
||||
// `~ 1.2.3` => `~1.2.3`
|
||||
range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
|
||||
|
||||
// `^ 1.2.3` => `^1.2.3`
|
||||
range = range.replace(re[t.CARETTRIM], caretTrimReplace)
|
||||
|
||||
// normalize spaces
|
||||
range = range.split(/\s+/).join(' ')
|
||||
|
||||
// At this point, the range is completely trimmed and
|
||||
// ready to be split into comparators.
|
||||
|
||||
const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
||||
return range
|
||||
.split(' ')
|
||||
.map(comp => parseComparator(comp, this.options))
|
||||
.join(' ')
|
||||
.split(/\s+/)
|
||||
// in loose mode, throw out any that are not valid comparators
|
||||
.filter(this.options.loose ? comp => !!comp.match(compRe) : () => true)
|
||||
.map(comp => new Comparator(comp, this.options))
|
||||
}
|
||||
|
||||
intersects (range, options) {
|
||||
if (!(range instanceof Range)) {
|
||||
throw new TypeError('a Range is required')
|
||||
}
|
||||
|
||||
return this.set.some((thisComparators) => {
|
||||
return (
|
||||
isSatisfiable(thisComparators, options) &&
|
||||
range.set.some((rangeComparators) => {
|
||||
return (
|
||||
isSatisfiable(rangeComparators, options) &&
|
||||
thisComparators.every((thisComparator) => {
|
||||
return rangeComparators.every((rangeComparator) => {
|
||||
return thisComparator.intersects(rangeComparator, options)
|
||||
})
|
||||
})
|
||||
)
|
||||
})
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
// if ANY of the sets match ALL of its comparators, then pass
|
||||
test (version) {
|
||||
if (!version) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (typeof version === 'string') {
|
||||
try {
|
||||
version = new SemVer(version, this.options)
|
||||
} catch (er) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.set.length; i++) {
|
||||
if (testSet(this.set[i], version, this.options)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
module.exports = Range
|
||||
|
||||
const Comparator = require('./comparator')
|
||||
const debug = require('../internal/debug')
|
||||
const SemVer = require('./semver')
|
||||
const {
|
||||
re,
|
||||
t,
|
||||
comparatorTrimReplace,
|
||||
tildeTrimReplace,
|
||||
caretTrimReplace
|
||||
} = require('../internal/re')
|
||||
|
||||
// take a set of comparators and determine whether there
|
||||
// exists a version which can satisfy it
|
||||
const isSatisfiable = (comparators, options) => {
|
||||
let result = true
|
||||
const remainingComparators = comparators.slice()
|
||||
let testComparator = remainingComparators.pop()
|
||||
|
||||
while (result && remainingComparators.length) {
|
||||
result = remainingComparators.every((otherComparator) => {
|
||||
return testComparator.intersects(otherComparator, options)
|
||||
})
|
||||
|
||||
testComparator = remainingComparators.pop()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// comprised of xranges, tildes, stars, and gtlt's at this point.
|
||||
// already replaced the hyphen ranges
|
||||
// turn into a set of JUST comparators.
|
||||
const parseComparator = (comp, options) => {
|
||||
debug('comp', comp, options)
|
||||
comp = replaceCarets(comp, options)
|
||||
debug('caret', comp)
|
||||
comp = replaceTildes(comp, options)
|
||||
debug('tildes', comp)
|
||||
comp = replaceXRanges(comp, options)
|
||||
debug('xrange', comp)
|
||||
comp = replaceStars(comp, options)
|
||||
debug('stars', comp)
|
||||
return comp
|
||||
}
|
||||
|
||||
const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
|
||||
|
||||
// ~, ~> --> * (any, kinda silly)
|
||||
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
|
||||
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
|
||||
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
|
||||
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
|
||||
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
|
||||
const replaceTildes = (comp, options) =>
|
||||
comp.trim().split(/\s+/).map((comp) => {
|
||||
return replaceTilde(comp, options)
|
||||
}).join(' ')
|
||||
|
||||
const replaceTilde = (comp, options) => {
|
||||
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
|
||||
return comp.replace(r, (_, M, m, p, pr) => {
|
||||
debug('tilde', comp, _, M, m, p, pr)
|
||||
let ret
|
||||
|
||||
if (isX(M)) {
|
||||
ret = ''
|
||||
} else if (isX(m)) {
|
||||
ret = `>=${M}.0.0 <${+M + 1}.0.0`
|
||||
} else if (isX(p)) {
|
||||
// ~1.2 == >=1.2.0 <1.3.0
|
||||
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0`
|
||||
} else if (pr) {
|
||||
debug('replaceTilde pr', pr)
|
||||
ret = `>=${M}.${m}.${p}-${pr
|
||||
} <${M}.${+m + 1}.0`
|
||||
} else {
|
||||
// ~1.2.3 == >=1.2.3 <1.3.0
|
||||
ret = `>=${M}.${m}.${p
|
||||
} <${M}.${+m + 1}.0`
|
||||
}
|
||||
|
||||
debug('tilde return', ret)
|
||||
return ret
|
||||
})
|
||||
}
|
||||
|
||||
// ^ --> * (any, kinda silly)
|
||||
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
|
||||
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
|
||||
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
|
||||
// ^1.2.3 --> >=1.2.3 <2.0.0
|
||||
// ^1.2.0 --> >=1.2.0 <2.0.0
|
||||
const replaceCarets = (comp, options) =>
|
||||
comp.trim().split(/\s+/).map((comp) => {
|
||||
return replaceCaret(comp, options)
|
||||
}).join(' ')
|
||||
|
||||
const replaceCaret = (comp, options) => {
|
||||
debug('caret', comp, options)
|
||||
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
|
||||
return comp.replace(r, (_, M, m, p, pr) => {
|
||||
debug('caret', comp, _, M, m, p, pr)
|
||||
let ret
|
||||
|
||||
if (isX(M)) {
|
||||
ret = ''
|
||||
} else if (isX(m)) {
|
||||
ret = `>=${M}.0.0 <${+M + 1}.0.0`
|
||||
} else if (isX(p)) {
|
||||
if (M === '0') {
|
||||
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0`
|
||||
} else {
|
||||
ret = `>=${M}.${m}.0 <${+M + 1}.0.0`
|
||||
}
|
||||
} else if (pr) {
|
||||
debug('replaceCaret pr', pr)
|
||||
if (M === '0') {
|
||||
if (m === '0') {
|
||||
ret = `>=${M}.${m}.${p}-${pr
|
||||
} <${M}.${m}.${+p + 1}`
|
||||
} else {
|
||||
ret = `>=${M}.${m}.${p}-${pr
|
||||
} <${M}.${+m + 1}.0`
|
||||
}
|
||||
} else {
|
||||
ret = `>=${M}.${m}.${p}-${pr
|
||||
} <${+M + 1}.0.0`
|
||||
}
|
||||
} else {
|
||||
debug('no pr')
|
||||
if (M === '0') {
|
||||
if (m === '0') {
|
||||
ret = `>=${M}.${m}.${p
|
||||
} <${M}.${m}.${+p + 1}`
|
||||
} else {
|
||||
ret = `>=${M}.${m}.${p
|
||||
} <${M}.${+m + 1}.0`
|
||||
}
|
||||
} else {
|
||||
ret = `>=${M}.${m}.${p
|
||||
} <${+M + 1}.0.0`
|
||||
}
|
||||
}
|
||||
|
||||
debug('caret return', ret)
|
||||
return ret
|
||||
})
|
||||
}
|
||||
|
||||
const replaceXRanges = (comp, options) => {
|
||||
debug('replaceXRanges', comp, options)
|
||||
return comp.split(/\s+/).map((comp) => {
|
||||
return replaceXRange(comp, options)
|
||||
}).join(' ')
|
||||
}
|
||||
|
||||
const replaceXRange = (comp, options) => {
|
||||
comp = comp.trim()
|
||||
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
|
||||
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
||||
debug('xRange', comp, ret, gtlt, M, m, p, pr)
|
||||
const xM = isX(M)
|
||||
const xm = xM || isX(m)
|
||||
const xp = xm || isX(p)
|
||||
const anyX = xp
|
||||
|
||||
if (gtlt === '=' && anyX) {
|
||||
gtlt = ''
|
||||
}
|
||||
|
||||
// if we're including prereleases in the match, then we need
|
||||
// to fix this to -0, the lowest possible prerelease value
|
||||
pr = options.includePrerelease ? '-0' : ''
|
||||
|
||||
if (xM) {
|
||||
if (gtlt === '>' || gtlt === '<') {
|
||||
// nothing is allowed
|
||||
ret = '<0.0.0-0'
|
||||
} else {
|
||||
// nothing is forbidden
|
||||
ret = '*'
|
||||
}
|
||||
} else if (gtlt && anyX) {
|
||||
// we know patch is an x, because we have any x at all.
|
||||
// replace X with 0
|
||||
if (xm) {
|
||||
m = 0
|
||||
}
|
||||
p = 0
|
||||
|
||||
if (gtlt === '>') {
|
||||
// >1 => >=2.0.0
|
||||
// >1.2 => >=1.3.0
|
||||
gtlt = '>='
|
||||
if (xm) {
|
||||
M = +M + 1
|
||||
m = 0
|
||||
p = 0
|
||||
} else {
|
||||
m = +m + 1
|
||||
p = 0
|
||||
}
|
||||
} else if (gtlt === '<=') {
|
||||
// <=0.7.x is actually <0.8.0, since any 0.7.x should
|
||||
// pass. Similarly, <=7.x is actually <8.0.0, etc.
|
||||
gtlt = '<'
|
||||
if (xm) {
|
||||
M = +M + 1
|
||||
} else {
|
||||
m = +m + 1
|
||||
}
|
||||
}
|
||||
|
||||
ret = `${gtlt + M}.${m}.${p}${pr}`
|
||||
} else if (xm) {
|
||||
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0${pr}`
|
||||
} else if (xp) {
|
||||
ret = `>=${M}.${m}.0${pr
|
||||
} <${M}.${+m + 1}.0${pr}`
|
||||
}
|
||||
|
||||
debug('xRange return', ret)
|
||||
|
||||
return ret
|
||||
})
|
||||
}
|
||||
|
||||
// Because * is AND-ed with everything else in the comparator,
|
||||
// and '' means "any version", just remove the *s entirely.
|
||||
const replaceStars = (comp, options) => {
|
||||
debug('replaceStars', comp, options)
|
||||
// Looseness is ignored here. star is always as loose as it gets!
|
||||
return comp.trim().replace(re[t.STAR], '')
|
||||
}
|
||||
|
||||
// This function is passed to string.replace(re[t.HYPHENRANGE])
|
||||
// M, m, patch, prerelease, build
|
||||
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
|
||||
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
|
||||
// 1.2 - 3.4 => >=1.2.0 <3.5.0
|
||||
const hyphenReplace = ($0,
|
||||
from, fM, fm, fp, fpr, fb,
|
||||
to, tM, tm, tp, tpr, tb) => {
|
||||
if (isX(fM)) {
|
||||
from = ''
|
||||
} else if (isX(fm)) {
|
||||
from = `>=${fM}.0.0`
|
||||
} else if (isX(fp)) {
|
||||
from = `>=${fM}.${fm}.0`
|
||||
} else {
|
||||
from = `>=${from}`
|
||||
}
|
||||
|
||||
if (isX(tM)) {
|
||||
to = ''
|
||||
} else if (isX(tm)) {
|
||||
to = `<${+tM + 1}.0.0`
|
||||
} else if (isX(tp)) {
|
||||
to = `<${tM}.${+tm + 1}.0`
|
||||
} else if (tpr) {
|
||||
to = `<=${tM}.${tm}.${tp}-${tpr}`
|
||||
} else {
|
||||
to = `<=${to}`
|
||||
}
|
||||
|
||||
return (`${from} ${to}`).trim()
|
||||
}
|
||||
|
||||
const testSet = (set, version, options) => {
|
||||
for (let i = 0; i < set.length; i++) {
|
||||
if (!set[i].test(version)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (version.prerelease.length && !options.includePrerelease) {
|
||||
// Find the set of versions that are allowed to have prereleases
|
||||
// For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
|
||||
// That should allow `1.2.3-pr.2` to pass.
|
||||
// However, `1.2.4-alpha.notready` should NOT be allowed,
|
||||
// even though it's within the range set by the comparators.
|
||||
for (let i = 0; i < set.length; i++) {
|
||||
debug(set[i].semver)
|
||||
if (set[i].semver === Comparator.ANY) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (set[i].semver.prerelease.length > 0) {
|
||||
const allowed = set[i].semver
|
||||
if (allowed.major === version.major &&
|
||||
allowed.minor === version.minor &&
|
||||
allowed.patch === version.patch) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Version has a -pre, but it's not one of the ones we like.
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
290
assets_old/node_modules/core-js-compat/node_modules/semver/classes/semver.js
generated
vendored
Normal file
290
assets_old/node_modules/core-js-compat/node_modules/semver/classes/semver.js
generated
vendored
Normal file
|
@ -0,0 +1,290 @@
|
|||
const debug = require('../internal/debug')
|
||||
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
|
||||
const { re, t } = require('../internal/re')
|
||||
|
||||
const { compareIdentifiers } = require('../internal/identifiers')
|
||||
class SemVer {
|
||||
constructor (version, options) {
|
||||
if (!options || typeof options !== 'object') {
|
||||
options = {
|
||||
loose: !!options,
|
||||
includePrerelease: false
|
||||
}
|
||||
}
|
||||
if (version instanceof SemVer) {
|
||||
if (version.loose === !!options.loose &&
|
||||
version.includePrerelease === !!options.includePrerelease) {
|
||||
return version
|
||||
} else {
|
||||
version = version.version
|
||||
}
|
||||
} else if (typeof version !== 'string') {
|
||||
throw new TypeError(`Invalid Version: ${version}`)
|
||||
}
|
||||
|
||||
if (version.length > MAX_LENGTH) {
|
||||
throw new TypeError(
|
||||
`version is longer than ${MAX_LENGTH} characters`
|
||||
)
|
||||
}
|
||||
|
||||
debug('SemVer', version, options)
|
||||
this.options = options
|
||||
this.loose = !!options.loose
|
||||
// this isn't actually relevant for versions, but keep it so that we
|
||||
// don't run into trouble passing this.options around.
|
||||
this.includePrerelease = !!options.includePrerelease
|
||||
|
||||
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
|
||||
|
||||
if (!m) {
|
||||
throw new TypeError(`Invalid Version: ${version}`)
|
||||
}
|
||||
|
||||
this.raw = version
|
||||
|
||||
// these are actually numbers
|
||||
this.major = +m[1]
|
||||
this.minor = +m[2]
|
||||
this.patch = +m[3]
|
||||
|
||||
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
||||
throw new TypeError('Invalid major version')
|
||||
}
|
||||
|
||||
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
||||
throw new TypeError('Invalid minor version')
|
||||
}
|
||||
|
||||
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
||||
throw new TypeError('Invalid patch version')
|
||||
}
|
||||
|
||||
// numberify any prerelease numeric ids
|
||||
if (!m[4]) {
|
||||
this.prerelease = []
|
||||
} else {
|
||||
this.prerelease = m[4].split('.').map((id) => {
|
||||
if (/^[0-9]+$/.test(id)) {
|
||||
const num = +id
|
||||
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
||||
return num
|
||||
}
|
||||
}
|
||||
return id
|
||||
})
|
||||
}
|
||||
|
||||
this.build = m[5] ? m[5].split('.') : []
|
||||
this.format()
|
||||
}
|
||||
|
||||
format () {
|
||||
this.version = `${this.major}.${this.minor}.${this.patch}`
|
||||
if (this.prerelease.length) {
|
||||
this.version += `-${this.prerelease.join('.')}`
|
||||
}
|
||||
return this.version
|
||||
}
|
||||
|
||||
toString () {
|
||||
return this.version
|
||||
}
|
||||
|
||||
compare (other) {
|
||||
debug('SemVer.compare', this.version, this.options, other)
|
||||
if (!(other instanceof SemVer)) {
|
||||
if (typeof other === 'string' && other === this.version) {
|
||||
return 0
|
||||
}
|
||||
other = new SemVer(other, this.options)
|
||||
}
|
||||
|
||||
if (other.version === this.version) {
|
||||
return 0
|
||||
}
|
||||
|
||||
return this.compareMain(other) || this.comparePre(other)
|
||||
}
|
||||
|
||||
compareMain (other) {
|
||||
if (!(other instanceof SemVer)) {
|
||||
other = new SemVer(other, this.options)
|
||||
}
|
||||
|
||||
return (
|
||||
compareIdentifiers(this.major, other.major) ||
|
||||
compareIdentifiers(this.minor, other.minor) ||
|
||||
compareIdentifiers(this.patch, other.patch)
|
||||
)
|
||||
}
|
||||
|
||||
comparePre (other) {
|
||||
if (!(other instanceof SemVer)) {
|
||||
other = new SemVer(other, this.options)
|
||||
}
|
||||
|
||||
// NOT having a prerelease is > having one
|
||||
if (this.prerelease.length && !other.prerelease.length) {
|
||||
return -1
|
||||
} else if (!this.prerelease.length && other.prerelease.length) {
|
||||
return 1
|
||||
} else if (!this.prerelease.length && !other.prerelease.length) {
|
||||
return 0
|
||||
}
|
||||
|
||||
let i = 0
|
||||
do {
|
||||
const a = this.prerelease[i]
|
||||
const b = other.prerelease[i]
|
||||
debug('prerelease compare', i, a, b)
|
||||
if (a === undefined && b === undefined) {
|
||||
return 0
|
||||
} else if (b === undefined) {
|
||||
return 1
|
||||
} else if (a === undefined) {
|
||||
return -1
|
||||
} else if (a === b) {
|
||||
continue
|
||||
} else {
|
||||
return compareIdentifiers(a, b)
|
||||
}
|
||||
} while (++i)
|
||||
}
|
||||
|
||||
compareBuild (other) {
|
||||
if (!(other instanceof SemVer)) {
|
||||
other = new SemVer(other, this.options)
|
||||
}
|
||||
|
||||
let i = 0
|
||||
do {
|
||||
const a = this.build[i]
|
||||
const b = other.build[i]
|
||||
debug('prerelease compare', i, a, b)
|
||||
if (a === undefined && b === undefined) {
|
||||
return 0
|
||||
} else if (b === undefined) {
|
||||
return 1
|
||||
} else if (a === undefined) {
|
||||
return -1
|
||||
} else if (a === b) {
|
||||
continue
|
||||
} else {
|
||||
return compareIdentifiers(a, b)
|
||||
}
|
||||
} while (++i)
|
||||
}
|
||||
|
||||
// preminor will bump the version up to the next minor release, and immediately
|
||||
// down to pre-release. premajor and prepatch work the same way.
|
||||
inc (release, identifier) {
|
||||
switch (release) {
|
||||
case 'premajor':
|
||||
this.prerelease.length = 0
|
||||
this.patch = 0
|
||||
this.minor = 0
|
||||
this.major++
|
||||
this.inc('pre', identifier)
|
||||
break
|
||||
case 'preminor':
|
||||
this.prerelease.length = 0
|
||||
this.patch = 0
|
||||
this.minor++
|
||||
this.inc('pre', identifier)
|
||||
break
|
||||
case 'prepatch':
|
||||
// If this is already a prerelease, it will bump to the next version
|
||||
// drop any prereleases that might already exist, since they are not
|
||||
// relevant at this point.
|
||||
this.prerelease.length = 0
|
||||
this.inc('patch', identifier)
|
||||
this.inc('pre', identifier)
|
||||
break
|
||||
// If the input is a non-prerelease version, this acts the same as
|
||||
// prepatch.
|
||||
case 'prerelease':
|
||||
if (this.prerelease.length === 0) {
|
||||
this.inc('patch', identifier)
|
||||
}
|
||||
this.inc('pre', identifier)
|
||||
break
|
||||
|
||||
case 'major':
|
||||
// If this is a pre-major version, bump up to the same major version.
|
||||
// Otherwise increment major.
|
||||
// 1.0.0-5 bumps to 1.0.0
|
||||
// 1.1.0 bumps to 2.0.0
|
||||
if (
|
||||
this.minor !== 0 ||
|
||||
this.patch !== 0 ||
|
||||
this.prerelease.length === 0
|
||||
) {
|
||||
this.major++
|
||||
}
|
||||
this.minor = 0
|
||||
this.patch = 0
|
||||
this.prerelease = []
|
||||
break
|
||||
case 'minor':
|
||||
// If this is a pre-minor version, bump up to the same minor version.
|
||||
// Otherwise increment minor.
|
||||
// 1.2.0-5 bumps to 1.2.0
|
||||
// 1.2.1 bumps to 1.3.0
|
||||
if (this.patch !== 0 || this.prerelease.length === 0) {
|
||||
this.minor++
|
||||
}
|
||||
this.patch = 0
|
||||
this.prerelease = []
|
||||
break
|
||||
case 'patch':
|
||||
// If this is not a pre-release version, it will increment the patch.
|
||||
// If it is a pre-release it will bump up to the same patch version.
|
||||
// 1.2.0-5 patches to 1.2.0
|
||||
// 1.2.0 patches to 1.2.1
|
||||
if (this.prerelease.length === 0) {
|
||||
this.patch++
|
||||
}
|
||||
this.prerelease = []
|
||||
break
|
||||
// This probably shouldn't be used publicly.
|
||||
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
||||
case 'pre':
|
||||
if (this.prerelease.length === 0) {
|
||||
this.prerelease = [0]
|
||||
} else {
|
||||
let i = this.prerelease.length
|
||||
while (--i >= 0) {
|
||||
if (typeof this.prerelease[i] === 'number') {
|
||||
this.prerelease[i]++
|
||||
i = -2
|
||||
}
|
||||
}
|
||||
if (i === -1) {
|
||||
// didn't increment anything
|
||||
this.prerelease.push(0)
|
||||
}
|
||||
}
|
||||
if (identifier) {
|
||||
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
|
||||
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
|
||||
if (this.prerelease[0] === identifier) {
|
||||
if (isNaN(this.prerelease[1])) {
|
||||
this.prerelease = [identifier, 0]
|
||||
}
|
||||
} else {
|
||||
this.prerelease = [identifier, 0]
|
||||
}
|
||||
}
|
||||
break
|
||||
|
||||
default:
|
||||
throw new Error(`invalid increment argument: ${release}`)
|
||||
}
|
||||
this.format()
|
||||
this.raw = this.version
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SemVer
|
6
assets_old/node_modules/core-js-compat/node_modules/semver/functions/clean.js
generated
vendored
Normal file
6
assets_old/node_modules/core-js-compat/node_modules/semver/functions/clean.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
const parse = require('./parse')
|
||||
const clean = (version, options) => {
|
||||
const s = parse(version.trim().replace(/^[=v]+/, ''), options)
|
||||
return s ? s.version : null
|
||||
}
|
||||
module.exports = clean
|
48
assets_old/node_modules/core-js-compat/node_modules/semver/functions/cmp.js
generated
vendored
Normal file
48
assets_old/node_modules/core-js-compat/node_modules/semver/functions/cmp.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
const eq = require('./eq')
|
||||
const neq = require('./neq')
|
||||
const gt = require('./gt')
|
||||
const gte = require('./gte')
|
||||
const lt = require('./lt')
|
||||
const lte = require('./lte')
|
||||
|
||||
const cmp = (a, op, b, loose) => {
|
||||
switch (op) {
|
||||
case '===':
|
||||
if (typeof a === 'object')
|
||||
a = a.version
|
||||
if (typeof b === 'object')
|
||||
b = b.version
|
||||
return a === b
|
||||
|
||||
case '!==':
|
||||
if (typeof a === 'object')
|
||||
a = a.version
|
||||
if (typeof b === 'object')
|
||||
b = b.version
|
||||
return a !== b
|
||||
|
||||
case '':
|
||||
case '=':
|
||||
case '==':
|
||||
return eq(a, b, loose)
|
||||
|
||||
case '!=':
|
||||
return neq(a, b, loose)
|
||||
|
||||
case '>':
|
||||
return gt(a, b, loose)
|
||||
|
||||
case '>=':
|
||||
return gte(a, b, loose)
|
||||
|
||||
case '<':
|
||||
return lt(a, b, loose)
|
||||
|
||||
case '<=':
|
||||
return lte(a, b, loose)
|
||||
|
||||
default:
|
||||
throw new TypeError(`Invalid operator: ${op}`)
|
||||
}
|
||||
}
|
||||
module.exports = cmp
|
51
assets_old/node_modules/core-js-compat/node_modules/semver/functions/coerce.js
generated
vendored
Normal file
51
assets_old/node_modules/core-js-compat/node_modules/semver/functions/coerce.js
generated
vendored
Normal file
|
@ -0,0 +1,51 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const parse = require('./parse')
|
||||
const {re, t} = require('../internal/re')
|
||||
|
||||
const coerce = (version, options) => {
|
||||
if (version instanceof SemVer) {
|
||||
return version
|
||||
}
|
||||
|
||||
if (typeof version === 'number') {
|
||||
version = String(version)
|
||||
}
|
||||
|
||||
if (typeof version !== 'string') {
|
||||
return null
|
||||
}
|
||||
|
||||
options = options || {}
|
||||
|
||||
let match = null
|
||||
if (!options.rtl) {
|
||||
match = version.match(re[t.COERCE])
|
||||
} else {
|
||||
// Find the right-most coercible string that does not share
|
||||
// a terminus with a more left-ward coercible string.
|
||||
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
||||
//
|
||||
// Walk through the string checking with a /g regexp
|
||||
// Manually set the index so as to pick up overlapping matches.
|
||||
// Stop when we get a match that ends at the string end, since no
|
||||
// coercible string can be more right-ward without the same terminus.
|
||||
let next
|
||||
while ((next = re[t.COERCERTL].exec(version)) &&
|
||||
(!match || match.index + match[0].length !== version.length)
|
||||
) {
|
||||
if (!match ||
|
||||
next.index + next[0].length !== match.index + match[0].length) {
|
||||
match = next
|
||||
}
|
||||
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
||||
}
|
||||
// leave it in a clean state
|
||||
re[t.COERCERTL].lastIndex = -1
|
||||
}
|
||||
|
||||
if (match === null)
|
||||
return null
|
||||
|
||||
return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
|
||||
}
|
||||
module.exports = coerce
|
7
assets_old/node_modules/core-js-compat/node_modules/semver/functions/compare-build.js
generated
vendored
Normal file
7
assets_old/node_modules/core-js-compat/node_modules/semver/functions/compare-build.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const compareBuild = (a, b, loose) => {
|
||||
const versionA = new SemVer(a, loose)
|
||||
const versionB = new SemVer(b, loose)
|
||||
return versionA.compare(versionB) || versionA.compareBuild(versionB)
|
||||
}
|
||||
module.exports = compareBuild
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/compare-loose.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/compare-loose.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const compareLoose = (a, b) => compare(a, b, true)
|
||||
module.exports = compareLoose
|
5
assets_old/node_modules/core-js-compat/node_modules/semver/functions/compare.js
generated
vendored
Normal file
5
assets_old/node_modules/core-js-compat/node_modules/semver/functions/compare.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const compare = (a, b, loose) =>
|
||||
new SemVer(a, loose).compare(new SemVer(b, loose))
|
||||
|
||||
module.exports = compare
|
25
assets_old/node_modules/core-js-compat/node_modules/semver/functions/diff.js
generated
vendored
Normal file
25
assets_old/node_modules/core-js-compat/node_modules/semver/functions/diff.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
const parse = require('./parse')
|
||||
const eq = require('./eq')
|
||||
|
||||
const diff = (version1, version2) => {
|
||||
if (eq(version1, version2)) {
|
||||
return null
|
||||
} else {
|
||||
const v1 = parse(version1)
|
||||
const v2 = parse(version2)
|
||||
let prefix = ''
|
||||
if (v1.prerelease.length || v2.prerelease.length) {
|
||||
prefix = 'pre'
|
||||
var defaultResult = 'prerelease'
|
||||
}
|
||||
for (const key in v1) {
|
||||
if (key === 'major' || key === 'minor' || key === 'patch') {
|
||||
if (v1[key] !== v2[key]) {
|
||||
return prefix + key
|
||||
}
|
||||
}
|
||||
}
|
||||
return defaultResult // may be undefined
|
||||
}
|
||||
}
|
||||
module.exports = diff
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/eq.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/eq.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const eq = (a, b, loose) => compare(a, b, loose) === 0
|
||||
module.exports = eq
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/gt.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/gt.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const gt = (a, b, loose) => compare(a, b, loose) > 0
|
||||
module.exports = gt
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/gte.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/gte.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const gte = (a, b, loose) => compare(a, b, loose) >= 0
|
||||
module.exports = gte
|
15
assets_old/node_modules/core-js-compat/node_modules/semver/functions/inc.js
generated
vendored
Normal file
15
assets_old/node_modules/core-js-compat/node_modules/semver/functions/inc.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
|
||||
const inc = (version, release, options, identifier) => {
|
||||
if (typeof (options) === 'string') {
|
||||
identifier = options
|
||||
options = undefined
|
||||
}
|
||||
|
||||
try {
|
||||
return new SemVer(version, options).inc(release, identifier).version
|
||||
} catch (er) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
module.exports = inc
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/lt.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/lt.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const lt = (a, b, loose) => compare(a, b, loose) < 0
|
||||
module.exports = lt
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/lte.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/lte.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const lte = (a, b, loose) => compare(a, b, loose) <= 0
|
||||
module.exports = lte
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/major.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/major.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const major = (a, loose) => new SemVer(a, loose).major
|
||||
module.exports = major
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/minor.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/minor.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const minor = (a, loose) => new SemVer(a, loose).minor
|
||||
module.exports = minor
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/neq.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/neq.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const neq = (a, b, loose) => compare(a, b, loose) !== 0
|
||||
module.exports = neq
|
37
assets_old/node_modules/core-js-compat/node_modules/semver/functions/parse.js
generated
vendored
Normal file
37
assets_old/node_modules/core-js-compat/node_modules/semver/functions/parse.js
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
const {MAX_LENGTH} = require('../internal/constants')
|
||||
const { re, t } = require('../internal/re')
|
||||
const SemVer = require('../classes/semver')
|
||||
|
||||
const parse = (version, options) => {
|
||||
if (!options || typeof options !== 'object') {
|
||||
options = {
|
||||
loose: !!options,
|
||||
includePrerelease: false
|
||||
}
|
||||
}
|
||||
|
||||
if (version instanceof SemVer) {
|
||||
return version
|
||||
}
|
||||
|
||||
if (typeof version !== 'string') {
|
||||
return null
|
||||
}
|
||||
|
||||
if (version.length > MAX_LENGTH) {
|
||||
return null
|
||||
}
|
||||
|
||||
const r = options.loose ? re[t.LOOSE] : re[t.FULL]
|
||||
if (!r.test(version)) {
|
||||
return null
|
||||
}
|
||||
|
||||
try {
|
||||
return new SemVer(version, options)
|
||||
} catch (er) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = parse
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/patch.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/patch.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const patch = (a, loose) => new SemVer(a, loose).patch
|
||||
module.exports = patch
|
6
assets_old/node_modules/core-js-compat/node_modules/semver/functions/prerelease.js
generated
vendored
Normal file
6
assets_old/node_modules/core-js-compat/node_modules/semver/functions/prerelease.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
const parse = require('./parse')
|
||||
const prerelease = (version, options) => {
|
||||
const parsed = parse(version, options)
|
||||
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
|
||||
}
|
||||
module.exports = prerelease
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/rcompare.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/rcompare.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compare = require('./compare')
|
||||
const rcompare = (a, b, loose) => compare(b, a, loose)
|
||||
module.exports = rcompare
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/rsort.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/rsort.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compareBuild = require('./compare-build')
|
||||
const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
|
||||
module.exports = rsort
|
10
assets_old/node_modules/core-js-compat/node_modules/semver/functions/satisfies.js
generated
vendored
Normal file
10
assets_old/node_modules/core-js-compat/node_modules/semver/functions/satisfies.js
generated
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
const Range = require('../classes/range')
|
||||
const satisfies = (version, range, options) => {
|
||||
try {
|
||||
range = new Range(range, options)
|
||||
} catch (er) {
|
||||
return false
|
||||
}
|
||||
return range.test(version)
|
||||
}
|
||||
module.exports = satisfies
|
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/sort.js
generated
vendored
Normal file
3
assets_old/node_modules/core-js-compat/node_modules/semver/functions/sort.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const compareBuild = require('./compare-build')
|
||||
const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
|
||||
module.exports = sort
|
6
assets_old/node_modules/core-js-compat/node_modules/semver/functions/valid.js
generated
vendored
Normal file
6
assets_old/node_modules/core-js-compat/node_modules/semver/functions/valid.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
const parse = require('./parse')
|
||||
const valid = (version, options) => {
|
||||
const v = parse(version, options)
|
||||
return v ? v.version : null
|
||||
}
|
||||
module.exports = valid
|
64
assets_old/node_modules/core-js-compat/node_modules/semver/index.js
generated
vendored
Normal file
64
assets_old/node_modules/core-js-compat/node_modules/semver/index.js
generated
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
const lrCache = {}
|
||||
const lazyRequire = (path, subkey) => {
|
||||
const module = lrCache[path] || (lrCache[path] = require(path))
|
||||
return subkey ? module[subkey] : module
|
||||
}
|
||||
|
||||
const lazyExport = (key, path, subkey) => {
|
||||
Object.defineProperty(exports, key, {
|
||||
get: () => {
|
||||
const res = lazyRequire(path, subkey)
|
||||
Object.defineProperty(exports, key, {
|
||||
value: res,
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
})
|
||||
return res
|
||||
},
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
})
|
||||
}
|
||||
|
||||
lazyExport('re', './internal/re', 're')
|
||||
lazyExport('src', './internal/re', 'src')
|
||||
lazyExport('tokens', './internal/re', 't')
|
||||
lazyExport('SEMVER_SPEC_VERSION', './internal/constants', 'SEMVER_SPEC_VERSION')
|
||||
lazyExport('SemVer', './classes/semver')
|
||||
lazyExport('compareIdentifiers', './internal/identifiers', 'compareIdentifiers')
|
||||
lazyExport('rcompareIdentifiers', './internal/identifiers', 'rcompareIdentifiers')
|
||||
lazyExport('parse', './functions/parse')
|
||||
lazyExport('valid', './functions/valid')
|
||||
lazyExport('clean', './functions/clean')
|
||||
lazyExport('inc', './functions/inc')
|
||||
lazyExport('diff', './functions/diff')
|
||||
lazyExport('major', './functions/major')
|
||||
lazyExport('minor', './functions/minor')
|
||||
lazyExport('patch', './functions/patch')
|
||||
lazyExport('prerelease', './functions/prerelease')
|
||||
lazyExport('compare', './functions/compare')
|
||||
lazyExport('rcompare', './functions/rcompare')
|
||||
lazyExport('compareLoose', './functions/compare-loose')
|
||||
lazyExport('compareBuild', './functions/compare-build')
|
||||
lazyExport('sort', './functions/sort')
|
||||
lazyExport('rsort', './functions/rsort')
|
||||
lazyExport('gt', './functions/gt')
|
||||
lazyExport('lt', './functions/lt')
|
||||
lazyExport('eq', './functions/eq')
|
||||
lazyExport('neq', './functions/neq')
|
||||
lazyExport('gte', './functions/gte')
|
||||
lazyExport('lte', './functions/lte')
|
||||
lazyExport('cmp', './functions/cmp')
|
||||
lazyExport('coerce', './functions/coerce')
|
||||
lazyExport('Comparator', './classes/comparator')
|
||||
lazyExport('Range', './classes/range')
|
||||
lazyExport('satisfies', './functions/satisfies')
|
||||
lazyExport('toComparators', './ranges/to-comparators')
|
||||
lazyExport('maxSatisfying', './ranges/max-satisfying')
|
||||
lazyExport('minSatisfying', './ranges/min-satisfying')
|
||||
lazyExport('minVersion', './ranges/min-version')
|
||||
lazyExport('validRange', './ranges/valid')
|
||||
lazyExport('outside', './ranges/outside')
|
||||
lazyExport('gtr', './ranges/gtr')
|
||||
lazyExport('ltr', './ranges/ltr')
|
||||
lazyExport('intersects', './ranges/intersects')
|
17
assets_old/node_modules/core-js-compat/node_modules/semver/internal/constants.js
generated
vendored
Normal file
17
assets_old/node_modules/core-js-compat/node_modules/semver/internal/constants.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Note: this is the semver.org version of the spec that it implements
|
||||
// Not necessarily the package version of this code.
|
||||
const SEMVER_SPEC_VERSION = '2.0.0'
|
||||
|
||||
const MAX_LENGTH = 256
|
||||
const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
|
||||
/* istanbul ignore next */ 9007199254740991
|
||||
|
||||
// Max safe segment length for coercion.
|
||||
const MAX_SAFE_COMPONENT_LENGTH = 16
|
||||
|
||||
module.exports = {
|
||||
SEMVER_SPEC_VERSION,
|
||||
MAX_LENGTH,
|
||||
MAX_SAFE_INTEGER,
|
||||
MAX_SAFE_COMPONENT_LENGTH
|
||||
}
|
9
assets_old/node_modules/core-js-compat/node_modules/semver/internal/debug.js
generated
vendored
Normal file
9
assets_old/node_modules/core-js-compat/node_modules/semver/internal/debug.js
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
const debug = (
|
||||
typeof process === 'object' &&
|
||||
process.env &&
|
||||
process.env.NODE_DEBUG &&
|
||||
/\bsemver\b/i.test(process.env.NODE_DEBUG)
|
||||
) ? (...args) => console.error('SEMVER', ...args)
|
||||
: () => {}
|
||||
|
||||
module.exports = debug
|
23
assets_old/node_modules/core-js-compat/node_modules/semver/internal/identifiers.js
generated
vendored
Normal file
23
assets_old/node_modules/core-js-compat/node_modules/semver/internal/identifiers.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
const numeric = /^[0-9]+$/
|
||||
const compareIdentifiers = (a, b) => {
|
||||
const anum = numeric.test(a)
|
||||
const bnum = numeric.test(b)
|
||||
|
||||
if (anum && bnum) {
|
||||
a = +a
|
||||
b = +b
|
||||
}
|
||||
|
||||
return a === b ? 0
|
||||
: (anum && !bnum) ? -1
|
||||
: (bnum && !anum) ? 1
|
||||
: a < b ? -1
|
||||
: 1
|
||||
}
|
||||
|
||||
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
|
||||
|
||||
module.exports = {
|
||||
compareIdentifiers,
|
||||
rcompareIdentifiers
|
||||
}
|
179
assets_old/node_modules/core-js-compat/node_modules/semver/internal/re.js
generated
vendored
Normal file
179
assets_old/node_modules/core-js-compat/node_modules/semver/internal/re.js
generated
vendored
Normal file
|
@ -0,0 +1,179 @@
|
|||
const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')
|
||||
const debug = require('./debug')
|
||||
exports = module.exports = {}
|
||||
|
||||
// The actual regexps go on exports.re
|
||||
const re = exports.re = []
|
||||
const src = exports.src = []
|
||||
const t = exports.t = {}
|
||||
let R = 0
|
||||
|
||||
const createToken = (name, value, isGlobal) => {
|
||||
const index = R++
|
||||
debug(index, value)
|
||||
t[name] = index
|
||||
src[index] = value
|
||||
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
|
||||
}
|
||||
|
||||
// The following Regular Expressions can be used for tokenizing,
|
||||
// validating, and parsing SemVer version strings.
|
||||
|
||||
// ## Numeric Identifier
|
||||
// A single `0`, or a non-zero digit followed by zero or more digits.
|
||||
|
||||
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
|
||||
createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')
|
||||
|
||||
// ## Non-numeric Identifier
|
||||
// Zero or more digits, followed by a letter or hyphen, and then zero or
|
||||
// more letters, digits, or hyphens.
|
||||
|
||||
createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*')
|
||||
|
||||
// ## Main Version
|
||||
// Three dot-separated numeric identifiers.
|
||||
|
||||
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
|
||||
`(${src[t.NUMERICIDENTIFIER]})\\.` +
|
||||
`(${src[t.NUMERICIDENTIFIER]})`)
|
||||
|
||||
createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
||||
`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
|
||||
`(${src[t.NUMERICIDENTIFIERLOOSE]})`)
|
||||
|
||||
// ## Pre-release Version Identifier
|
||||
// A numeric identifier, or a non-numeric identifier.
|
||||
|
||||
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
|
||||
}|${src[t.NONNUMERICIDENTIFIER]})`)
|
||||
|
||||
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
|
||||
}|${src[t.NONNUMERICIDENTIFIER]})`)
|
||||
|
||||
// ## Pre-release Version
|
||||
// Hyphen, followed by one or more dot-separated pre-release version
|
||||
// identifiers.
|
||||
|
||||
createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
|
||||
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
|
||||
|
||||
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
|
||||
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
|
||||
|
||||
// ## Build Metadata Identifier
|
||||
// Any combination of digits, letters, or hyphens.
|
||||
|
||||
createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')
|
||||
|
||||
// ## Build Metadata
|
||||
// Plus sign, followed by one or more period-separated build metadata
|
||||
// identifiers.
|
||||
|
||||
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
|
||||
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
|
||||
|
||||
// ## Full Version String
|
||||
// A main version, followed optionally by a pre-release version and
|
||||
// build metadata.
|
||||
|
||||
// Note that the only major, minor, patch, and pre-release sections of
|
||||
// the version string are capturing groups. The build metadata is not a
|
||||
// capturing group, because it should not ever be used in version
|
||||
// comparison.
|
||||
|
||||
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
|
||||
}${src[t.PRERELEASE]}?${
|
||||
src[t.BUILD]}?`)
|
||||
|
||||
createToken('FULL', `^${src[t.FULLPLAIN]}$`)
|
||||
|
||||
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
|
||||
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
|
||||
// common in the npm registry.
|
||||
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
|
||||
}${src[t.PRERELEASELOOSE]}?${
|
||||
src[t.BUILD]}?`)
|
||||
|
||||
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
|
||||
|
||||
createToken('GTLT', '((?:<|>)?=?)')
|
||||
|
||||
// Something like "2.*" or "1.2.x".
|
||||
// Note that "x.x" is a valid xRange identifer, meaning "any version"
|
||||
// Only the first item is strictly required.
|
||||
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
|
||||
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
|
||||
|
||||
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
|
||||
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
||||
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
|
||||
`(?:${src[t.PRERELEASE]})?${
|
||||
src[t.BUILD]}?` +
|
||||
`)?)?`)
|
||||
|
||||
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
||||
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
||||
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
|
||||
`(?:${src[t.PRERELEASELOOSE]})?${
|
||||
src[t.BUILD]}?` +
|
||||
`)?)?`)
|
||||
|
||||
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
|
||||
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
|
||||
|
||||
// Coercion.
|
||||
// Extract anything that could conceivably be a part of a valid semver
|
||||
createToken('COERCE', `${'(^|[^\\d])' +
|
||||
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
||||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
||||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
||||
`(?:$|[^\\d])`)
|
||||
createToken('COERCERTL', src[t.COERCE], true)
|
||||
|
||||
// Tilde ranges.
|
||||
// Meaning is "reasonably at or greater than"
|
||||
createToken('LONETILDE', '(?:~>?)')
|
||||
|
||||
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
|
||||
exports.tildeTrimReplace = '$1~'
|
||||
|
||||
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
|
||||
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
|
||||
|
||||
// Caret ranges.
|
||||
// Meaning is "at least and backwards compatible with"
|
||||
createToken('LONECARET', '(?:\\^)')
|
||||
|
||||
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
|
||||
exports.caretTrimReplace = '$1^'
|
||||
|
||||
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
|
||||
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
|
||||
|
||||
// A simple gt/lt/eq thing, or just "" to indicate "any version"
|
||||
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
|
||||
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
|
||||
|
||||
// An expression to strip any whitespace between the gtlt and the thing
|
||||
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
|
||||
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
|
||||
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
|
||||
exports.comparatorTrimReplace = '$1$2$3'
|
||||
|
||||
// Something like `1.2.3 - 1.2.4`
|
||||
// Note that these all use the loose form, because they'll be
|
||||
// checked against either the strict or loose comparator form
|
||||
// later.
|
||||
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
|
||||
`\\s+-\\s+` +
|
||||
`(${src[t.XRANGEPLAIN]})` +
|
||||
`\\s*$`)
|
||||
|
||||
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
|
||||
`\\s+-\\s+` +
|
||||
`(${src[t.XRANGEPLAINLOOSE]})` +
|
||||
`\\s*$`)
|
||||
|
||||
// Star ranges basically just allow anything at all.
|
||||
createToken('STAR', '(<|>)?=?\\s*\\*')
|
34
assets_old/node_modules/core-js-compat/node_modules/semver/package.json
generated
vendored
Normal file
34
assets_old/node_modules/core-js-compat/node_modules/semver/package.json
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "semver",
|
||||
"version": "7.0.0",
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"snap": "tap",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"postpublish": "git push origin --follow-tags"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "^14.10.1"
|
||||
},
|
||||
"license": "ISC",
|
||||
"repository": "https://github.com/npm/node-semver",
|
||||
"bin": {
|
||||
"semver": "./bin/semver.js"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"range.bnf",
|
||||
"classes",
|
||||
"functions",
|
||||
"internal",
|
||||
"ranges",
|
||||
"index.js"
|
||||
],
|
||||
"tap": {
|
||||
"check-coverage": true,
|
||||
"coverage-map": "map.js"
|
||||
}
|
||||
}
|
16
assets_old/node_modules/core-js-compat/node_modules/semver/range.bnf
generated
vendored
Normal file
16
assets_old/node_modules/core-js-compat/node_modules/semver/range.bnf
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | [1-9] ( [0-9] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
4
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/gtr.js
generated
vendored
Normal file
4
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/gtr.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
// Determine if version is greater than all the versions possible in the range.
|
||||
const outside = require('./outside')
|
||||
const gtr = (version, range, options) => outside(version, range, '>', options)
|
||||
module.exports = gtr
|
7
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/intersects.js
generated
vendored
Normal file
7
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/intersects.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
const Range = require('../classes/range')
|
||||
const intersects = (r1, r2, options) => {
|
||||
r1 = new Range(r1, options)
|
||||
r2 = new Range(r2, options)
|
||||
return r1.intersects(r2)
|
||||
}
|
||||
module.exports = intersects
|
4
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/ltr.js
generated
vendored
Normal file
4
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/ltr.js
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
const outside = require('./outside')
|
||||
// Determine if version is less than all the versions possible in the range
|
||||
const ltr = (version, range, options) => outside(version, range, '<', options)
|
||||
module.exports = ltr
|
25
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/max-satisfying.js
generated
vendored
Normal file
25
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/max-satisfying.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const Range = require('../classes/range')
|
||||
|
||||
const maxSatisfying = (versions, range, options) => {
|
||||
let max = null
|
||||
let maxSV = null
|
||||
let rangeObj = null
|
||||
try {
|
||||
rangeObj = new Range(range, options)
|
||||
} catch (er) {
|
||||
return null
|
||||
}
|
||||
versions.forEach((v) => {
|
||||
if (rangeObj.test(v)) {
|
||||
// satisfies(v, range, options)
|
||||
if (!max || maxSV.compare(v) === -1) {
|
||||
// compare(max, v, true)
|
||||
max = v
|
||||
maxSV = new SemVer(max, options)
|
||||
}
|
||||
}
|
||||
})
|
||||
return max
|
||||
}
|
||||
module.exports = maxSatisfying
|
24
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/min-satisfying.js
generated
vendored
Normal file
24
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/min-satisfying.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const Range = require('../classes/range')
|
||||
const minSatisfying = (versions, range, options) => {
|
||||
let min = null
|
||||
let minSV = null
|
||||
let rangeObj = null
|
||||
try {
|
||||
rangeObj = new Range(range, options)
|
||||
} catch (er) {
|
||||
return null
|
||||
}
|
||||
versions.forEach((v) => {
|
||||
if (rangeObj.test(v)) {
|
||||
// satisfies(v, range, options)
|
||||
if (!min || minSV.compare(v) === 1) {
|
||||
// compare(min, v, true)
|
||||
min = v
|
||||
minSV = new SemVer(min, options)
|
||||
}
|
||||
}
|
||||
})
|
||||
return min
|
||||
}
|
||||
module.exports = minSatisfying
|
57
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/min-version.js
generated
vendored
Normal file
57
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/min-version.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const Range = require('../classes/range')
|
||||
const gt = require('../functions/gt')
|
||||
|
||||
const minVersion = (range, loose) => {
|
||||
range = new Range(range, loose)
|
||||
|
||||
let minver = new SemVer('0.0.0')
|
||||
if (range.test(minver)) {
|
||||
return minver
|
||||
}
|
||||
|
||||
minver = new SemVer('0.0.0-0')
|
||||
if (range.test(minver)) {
|
||||
return minver
|
||||
}
|
||||
|
||||
minver = null
|
||||
for (let i = 0; i < range.set.length; ++i) {
|
||||
const comparators = range.set[i]
|
||||
|
||||
comparators.forEach((comparator) => {
|
||||
// Clone to avoid manipulating the comparator's semver object.
|
||||
const compver = new SemVer(comparator.semver.version)
|
||||
switch (comparator.operator) {
|
||||
case '>':
|
||||
if (compver.prerelease.length === 0) {
|
||||
compver.patch++
|
||||
} else {
|
||||
compver.prerelease.push(0)
|
||||
}
|
||||
compver.raw = compver.format()
|
||||
/* fallthrough */
|
||||
case '':
|
||||
case '>=':
|
||||
if (!minver || gt(minver, compver)) {
|
||||
minver = compver
|
||||
}
|
||||
break
|
||||
case '<':
|
||||
case '<=':
|
||||
/* Ignore maximum versions */
|
||||
break
|
||||
/* istanbul ignore next */
|
||||
default:
|
||||
throw new Error(`Unexpected operation: ${comparator.operator}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (minver && range.test(minver)) {
|
||||
return minver
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
module.exports = minVersion
|
80
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/outside.js
generated
vendored
Normal file
80
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/outside.js
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
const SemVer = require('../classes/semver')
|
||||
const Comparator = require('../classes/comparator')
|
||||
const {ANY} = Comparator
|
||||
const Range = require('../classes/range')
|
||||
const satisfies = require('../functions/satisfies')
|
||||
const gt = require('../functions/gt')
|
||||
const lt = require('../functions/lt')
|
||||
const lte = require('../functions/lte')
|
||||
const gte = require('../functions/gte')
|
||||
|
||||
const outside = (version, range, hilo, options) => {
|
||||
version = new SemVer(version, options)
|
||||
range = new Range(range, options)
|
||||
|
||||
let gtfn, ltefn, ltfn, comp, ecomp
|
||||
switch (hilo) {
|
||||
case '>':
|
||||
gtfn = gt
|
||||
ltefn = lte
|
||||
ltfn = lt
|
||||
comp = '>'
|
||||
ecomp = '>='
|
||||
break
|
||||
case '<':
|
||||
gtfn = lt
|
||||
ltefn = gte
|
||||
ltfn = gt
|
||||
comp = '<'
|
||||
ecomp = '<='
|
||||
break
|
||||
default:
|
||||
throw new TypeError('Must provide a hilo val of "<" or ">"')
|
||||
}
|
||||
|
||||
// If it satisifes the range it is not outside
|
||||
if (satisfies(version, range, options)) {
|
||||
return false
|
||||
}
|
||||
|
||||
// From now on, variable terms are as if we're in "gtr" mode.
|
||||
// but note that everything is flipped for the "ltr" function.
|
||||
|
||||
for (let i = 0; i < range.set.length; ++i) {
|
||||
const comparators = range.set[i]
|
||||
|
||||
let high = null
|
||||
let low = null
|
||||
|
||||
comparators.forEach((comparator) => {
|
||||
if (comparator.semver === ANY) {
|
||||
comparator = new Comparator('>=0.0.0')
|
||||
}
|
||||
high = high || comparator
|
||||
low = low || comparator
|
||||
if (gtfn(comparator.semver, high.semver, options)) {
|
||||
high = comparator
|
||||
} else if (ltfn(comparator.semver, low.semver, options)) {
|
||||
low = comparator
|
||||
}
|
||||
})
|
||||
|
||||
// If the edge version comparator has a operator then our version
|
||||
// isn't outside it
|
||||
if (high.operator === comp || high.operator === ecomp) {
|
||||
return false
|
||||
}
|
||||
|
||||
// If the lowest version comparator has an operator and our version
|
||||
// is less than it then it isn't higher than the range
|
||||
if ((!low.operator || low.operator === comp) &&
|
||||
ltefn(version, low.semver)) {
|
||||
return false
|
||||
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
module.exports = outside
|
8
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/to-comparators.js
generated
vendored
Normal file
8
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/to-comparators.js
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
const Range = require('../classes/range')
|
||||
|
||||
// Mostly just for testing and legacy API reasons
|
||||
const toComparators = (range, options) =>
|
||||
new Range(range, options).set
|
||||
.map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
|
||||
|
||||
module.exports = toComparators
|
11
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/valid.js
generated
vendored
Normal file
11
assets_old/node_modules/core-js-compat/node_modules/semver/ranges/valid.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
const Range = require('../classes/range')
|
||||
const validRange = (range, options) => {
|
||||
try {
|
||||
// Return '*' instead of '' so that truthiness works.
|
||||
// This will throw if it's invalid anyway
|
||||
return new Range(range, options).range || '*'
|
||||
} catch (er) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
module.exports = validRange
|
26
assets_old/node_modules/core-js-compat/package.json
generated
vendored
Normal file
26
assets_old/node_modules/core-js-compat/package.json
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "core-js-compat",
|
||||
"description": "core-js compat",
|
||||
"version": "3.9.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zloirock/core-js.git",
|
||||
"directory": "packages/core-js-compat"
|
||||
},
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"browserslist": "^4.16.3",
|
||||
"semver": "7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"detective": "^5.2.0",
|
||||
"electron-to-chromium": "^1.3.675",
|
||||
"glob": "^7.1.6"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/core-js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"gitHead": "50073b34ee7373eaa8c9cbbcc7313c5236a2f83e"
|
||||
}
|
70
assets_old/node_modules/core-js-compat/targets-parser.js
generated
vendored
Normal file
70
assets_old/node_modules/core-js-compat/targets-parser.js
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
'use strict';
|
||||
const browserslist = require('browserslist');
|
||||
const { compare, has } = require('./helpers');
|
||||
const external = require('./external');
|
||||
|
||||
const aliases = new Map([
|
||||
['and_chr', 'chrome'],
|
||||
['and_ff', 'firefox'],
|
||||
['ie_mob', 'ie'],
|
||||
['ios_saf', 'ios'],
|
||||
['op_mob', 'opera_mobile'],
|
||||
]);
|
||||
|
||||
const validTargets = new Set([
|
||||
'android',
|
||||
'chrome',
|
||||
'edge',
|
||||
'electron',
|
||||
'firefox',
|
||||
'ie',
|
||||
'ios',
|
||||
'node',
|
||||
'opera',
|
||||
'opera_mobile',
|
||||
'phantom',
|
||||
'safari',
|
||||
'samsung',
|
||||
]);
|
||||
|
||||
module.exports = function (targets) {
|
||||
if (typeof targets !== 'object' || Array.isArray(targets)) {
|
||||
targets = { browsers: targets };
|
||||
}
|
||||
|
||||
const { browsers, esmodules, node, ...rest } = targets;
|
||||
const list = Object.entries(rest);
|
||||
|
||||
if (browsers) {
|
||||
list.push(...browserslist(browsers).map(it => it.split(' ')));
|
||||
}
|
||||
if (esmodules) {
|
||||
list.push(...Object.entries(external.modules));
|
||||
}
|
||||
if (node) {
|
||||
list.push(['node', node === 'current' ? process.versions.node : node]);
|
||||
}
|
||||
|
||||
const normalized = list.map(([engine, version]) => {
|
||||
if (has(browserslist.aliases, engine)) {
|
||||
engine = browserslist.aliases[engine];
|
||||
}
|
||||
if (aliases.has(engine)) {
|
||||
engine = aliases.get(engine);
|
||||
}
|
||||
return [engine, String(version)];
|
||||
}).filter(([engine]) => {
|
||||
return validTargets.has(engine);
|
||||
}).sort(([a], [b]) => {
|
||||
return a < b ? -1 : a > b ? 1 : 0;
|
||||
});
|
||||
|
||||
const reducedByMinVersion = new Map();
|
||||
for (const [engine, version] of normalized) {
|
||||
if (!reducedByMinVersion.has(engine) || compare(version, '<=', reducedByMinVersion.get(engine))) {
|
||||
reducedByMinVersion.set(engine, version);
|
||||
}
|
||||
}
|
||||
|
||||
return reducedByMinVersion;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue