mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-16 21:11:52 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
22
web/node_modules/babel-plugin-polyfill-corejs2/LICENSE
generated
vendored
Normal file
22
web/node_modules/babel-plugin-polyfill-corejs2/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Nicolò Ribaudo and other contributors
|
||||
|
||||
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.
|
28
web/node_modules/babel-plugin-polyfill-corejs2/README.md
generated
vendored
Normal file
28
web/node_modules/babel-plugin-polyfill-corejs2/README.md
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
# babel-plugin-polyfill-corejs2
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev babel-plugin-polyfill-corejs2
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add babel-plugin-polyfill-corejs2 --dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Add this plugin to your Babel configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": [["polyfill-corejs2", { "method": "usage-global" }]]
|
||||
}
|
||||
```
|
||||
|
||||
This package supports the `usage-pure`, `usage-global`, and `entry-global` methods.
|
||||
When `entry-global` is used, it replaces imports to `core-js`.
|
411
web/node_modules/babel-plugin-polyfill-corejs2/esm/index.mjs
generated
vendored
Normal file
411
web/node_modules/babel-plugin-polyfill-corejs2/esm/index.mjs
generated
vendored
Normal file
|
@ -0,0 +1,411 @@
|
|||
import corejs2Polyfills from '@babel/compat-data/corejs2-built-ins';
|
||||
import semver from 'semver';
|
||||
import defineProvider from '@babel/helper-define-polyfill-provider';
|
||||
import * as babel from '@babel/core';
|
||||
|
||||
const define = (name, pure, global = [], meta) => {
|
||||
return {
|
||||
name,
|
||||
pure,
|
||||
global,
|
||||
meta
|
||||
};
|
||||
};
|
||||
|
||||
const pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {
|
||||
minRuntimeVersion
|
||||
});
|
||||
|
||||
const globalOnly = global => define(global[0], null, global);
|
||||
|
||||
const pureOnly = (pure, name) => define(name, pure, []);
|
||||
|
||||
const ArrayNatureIterators = ["es6.object.to-string", "es6.array.iterator", "web.dom.iterable"];
|
||||
const CommonIterators = ["es6.string.iterator", ...ArrayNatureIterators];
|
||||
const PromiseDependencies = ["es6.object.to-string", "es6.promise"];
|
||||
const BuiltIns = {
|
||||
DataView: globalOnly(["es6.typed.data-view"]),
|
||||
Float32Array: globalOnly(["es6.typed.float32-array"]),
|
||||
Float64Array: globalOnly(["es6.typed.float64-array"]),
|
||||
Int8Array: globalOnly(["es6.typed.int8-array"]),
|
||||
Int16Array: globalOnly(["es6.typed.int16-array"]),
|
||||
Int32Array: globalOnly(["es6.typed.int32-array"]),
|
||||
Map: pureAndGlobal("map", ["es6.map", ...CommonIterators]),
|
||||
Number: globalOnly(["es6.number.constructor"]),
|
||||
Promise: pureAndGlobal("promise", PromiseDependencies),
|
||||
RegExp: globalOnly(["es6.regexp.constructor"]),
|
||||
Set: pureAndGlobal("set", ["es6.set", ...CommonIterators]),
|
||||
Symbol: pureAndGlobal("symbol", ["es6.symbol"]),
|
||||
Uint8Array: globalOnly(["es6.typed.uint8-array"]),
|
||||
Uint8ClampedArray: globalOnly(["es6.typed.uint8-clamped-array"]),
|
||||
Uint16Array: globalOnly(["es6.typed.uint16-array"]),
|
||||
Uint32Array: globalOnly(["es6.typed.uint32-array"]),
|
||||
WeakMap: pureAndGlobal("weak-map", ["es6.weak-map", ...CommonIterators]),
|
||||
WeakSet: pureAndGlobal("weak-set", ["es6.weak-set", ...CommonIterators]),
|
||||
setImmediate: pureOnly("set-immediate", "web.immediate"),
|
||||
clearImmediate: pureOnly("clear-immediate", "web.immediate"),
|
||||
parseFloat: pureOnly("parse-float", "es6.parse-float"),
|
||||
parseInt: pureOnly("parse-int", "es6.parse-int")
|
||||
};
|
||||
const InstanceProperties = {
|
||||
__defineGetter__: globalOnly(["es7.object.define-getter"]),
|
||||
__defineSetter__: globalOnly(["es7.object.define-setter"]),
|
||||
__lookupGetter__: globalOnly(["es7.object.lookup-getter"]),
|
||||
__lookupSetter__: globalOnly(["es7.object.lookup-setter"]),
|
||||
anchor: globalOnly(["es6.string.anchor"]),
|
||||
big: globalOnly(["es6.string.big"]),
|
||||
bind: globalOnly(["es6.function.bind"]),
|
||||
blink: globalOnly(["es6.string.blink"]),
|
||||
bold: globalOnly(["es6.string.bold"]),
|
||||
codePointAt: globalOnly(["es6.string.code-point-at"]),
|
||||
copyWithin: globalOnly(["es6.array.copy-within"]),
|
||||
endsWith: globalOnly(["es6.string.ends-with"]),
|
||||
entries: globalOnly(ArrayNatureIterators),
|
||||
every: globalOnly(["es6.array.every"]),
|
||||
fill: globalOnly(["es6.array.fill"]),
|
||||
filter: globalOnly(["es6.array.filter"]),
|
||||
finally: globalOnly(["es7.promise.finally", ...PromiseDependencies]),
|
||||
find: globalOnly(["es6.array.find"]),
|
||||
findIndex: globalOnly(["es6.array.find-index"]),
|
||||
fixed: globalOnly(["es6.string.fixed"]),
|
||||
flags: globalOnly(["es6.regexp.flags"]),
|
||||
flatMap: globalOnly(["es7.array.flat-map"]),
|
||||
fontcolor: globalOnly(["es6.string.fontcolor"]),
|
||||
fontsize: globalOnly(["es6.string.fontsize"]),
|
||||
forEach: globalOnly(["es6.array.for-each"]),
|
||||
includes: globalOnly(["es6.string.includes", "es7.array.includes"]),
|
||||
indexOf: globalOnly(["es6.array.index-of"]),
|
||||
italics: globalOnly(["es6.string.italics"]),
|
||||
keys: globalOnly(ArrayNatureIterators),
|
||||
lastIndexOf: globalOnly(["es6.array.last-index-of"]),
|
||||
link: globalOnly(["es6.string.link"]),
|
||||
map: globalOnly(["es6.array.map"]),
|
||||
match: globalOnly(["es6.regexp.match"]),
|
||||
name: globalOnly(["es6.function.name"]),
|
||||
padStart: globalOnly(["es7.string.pad-start"]),
|
||||
padEnd: globalOnly(["es7.string.pad-end"]),
|
||||
reduce: globalOnly(["es6.array.reduce"]),
|
||||
reduceRight: globalOnly(["es6.array.reduce-right"]),
|
||||
repeat: globalOnly(["es6.string.repeat"]),
|
||||
replace: globalOnly(["es6.regexp.replace"]),
|
||||
search: globalOnly(["es6.regexp.search"]),
|
||||
small: globalOnly(["es6.string.small"]),
|
||||
some: globalOnly(["es6.array.some"]),
|
||||
sort: globalOnly(["es6.array.sort"]),
|
||||
split: globalOnly(["es6.regexp.split"]),
|
||||
startsWith: globalOnly(["es6.string.starts-with"]),
|
||||
strike: globalOnly(["es6.string.strike"]),
|
||||
sub: globalOnly(["es6.string.sub"]),
|
||||
sup: globalOnly(["es6.string.sup"]),
|
||||
toISOString: globalOnly(["es6.date.to-iso-string"]),
|
||||
toJSON: globalOnly(["es6.date.to-json"]),
|
||||
toString: globalOnly(["es6.object.to-string", "es6.date.to-string", "es6.regexp.to-string"]),
|
||||
trim: globalOnly(["es6.string.trim"]),
|
||||
trimEnd: globalOnly(["es7.string.trim-right"]),
|
||||
trimLeft: globalOnly(["es7.string.trim-left"]),
|
||||
trimRight: globalOnly(["es7.string.trim-right"]),
|
||||
trimStart: globalOnly(["es7.string.trim-left"]),
|
||||
values: globalOnly(ArrayNatureIterators)
|
||||
}; // This isn't present in older @babel/compat-data versions
|
||||
|
||||
if ("es6.array.slice" in corejs2Polyfills) {
|
||||
InstanceProperties.slice = globalOnly(["es6.array.slice"]);
|
||||
}
|
||||
|
||||
const StaticProperties = {
|
||||
Array: {
|
||||
from: pureAndGlobal("array/from", ["es6.symbol", "es6.array.from", ...CommonIterators]),
|
||||
isArray: pureAndGlobal("array/is-array", ["es6.array.is-array"]),
|
||||
of: pureAndGlobal("array/of", ["es6.array.of"])
|
||||
},
|
||||
Date: {
|
||||
now: pureAndGlobal("date/now", ["es6.date.now"])
|
||||
},
|
||||
JSON: {
|
||||
stringify: pureOnly("json/stringify", "es6.symbol")
|
||||
},
|
||||
Math: {
|
||||
// 'Math' was not included in the 7.0.0
|
||||
// release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.
|
||||
acosh: pureAndGlobal("math/acosh", ["es6.math.acosh"], "7.0.1"),
|
||||
asinh: pureAndGlobal("math/asinh", ["es6.math.asinh"], "7.0.1"),
|
||||
atanh: pureAndGlobal("math/atanh", ["es6.math.atanh"], "7.0.1"),
|
||||
cbrt: pureAndGlobal("math/cbrt", ["es6.math.cbrt"], "7.0.1"),
|
||||
clz32: pureAndGlobal("math/clz32", ["es6.math.clz32"], "7.0.1"),
|
||||
cosh: pureAndGlobal("math/cosh", ["es6.math.cosh"], "7.0.1"),
|
||||
expm1: pureAndGlobal("math/expm1", ["es6.math.expm1"], "7.0.1"),
|
||||
fround: pureAndGlobal("math/fround", ["es6.math.fround"], "7.0.1"),
|
||||
hypot: pureAndGlobal("math/hypot", ["es6.math.hypot"], "7.0.1"),
|
||||
imul: pureAndGlobal("math/imul", ["es6.math.imul"], "7.0.1"),
|
||||
log1p: pureAndGlobal("math/log1p", ["es6.math.log1p"], "7.0.1"),
|
||||
log10: pureAndGlobal("math/log10", ["es6.math.log10"], "7.0.1"),
|
||||
log2: pureAndGlobal("math/log2", ["es6.math.log2"], "7.0.1"),
|
||||
sign: pureAndGlobal("math/sign", ["es6.math.sign"], "7.0.1"),
|
||||
sinh: pureAndGlobal("math/sinh", ["es6.math.sinh"], "7.0.1"),
|
||||
tanh: pureAndGlobal("math/tanh", ["es6.math.tanh"], "7.0.1"),
|
||||
trunc: pureAndGlobal("math/trunc", ["es6.math.trunc"], "7.0.1")
|
||||
},
|
||||
Number: {
|
||||
EPSILON: pureAndGlobal("number/epsilon", ["es6.number.epsilon"]),
|
||||
MIN_SAFE_INTEGER: pureAndGlobal("number/min-safe-integer", ["es6.number.min-safe-integer"]),
|
||||
MAX_SAFE_INTEGER: pureAndGlobal("number/max-safe-integer", ["es6.number.max-safe-integer"]),
|
||||
isFinite: pureAndGlobal("number/is-finite", ["es6.number.is-finite"]),
|
||||
isInteger: pureAndGlobal("number/is-integer", ["es6.number.is-integer"]),
|
||||
isSafeInteger: pureAndGlobal("number/is-safe-integer", ["es6.number.is-safe-integer"]),
|
||||
isNaN: pureAndGlobal("number/is-nan", ["es6.number.is-nan"]),
|
||||
parseFloat: pureAndGlobal("number/parse-float", ["es6.number.parse-float"]),
|
||||
parseInt: pureAndGlobal("number/parse-int", ["es6.number.parse-int"])
|
||||
},
|
||||
Object: {
|
||||
assign: pureAndGlobal("object/assign", ["es6.object.assign"]),
|
||||
create: pureAndGlobal("object/create", ["es6.object.create"]),
|
||||
defineProperties: pureAndGlobal("object/define-properties", ["es6.object.define-properties"]),
|
||||
defineProperty: pureAndGlobal("object/define-property", ["es6.object.define-property"]),
|
||||
entries: pureAndGlobal("object/entries", ["es7.object.entries"]),
|
||||
freeze: pureAndGlobal("object/freeze", ["es6.object.freeze"]),
|
||||
getOwnPropertyDescriptor: pureAndGlobal("object/get-own-property-descriptor", ["es6.object.get-own-property-descriptor"]),
|
||||
getOwnPropertyDescriptors: pureAndGlobal("object/get-own-property-descriptors", ["es7.object.get-own-property-descriptors"]),
|
||||
getOwnPropertyNames: pureAndGlobal("object/get-own-property-names", ["es6.object.get-own-property-names"]),
|
||||
getOwnPropertySymbols: pureAndGlobal("object/get-own-property-symbols", ["es6.symbol"]),
|
||||
getPrototypeOf: pureAndGlobal("object/get-prototype-of", ["es6.object.get-prototype-of"]),
|
||||
is: pureAndGlobal("object/is", ["es6.object.is"]),
|
||||
isExtensible: pureAndGlobal("object/is-extensible", ["es6.object.is-extensible"]),
|
||||
isFrozen: pureAndGlobal("object/is-frozen", ["es6.object.is-frozen"]),
|
||||
isSealed: pureAndGlobal("object/is-sealed", ["es6.object.is-sealed"]),
|
||||
keys: pureAndGlobal("object/keys", ["es6.object.keys"]),
|
||||
preventExtensions: pureAndGlobal("object/prevent-extensions", ["es6.object.prevent-extensions"]),
|
||||
seal: pureAndGlobal("object/seal", ["es6.object.seal"]),
|
||||
setPrototypeOf: pureAndGlobal("object/set-prototype-of", ["es6.object.set-prototype-of"]),
|
||||
values: pureAndGlobal("object/values", ["es7.object.values"])
|
||||
},
|
||||
Promise: {
|
||||
all: globalOnly(CommonIterators),
|
||||
race: globalOnly(CommonIterators)
|
||||
},
|
||||
Reflect: {
|
||||
apply: pureAndGlobal("reflect/apply", ["es6.reflect.apply"]),
|
||||
construct: pureAndGlobal("reflect/construct", ["es6.reflect.construct"]),
|
||||
defineProperty: pureAndGlobal("reflect/define-property", ["es6.reflect.define-property"]),
|
||||
deleteProperty: pureAndGlobal("reflect/delete-property", ["es6.reflect.delete-property"]),
|
||||
get: pureAndGlobal("reflect/get", ["es6.reflect.get"]),
|
||||
getOwnPropertyDescriptor: pureAndGlobal("reflect/get-own-property-descriptor", ["es6.reflect.get-own-property-descriptor"]),
|
||||
getPrototypeOf: pureAndGlobal("reflect/get-prototype-of", ["es6.reflect.get-prototype-of"]),
|
||||
has: pureAndGlobal("reflect/has", ["es6.reflect.has"]),
|
||||
isExtensible: pureAndGlobal("reflect/is-extensible", ["es6.reflect.is-extensible"]),
|
||||
ownKeys: pureAndGlobal("reflect/own-keys", ["es6.reflect.own-keys"]),
|
||||
preventExtensions: pureAndGlobal("reflect/prevent-extensions", ["es6.reflect.prevent-extensions"]),
|
||||
set: pureAndGlobal("reflect/set", ["es6.reflect.set"]),
|
||||
setPrototypeOf: pureAndGlobal("reflect/set-prototype-of", ["es6.reflect.set-prototype-of"])
|
||||
},
|
||||
String: {
|
||||
at: pureOnly("string/at", "es7.string.at"),
|
||||
fromCodePoint: pureAndGlobal("string/from-code-point", ["es6.string.from-code-point"]),
|
||||
raw: pureAndGlobal("string/raw", ["es6.string.raw"])
|
||||
},
|
||||
Symbol: {
|
||||
// FIXME: Pure disabled to work around zloirock/core-js#262.
|
||||
asyncIterator: globalOnly(["es6.symbol", "es7.symbol.async-iterator"]),
|
||||
for: pureOnly("symbol/for", "es6.symbol"),
|
||||
hasInstance: pureOnly("symbol/has-instance", "es6.symbol"),
|
||||
isConcatSpreadable: pureOnly("symbol/is-concat-spreadable", "es6.symbol"),
|
||||
iterator: define("es6.symbol", "symbol/iterator", CommonIterators),
|
||||
keyFor: pureOnly("symbol/key-for", "es6.symbol"),
|
||||
match: pureAndGlobal("symbol/match", ["es6.regexp.match"]),
|
||||
replace: pureOnly("symbol/replace", "es6.symbol"),
|
||||
search: pureOnly("symbol/search", "es6.symbol"),
|
||||
species: pureOnly("symbol/species", "es6.symbol"),
|
||||
split: pureOnly("symbol/split", "es6.symbol"),
|
||||
toPrimitive: pureOnly("symbol/to-primitive", "es6.symbol"),
|
||||
toStringTag: pureOnly("symbol/to-string-tag", "es6.symbol"),
|
||||
unscopables: pureOnly("symbol/unscopables", "es6.symbol")
|
||||
}
|
||||
};
|
||||
|
||||
const webPolyfills = {
|
||||
"web.timers": {},
|
||||
"web.immediate": {},
|
||||
"web.dom.iterable": {}
|
||||
};
|
||||
const purePolyfills = {
|
||||
"es6.parse-float": {},
|
||||
"es6.parse-int": {},
|
||||
"es7.string.at": {}
|
||||
};
|
||||
function addPlatformSpecificPolyfills (targets, method, polyfills) {
|
||||
const targetNames = Object.keys(targets);
|
||||
const isAnyTarget = !targetNames.length;
|
||||
const isWebTarget = targetNames.some(name => name !== "node");
|
||||
return { ...polyfills,
|
||||
...(method === "usage-pure" ? purePolyfills : null),
|
||||
...(isAnyTarget || isWebTarget ? webPolyfills : null)
|
||||
};
|
||||
}
|
||||
|
||||
function hasMinVersion(minVersion, runtimeVersion) {
|
||||
// If the range is unavailable, we're running the script during Babel's
|
||||
// build process, and we want to assume that all versions are satisfied so
|
||||
// that the built output will include all definitions.
|
||||
if (!runtimeVersion || !minVersion) return true; // semver.intersects() has some surprising behavior with comparing ranges
|
||||
// with preprelease versions. We add '^' to ensure that we are always
|
||||
// comparing ranges with ranges, which sidesteps this logic.
|
||||
// For example:
|
||||
//
|
||||
// semver.intersects(`<7.0.1`, "7.0.0-beta.0") // false - surprising
|
||||
// semver.intersects(`<7.0.1`, "^7.0.0-beta.0") // true - expected
|
||||
//
|
||||
// This is because the first falls back to
|
||||
//
|
||||
// semver.satisfies("7.0.0-beta.0", `<7.0.1`) // false - surprising
|
||||
//
|
||||
// and this fails because a prerelease version can only satisfy a range
|
||||
// if it is a prerelease within the same major/minor/patch range.
|
||||
//
|
||||
// Note: If this is found to have issues, please also revist the logic in
|
||||
// babel-core's availableHelper() API.
|
||||
|
||||
if (semver.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
|
||||
return !semver.intersects(`<${minVersion}`, runtimeVersion) && !semver.intersects(`>=8.0.0`, runtimeVersion);
|
||||
}
|
||||
|
||||
const {
|
||||
types: t
|
||||
} = babel.default || babel;
|
||||
const presetEnvCompat = "#__secret_key__@babel/preset-env__compatibility";
|
||||
const runtimeCompat = "#__secret_key__@babel/runtime__compatibility"; // $FlowIgnore
|
||||
|
||||
const has = Function.call.bind(Object.hasOwnProperty);
|
||||
var index = defineProvider(function (api, {
|
||||
[presetEnvCompat]: {
|
||||
entryInjectRegenerator
|
||||
} = {},
|
||||
[runtimeCompat]: {
|
||||
useBabelRuntime,
|
||||
runtimeVersion,
|
||||
ext = ".js"
|
||||
} = {}
|
||||
}) {
|
||||
const resolve = api.createMetaResolver({
|
||||
global: BuiltIns,
|
||||
static: StaticProperties,
|
||||
instance: InstanceProperties
|
||||
});
|
||||
const {
|
||||
debug,
|
||||
shouldInjectPolyfill,
|
||||
method
|
||||
} = api;
|
||||
const polyfills = addPlatformSpecificPolyfills(api.targets, method, corejs2Polyfills);
|
||||
const coreJSBase = useBabelRuntime ? `${useBabelRuntime}/core-js` : method === "usage-pure" ? "core-js/library/fn" : "core-js/modules";
|
||||
|
||||
function inject(name, utils) {
|
||||
if (typeof name === "string") {
|
||||
// Some polyfills aren't always available, for example
|
||||
// web.dom.iterable when targeting node
|
||||
if (has(polyfills, name) && shouldInjectPolyfill(name)) {
|
||||
debug(name);
|
||||
utils.injectGlobalImport(`${coreJSBase}/${name}.js`);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
name.forEach(name => inject(name, utils));
|
||||
}
|
||||
|
||||
function maybeInjectPure(desc, hint, utils) {
|
||||
const {
|
||||
pure,
|
||||
meta,
|
||||
name
|
||||
} = desc;
|
||||
if (!pure || !shouldInjectPolyfill(name)) return;
|
||||
|
||||
if (runtimeVersion && meta && meta.minRuntimeVersion && !hasMinVersion(meta && meta.minRuntimeVersion, runtimeVersion)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return utils.injectDefaultImport(`${coreJSBase}/${pure}${ext}`, hint);
|
||||
}
|
||||
|
||||
return {
|
||||
name: "corejs2",
|
||||
polyfills,
|
||||
|
||||
entryGlobal(meta, utils, path) {
|
||||
if (meta.kind === "import" && meta.source === "core-js") {
|
||||
debug(null);
|
||||
inject(Object.keys(polyfills), utils);
|
||||
|
||||
if (entryInjectRegenerator) {
|
||||
utils.injectGlobalImport("regenerator-runtime/runtime.js");
|
||||
}
|
||||
|
||||
path.remove();
|
||||
}
|
||||
},
|
||||
|
||||
usageGlobal(meta, utils) {
|
||||
const resolved = resolve(meta);
|
||||
if (!resolved) return;
|
||||
let deps = resolved.desc.global;
|
||||
|
||||
if (resolved.kind !== "global" && meta.object && meta.placement === "prototype") {
|
||||
const low = meta.object.toLowerCase();
|
||||
deps = deps.filter(m => m.includes(low));
|
||||
}
|
||||
|
||||
inject(deps, utils);
|
||||
},
|
||||
|
||||
usagePure(meta, utils, path) {
|
||||
if (meta.kind === "in") {
|
||||
if (meta.key === "Symbol.iterator") {
|
||||
path.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable${ext}`, "isIterable"), [path.node.right]));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (path.parentPath.isUnaryExpression({
|
||||
operator: "delete"
|
||||
})) return;
|
||||
|
||||
if (meta.kind === "property") {
|
||||
// We can't compile destructuring.
|
||||
if (!path.isMemberExpression()) return;
|
||||
if (!path.isReferenced()) return;
|
||||
|
||||
if (meta.key === "Symbol.iterator" && shouldInjectPolyfill("es6.symbol") && path.parentPath.isCallExpression({
|
||||
callee: path.node
|
||||
}) && path.parent.arguments.length === 0) {
|
||||
path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator${ext}`, "getIterator"), [path.node.object]));
|
||||
path.skip();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const resolved = resolve(meta);
|
||||
if (!resolved) return;
|
||||
const id = maybeInjectPure(resolved.desc, resolved.name, utils);
|
||||
if (id) path.replaceWith(id);
|
||||
},
|
||||
|
||||
visitor: method === "usage-global" && {
|
||||
// yield*
|
||||
YieldExpression(path) {
|
||||
if (path.node.delegate) {
|
||||
inject("web.dom.iterable", api.getUtils(path));
|
||||
}
|
||||
},
|
||||
|
||||
// for-of, [a, b] = c
|
||||
"ForOfStatement|ArrayPattern"(path) {
|
||||
CommonIterators.forEach(name => inject(name, api.getUtils(path)));
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
export default index;
|
||||
//# sourceMappingURL=index.mjs.map
|
1
web/node_modules/babel-plugin-polyfill-corejs2/esm/index.mjs.map
generated
vendored
Normal file
1
web/node_modules/babel-plugin-polyfill-corejs2/esm/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
web/node_modules/babel-plugin-polyfill-corejs2/lib/add-platform-specific-polyfills.js
generated
vendored
Normal file
24
web/node_modules/babel-plugin-polyfill-corejs2/lib/add-platform-specific-polyfills.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = _default;
|
||||
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
const webPolyfills = {
|
||||
"web.timers": {},
|
||||
"web.immediate": {},
|
||||
"web.dom.iterable": {}
|
||||
};
|
||||
const purePolyfills = {
|
||||
"es6.parse-float": {},
|
||||
"es6.parse-int": {},
|
||||
"es7.string.at": {}
|
||||
};
|
||||
|
||||
function _default(targets, method, polyfills) {
|
||||
const targetNames = Object.keys(targets);
|
||||
const isAnyTarget = !targetNames.length;
|
||||
const isWebTarget = targetNames.some(name => name !== "node");
|
||||
return _extends({}, polyfills, method === "usage-pure" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);
|
||||
}
|
231
web/node_modules/babel-plugin-polyfill-corejs2/lib/built-in-definitions.js
generated
vendored
Normal file
231
web/node_modules/babel-plugin-polyfill-corejs2/lib/built-in-definitions.js
generated
vendored
Normal file
|
@ -0,0 +1,231 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.StaticProperties = exports.InstanceProperties = exports.BuiltIns = exports.CommonIterators = void 0;
|
||||
|
||||
var _corejs2BuiltIns = _interopRequireDefault(require("@babel/compat-data/corejs2-built-ins"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const define = (name, pure, global = [], meta) => {
|
||||
return {
|
||||
name,
|
||||
pure,
|
||||
global,
|
||||
meta
|
||||
};
|
||||
};
|
||||
|
||||
const pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {
|
||||
minRuntimeVersion
|
||||
});
|
||||
|
||||
const globalOnly = global => define(global[0], null, global);
|
||||
|
||||
const pureOnly = (pure, name) => define(name, pure, []);
|
||||
|
||||
const ArrayNatureIterators = ["es6.object.to-string", "es6.array.iterator", "web.dom.iterable"];
|
||||
const CommonIterators = ["es6.string.iterator", ...ArrayNatureIterators];
|
||||
exports.CommonIterators = CommonIterators;
|
||||
const PromiseDependencies = ["es6.object.to-string", "es6.promise"];
|
||||
const BuiltIns = {
|
||||
DataView: globalOnly(["es6.typed.data-view"]),
|
||||
Float32Array: globalOnly(["es6.typed.float32-array"]),
|
||||
Float64Array: globalOnly(["es6.typed.float64-array"]),
|
||||
Int8Array: globalOnly(["es6.typed.int8-array"]),
|
||||
Int16Array: globalOnly(["es6.typed.int16-array"]),
|
||||
Int32Array: globalOnly(["es6.typed.int32-array"]),
|
||||
Map: pureAndGlobal("map", ["es6.map", ...CommonIterators]),
|
||||
Number: globalOnly(["es6.number.constructor"]),
|
||||
Promise: pureAndGlobal("promise", PromiseDependencies),
|
||||
RegExp: globalOnly(["es6.regexp.constructor"]),
|
||||
Set: pureAndGlobal("set", ["es6.set", ...CommonIterators]),
|
||||
Symbol: pureAndGlobal("symbol", ["es6.symbol"]),
|
||||
Uint8Array: globalOnly(["es6.typed.uint8-array"]),
|
||||
Uint8ClampedArray: globalOnly(["es6.typed.uint8-clamped-array"]),
|
||||
Uint16Array: globalOnly(["es6.typed.uint16-array"]),
|
||||
Uint32Array: globalOnly(["es6.typed.uint32-array"]),
|
||||
WeakMap: pureAndGlobal("weak-map", ["es6.weak-map", ...CommonIterators]),
|
||||
WeakSet: pureAndGlobal("weak-set", ["es6.weak-set", ...CommonIterators]),
|
||||
setImmediate: pureOnly("set-immediate", "web.immediate"),
|
||||
clearImmediate: pureOnly("clear-immediate", "web.immediate"),
|
||||
parseFloat: pureOnly("parse-float", "es6.parse-float"),
|
||||
parseInt: pureOnly("parse-int", "es6.parse-int")
|
||||
};
|
||||
exports.BuiltIns = BuiltIns;
|
||||
const InstanceProperties = {
|
||||
__defineGetter__: globalOnly(["es7.object.define-getter"]),
|
||||
__defineSetter__: globalOnly(["es7.object.define-setter"]),
|
||||
__lookupGetter__: globalOnly(["es7.object.lookup-getter"]),
|
||||
__lookupSetter__: globalOnly(["es7.object.lookup-setter"]),
|
||||
anchor: globalOnly(["es6.string.anchor"]),
|
||||
big: globalOnly(["es6.string.big"]),
|
||||
bind: globalOnly(["es6.function.bind"]),
|
||||
blink: globalOnly(["es6.string.blink"]),
|
||||
bold: globalOnly(["es6.string.bold"]),
|
||||
codePointAt: globalOnly(["es6.string.code-point-at"]),
|
||||
copyWithin: globalOnly(["es6.array.copy-within"]),
|
||||
endsWith: globalOnly(["es6.string.ends-with"]),
|
||||
entries: globalOnly(ArrayNatureIterators),
|
||||
every: globalOnly(["es6.array.every"]),
|
||||
fill: globalOnly(["es6.array.fill"]),
|
||||
filter: globalOnly(["es6.array.filter"]),
|
||||
finally: globalOnly(["es7.promise.finally", ...PromiseDependencies]),
|
||||
find: globalOnly(["es6.array.find"]),
|
||||
findIndex: globalOnly(["es6.array.find-index"]),
|
||||
fixed: globalOnly(["es6.string.fixed"]),
|
||||
flags: globalOnly(["es6.regexp.flags"]),
|
||||
flatMap: globalOnly(["es7.array.flat-map"]),
|
||||
fontcolor: globalOnly(["es6.string.fontcolor"]),
|
||||
fontsize: globalOnly(["es6.string.fontsize"]),
|
||||
forEach: globalOnly(["es6.array.for-each"]),
|
||||
includes: globalOnly(["es6.string.includes", "es7.array.includes"]),
|
||||
indexOf: globalOnly(["es6.array.index-of"]),
|
||||
italics: globalOnly(["es6.string.italics"]),
|
||||
keys: globalOnly(ArrayNatureIterators),
|
||||
lastIndexOf: globalOnly(["es6.array.last-index-of"]),
|
||||
link: globalOnly(["es6.string.link"]),
|
||||
map: globalOnly(["es6.array.map"]),
|
||||
match: globalOnly(["es6.regexp.match"]),
|
||||
name: globalOnly(["es6.function.name"]),
|
||||
padStart: globalOnly(["es7.string.pad-start"]),
|
||||
padEnd: globalOnly(["es7.string.pad-end"]),
|
||||
reduce: globalOnly(["es6.array.reduce"]),
|
||||
reduceRight: globalOnly(["es6.array.reduce-right"]),
|
||||
repeat: globalOnly(["es6.string.repeat"]),
|
||||
replace: globalOnly(["es6.regexp.replace"]),
|
||||
search: globalOnly(["es6.regexp.search"]),
|
||||
small: globalOnly(["es6.string.small"]),
|
||||
some: globalOnly(["es6.array.some"]),
|
||||
sort: globalOnly(["es6.array.sort"]),
|
||||
split: globalOnly(["es6.regexp.split"]),
|
||||
startsWith: globalOnly(["es6.string.starts-with"]),
|
||||
strike: globalOnly(["es6.string.strike"]),
|
||||
sub: globalOnly(["es6.string.sub"]),
|
||||
sup: globalOnly(["es6.string.sup"]),
|
||||
toISOString: globalOnly(["es6.date.to-iso-string"]),
|
||||
toJSON: globalOnly(["es6.date.to-json"]),
|
||||
toString: globalOnly(["es6.object.to-string", "es6.date.to-string", "es6.regexp.to-string"]),
|
||||
trim: globalOnly(["es6.string.trim"]),
|
||||
trimEnd: globalOnly(["es7.string.trim-right"]),
|
||||
trimLeft: globalOnly(["es7.string.trim-left"]),
|
||||
trimRight: globalOnly(["es7.string.trim-right"]),
|
||||
trimStart: globalOnly(["es7.string.trim-left"]),
|
||||
values: globalOnly(ArrayNatureIterators)
|
||||
}; // This isn't present in older @babel/compat-data versions
|
||||
|
||||
exports.InstanceProperties = InstanceProperties;
|
||||
|
||||
if ("es6.array.slice" in _corejs2BuiltIns.default) {
|
||||
InstanceProperties.slice = globalOnly(["es6.array.slice"]);
|
||||
}
|
||||
|
||||
const StaticProperties = {
|
||||
Array: {
|
||||
from: pureAndGlobal("array/from", ["es6.symbol", "es6.array.from", ...CommonIterators]),
|
||||
isArray: pureAndGlobal("array/is-array", ["es6.array.is-array"]),
|
||||
of: pureAndGlobal("array/of", ["es6.array.of"])
|
||||
},
|
||||
Date: {
|
||||
now: pureAndGlobal("date/now", ["es6.date.now"])
|
||||
},
|
||||
JSON: {
|
||||
stringify: pureOnly("json/stringify", "es6.symbol")
|
||||
},
|
||||
Math: {
|
||||
// 'Math' was not included in the 7.0.0
|
||||
// release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.
|
||||
acosh: pureAndGlobal("math/acosh", ["es6.math.acosh"], "7.0.1"),
|
||||
asinh: pureAndGlobal("math/asinh", ["es6.math.asinh"], "7.0.1"),
|
||||
atanh: pureAndGlobal("math/atanh", ["es6.math.atanh"], "7.0.1"),
|
||||
cbrt: pureAndGlobal("math/cbrt", ["es6.math.cbrt"], "7.0.1"),
|
||||
clz32: pureAndGlobal("math/clz32", ["es6.math.clz32"], "7.0.1"),
|
||||
cosh: pureAndGlobal("math/cosh", ["es6.math.cosh"], "7.0.1"),
|
||||
expm1: pureAndGlobal("math/expm1", ["es6.math.expm1"], "7.0.1"),
|
||||
fround: pureAndGlobal("math/fround", ["es6.math.fround"], "7.0.1"),
|
||||
hypot: pureAndGlobal("math/hypot", ["es6.math.hypot"], "7.0.1"),
|
||||
imul: pureAndGlobal("math/imul", ["es6.math.imul"], "7.0.1"),
|
||||
log1p: pureAndGlobal("math/log1p", ["es6.math.log1p"], "7.0.1"),
|
||||
log10: pureAndGlobal("math/log10", ["es6.math.log10"], "7.0.1"),
|
||||
log2: pureAndGlobal("math/log2", ["es6.math.log2"], "7.0.1"),
|
||||
sign: pureAndGlobal("math/sign", ["es6.math.sign"], "7.0.1"),
|
||||
sinh: pureAndGlobal("math/sinh", ["es6.math.sinh"], "7.0.1"),
|
||||
tanh: pureAndGlobal("math/tanh", ["es6.math.tanh"], "7.0.1"),
|
||||
trunc: pureAndGlobal("math/trunc", ["es6.math.trunc"], "7.0.1")
|
||||
},
|
||||
Number: {
|
||||
EPSILON: pureAndGlobal("number/epsilon", ["es6.number.epsilon"]),
|
||||
MIN_SAFE_INTEGER: pureAndGlobal("number/min-safe-integer", ["es6.number.min-safe-integer"]),
|
||||
MAX_SAFE_INTEGER: pureAndGlobal("number/max-safe-integer", ["es6.number.max-safe-integer"]),
|
||||
isFinite: pureAndGlobal("number/is-finite", ["es6.number.is-finite"]),
|
||||
isInteger: pureAndGlobal("number/is-integer", ["es6.number.is-integer"]),
|
||||
isSafeInteger: pureAndGlobal("number/is-safe-integer", ["es6.number.is-safe-integer"]),
|
||||
isNaN: pureAndGlobal("number/is-nan", ["es6.number.is-nan"]),
|
||||
parseFloat: pureAndGlobal("number/parse-float", ["es6.number.parse-float"]),
|
||||
parseInt: pureAndGlobal("number/parse-int", ["es6.number.parse-int"])
|
||||
},
|
||||
Object: {
|
||||
assign: pureAndGlobal("object/assign", ["es6.object.assign"]),
|
||||
create: pureAndGlobal("object/create", ["es6.object.create"]),
|
||||
defineProperties: pureAndGlobal("object/define-properties", ["es6.object.define-properties"]),
|
||||
defineProperty: pureAndGlobal("object/define-property", ["es6.object.define-property"]),
|
||||
entries: pureAndGlobal("object/entries", ["es7.object.entries"]),
|
||||
freeze: pureAndGlobal("object/freeze", ["es6.object.freeze"]),
|
||||
getOwnPropertyDescriptor: pureAndGlobal("object/get-own-property-descriptor", ["es6.object.get-own-property-descriptor"]),
|
||||
getOwnPropertyDescriptors: pureAndGlobal("object/get-own-property-descriptors", ["es7.object.get-own-property-descriptors"]),
|
||||
getOwnPropertyNames: pureAndGlobal("object/get-own-property-names", ["es6.object.get-own-property-names"]),
|
||||
getOwnPropertySymbols: pureAndGlobal("object/get-own-property-symbols", ["es6.symbol"]),
|
||||
getPrototypeOf: pureAndGlobal("object/get-prototype-of", ["es6.object.get-prototype-of"]),
|
||||
is: pureAndGlobal("object/is", ["es6.object.is"]),
|
||||
isExtensible: pureAndGlobal("object/is-extensible", ["es6.object.is-extensible"]),
|
||||
isFrozen: pureAndGlobal("object/is-frozen", ["es6.object.is-frozen"]),
|
||||
isSealed: pureAndGlobal("object/is-sealed", ["es6.object.is-sealed"]),
|
||||
keys: pureAndGlobal("object/keys", ["es6.object.keys"]),
|
||||
preventExtensions: pureAndGlobal("object/prevent-extensions", ["es6.object.prevent-extensions"]),
|
||||
seal: pureAndGlobal("object/seal", ["es6.object.seal"]),
|
||||
setPrototypeOf: pureAndGlobal("object/set-prototype-of", ["es6.object.set-prototype-of"]),
|
||||
values: pureAndGlobal("object/values", ["es7.object.values"])
|
||||
},
|
||||
Promise: {
|
||||
all: globalOnly(CommonIterators),
|
||||
race: globalOnly(CommonIterators)
|
||||
},
|
||||
Reflect: {
|
||||
apply: pureAndGlobal("reflect/apply", ["es6.reflect.apply"]),
|
||||
construct: pureAndGlobal("reflect/construct", ["es6.reflect.construct"]),
|
||||
defineProperty: pureAndGlobal("reflect/define-property", ["es6.reflect.define-property"]),
|
||||
deleteProperty: pureAndGlobal("reflect/delete-property", ["es6.reflect.delete-property"]),
|
||||
get: pureAndGlobal("reflect/get", ["es6.reflect.get"]),
|
||||
getOwnPropertyDescriptor: pureAndGlobal("reflect/get-own-property-descriptor", ["es6.reflect.get-own-property-descriptor"]),
|
||||
getPrototypeOf: pureAndGlobal("reflect/get-prototype-of", ["es6.reflect.get-prototype-of"]),
|
||||
has: pureAndGlobal("reflect/has", ["es6.reflect.has"]),
|
||||
isExtensible: pureAndGlobal("reflect/is-extensible", ["es6.reflect.is-extensible"]),
|
||||
ownKeys: pureAndGlobal("reflect/own-keys", ["es6.reflect.own-keys"]),
|
||||
preventExtensions: pureAndGlobal("reflect/prevent-extensions", ["es6.reflect.prevent-extensions"]),
|
||||
set: pureAndGlobal("reflect/set", ["es6.reflect.set"]),
|
||||
setPrototypeOf: pureAndGlobal("reflect/set-prototype-of", ["es6.reflect.set-prototype-of"])
|
||||
},
|
||||
String: {
|
||||
at: pureOnly("string/at", "es7.string.at"),
|
||||
fromCodePoint: pureAndGlobal("string/from-code-point", ["es6.string.from-code-point"]),
|
||||
raw: pureAndGlobal("string/raw", ["es6.string.raw"])
|
||||
},
|
||||
Symbol: {
|
||||
// FIXME: Pure disabled to work around zloirock/core-js#262.
|
||||
asyncIterator: globalOnly(["es6.symbol", "es7.symbol.async-iterator"]),
|
||||
for: pureOnly("symbol/for", "es6.symbol"),
|
||||
hasInstance: pureOnly("symbol/has-instance", "es6.symbol"),
|
||||
isConcatSpreadable: pureOnly("symbol/is-concat-spreadable", "es6.symbol"),
|
||||
iterator: define("es6.symbol", "symbol/iterator", CommonIterators),
|
||||
keyFor: pureOnly("symbol/key-for", "es6.symbol"),
|
||||
match: pureAndGlobal("symbol/match", ["es6.regexp.match"]),
|
||||
replace: pureOnly("symbol/replace", "es6.symbol"),
|
||||
search: pureOnly("symbol/search", "es6.symbol"),
|
||||
species: pureOnly("symbol/species", "es6.symbol"),
|
||||
split: pureOnly("symbol/split", "es6.symbol"),
|
||||
toPrimitive: pureOnly("symbol/to-primitive", "es6.symbol"),
|
||||
toStringTag: pureOnly("symbol/to-string-tag", "es6.symbol"),
|
||||
unscopables: pureOnly("symbol/unscopables", "es6.symbol")
|
||||
}
|
||||
};
|
||||
exports.StaticProperties = StaticProperties;
|
34
web/node_modules/babel-plugin-polyfill-corejs2/lib/helpers.js
generated
vendored
Normal file
34
web/node_modules/babel-plugin-polyfill-corejs2/lib/helpers.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.hasMinVersion = hasMinVersion;
|
||||
|
||||
var _semver = _interopRequireDefault(require("semver"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function hasMinVersion(minVersion, runtimeVersion) {
|
||||
// If the range is unavailable, we're running the script during Babel's
|
||||
// build process, and we want to assume that all versions are satisfied so
|
||||
// that the built output will include all definitions.
|
||||
if (!runtimeVersion || !minVersion) return true; // semver.intersects() has some surprising behavior with comparing ranges
|
||||
// with preprelease versions. We add '^' to ensure that we are always
|
||||
// comparing ranges with ranges, which sidesteps this logic.
|
||||
// For example:
|
||||
//
|
||||
// semver.intersects(`<7.0.1`, "7.0.0-beta.0") // false - surprising
|
||||
// semver.intersects(`<7.0.1`, "^7.0.0-beta.0") // true - expected
|
||||
//
|
||||
// This is because the first falls back to
|
||||
//
|
||||
// semver.satisfies("7.0.0-beta.0", `<7.0.1`) // false - surprising
|
||||
//
|
||||
// and this fails because a prerelease version can only satisfy a range
|
||||
// if it is a prerelease within the same major/minor/patch range.
|
||||
//
|
||||
// Note: If this is found to have issues, please also revist the logic in
|
||||
// babel-core's availableHelper() API.
|
||||
|
||||
if (_semver.default.valid(runtimeVersion)) runtimeVersion = `^${runtimeVersion}`;
|
||||
return !_semver.default.intersects(`<${minVersion}`, runtimeVersion) && !_semver.default.intersects(`>=8.0.0`, runtimeVersion);
|
||||
}
|
165
web/node_modules/babel-plugin-polyfill-corejs2/lib/index.js
generated
vendored
Normal file
165
web/node_modules/babel-plugin-polyfill-corejs2/lib/index.js
generated
vendored
Normal file
|
@ -0,0 +1,165 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _corejs2BuiltIns = _interopRequireDefault(require("@babel/compat-data/corejs2-built-ins"));
|
||||
|
||||
var _builtInDefinitions = require("./built-in-definitions");
|
||||
|
||||
var _addPlatformSpecificPolyfills = _interopRequireDefault(require("./add-platform-specific-polyfills"));
|
||||
|
||||
var _helpers = require("./helpers");
|
||||
|
||||
var _helperDefinePolyfillProvider = _interopRequireDefault(require("@babel/helper-define-polyfill-provider"));
|
||||
|
||||
var babel = _interopRequireWildcard(require("@babel/core"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const {
|
||||
types: t
|
||||
} = babel.default || babel;
|
||||
const presetEnvCompat = "#__secret_key__@babel/preset-env__compatibility";
|
||||
const runtimeCompat = "#__secret_key__@babel/runtime__compatibility"; // $FlowIgnore
|
||||
|
||||
const has = Function.call.bind(Object.hasOwnProperty);
|
||||
|
||||
var _default = (0, _helperDefinePolyfillProvider.default)(function (api, {
|
||||
[presetEnvCompat]: {
|
||||
entryInjectRegenerator
|
||||
} = {},
|
||||
[runtimeCompat]: {
|
||||
useBabelRuntime,
|
||||
runtimeVersion,
|
||||
ext = ".js"
|
||||
} = {}
|
||||
}) {
|
||||
const resolve = api.createMetaResolver({
|
||||
global: _builtInDefinitions.BuiltIns,
|
||||
static: _builtInDefinitions.StaticProperties,
|
||||
instance: _builtInDefinitions.InstanceProperties
|
||||
});
|
||||
const {
|
||||
debug,
|
||||
shouldInjectPolyfill,
|
||||
method
|
||||
} = api;
|
||||
const polyfills = (0, _addPlatformSpecificPolyfills.default)(api.targets, method, _corejs2BuiltIns.default);
|
||||
const coreJSBase = useBabelRuntime ? `${useBabelRuntime}/core-js` : method === "usage-pure" ? "core-js/library/fn" : "core-js/modules";
|
||||
|
||||
function inject(name, utils) {
|
||||
if (typeof name === "string") {
|
||||
// Some polyfills aren't always available, for example
|
||||
// web.dom.iterable when targeting node
|
||||
if (has(polyfills, name) && shouldInjectPolyfill(name)) {
|
||||
debug(name);
|
||||
utils.injectGlobalImport(`${coreJSBase}/${name}.js`);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
name.forEach(name => inject(name, utils));
|
||||
}
|
||||
|
||||
function maybeInjectPure(desc, hint, utils) {
|
||||
const {
|
||||
pure,
|
||||
meta,
|
||||
name
|
||||
} = desc;
|
||||
if (!pure || !shouldInjectPolyfill(name)) return;
|
||||
|
||||
if (runtimeVersion && meta && meta.minRuntimeVersion && !(0, _helpers.hasMinVersion)(meta && meta.minRuntimeVersion, runtimeVersion)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return utils.injectDefaultImport(`${coreJSBase}/${pure}${ext}`, hint);
|
||||
}
|
||||
|
||||
return {
|
||||
name: "corejs2",
|
||||
polyfills,
|
||||
|
||||
entryGlobal(meta, utils, path) {
|
||||
if (meta.kind === "import" && meta.source === "core-js") {
|
||||
debug(null);
|
||||
inject(Object.keys(polyfills), utils);
|
||||
|
||||
if (entryInjectRegenerator) {
|
||||
utils.injectGlobalImport("regenerator-runtime/runtime.js");
|
||||
}
|
||||
|
||||
path.remove();
|
||||
}
|
||||
},
|
||||
|
||||
usageGlobal(meta, utils) {
|
||||
const resolved = resolve(meta);
|
||||
if (!resolved) return;
|
||||
let deps = resolved.desc.global;
|
||||
|
||||
if (resolved.kind !== "global" && meta.object && meta.placement === "prototype") {
|
||||
const low = meta.object.toLowerCase();
|
||||
deps = deps.filter(m => m.includes(low));
|
||||
}
|
||||
|
||||
inject(deps, utils);
|
||||
},
|
||||
|
||||
usagePure(meta, utils, path) {
|
||||
if (meta.kind === "in") {
|
||||
if (meta.key === "Symbol.iterator") {
|
||||
path.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/is-iterable${ext}`, "isIterable"), [path.node.right]));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (path.parentPath.isUnaryExpression({
|
||||
operator: "delete"
|
||||
})) return;
|
||||
|
||||
if (meta.kind === "property") {
|
||||
// We can't compile destructuring.
|
||||
if (!path.isMemberExpression()) return;
|
||||
if (!path.isReferenced()) return;
|
||||
|
||||
if (meta.key === "Symbol.iterator" && shouldInjectPolyfill("es6.symbol") && path.parentPath.isCallExpression({
|
||||
callee: path.node
|
||||
}) && path.parent.arguments.length === 0) {
|
||||
path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(`${coreJSBase}/get-iterator${ext}`, "getIterator"), [path.node.object]));
|
||||
path.skip();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const resolved = resolve(meta);
|
||||
if (!resolved) return;
|
||||
const id = maybeInjectPure(resolved.desc, resolved.name, utils);
|
||||
if (id) path.replaceWith(id);
|
||||
},
|
||||
|
||||
visitor: method === "usage-global" && {
|
||||
// yield*
|
||||
YieldExpression(path) {
|
||||
if (path.node.delegate) {
|
||||
inject("web.dom.iterable", api.getUtils(path));
|
||||
}
|
||||
},
|
||||
|
||||
// for-of, [a, b] = c
|
||||
"ForOfStatement|ArrayPattern"(path) {
|
||||
_builtInDefinitions.CommonIterators.forEach(name => inject(name, api.getUtils(path)));
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
exports.default = _default;
|
1
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver
generated
vendored
Symbolic link
1
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/.bin/semver
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../semver/bin/semver.js
|
70
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/CHANGELOG.md
generated
vendored
Normal file
70
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
# changes log
|
||||
|
||||
## 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
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/LICENSE
generated
vendored
Normal file
15
web/node_modules/babel-plugin-polyfill-corejs2/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.
|
443
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/README.md
generated
vendored
Normal file
443
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/README.md
generated
vendored
Normal file
|
@ -0,0 +1,443 @@
|
|||
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 `Integer.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`
|
174
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/bin/semver.js
generated
vendored
Executable file
174
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/bin/semver.js
generated
vendored
Executable file
|
@ -0,0 +1,174 @@
|
|||
#!/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.
|
||||
|
||||
var argv = process.argv.slice(2)
|
||||
|
||||
var versions = []
|
||||
|
||||
var range = []
|
||||
|
||||
var inc = null
|
||||
|
||||
var version = require('../package.json').version
|
||||
|
||||
var loose = false
|
||||
|
||||
var includePrerelease = false
|
||||
|
||||
var coerce = false
|
||||
|
||||
var rtl = false
|
||||
|
||||
var identifier
|
||||
|
||||
var semver = require('../semver')
|
||||
|
||||
var reverse = false
|
||||
|
||||
var options = {}
|
||||
|
||||
main()
|
||||
|
||||
function main () {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
var a = argv.shift()
|
||||
var 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
|
||||
}
|
||||
}
|
||||
|
||||
var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
|
||||
|
||||
versions = versions.map(function (v) {
|
||||
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||
}).filter(function (v) {
|
||||
return semver.valid(v)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
|
||||
|
||||
for (var i = 0, l = range.length; i < l; i++) {
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.satisfies(v, range[i], options)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
function failInc () {
|
||||
console.error('--inc can only be used on a single version with no range')
|
||||
fail()
|
||||
}
|
||||
|
||||
function fail () { process.exit(1) }
|
||||
|
||||
function success () {
|
||||
var compare = reverse ? 'rcompare' : 'compare'
|
||||
versions.sort(function (a, b) {
|
||||
return semver[compare](a, b, options)
|
||||
}).map(function (v) {
|
||||
return semver.clean(v, options)
|
||||
}).map(function (v) {
|
||||
return inc ? semver.inc(v, inc, options, identifier) : v
|
||||
}).forEach(function (v, i, _) { console.log(v) })
|
||||
}
|
||||
|
||||
function 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.'
|
||||
].join('\n'))
|
||||
}
|
28
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/package.json
generated
vendored
Normal file
28
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/package.json
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "semver",
|
||||
"version": "6.3.0",
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"main": "semver.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"postpublish": "git push origin --follow-tags"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "^14.3.1"
|
||||
},
|
||||
"license": "ISC",
|
||||
"repository": "https://github.com/npm/node-semver",
|
||||
"bin": {
|
||||
"semver": "./bin/semver.js"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"range.bnf",
|
||||
"semver.js"
|
||||
],
|
||||
"tap": {
|
||||
"check-coverage": true
|
||||
}
|
||||
}
|
16
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/range.bnf
generated
vendored
Normal file
16
web/node_modules/babel-plugin-polyfill-corejs2/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]+
|
1596
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/semver.js
generated
vendored
Normal file
1596
web/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver/semver.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
43
web/node_modules/babel-plugin-polyfill-corejs2/package.json
generated
vendored
Normal file
43
web/node_modules/babel-plugin-polyfill-corejs2/package.json
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "babel-plugin-polyfill-corejs2",
|
||||
"version": "0.2.2",
|
||||
"description": "A Babel plugin to inject imports to core-js@2 polyfills",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel-polyfills.git",
|
||||
"directory": "packages/babel-plugin-polyfill-corejs2"
|
||||
},
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"import": "./esm/index.mjs",
|
||||
"default": "./lib/index.js"
|
||||
},
|
||||
"./lib/index.js"
|
||||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/compat-data": "^7.13.11",
|
||||
"@babel/helper-define-polyfill-provider": "^0.2.2",
|
||||
"semver": "^6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.0",
|
||||
"@babel/helper-plugin-test-runner": "^7.10.4",
|
||||
"@babel/plugin-transform-for-of": "^7.10.4",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.10.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"gitHead": "1db1e16a7e6855094c52a6cf9b98410e3f0e80de"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue