Add to preset-env ES3 transforms for ES3 targets (#9781)

* add to preset-env ES3 transforms for ES3 targets

* add `transform-reserved-words`

* fix `transform-reserved-words` plugin in `@babel/standalone`
This commit is contained in:
Denis Pushkarev 2019-03-31 05:25:12 +07:00 committed by Nicolò Ribaudo
parent 1f5444e96a
commit ae9b25ac69
63 changed files with 222 additions and 50 deletions

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@ -54,7 +54,7 @@ function () {
return Foo; return Foo;
}(); }();
exports.default = Foo; exports["default"] = Foo;
function foo() { function foo() {
return _foo.apply(this, arguments); return _foo.apply(this, arguments);

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _net = babelHelpers.interopRequireDefault(require("net")); var _net = babelHelpers.interopRequireDefault(require("net"));
@ -31,7 +31,7 @@ function (_EventEmitter) {
babelHelpers.createClass(Connection, [{ babelHelpers.createClass(Connection, [{
key: "send", key: "send",
value: function send(message) { value: function send(message) {
this.sock.write(_binarySerializer.default.serializeMessage(message)); this.sock.write(_binarySerializer["default"].serializeMessage(message));
} }
}, { }, {
key: "disconnect", key: "disconnect",
@ -42,4 +42,4 @@ function (_EventEmitter) {
return Connection; return Connection;
}(_events.EventEmitter); }(_events.EventEmitter);
exports.default = Connection; exports["default"] = Connection;

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _BaseFoo2 = babelHelpers.interopRequireDefault(require("./BaseFoo")); var _BaseFoo2 = babelHelpers.interopRequireDefault(require("./BaseFoo"));
@ -25,6 +25,6 @@ function (_BaseFoo) {
} }
}]); }]);
return SubFoo; return SubFoo;
}(_BaseFoo2.default); }(_BaseFoo2["default"]);
exports.default = SubFoo; exports["default"] = SubFoo;

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _react = babelHelpers.interopRequireDefault(require("react")); var _react = babelHelpers.interopRequireDefault(require("react"));
@ -20,12 +20,12 @@ function (_Component) {
babelHelpers.createClass(RandomComponent, [{ babelHelpers.createClass(RandomComponent, [{
key: "render", key: "render",
value: function render() { value: function render() {
return _react.default.createElement("div", { return _react["default"].createElement("div", {
className: "sui-RandomComponent" className: "sui-RandomComponent"
}, _react.default.createElement("h2", null, "Hi there!")); }, _react["default"].createElement("h2", null, "Hi there!"));
} }
}]); }]);
return RandomComponent; return RandomComponent;
}(_react.Component); }(_react.Component);
exports.default = RandomComponent; exports["default"] = RandomComponent;

View File

@ -3,10 +3,10 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _default = function _default() { var _default = function _default() {
babelHelpers.classCallCheck(this, _default); babelHelpers.classCallCheck(this, _default);
}; };
exports.default = _default; exports["default"] = _default;

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var b = function b() { var b = function b() {
babelHelpers.classCallCheck(this, b); babelHelpers.classCallCheck(this, b);
@ -51,4 +51,4 @@ function (_b2) {
return a2; return a2;
}(b); }(b);
exports.default = a2; exports["default"] = a2;

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = _default; exports["default"] = _default;
function _default() { function _default() {
return ( return (

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _default = function _default() { var _default = function _default() {
return { return {
@ -13,4 +13,4 @@ var _default = function _default() {
}; };
}; };
exports.default = _default; exports["default"] = _default;

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _default = function _default(_ref) { var _default = function _default(_ref) {
var _onClick = _ref.onClick; var _onClick = _ref.onClick;
@ -14,4 +14,4 @@ var _default = function _default(_ref) {
}); });
}; };
exports.default = _default; exports["default"] = _default;

View File

@ -3,11 +3,11 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports["default"] = void 0;
var _args = _interopRequireDefault(require("utils/url/args")); var _args = _interopRequireDefault(require("utils/url/args"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
@ -55,11 +55,11 @@ function (_Component) {
_createClass(App, [{ _createClass(App, [{
key: "componentDidMount", key: "componentDidMount",
value: function componentDidMount() { value: function componentDidMount() {
this.exportType = _args.default.get('type', window.location.href); this.exportType = _args["default"].get('type', window.location.href);
} }
}]); }]);
return App; return App;
}(Component); }(Component);
exports.default = App; exports["default"] = App;

View File

@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = _callee; exports["default"] = _callee;
var _marked = var _marked =
/*#__PURE__*/ /*#__PURE__*/

View File

@ -24,8 +24,6 @@
"@babel/core": "^7.4.0", "@babel/core": "^7.4.0",
"@babel/helper-plugin-test-runner": "^7.0.0", "@babel/helper-plugin-test-runner": "^7.0.0",
"@babel/helpers": "^7.4.0", "@babel/helpers": "^7.4.0",
"@babel/plugin-transform-member-expression-literals": "^7.2.0",
"@babel/plugin-transform-property-literals": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.4.0", "@babel/plugin-transform-runtime": "^7.4.0",
"@babel/preset-env": "^7.4.0", "@babel/preset-env": "^7.4.0",
"@babel/runtime": "^7.4.0", "@babel/runtime": "^7.4.0",

View File

@ -8,8 +8,6 @@ const template = require("@babel/template");
const t = require("@babel/types"); const t = require("@babel/types");
const transformRuntime = require("../"); const transformRuntime = require("../");
const transformMemberExpressionLiterals = require("@babel/plugin-transform-member-expression-literals");
const transformPropertyLiterals = require("@babel/plugin-transform-property-literals");
const corejs2Definitions = require("../lib/runtime-corejs2-definitions").default(); const corejs2Definitions = require("../lib/runtime-corejs2-definitions").default();
const corejs3Definitions = require("../lib/runtime-corejs3-definitions").default(); const corejs3Definitions = require("../lib/runtime-corejs3-definitions").default();
@ -156,8 +154,6 @@ function buildHelper(
presets: [[require("@babel/preset-env"), { modules: false }]], presets: [[require("@babel/preset-env"), { modules: false }]],
plugins: [ plugins: [
[transformRuntime, { corejs, useESModules: esm }], [transformRuntime, { corejs, useESModules: esm }],
[transformMemberExpressionLiterals],
[transformPropertyLiterals],
buildRuntimeRewritePlugin( buildRuntimeRewritePlugin(
runtimeName, runtimeName,
path.relative(path.dirname(helperFilename), pkgDirname), path.relative(path.dirname(helperFilename), pkgDirname),

View File

@ -99,6 +99,9 @@ const es = {
"proposal-json-strings": "JSON superset", "proposal-json-strings": "JSON superset",
"proposal-optional-catch-binding": "optional catch binding", "proposal-optional-catch-binding": "optional catch binding",
"transform-named-capturing-groups-regex": "RegExp named capture groups", "transform-named-capturing-groups-regex": "RegExp named capture groups",
"transform-member-expression-literals": "Object/array literal extensions / Reserved words as property names",
"transform-property-literals": "Object/array literal extensions / Reserved words as property names",
"transform-reserved-words": "Miscellaneous / Unreserved words",
}; };
const proposals = require("./shipped-proposals").features; const proposals = require("./shipped-proposals").features;

View File

@ -301,5 +301,47 @@
"ios": "11.3", "ios": "11.3",
"opera": "51", "opera": "51",
"electron": "3.1" "electron": "3.1"
},
"transform-member-expression-literals": {
"chrome": "7",
"opera": "12",
"edge": "12",
"firefox": "2",
"safari": "5.1",
"node": "0.10",
"ie": "9",
"android": "4",
"ios": "6",
"phantom": "2",
"samsung": "2.1",
"electron": "5"
},
"transform-property-literals": {
"chrome": "7",
"opera": "12",
"edge": "12",
"firefox": "2",
"safari": "5.1",
"node": "0.10",
"ie": "9",
"android": "4",
"ios": "6",
"phantom": "2",
"samsung": "2.1",
"electron": "5"
},
"transform-reserved-words": {
"chrome": "13",
"opera": "10.50",
"edge": "12",
"firefox": "2",
"safari": "3.1",
"node": "0.10",
"ie": "9",
"android": "4.4",
"ios": "6",
"phantom": "2",
"samsung": "2.1",
"electron": "0.2"
} }
} }

View File

@ -38,6 +38,7 @@
"@babel/plugin-transform-for-of": "^7.4.0", "@babel/plugin-transform-for-of": "^7.4.0",
"@babel/plugin-transform-function-name": "^7.2.0", "@babel/plugin-transform-function-name": "^7.2.0",
"@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-literals": "^7.2.0",
"@babel/plugin-transform-member-expression-literals": "^7.2.0",
"@babel/plugin-transform-modules-amd": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.2.0",
"@babel/plugin-transform-modules-commonjs": "^7.4.0", "@babel/plugin-transform-modules-commonjs": "^7.4.0",
"@babel/plugin-transform-modules-systemjs": "^7.4.0", "@babel/plugin-transform-modules-systemjs": "^7.4.0",
@ -46,7 +47,9 @@
"@babel/plugin-transform-new-target": "^7.4.0", "@babel/plugin-transform-new-target": "^7.4.0",
"@babel/plugin-transform-object-super": "^7.2.0", "@babel/plugin-transform-object-super": "^7.2.0",
"@babel/plugin-transform-parameters": "^7.4.0", "@babel/plugin-transform-parameters": "^7.4.0",
"@babel/plugin-transform-property-literals": "^7.2.0",
"@babel/plugin-transform-regenerator": "^7.4.0", "@babel/plugin-transform-regenerator": "^7.4.0",
"@babel/plugin-transform-reserved-words": "^7.2.0",
"@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0",
"@babel/plugin-transform-sticky-regex": "^7.2.0", "@babel/plugin-transform-sticky-regex": "^7.2.0",

View File

@ -19,6 +19,7 @@ export default {
"transform-for-of": require("@babel/plugin-transform-for-of"), "transform-for-of": require("@babel/plugin-transform-for-of"),
"transform-function-name": require("@babel/plugin-transform-function-name"), "transform-function-name": require("@babel/plugin-transform-function-name"),
"transform-literals": require("@babel/plugin-transform-literals"), "transform-literals": require("@babel/plugin-transform-literals"),
"transform-member-expression-literals": require("@babel/plugin-transform-member-expression-literals"),
"transform-modules-amd": require("@babel/plugin-transform-modules-amd"), "transform-modules-amd": require("@babel/plugin-transform-modules-amd"),
"transform-modules-commonjs": require("@babel/plugin-transform-modules-commonjs"), "transform-modules-commonjs": require("@babel/plugin-transform-modules-commonjs"),
"transform-modules-systemjs": require("@babel/plugin-transform-modules-systemjs"), "transform-modules-systemjs": require("@babel/plugin-transform-modules-systemjs"),
@ -26,6 +27,8 @@ export default {
"transform-named-capturing-groups-regex": require("@babel/plugin-transform-named-capturing-groups-regex"), "transform-named-capturing-groups-regex": require("@babel/plugin-transform-named-capturing-groups-regex"),
"transform-object-super": require("@babel/plugin-transform-object-super"), "transform-object-super": require("@babel/plugin-transform-object-super"),
"transform-parameters": require("@babel/plugin-transform-parameters"), "transform-parameters": require("@babel/plugin-transform-parameters"),
"transform-property-literals": require("@babel/plugin-transform-property-literals"),
"transform-reserved-words": require("@babel/plugin-transform-reserved-words"),
"transform-shorthand-properties": require("@babel/plugin-transform-shorthand-properties"), "transform-shorthand-properties": require("@babel/plugin-transform-shorthand-properties"),
"transform-spread": require("@babel/plugin-transform-spread"), "transform-spread": require("@babel/plugin-transform-spread"),
"transform-sticky-regex": require("@babel/plugin-transform-sticky-regex"), "transform-sticky-regex": require("@babel/plugin-transform-sticky-regex"),

View File

@ -37,6 +37,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set.
Successfully compiled 1 file with Babel. Successfully compiled 1 file with Babel.

View File

@ -37,6 +37,7 @@ Using plugins:
proposal-json-strings { "android":"4" } proposal-json-strings { "android":"4" }
proposal-optional-catch-binding { "android":"4" } proposal-optional-catch-binding { "android":"4" }
transform-named-capturing-groups-regex { "android":"4" } transform-named-capturing-groups-regex { "android":"4" }
transform-reserved-words { "android":"4" }
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -32,6 +32,8 @@ Using plugins:
proposal-json-strings { "electron":"0.36" } proposal-json-strings { "electron":"0.36" }
proposal-optional-catch-binding { "electron":"0.36" } proposal-optional-catch-binding { "electron":"0.36" }
transform-named-capturing-groups-regex { "electron":"0.36" } transform-named-capturing-groups-regex { "electron":"0.36" }
transform-member-expression-literals { "electron":"0.36" }
transform-property-literals { "electron":"0.36" }
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -37,6 +37,9 @@ Using plugins:
proposal-json-strings { "chrome":"55" } proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" } proposal-optional-catch-binding { "chrome":"55" }
transform-named-capturing-groups-regex { "chrome":"55" } transform-named-capturing-groups-regex { "chrome":"55" }
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -48,6 +48,8 @@ Using plugins:
proposal-json-strings { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" } proposal-json-strings { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-optional-catch-binding { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" } proposal-optional-catch-binding { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-named-capturing-groups-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" } transform-named-capturing-groups-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-member-expression-literals { "electron":"0.36" }
transform-property-literals { "electron":"0.36" }
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -37,6 +37,7 @@ Using plugins:
proposal-json-strings { "android":"4" } proposal-json-strings { "android":"4" }
proposal-optional-catch-binding { "android":"4" } proposal-optional-catch-binding { "android":"4" }
transform-named-capturing-groups-regex { "android":"4" } transform-named-capturing-groups-regex { "android":"4" }
transform-reserved-words { "android":"4" }
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -32,6 +32,8 @@ Using plugins:
proposal-json-strings { "electron":"0.36" } proposal-json-strings { "electron":"0.36" }
proposal-optional-catch-binding { "electron":"0.36" } proposal-optional-catch-binding { "electron":"0.36" }
transform-named-capturing-groups-regex { "electron":"0.36" } transform-named-capturing-groups-regex { "electron":"0.36" }
transform-member-expression-literals { "electron":"0.36" }
transform-property-literals { "electron":"0.36" }
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -37,6 +37,9 @@ Using plugins:
proposal-json-strings { "chrome":"55" } proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" } proposal-optional-catch-binding { "chrome":"55" }
transform-named-capturing-groups-regex { "chrome":"55" } transform-named-capturing-groups-regex { "chrome":"55" }
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -48,6 +48,8 @@ Using plugins:
proposal-json-strings { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" } proposal-json-strings { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
proposal-optional-catch-binding { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" } proposal-optional-catch-binding { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-named-capturing-groups-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" } transform-named-capturing-groups-regex { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
transform-member-expression-literals { "electron":"0.36" }
transform-property-literals { "electron":"0.36" }
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -35,6 +35,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -42,6 +42,9 @@ Using plugins:
proposal-json-strings {} proposal-json-strings {}
proposal-optional-catch-binding {} proposal-optional-catch-binding {}
transform-named-capturing-groups-regex {} transform-named-capturing-groups-regex {}
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -48,6 +48,9 @@ Using plugins:
proposal-json-strings { "chrome":"55" } proposal-json-strings { "chrome":"55" }
proposal-optional-catch-binding { "chrome":"55" } proposal-optional-catch-binding { "chrome":"55" }
transform-named-capturing-groups-regex { "chrome":"55" } transform-named-capturing-groups-regex { "chrome":"55" }
transform-member-expression-literals {}
transform-property-literals {}
transform-reserved-words {}
Using polyfills with `entry` option: Using polyfills with `entry` option:

View File

@ -308,15 +308,15 @@ function _awaitAsyncGenerator(value) { return new _AwaitValue(value); }
function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; } function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; }
function _AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; var wrappedAwait = value instanceof _AwaitValue; Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { if (wrappedAwait) { resume("next", arg); return; } settle(result.done ? "return" : "normal", arg); }, function (err) { resume("throw", err); }); } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front.key, front.arg); } else { back = null; } } this._invoke = send; if (typeof gen.return !== "function") { this.return = undefined; } } function _AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; var wrappedAwait = value instanceof _AwaitValue; Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { if (wrappedAwait) { resume("next", arg); return; } settle(result.done ? "return" : "normal", arg); }, function (err) { resume("throw", err); }); } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front.key, front.arg); } else { back = null; } } this._invoke = send; if (typeof gen["return"] !== "function") { this["return"] = undefined; } }
if (typeof Symbol === "function" && Symbol.asyncIterator) { _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; } if (typeof Symbol === "function" && Symbol.asyncIterator) { _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; }
_AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); }; _AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };
_AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); }; _AsyncGenerator.prototype["throw"] = function (arg) { return this._invoke("throw", arg); };
_AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); }; _AsyncGenerator.prototype["return"] = function (arg) { return this._invoke("return", arg); };
function _AwaitValue(value) { this.wrapped = value; } function _AwaitValue(value) { this.wrapped = value; }

View File

@ -36,15 +36,15 @@ function _awaitAsyncGenerator(value) { return new _AwaitValue(value); }
function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; } function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; }
function _AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; var wrappedAwait = value instanceof _AwaitValue; Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { if (wrappedAwait) { resume("next", arg); return; } settle(result.done ? "return" : "normal", arg); }, function (err) { resume("throw", err); }); } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front.key, front.arg); } else { back = null; } } this._invoke = send; if (typeof gen.return !== "function") { this.return = undefined; } } function _AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; var wrappedAwait = value instanceof _AwaitValue; Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { if (wrappedAwait) { resume("next", arg); return; } settle(result.done ? "return" : "normal", arg); }, function (err) { resume("throw", err); }); } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front.key, front.arg); } else { back = null; } } this._invoke = send; if (typeof gen["return"] !== "function") { this["return"] = undefined; } }
if (typeof Symbol === "function" && Symbol.asyncIterator) { _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; } if (typeof Symbol === "function" && Symbol.asyncIterator) { _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; }
_AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); }; _AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };
_AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); }; _AsyncGenerator.prototype["throw"] = function (arg) { return this._invoke("throw", arg); };
_AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); }; _AsyncGenerator.prototype["return"] = function (arg) { return this._invoke("return", arg); };
function _AwaitValue(value) { this.wrapped = value; } function _AwaitValue(value) { this.wrapped = value; }

View File

@ -2,6 +2,6 @@
var _mod = _interopRequireDefault(require("mod")); var _mod = _interopRequireDefault(require("mod"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
console.log(_mod.default); console.log(_mod["default"]);

View File

@ -2,6 +2,6 @@
var _mod = _interopRequireDefault(require("mod")); var _mod = _interopRequireDefault(require("mod"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
console.log(_mod.default); console.log(_mod["default"]);

View File

@ -2,4 +2,4 @@
var _a = _interopRequireDefault(require("a")); var _a = _interopRequireDefault(require("a"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

View File

@ -2,4 +2,4 @@
var _a = _interopRequireDefault(require("a")); var _a = _interopRequireDefault(require("a"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

View File

@ -15,5 +15,5 @@
_a = _interopRequireDefault(_a); _a = _interopRequireDefault(_a);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
}); });

View File

@ -0,0 +1 @@
({ if: 42 }).if == 42;

View File

@ -0,0 +1,13 @@
{
"presets": [
[
"../../../../lib",
{
"targets": {
"browsers": ["ie 8"]
},
"modules": false
}
]
]
}

View File

@ -0,0 +1,3 @@
({
"if": 42
})["if"] == 42;

View File

@ -0,0 +1 @@
({ if: 42 }).if == 42;

View File

@ -0,0 +1,13 @@
{
"presets": [
[
"../../../../lib",
{
"targets": {
"browsers": ["ie 9"]
},
"modules": false
}
]
]
}

View File

@ -0,0 +1,3 @@
({
if: 42
}).if == 42;

View File

@ -0,0 +1 @@
var abstract = 1;

View File

@ -0,0 +1,13 @@
{
"presets": [
[
"../../../../lib",
{
"targets": {
"browsers": ["ie 8"]
},
"modules": false
}
]
]
}

View File

@ -0,0 +1 @@
var _abstract = 1;

View File

@ -0,0 +1 @@
var abstract = 1;

View File

@ -0,0 +1,13 @@
{
"presets": [
[
"../../../../lib",
{
"targets": {
"browsers": ["ie 9"]
},
"modules": false
}
]
]
}

View File

@ -0,0 +1 @@
var abstract = 1;

View File

@ -10,15 +10,15 @@ function _awaitAsyncGenerator(value) { return new _AwaitValue(value); }
function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; } function _wrapAsyncGenerator(fn) { return function () { return new _AsyncGenerator(fn.apply(this, arguments)); }; }
function _AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; var wrappedAwait = value instanceof _AwaitValue; Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { if (wrappedAwait) { resume("next", arg); return; } settle(result.done ? "return" : "normal", arg); }, function (err) { resume("throw", err); }); } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front.key, front.arg); } else { back = null; } } this._invoke = send; if (typeof gen.return !== "function") { this.return = undefined; } } function _AsyncGenerator(gen) { var front, back; function send(key, arg) { return new Promise(function (resolve, reject) { var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null }; if (back) { back = back.next = request; } else { front = back = request; resume(key, arg); } }); } function resume(key, arg) { try { var result = gen[key](arg); var value = result.value; var wrappedAwait = value instanceof _AwaitValue; Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) { if (wrappedAwait) { resume("next", arg); return; } settle(result.done ? "return" : "normal", arg); }, function (err) { resume("throw", err); }); } catch (err) { settle("throw", err); } } function settle(type, value) { switch (type) { case "return": front.resolve({ value: value, done: true }); break; case "throw": front.reject(value); break; default: front.resolve({ value: value, done: false }); break; } front = front.next; if (front) { resume(front.key, front.arg); } else { back = null; } } this._invoke = send; if (typeof gen["return"] !== "function") { this["return"] = undefined; } }
if (typeof Symbol === "function" && Symbol.asyncIterator) { _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; } if (typeof Symbol === "function" && Symbol.asyncIterator) { _AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; }
_AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); }; _AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };
_AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); }; _AsyncGenerator.prototype["throw"] = function (arg) { return this._invoke("throw", arg); };
_AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); }; _AsyncGenerator.prototype["return"] = function (arg) { return this._invoke("return", arg); };
function _AwaitValue(value) { this.wrapped = value; } function _AwaitValue(value) { this.wrapped = value; }

View File

@ -31,8 +31,8 @@ try {
_iteratorError = err; _iteratorError = err;
} finally { } finally {
try { try {
if (!_iteratorNormalCompletion && _iterator.return != null) { if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator.return(); _iterator["return"]();
} }
} finally { } finally {
if (_didIteratorError) { if (_didIteratorError) {

View File

@ -85,6 +85,7 @@
"@babel/plugin-transform-react-jsx-self": "^7.2.0", "@babel/plugin-transform-react-jsx-self": "^7.2.0",
"@babel/plugin-transform-react-jsx-source": "^7.2.0", "@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@babel/plugin-transform-regenerator": "^7.4.0", "@babel/plugin-transform-regenerator": "^7.4.0",
"@babel/plugin-transform-reserved-words": "^7.2.0",
"@babel/plugin-transform-runtime": "^7.4.0", "@babel/plugin-transform-runtime": "^7.4.0",
"@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0",
"@babel/plugin-transform-spread": "^7.2.2", "@babel/plugin-transform-spread": "^7.2.2",

View File

@ -73,6 +73,7 @@
"transform-react-jsx-self", "transform-react-jsx-self",
"transform-react-jsx-source", "transform-react-jsx-source",
"transform-regenerator", "transform-regenerator",
"transform-reserved-words",
"transform-runtime", "transform-runtime",
"transform-shorthand-properties", "transform-shorthand-properties",
"transform-spread", "transform-spread",

View File

@ -77,6 +77,7 @@ import transformReactJsxCompat from "@babel/plugin-transform-react-jsx-compat";
import transformReactJsxSelf from "@babel/plugin-transform-react-jsx-self"; import transformReactJsxSelf from "@babel/plugin-transform-react-jsx-self";
import transformReactJsxSource from "@babel/plugin-transform-react-jsx-source"; import transformReactJsxSource from "@babel/plugin-transform-react-jsx-source";
import transformRegenerator from "@babel/plugin-transform-regenerator"; import transformRegenerator from "@babel/plugin-transform-regenerator";
import transformReservedWords from "@babel/plugin-transform-reserved-words";
import transformRuntime from "@babel/plugin-transform-runtime"; import transformRuntime from "@babel/plugin-transform-runtime";
import transformShorthandProperties from "@babel/plugin-transform-shorthand-properties"; import transformShorthandProperties from "@babel/plugin-transform-shorthand-properties";
import transformSpread from "@babel/plugin-transform-spread"; import transformSpread from "@babel/plugin-transform-spread";
@ -162,6 +163,7 @@ export {
transformReactJsxSelf, transformReactJsxSelf,
transformReactJsxSource, transformReactJsxSource,
transformRegenerator, transformRegenerator,
transformReservedWords,
transformRuntime, transformRuntime,
transformShorthandProperties, transformShorthandProperties,
transformSpread, transformSpread,
@ -248,6 +250,7 @@ export const all = {
"transform-react-jsx-self": transformReactJsxSelf, "transform-react-jsx-self": transformReactJsxSelf,
"transform-react-jsx-source": transformReactJsxSource, "transform-react-jsx-source": transformReactJsxSource,
"transform-regenerator": transformRegenerator, "transform-regenerator": transformRegenerator,
"transform-reserved-words": transformReservedWords,
"transform-runtime": transformRuntime, "transform-runtime": transformRuntime,
"transform-shorthand-properties": transformShorthandProperties, "transform-shorthand-properties": transformShorthandProperties,
"transform-spread": transformSpread, "transform-spread": transformSpread,