Add initial support for ES2018 in preset-env (#7658)
This commit is contained in:
parent
5166eef103
commit
81149a5cc9
@ -12,9 +12,10 @@ const es5 = {
|
||||
"es6.array.sort": "Array methods / Array.prototype.sort",
|
||||
"es6.date.now": "Date methods / Date.now",
|
||||
"es6.date.to-iso-string": "Date methods / Date.prototype.toISOString",
|
||||
"es6.date.to-json" : "Date methods / Date.prototype.toJSON",
|
||||
"es6.date.to-json": "Date methods / Date.prototype.toJSON",
|
||||
"es6.function.bind": "Function.prototype.bind",
|
||||
"es6.string.iterator": "String properties and methods / Property access on strings",
|
||||
"es6.string.iterator":
|
||||
"String properties and methods / Property access on strings",
|
||||
"es6.string.trim": "String properties and methods / String.prototype.trim",
|
||||
};
|
||||
|
||||
@ -50,31 +51,31 @@ const es2015 = {
|
||||
"es6.typed.array-buffer": "typed arrays / ArrayBuffer[Symbol.species]",
|
||||
"es6.typed.data-view": "typed arrays / DataView",
|
||||
"es6.typed.int8-array": {
|
||||
features: ["typed arrays / Int8Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Int8Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.uint8-array": {
|
||||
features: ["typed arrays / Uint8Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Uint8Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.uint8-clamped-array": {
|
||||
features: ["typed arrays / Uint8ClampedArray"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Uint8ClampedArray"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.int16-array": {
|
||||
features: ["typed arrays / Int16Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Int16Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.uint16-array": {
|
||||
features: ["typed arrays / Uint16Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Uint16Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.int32-array": {
|
||||
features: ["typed arrays / Int32Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Int32Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.uint32-array": {
|
||||
features: ["typed arrays / Uint32Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Uint32Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.float32-array": {
|
||||
features: ["typed arrays / Float32Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Float32Array"].concat(typedArrayMethods),
|
||||
},
|
||||
"es6.typed.float64-array": {
|
||||
features: ["typed arrays / Float64Array"].concat(typedArrayMethods)
|
||||
features: ["typed arrays / Float64Array"].concat(typedArrayMethods),
|
||||
},
|
||||
|
||||
"es6.map": "Map",
|
||||
@ -89,7 +90,8 @@ const es2015 = {
|
||||
"es6.reflect.define-property": "Reflect / Reflect.defineProperty",
|
||||
"es6.reflect.delete-property": "Reflect / Reflect.deleteProperty",
|
||||
"es6.reflect.get": "Reflect / Reflect.get",
|
||||
"es6.reflect.get-own-property-descriptor": "Reflect / Reflect.getOwnPropertyDescriptor",
|
||||
"es6.reflect.get-own-property-descriptor":
|
||||
"Reflect / Reflect.getOwnPropertyDescriptor",
|
||||
"es6.reflect.get-prototype-of": "Reflect / Reflect.getPrototypeOf",
|
||||
"es6.reflect.has": "Reflect / Reflect.has",
|
||||
"es6.reflect.is-extensible": "Reflect / Reflect.isExtensible",
|
||||
@ -102,13 +104,13 @@ const es2015 = {
|
||||
features: [
|
||||
"Promise / basic functionality",
|
||||
"Promise / constructor requires new",
|
||||
"Promise / Promise.prototype isn\'t an instance",
|
||||
"Promise / Promise.prototype isn't an instance",
|
||||
"Promise / Promise.all",
|
||||
"Promise / Promise.all, generic iterables",
|
||||
"Promise / Promise.race",
|
||||
"Promise / Promise.race, generic iterables",
|
||||
"Promise / Promise[Symbol.species]"
|
||||
]
|
||||
"Promise / Promise[Symbol.species]",
|
||||
],
|
||||
},
|
||||
|
||||
"es6.symbol": {
|
||||
@ -126,47 +128,63 @@ const es2015 = {
|
||||
"well-known symbols / Symbol.toPrimitive",
|
||||
"well-known symbols / Symbol.toStringTag",
|
||||
"well-known symbols / Symbol.unscopables",
|
||||
]
|
||||
],
|
||||
},
|
||||
|
||||
"es6.object.freeze": "Object static methods accept primitives / Object.freeze",
|
||||
"es6.object.freeze":
|
||||
"Object static methods accept primitives / Object.freeze",
|
||||
"es6.object.seal": "Object static methods accept primitives / Object.seal",
|
||||
"es6.object.prevent-extensions": "Object static methods accept primitives / Object.preventExtensions",
|
||||
"es6.object.is-frozen": "Object static methods accept primitives / Object.isFrozen",
|
||||
"es6.object.is-sealed": "Object static methods accept primitives / Object.isSealed",
|
||||
"es6.object.is-extensible": "Object static methods accept primitives / Object.isExtensible",
|
||||
"es6.object.prevent-extensions":
|
||||
"Object static methods accept primitives / Object.preventExtensions",
|
||||
"es6.object.is-frozen":
|
||||
"Object static methods accept primitives / Object.isFrozen",
|
||||
"es6.object.is-sealed":
|
||||
"Object static methods accept primitives / Object.isSealed",
|
||||
"es6.object.is-extensible":
|
||||
"Object static methods accept primitives / Object.isExtensible",
|
||||
"es6.object.get-own-property-descriptor":
|
||||
"Object static methods accept primitives / Object.getOwnPropertyDescriptor",
|
||||
"es6.object.get-prototype-of": "Object static methods accept primitives / Object.getPrototypeOf",
|
||||
"es6.object.get-prototype-of":
|
||||
"Object static methods accept primitives / Object.getPrototypeOf",
|
||||
"es6.object.keys": "Object static methods accept primitives / Object.keys",
|
||||
"es6.object.get-own-property-names": "Object static methods accept primitives / Object.getOwnPropertyNames",
|
||||
"es6.object.get-own-property-names":
|
||||
"Object static methods accept primitives / Object.getOwnPropertyNames",
|
||||
|
||||
"es6.object.assign": "Object static methods / Object.assign",
|
||||
"es6.object.is": "Object static methods / Object.is",
|
||||
"es6.object.set-prototype-of": "Object static methods / Object.setPrototypeOf",
|
||||
"es6.object.set-prototype-of":
|
||||
"Object static methods / Object.setPrototypeOf",
|
||||
|
||||
"es6.function.name": "function \"name\" property",
|
||||
"es6.function.name": 'function "name" property',
|
||||
|
||||
"es6.string.raw": "String static methods / String.raw",
|
||||
"es6.string.from-code-point": "String static methods / String.fromCodePoint",
|
||||
|
||||
"es6.string.code-point-at": "String.prototype methods / String.prototype.codePointAt",
|
||||
"es6.string.code-point-at":
|
||||
"String.prototype methods / String.prototype.codePointAt",
|
||||
// "String.prototype methods / String.prototype.normalize" not implemented
|
||||
"es6.string.repeat": "String.prototype methods / String.prototype.repeat",
|
||||
"es6.string.starts-with": "String.prototype methods / String.prototype.startsWith",
|
||||
"es6.string.ends-with": "String.prototype methods / String.prototype.endsWith",
|
||||
"es6.string.starts-with":
|
||||
"String.prototype methods / String.prototype.startsWith",
|
||||
"es6.string.ends-with":
|
||||
"String.prototype methods / String.prototype.endsWith",
|
||||
"es6.string.includes": "String.prototype methods / String.prototype.includes",
|
||||
|
||||
"es6.regexp.flags": "RegExp.prototype properties / RegExp.prototype.flags",
|
||||
"es6.regexp.match": "RegExp.prototype properties / RegExp.prototype[Symbol.match]",
|
||||
"es6.regexp.replace": "RegExp.prototype properties / RegExp.prototype[Symbol.replace]",
|
||||
"es6.regexp.split": "RegExp.prototype properties / RegExp.prototype[Symbol.split]",
|
||||
"es6.regexp.search": "RegExp.prototype properties / RegExp.prototype[Symbol.search]",
|
||||
"es6.regexp.match":
|
||||
"RegExp.prototype properties / RegExp.prototype[Symbol.match]",
|
||||
"es6.regexp.replace":
|
||||
"RegExp.prototype properties / RegExp.prototype[Symbol.replace]",
|
||||
"es6.regexp.split":
|
||||
"RegExp.prototype properties / RegExp.prototype[Symbol.split]",
|
||||
"es6.regexp.search":
|
||||
"RegExp.prototype properties / RegExp.prototype[Symbol.search]",
|
||||
|
||||
"es6.array.from": "Array static methods / Array.from",
|
||||
"es6.array.of": "Array static methods / Array.of",
|
||||
|
||||
"es6.array.copy-within": "Array.prototype methods / Array.prototype.copyWithin",
|
||||
"es6.array.copy-within":
|
||||
"Array.prototype methods / Array.prototype.copyWithin",
|
||||
"es6.array.find": "Array.prototype methods / Array.prototype.find",
|
||||
"es6.array.find-index": "Array.prototype methods / Array.prototype.findIndex",
|
||||
"es6.array.fill": "Array.prototype methods / Array.prototype.fill",
|
||||
@ -174,10 +192,10 @@ const es2015 = {
|
||||
"es6.array.iterator": {
|
||||
features: [
|
||||
"Array.prototype methods / Array.prototype.keys",
|
||||
// can use Symbol.iterator, not implemented in many environments
|
||||
// "Array.prototype methods / Array.prototype.values",
|
||||
// can use Symbol.iterator, not implemented in many environments
|
||||
// "Array.prototype methods / Array.prototype.values",
|
||||
"Array.prototype methods / Array.prototype.entries",
|
||||
]
|
||||
],
|
||||
},
|
||||
|
||||
"es6.number.is-finite": "Number properties / Number.isFinite",
|
||||
@ -216,11 +234,25 @@ const es2016 = {
|
||||
const es2017 = {
|
||||
"es7.object.values": "Object static methods / Object.values",
|
||||
"es7.object.entries": "Object static methods / Object.entries",
|
||||
"es7.object.get-own-property-descriptors": "Object static methods / Object.getOwnPropertyDescriptors",
|
||||
"es7.object.get-own-property-descriptors":
|
||||
"Object static methods / Object.getOwnPropertyDescriptors",
|
||||
"es7.string.pad-start": "String padding / String.prototype.padStart",
|
||||
"es7.string.pad-end": "String padding / String.prototype.padEnd",
|
||||
};
|
||||
|
||||
const es2018 = {
|
||||
"es7.promise.finally": "Promise.prototype.finally",
|
||||
"es7.symbol.async-iterator": "Asynchronous Iterators",
|
||||
};
|
||||
|
||||
const proposals = require("./shipped-proposals").builtIns;
|
||||
|
||||
module.exports = Object.assign({}, es5, es2015, es2016, es2017, proposals);
|
||||
module.exports = Object.assign(
|
||||
{},
|
||||
es5,
|
||||
es2015,
|
||||
es2016,
|
||||
es2017,
|
||||
es2018,
|
||||
proposals
|
||||
);
|
||||
|
||||
@ -85,6 +85,9 @@ const es2017 = {
|
||||
};
|
||||
|
||||
const es2018 = {
|
||||
"proposal-async-generator-functions": "Asynchronous Iterators",
|
||||
"proposal-object-rest-spread": "object rest/spread properties",
|
||||
"proposal-unicode-property-regex": "RegExp Unicode Property Escapes",
|
||||
"transform-dotall-regex": "s (dotAll) flag for regular expressions",
|
||||
};
|
||||
|
||||
|
||||
@ -218,11 +218,6 @@
|
||||
"opera": "42",
|
||||
"electron": "1.6"
|
||||
},
|
||||
"transform-dotall-regex": {
|
||||
"chrome": "62",
|
||||
"safari": "11.1",
|
||||
"opera": "49"
|
||||
},
|
||||
"proposal-async-generator-functions": {
|
||||
"chrome": "63",
|
||||
"firefox": "57",
|
||||
@ -237,15 +232,20 @@
|
||||
"opera": "47",
|
||||
"electron": "2"
|
||||
},
|
||||
"proposal-unicode-property-regex": {
|
||||
"chrome": "64",
|
||||
"safari": "11.1",
|
||||
"opera": "51"
|
||||
},
|
||||
"transform-dotall-regex": {
|
||||
"chrome": "62",
|
||||
"safari": "11.1",
|
||||
"opera": "49"
|
||||
},
|
||||
"proposal-optional-catch-binding": {
|
||||
"chrome": "66",
|
||||
"firefox": "58",
|
||||
"safari": "11.1",
|
||||
"opera": "53"
|
||||
},
|
||||
"proposal-unicode-property-regex": {
|
||||
"chrome": "64",
|
||||
"safari": "11.1",
|
||||
"opera": "51"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,10 @@
|
||||
// These mappings represent the builtin/feature proposals that have been
|
||||
// shipped by browsers, and are enabled by the `shippedProposals` option.
|
||||
|
||||
const builtIns = {
|
||||
"es7.promise.finally": "Promise.prototype.finally",
|
||||
"es7.symbol.async-iterator": "Asynchronous Iterators",
|
||||
};
|
||||
const builtIns = {};
|
||||
|
||||
const features = {
|
||||
"proposal-async-generator-functions": "Asynchronous Iterators",
|
||||
"proposal-object-rest-spread": "object rest/spread properties",
|
||||
"proposal-optional-catch-binding": "optional catch binding",
|
||||
"proposal-unicode-property-regex": "RegExp Unicode Property Escapes",
|
||||
};
|
||||
|
||||
const pluginSyntaxMap = new Map([
|
||||
|
||||
@ -30,6 +30,9 @@ Using plugins:
|
||||
transform-regenerator { "android":"4" }
|
||||
transform-exponentiation-operator { "android":"4" }
|
||||
transform-async-to-generator { "android":"4" }
|
||||
proposal-async-generator-functions { "android":"4" }
|
||||
proposal-object-rest-spread { "android":"4" }
|
||||
proposal-unicode-property-regex { "android":"4" }
|
||||
transform-dotall-regex { "android":"4" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -130,6 +133,8 @@ Using polyfills with `entry` option:
|
||||
es7.object.get-own-property-descriptors { "android":"4" }
|
||||
es7.string.pad-start { "android":"4" }
|
||||
es7.string.pad-end { "android":"4" }
|
||||
es7.promise.finally { "android":"4" }
|
||||
es7.symbol.async-iterator { "android":"4" }
|
||||
web.timers { "android":"4" }
|
||||
web.immediate { "android":"4" }
|
||||
web.dom.iterable { "android":"4" }
|
||||
|
||||
@ -13,6 +13,9 @@ Using plugins:
|
||||
transform-destructuring { "node":"6" }
|
||||
transform-exponentiation-operator { "node":"6" }
|
||||
transform-async-to-generator { "node":"6" }
|
||||
proposal-async-generator-functions { "node":"6" }
|
||||
proposal-object-rest-spread { "node":"6" }
|
||||
proposal-unicode-property-regex { "node":"6" }
|
||||
transform-dotall-regex { "node":"6" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
|
||||
@ -33,6 +33,9 @@ Using plugins:
|
||||
transform-regenerator {}
|
||||
transform-exponentiation-operator {}
|
||||
transform-async-to-generator {}
|
||||
proposal-async-generator-functions { "chrome":"55" }
|
||||
proposal-object-rest-spread { "chrome":"55" }
|
||||
proposal-unicode-property-regex { "chrome":"55" }
|
||||
transform-dotall-regex { "chrome":"55" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -41,6 +44,8 @@ Using polyfills with `entry` option:
|
||||
es6.array.sort { "chrome":"55" }
|
||||
es7.string.pad-start { "chrome":"55" }
|
||||
es7.string.pad-end { "chrome":"55" }
|
||||
es7.promise.finally { "chrome":"55" }
|
||||
es7.symbol.async-iterator { "chrome":"55" }
|
||||
web.timers { "chrome":"55" }
|
||||
web.immediate { "chrome":"55" }
|
||||
web.dom.iterable { "chrome":"55" }
|
||||
|
||||
@ -32,6 +32,9 @@ Using plugins:
|
||||
transform-regenerator { "ie":"10" }
|
||||
transform-exponentiation-operator { "ie":"10", "node":"6" }
|
||||
transform-async-to-generator { "chrome":"54", "ie":"10", "node":"6" }
|
||||
proposal-async-generator-functions { "chrome":"54", "ie":"10", "node":"6" }
|
||||
proposal-object-rest-spread { "chrome":"54", "ie":"10", "node":"6" }
|
||||
proposal-unicode-property-regex { "chrome":"54", "ie":"10", "node":"6" }
|
||||
transform-dotall-regex { "chrome":"54", "ie":"10", "node":"6" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -132,6 +135,8 @@ Using polyfills with `entry` option:
|
||||
es7.object.get-own-property-descriptors { "ie":"10", "node":"6" }
|
||||
es7.string.pad-start { "chrome":"54", "ie":"10", "node":"6" }
|
||||
es7.string.pad-end { "chrome":"54", "ie":"10", "node":"6" }
|
||||
es7.promise.finally { "chrome":"54", "ie":"10", "node":"6" }
|
||||
es7.symbol.async-iterator { "chrome":"54", "ie":"10", "node":"6" }
|
||||
web.timers { "chrome":"54", "ie":"10", "node":"6" }
|
||||
web.immediate { "chrome":"54", "ie":"10", "node":"6" }
|
||||
web.dom.iterable { "chrome":"54", "ie":"10", "node":"6" }
|
||||
|
||||
@ -25,6 +25,9 @@ Using plugins:
|
||||
transform-regenerator { "electron":"0.36" }
|
||||
transform-exponentiation-operator { "electron":"0.36" }
|
||||
transform-async-to-generator { "electron":"0.36" }
|
||||
proposal-async-generator-functions { "electron":"0.36" }
|
||||
proposal-object-rest-spread { "electron":"0.36" }
|
||||
proposal-unicode-property-regex { "electron":"0.36" }
|
||||
transform-dotall-regex { "electron":"0.36" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -89,6 +92,8 @@ Using polyfills with `entry` option:
|
||||
es7.object.get-own-property-descriptors { "electron":"0.36" }
|
||||
es7.string.pad-start { "electron":"0.36" }
|
||||
es7.string.pad-end { "electron":"0.36" }
|
||||
es7.promise.finally { "electron":"0.36" }
|
||||
es7.symbol.async-iterator { "electron":"0.36" }
|
||||
web.timers { "electron":"0.36" }
|
||||
web.immediate { "electron":"0.36" }
|
||||
web.dom.iterable { "electron":"0.36" }
|
||||
|
||||
@ -30,6 +30,9 @@ Using plugins:
|
||||
transform-regenerator {}
|
||||
transform-exponentiation-operator {}
|
||||
transform-async-to-generator {}
|
||||
proposal-async-generator-functions { "chrome":"55" }
|
||||
proposal-object-rest-spread { "chrome":"55" }
|
||||
proposal-unicode-property-regex { "chrome":"55" }
|
||||
transform-dotall-regex { "chrome":"55" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -38,6 +41,8 @@ Using polyfills with `entry` option:
|
||||
es6.array.sort { "chrome":"55" }
|
||||
es7.string.pad-start { "chrome":"55" }
|
||||
es7.string.pad-end { "chrome":"55" }
|
||||
es7.promise.finally { "chrome":"55" }
|
||||
es7.symbol.async-iterator { "chrome":"55" }
|
||||
web.timers { "chrome":"55" }
|
||||
web.immediate { "chrome":"55" }
|
||||
web.dom.iterable { "chrome":"55" }
|
||||
|
||||
@ -20,6 +20,9 @@ Using plugins:
|
||||
transform-function-name { "firefox":"52" }
|
||||
transform-for-of { "firefox":"52" }
|
||||
transform-destructuring { "firefox":"52" }
|
||||
proposal-async-generator-functions { "firefox":"52", "node":"7.4" }
|
||||
proposal-object-rest-spread { "firefox":"52", "node":"7.4" }
|
||||
proposal-unicode-property-regex { "firefox":"52", "node":"7.4" }
|
||||
transform-dotall-regex { "firefox":"52", "node":"7.4" }
|
||||
|
||||
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
|
||||
|
||||
@ -8,11 +8,11 @@ Using targets:
|
||||
Using modules transform: commonjs
|
||||
|
||||
Using plugins:
|
||||
transform-dotall-regex { "chrome":"60" }
|
||||
proposal-async-generator-functions { "chrome":"60" }
|
||||
syntax-object-rest-spread { "chrome":"60" }
|
||||
proposal-optional-catch-binding { "chrome":"60" }
|
||||
proposal-unicode-property-regex { "chrome":"60" }
|
||||
transform-dotall-regex { "chrome":"60" }
|
||||
proposal-optional-catch-binding { "chrome":"60" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
|
||||
@ -23,4 +23,4 @@ Using polyfills with `entry` option:
|
||||
web.timers { "chrome":"60" }
|
||||
web.immediate { "chrome":"60" }
|
||||
web.dom.iterable { "chrome":"60" }
|
||||
🎉 Successfully compiled 1 file with Babel.
|
||||
🎉 Successfully compiled 1 file with Babel.
|
||||
@ -28,11 +28,11 @@ Using plugins:
|
||||
transform-regenerator {}
|
||||
transform-exponentiation-operator {}
|
||||
transform-async-to-generator {}
|
||||
transform-dotall-regex {}
|
||||
proposal-async-generator-functions {}
|
||||
proposal-object-rest-spread {}
|
||||
proposal-optional-catch-binding {}
|
||||
proposal-unicode-property-regex {}
|
||||
transform-dotall-regex {}
|
||||
proposal-optional-catch-binding {}
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
|
||||
|
||||
@ -35,6 +35,9 @@ Using plugins:
|
||||
transform-regenerator { "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
transform-exponentiation-operator { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
transform-async-to-generator { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
proposal-async-generator-functions { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
proposal-object-rest-spread { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
proposal-unicode-property-regex { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
transform-dotall-regex { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -136,6 +139,8 @@ Using polyfills with `entry` option:
|
||||
es7.object.get-own-property-descriptors { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
es7.string.pad-start { "chrome":"54", "edge":"13", "ie":"10", "ios":"9", "safari":"7" }
|
||||
es7.string.pad-end { "chrome":"54", "edge":"13", "ie":"10", "ios":"9", "safari":"7" }
|
||||
es7.promise.finally { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
es7.symbol.async-iterator { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
web.timers { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
web.immediate { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
web.dom.iterable { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
|
||||
|
||||
@ -31,6 +31,9 @@ Using plugins:
|
||||
transform-regenerator { "firefox":"50", "ie":"11" }
|
||||
transform-exponentiation-operator { "firefox":"50", "ie":"11" }
|
||||
transform-async-to-generator { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
proposal-async-generator-functions { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
proposal-object-rest-spread { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
proposal-unicode-property-regex { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
transform-dotall-regex { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
|
||||
Using polyfills with `usage` option:
|
||||
|
||||
@ -8,9 +8,12 @@ Using targets:
|
||||
Using modules transform: commonjs
|
||||
|
||||
Using plugins:
|
||||
proposal-async-generator-functions { "chrome":"55" }
|
||||
proposal-object-rest-spread { "chrome":"55" }
|
||||
proposal-unicode-property-regex { "chrome":"55" }
|
||||
transform-dotall-regex { "chrome":"55" }
|
||||
|
||||
Using polyfills with `usage` option:
|
||||
|
||||
[src/in.js] Based on your code and targets, none were added.
|
||||
🎉 Successfully compiled 1 file with Babel.
|
||||
🎉 Successfully compiled 1 file with Babel.
|
||||
@ -31,6 +31,9 @@ Using plugins:
|
||||
transform-regenerator { "firefox":"50", "ie":"11" }
|
||||
transform-exponentiation-operator { "firefox":"50", "ie":"11" }
|
||||
transform-async-to-generator { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
proposal-async-generator-functions { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
proposal-object-rest-spread { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
proposal-unicode-property-regex { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
transform-dotall-regex { "chrome":"52", "firefox":"50", "ie":"11" }
|
||||
|
||||
Using polyfills with `usage` option:
|
||||
|
||||
@ -41,6 +41,9 @@ Using plugins:
|
||||
transform-regenerator { "electron":"0.36", "ie":"10" }
|
||||
transform-exponentiation-operator { "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
transform-async-to-generator { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
proposal-async-generator-functions { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
proposal-object-rest-spread { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
proposal-unicode-property-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
transform-dotall-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -158,6 +161,8 @@ Using polyfills with `entry` option:
|
||||
es7.object.get-own-property-descriptors { "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
es7.string.pad-start { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
es7.string.pad-end { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
es7.promise.finally { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
es7.symbol.async-iterator { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
web.timers { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
web.immediate { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
web.dom.iterable { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
|
||||
|
||||
@ -32,6 +32,9 @@ Using plugins:
|
||||
transform-regenerator { "ie":"10" }
|
||||
transform-exponentiation-operator { "ie":"10", "node":"6.10" }
|
||||
transform-async-to-generator { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
proposal-async-generator-functions { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
proposal-object-rest-spread { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
proposal-unicode-property-regex { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
transform-dotall-regex { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
|
||||
Using polyfills with `entry` option:
|
||||
@ -132,6 +135,8 @@ Using polyfills with `entry` option:
|
||||
es7.object.get-own-property-descriptors { "ie":"10", "node":"6.10" }
|
||||
es7.string.pad-start { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
es7.string.pad-end { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
es7.promise.finally { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
es7.symbol.async-iterator { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
web.timers { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
web.immediate { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
web.dom.iterable { "chrome":"54", "ie":"10", "node":"6.10" }
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/es6.symbol";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
Symbol.iterator in arr;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/es6.symbol";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
arr[Symbol.iterator]();
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
Array.from; // static method
|
||||
|
||||
Map; // built-in
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/es6.symbol";
|
||||
import "core-js/modules/es6.regexp.match";
|
||||
import "core-js/modules/es6.promise";
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
|
||||
for (const {
|
||||
padStart
|
||||
} of foo) {
|
||||
for (const _ref of foo) {
|
||||
const {
|
||||
padStart
|
||||
} = _ref;
|
||||
console.log('b'.padEnd(5));
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
for (const {
|
||||
a
|
||||
} of foo) {
|
||||
for (const _ref of foo) {
|
||||
const {
|
||||
a
|
||||
} = _ref;
|
||||
console.log(a);
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -5,6 +5,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es6.map";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -110,6 +110,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -91,6 +91,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -3,6 +3,8 @@ import "core-js/modules/es6.map";
|
||||
import "core-js/modules/es6.set";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -110,6 +110,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -40,6 +40,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -26,6 +26,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
16
packages/babel-preset-env/test/fixtures/preset-options/use-builtins-chrome-66/input.mjs
vendored
Normal file
16
packages/babel-preset-env/test/fixtures/preset-options/use-builtins-chrome-66/input.mjs
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import "@babel/polyfill";
|
||||
|
||||
const foo = {
|
||||
a: true,
|
||||
};
|
||||
|
||||
const bar = {
|
||||
...foo,
|
||||
b: false,
|
||||
};
|
||||
|
||||
async function baz() {
|
||||
for await (const x of someAsyncThing()) {
|
||||
console.log(x);
|
||||
}
|
||||
}
|
||||
11
packages/babel-preset-env/test/fixtures/preset-options/use-builtins-chrome-66/options.json
vendored
Normal file
11
packages/babel-preset-env/test/fixtures/preset-options/use-builtins-chrome-66/options.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"presets": [
|
||||
["../../../../lib", {
|
||||
"targets": {
|
||||
"chrome": "66"
|
||||
},
|
||||
"modules": false,
|
||||
"useBuiltIns": "entry"
|
||||
}]
|
||||
]
|
||||
}
|
||||
15
packages/babel-preset-env/test/fixtures/preset-options/use-builtins-chrome-66/output.mjs
vendored
Normal file
15
packages/babel-preset-env/test/fixtures/preset-options/use-builtins-chrome-66/output.mjs
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
const foo = {
|
||||
a: true
|
||||
};
|
||||
const bar = { ...foo,
|
||||
b: false
|
||||
};
|
||||
|
||||
async function baz() {
|
||||
for await (const x of someAsyncThing()) {
|
||||
console.log(x);
|
||||
}
|
||||
}
|
||||
@ -93,6 +93,8 @@ import "core-js/modules/es7.object.entries";
|
||||
import "core-js/modules/es7.object.get-own-property-descriptors";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "core-js/modules/web.timers";
|
||||
import "core-js/modules/web.immediate";
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import "core-js/modules/es6.array.sort";
|
||||
import "core-js/modules/es7.string.pad-start";
|
||||
import "core-js/modules/es7.string.pad-end";
|
||||
import "core-js/modules/es7.promise.finally";
|
||||
import "core-js/modules/es7.symbol.async-iterator";
|
||||
import "regenerator-runtime/runtime";
|
||||
|
||||
@ -4,6 +4,10 @@ require("core-js/modules/es7.string.pad-start");
|
||||
|
||||
require("core-js/modules/es7.string.pad-end");
|
||||
|
||||
require("core-js/modules/es7.promise.finally");
|
||||
|
||||
require("core-js/modules/es7.symbol.async-iterator");
|
||||
|
||||
require("core-js/modules/web.timers");
|
||||
|
||||
require("core-js/modules/web.immediate");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user