Skip to content

Commit

Permalink
update core-js to 3.0.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed May 27, 2018
1 parent 915a552 commit bb06bc8
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var _class2;

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object['define' + 'Property'](target, property, desc); desc = null; } return desc; }
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }

let _class = (_class2 = class {
bar() {}
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-runtime/src/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default {
findIndex: "find-index",
flags: "flags",
flatMap: "flat-map",
flatten: "flatten",
flat: "flat",
forEach: "for-each",
includes: "includes",
indexOf: "index-of",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-polyfill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-polyfill",
"main": "lib/index.js",
"dependencies": {
"core-js": "3.0.0-beta.1",
"core-js": "3.0.0-beta.2",
"regenerator-runtime": "^0.11.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol { "android":"4" }
es.symbol.async-iterator { "android":"4" }
es.symbol.has-instance { "android":"4" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Using plugins:
Using polyfills with `entry` option:

[<CWD>/src/in.js] `import '@babel/polyfill'` was not found.
🎉 Successfully compiled 1 file with Babel.
🎉 Successfully compiled 1 file with Babel.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol.async-iterator { "chrome":"55" }
es.object.define-getter { "chrome":"55" }
es.object.define-setter { "chrome":"55" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol { "ie":"10" }
es.symbol.async-iterator { "chrome":"54", "ie":"10", "node":"6" }
es.symbol.has-instance { "ie":"10", "node":"6" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol { "electron":"0.36" }
es.symbol.async-iterator { "electron":"0.36" }
es.symbol.has-instance { "electron":"0.36" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol.async-iterator { "chrome":"55" }
es.object.define-getter { "chrome":"55" }
es.object.define-setter { "chrome":"55" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Using plugins:
transform-dotall-regex { "firefox":"52", "node":"7.4" }

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.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol.async-iterator { "chrome":"60" }
es.object.define-getter { "chrome":"60" }
es.object.define-setter { "chrome":"60" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol {}
es.symbol.async-iterator {}
es.symbol.has-instance {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol { "ie":"10", "ios":"9", "safari":"7" }
es.symbol.async-iterator { "chrome":"54", "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
es.symbol.has-instance { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Using polyfills with `usage` option:
[<CWD>/src/in.js] Based on your code and targets, none were added.

[<CWD>/src/in2.js] Based on your code and targets, none were added.
🎉 Successfully compiled 2 files with Babel.
🎉 Successfully compiled 2 files with Babel.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol { "electron":"0.36", "ie":"10" }
es.symbol.async-iterator { "chrome":"54", "electron":"0.36", "ie":"10", "node":"6.1" }
es.symbol.has-instance { "electron":"0.36", "ie":"10", "node":"6.1" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Using plugins:

Using polyfills with `entry` option:

[src/in.js] Replaced `@babel/polyfill` with the following polyfills:
[<CWD>/src/in.js] Replaced `@babel/polyfill` with the following polyfills:
es.symbol { "ie":"10" }
es.symbol.async-iterator { "chrome":"54", "ie":"10", "node":"6.10" }
es.symbol.has-instance { "ie":"10" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } _setPrototypeOf(subClass.prototype, superClass && superClass.prototype); if (superClass) _setPrototypeOf(subClass, superClass); }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null) return null; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }

function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
Expand All @@ -18,19 +18,19 @@ function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _co

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var MyDate =
/*#__PURE__*/
function (_Date) {
_inherits(MyDate, _Date);

function MyDate(time) {
_classCallCheck(this, MyDate);

return _possibleConstructorReturn(this, _getPrototypeOf(MyDate).call(this, time));
}

_inherits(MyDate, _Date);

return MyDate;
}(_wrapNativeSuper(Date));

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-register/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"./lib/node.js": "./lib/browser.js"
},
"dependencies": {
"core-js": "3.0.0-beta.1",
"core-js": "3.0.0-beta.2",
"find-cache-dir": "^1.0.0",
"home-or-tmp": "^3.0.0",
"lodash": "^4.17.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var flatten = require("core-js-pure/features/array/virtual/flatten");
var flat = require("core-js-pure/features/array/virtual/flat");
var ArrayPrototype = Array.prototype;

module.exports = function (it) {
var own = it.flatten;
return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.flatten) ? flatten : own;
var own = it.flat;
return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.flat) ? flat : own;
};
2 changes: 1 addition & 1 deletion packages/babel-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-runtime",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"dependencies": {
"core-js-pure": "3.0.0-beta.1",
"core-js-pure": "3.0.0-beta.2",
"regenerator-runtime": "^0.11.1"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/babel-runtime/test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ describe("babel-runtime", () => {
).toEqual(undefined);
});

it("flatten, exists", () => {
it("flat, exists", () => {
expect(
require("../core-js/instance/flatten")([]).call([1, 2, [3, 4]]).length,
require("../core-js/instance/flat")([]).call([1, 2, [3, 4]]).length,
).toEqual(4);
});

it("flatten, missing", () => {
it("flat, missing", () => {
expect(
require("../core-js/instance/flatten")({}),
require("../core-js/instance/flat")({}),
).toEqual(undefined);
});

Expand Down

0 comments on commit bb06bc8

Please sign in to comment.