Remove yearly presets from repo, inline in standalone (#8274)

These were already deprecated in v6, just didn't remove the folders?
This commit is contained in:
Henry Zhu 2018-07-09 14:23:25 -04:00 committed by GitHub
parent dd6da3b3af
commit 10910a10f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
603 changed files with 165 additions and 12313 deletions

View File

@ -1,9 +1,5 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test1 = function Test1() {
_classCallCheck(this, Test1);
};
(function () {
return 42;
});

View File

@ -1,9 +1,5 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test2 = function Test2() {
_classCallCheck(this, Test2);
};
(function () {
return 42;
});

View File

@ -1,10 +1,6 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iYXIvYmFyLmpzIl0sIm5hbWVzIjpbIlRlc3QiXSwibWFwcGluZ3MiOiI7Ozs7OztJQUFNQSxJIiwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgVGVzdCB7XG5cbn0iXX0=
(function () {
return 42;
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iYXIvYmFyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsQ0FBQztBQUFBLFNBQU0sRUFBTjtBQUFBLENBQUQiLCJzb3VyY2VzQ29udGVudCI6WyIoKCkgPT4gNDIpIl19

View File

@ -1,3 +1 @@
class Test {
}
(() => 42)

View File

@ -1,10 +1,6 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
(function () {
return 42;
});
//# sourceMappingURL=bar.js.map

View File

@ -1 +1 @@
{"version":3,"sources":["../../src/bar/bar.js"],"names":["Test"],"mappings":";;;;;;IAAMA,I","sourcesContent":["class Test {\n\n}"],"file":"bar.js"}
{"version":3,"sources":["../../src/bar/bar.js"],"names":[],"mappings":";;AAAA,CAAC;AAAA,SAAM,EAAN;AAAA,CAAD","sourcesContent":["(() => 42)"],"file":"bar.js"}

View File

@ -1,3 +1 @@
class Test {
}
(() => 42)

View File

@ -1,9 +1,5 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
(function () {
return 42;
});

View File

@ -1,3 +1 @@
class Test {
}
(() => 42)

View File

@ -1,9 +1,5 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
(function () {
return 42;
});

View File

@ -1,5 +1,3 @@
var foo = function () {
return 4;
};
arr.map(x => x * MULTIPLIER);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFVBQVUsWTtTQUFNLEM7Q0FBQyIsInNvdXJjZXNDb250ZW50IjpbInZhciBmb28gPSAoKSA9PiA0OyJdfQ==

View File

@ -1,7 +1,7 @@
"use strict";
var foo = function foo() {
return 4;
};
arr.map(function (x) {
return x * MULTIPLIER;
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBQSxNQUFVLFNBQVYsR0FBVSxHO1NBQU0sQztBQUFDLENBQWpCIiwiZmlsZSI6InNjcmlwdDIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZm9vID0gKCkgPT4gNDsiXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBQSxHQUFBLENBQUE7QUFBQSxTQUFVLElBQUEsVUFBVjtBQUFBLENBQUEiLCJmaWxlIjoic2NyaXB0Mi5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciBmb28gPSAoKSA9PiA0OyJdfQ==

View File

@ -1,16 +1,12 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
(function () {
return 42;
});
"use strict";
arr.map(function (x) {
return x * MULTIPLIER;
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjcmlwdC5qcyIsInNjcmlwdDIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0lBQU0sSTs7Ozs7QUNBTixJQUFJLEdBQUosQ0FBUTtBQUFBLFNBQUssSUFBSSxVQUFUO0FBQUEsQ0FBUiIsImZpbGUiOiJzY3JpcHQzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgVGVzdCB7XG5cbn0iLCJhcnIubWFwKHggPT4geCAqIE1VTFRJUExJRVIpOyJdfQ==
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNjcmlwdC5qcyIsInNjcmlwdDIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxDQUFDO0FBQUEsU0FBTSxFQUFOO0FBQUEsQ0FBRDs7O0FDQUEsSUFBSSxHQUFKLENBQVE7QUFBQSxTQUFLLElBQUksVUFBVDtBQUFBLENBQVIiLCJmaWxlIjoic2NyaXB0My5qcyIsInNvdXJjZXNDb250ZW50IjpbIigoKSA9PiA0MikiLCJhcnIubWFwKHggPT4geCAqIE1VTFRJUExJRVIpOyJdfQ==

View File

@ -1,3 +1 @@
class Test {
}
(() => 42)

View File

@ -1,12 +1,8 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
(function () {
return 42;
});
"use strict";
arr.map(function (x) {

View File

@ -1 +1 @@
{"version":3,"sources":["script.js","script2.js"],"names":[],"mappings":";;;;;;IAAM,I;;;;;ACAN,IAAI,GAAJ,CAAQ;AAAA,SAAK,IAAI,UAAT;AAAA,CAAR","file":"script3.js","sourcesContent":["class Test {\n\n}","arr.map(x => x * MULTIPLIER);"]}
{"version":3,"sources":["script.js","script2.js"],"names":[],"mappings":";;AAAA,CAAC;AAAA,SAAM,EAAN;AAAA,CAAD;;;ACAA,IAAI,GAAJ,CAAQ;AAAA,SAAK,IAAI,UAAT;AAAA,CAAR","file":"script3.js","sourcesContent":["(() => 42)","arr.map(x => x * MULTIPLIER);"]}

View File

@ -1,3 +1 @@
class Test {
}
(() => 42)

View File

@ -1,12 +1,8 @@
"use strict";
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Test = function Test() {
_classCallCheck(this, Test);
};
(function () {
return 42;
});
"use strict";
arr.map(function (x) {

View File

@ -14,12 +14,10 @@ const fileFilter = function(x) {
return x !== ".DS_Store";
};
const presetLocs = [
path.join(__dirname, "../../babel-preset-es2015"),
path.join(__dirname, "../../babel-preset-react"),
].join(",");
const presetLocs = [path.join(__dirname, "../../babel-preset-react")];
const pluginLocs = [
path.join(__dirname, "/../../babel-plugin-transform-arrow-functions"),
path.join(__dirname, "/../../babel-plugin-transform-strict-mode"),
path.join(__dirname, "/../../babel-plugin-transform-modules-commonjs"),
].join(",");

View File

@ -180,7 +180,7 @@ describe("api", function() {
it("options merge backwards", function() {
return transformAsync("", {
presets: [__dirname + "/../../babel-preset-es2015"],
presets: [__dirname + "/../../babel-preset-env"],
plugins: [__dirname + "/../../babel-plugin-syntax-jsx"],
}).then(function(result) {
expect(result.options.plugins[0].manipulateOptions.toString()).toEqual(
@ -259,8 +259,8 @@ describe("api", function() {
};
},
// ES2015 preset
require(__dirname + "/../../babel-preset-es2015"),
// env preset
require(__dirname + "/../../babel-preset-env"),
// Third preset for Flow.
function() {

View File

@ -1,4 +1,4 @@
{
"plugins": ["transform-async-to-generator"],
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = void 0;
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
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 _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

View File

@ -1,7 +1,7 @@
{
"compact": false,
"presets": [
"es2015",
"env",
["stage-2", { "decoratorsLegacy": true }]
]
}

View File

@ -1,4 +1,4 @@
{
"plugins": ["transform-async-to-generator"],
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -16,7 +16,7 @@ const fileFilter = function(x) {
};
const presetLocs = [
path.join(__dirname, "../../babel-preset-es2015"),
path.join(__dirname, "../../babel-preset-env"),
path.join(__dirname, "../../babel-preset-react"),
].join(",");

View File

@ -3,7 +3,7 @@
"transform-async-to-generator",
"proposal-async-generator-functions"
],
"presets": ["es2015"],
"presets": ["env"],
"parserOpts": {
"allowReturnOutsideFunction": true
}

View File

@ -4,7 +4,7 @@
"transform-async-to-generator",
"proposal-async-generator-functions"
],
"presets": ["es2015"],
"presets": ["env"],
"parserOpts": {
"allowReturnOutsideFunction": true
}

View File

@ -4,7 +4,7 @@
"transform-async-to-generator",
"proposal-async-generator-functions"
],
"presets": ["es2015"],
"presets": ["env"],
"parserOpts": {
"allowReturnOutsideFunction": true
}

View File

@ -1,6 +1,6 @@
{
"presets": [
["stage-0", { "decoratorsLegacy": true, "pipelineProposal": "minimal" }],
"es2015"
"env"
]
}

View File

@ -2,6 +2,6 @@
"plugins": ["external-helpers", ["proposal-class-properties", {"loose": true}]],
"presets": [
["stage-0", { "decoratorsLegacy": true, "pipelineProposal": "minimal" }],
"es2015"
"env"
]
}

View File

@ -2,6 +2,6 @@
"plugins": ["external-helpers", "proposal-class-properties"],
"presets": [
["stage-0", { "decoratorsLegacy": true, "pipelineProposal": "minimal" }],
"es2015"
"env"
]
}

View File

@ -1,6 +1,6 @@
{
"presets": [
"es2015",
"env",
["stage-2", { "decoratorsLegacy": true }]
]
}

View File

@ -1,7 +1,5 @@
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 _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(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); }
@ -12,7 +10,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
["proposal-decorators", { "legacy": true }],
["proposal-class-properties", { "loose": true }]

View File

@ -1,6 +1,6 @@
{
"presets": [
"es2015",
"env",
["stage-0", { "decoratorsLegacy": true, "pipelineProposal": "minimal" }]
]
}

View File

@ -1,8 +1,6 @@
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
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 _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

View File

@ -1,4 +1,4 @@
{
"plugins": ["external-helpers"],
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -1,3 +1,7 @@
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 _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
var Example =
/*#__PURE__*/
function () {
@ -7,25 +11,47 @@ function () {
var _proto = Example.prototype;
_proto.test1 = async function test1() {
await Promise.resolve(2);
};
_proto.test2 =
_proto.test1 =
/*#__PURE__*/
regeneratorRuntime.mark(function test2() {
return regeneratorRuntime.wrap(function test2$(_context) {
function () {
var _test = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return 3;
return Promise.resolve(2);
case 2:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
return function test1() {
return _test.apply(this, arguments);
};
}();
_proto.test2 =
/*#__PURE__*/
regeneratorRuntime.mark(function test2() {
return regeneratorRuntime.wrap(function test2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return 3;
case 2:
case "end":
return _context2.stop();
}
}
}, test2, this);
});
return Example;

View File

@ -1,4 +1,4 @@
{
"plugins": ["transform-exponentiation-operator"],
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -10,9 +10,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var B = function B() {
"use strict";

View File

@ -1,4 +1,4 @@
{
"plugins": ["external-helpers", "proposal-class-properties"],
"presets": ["es2015", "react"]
"presets": ["env", "react"]
}

View File

@ -1,4 +1,4 @@
{
"presets": [["es2015", { "loose": true }]],
"presets": [["env", { "loose": true }]],
"plugins": ["transform-flow-comments", "external-helpers"]
}

View File

@ -1,4 +1,4 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": ["transform-flow-comments", "external-helpers"]
}

View File

@ -1,4 +1,4 @@
{
"presets": [["es2015", { "loose": true }]],
"presets": [["env", { "loose": true }]],
"plugins": ["transform-flow-strip-types", "external-helpers"]
}

View File

@ -1,4 +1,4 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": ["transform-flow-strip-types", "external-helpers"]
}

View File

@ -1,3 +1,3 @@
{
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -1,3 +1,3 @@
{
"presets": ["es2015", "react"]
"presets": ["env", "react"]
}

View File

@ -1,5 +1,5 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": [
"transform-member-expression-literals",
"transform-property-literals"

View File

@ -1,3 +1,3 @@
{
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -1,3 +1,3 @@
{
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -1,3 +1,3 @@
{
"presets": ["es2015"]
"presets": ["env"]
}

View File

@ -1,4 +1,4 @@
{
"presets": ["es2015"],
"presets": ["env"],
"plugins": ["proposal-class-properties"]
}

View File

@ -9,11 +9,9 @@ var _args = _interopRequireDefault(require("utils/url/args"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
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 _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

View File

@ -1,5 +1,5 @@
{
"presets": [
"es2015"
"env"
]
}

View File

@ -1,7 +1,15 @@
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 _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function test(fn) {
return function _callee() {
return (
/*#__PURE__*/
_asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
var _args = arguments;
return regeneratorRuntime.async(function _callee$(_context) {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
@ -12,6 +20,7 @@ function test(fn) {
return _context.stop();
}
}
}, null, this);
};
}, _callee, this);
}))
);
}

View File

@ -1,5 +1,5 @@
{
"presets": [
"es2015"
"env"
]
}

View File

@ -1,3 +0,0 @@
src
test
*.log

View File

@ -1,19 +0,0 @@
# @babel/preset-es2015
> Babel preset for all es2015 plugins.
See our website [@babel/preset-es2015](https://babeljs.io/docs/en/next/babel-preset-es2015.html) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/preset-es2015
```
or using yarn:
```sh
yarn add @babel/preset-es2015 --dev
```

View File

@ -1,3 +0,0 @@
import runner from "@babel/helper-transform-fixture-test-runner";
runner(`${__dirname}/fixtures/esnext`, "esnext");

View File

@ -1,37 +0,0 @@
function makeMultiplier() {
// `arguments` should refer to `makeMultiplier`'s arguments.
return (n) => [].slice.call(arguments).reduce((a, b) => a * b) * n;
}
function toArray() {
// Intentionally nest arrow functions to ensure `arguments` is put inside
// `toArray`'s scope.
return (() => (arguments, (() => [].slice.call(arguments)).call())).call();
}
function returnDotArguments(object) {
// Ensure `arguments` is not treated as a reference to the magic value.
return (() => object.arguments).call();
}
function returnArgumentsObject() {
// Ensure `arguments` is not treated as a reference to the magic value.
return (() => ({arguments: 1})).call();
}
function makeArgumentsReturner() {
return (() => function() {
return [].slice.call(arguments);
}).call();
}
// i.e. 2 * 3 * 4 == 24, not 16 (4 * 4)
expect(makeMultiplier(2, 3)(4)).toBe(24);
expect(toArray(1, 2, 3)).toEqual([1, 2, 3]);
expect(returnDotArguments({arguments: 1})).toBe(1);
expect(returnArgumentsObject()).toEqual({arguments: 1});
expect(makeArgumentsReturner()(1, 2, 3)).toEqual([1, 2, 3]);

View File

@ -1,2 +0,0 @@
var empty = () => {};
expect(empty()).toBeUndefined();

View File

@ -1,12 +0,0 @@
var obj = {
method: function() {
return () => (this, () => this);
},
method2: function() {
return () => () => this;
}
};
expect(obj.method()()()).toBe(obj);
expect(obj.method2()()()).toBe(obj);

View File

@ -1,2 +0,0 @@
var square = x => x * x;
expect(square(4)).toBe(16);

View File

@ -1,2 +0,0 @@
var keyMaker = val => ({ key: val });
expect(keyMaker(9)).toEqual({ key: 9 });

View File

@ -1,7 +0,0 @@
var obj = {
method: function() {
return () => this;
}
};
expect(obj.method()()).toBe(obj);

View File

@ -1,3 +0,0 @@
{
"plugins": ["transform-arrow-functions"]
}

View File

@ -1,2 +0,0 @@
var odds = [0, 2, 4].map(v => v + 1);
expect(odds).toEqual([1, 3, 5]);

View File

@ -1,2 +0,0 @@
var identity = x => x;
expect(identity(1)).toBe(1);

View File

@ -1,29 +0,0 @@
var Animal = class {
sayHi() {
return 'Hi, I am a '+this.type()+'.';
}
static getName() {
return 'Animal';
}
};
var Dog = class extends Animal {
type() { return 'dog'; }
sayHi() {
return super.sayHi() + ' WOOF!';
}
static getName() {
return super.getName() + '/Dog';
}
};
expect(new Dog().sayHi()).toBe('Hi, I am a dog. WOOF!');
expect(Dog.getName()).toBe('Animal/Dog');
var count = 0;
var Cat = class extends (function(){ count++; return Animal; })() {};
expect(count).toBe(1);

View File

@ -1,21 +0,0 @@
class Animal {
sayHi() {
return 'I am an animal.'
}
sayOther() {
return 'WAT?!';
}
}
class Horse extends Animal {
sayHi() {
return super.sayOther();
}
sayOther() {
return 'I see dead objects.';
}
}
expect(new Horse().sayHi()).toBe('WAT?!');

View File

@ -1,6 +0,0 @@
var Person = (class Person {});
expect(typeof Person).toBe('function');
expect((function(){ return (class Person {}); })().name).toBe('Person');
expect(typeof (class {})).toBe('function');

View File

@ -1,15 +0,0 @@
class Animal {
sayHi() {
return 'Hi, I am a '+this.type()+'.';
}
}
class Dog extends Animal {
type() { return 'dog'; }
sayHi() {
return super.sayHi() + ' WOOF!';
}
}
expect(new Dog().sayHi()).toBe('Hi, I am a dog. WOOF!');

View File

@ -1,14 +0,0 @@
class Multiplier {
constructor(n=1) {
this.n = n;
}
multiply(n=1) {
return n * this.n;
}
}
expect(new Multiplier().n).toBe(1);
expect(new Multiplier(6).n).toBe(6);
expect(new Multiplier().multiply()).toBe(1);
expect(new Multiplier(2).multiply(3)).toBe(6);

View File

@ -1,10 +0,0 @@
class Person {
getName() {
return this.firstName + ' ' + this.lastName;
}
}
var me = new Person();
me.firstName = 'Brian';
me.lastName = 'Donovan';
expect(me.getName()).toBe('Brian Donovan');

View File

@ -1,5 +0,0 @@
class Foo {
}
expect(new Foo().constructor).toBe(Foo);
expect(new Foo()).toBeInstanceOf(Foo);

View File

@ -1,20 +0,0 @@
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
toString() {
return '(' + this.x + ', ' + this.y + ')';
}
}
var point = new Point(1, 2);
var keys = [];
for (var key in point) {
keys.push(key);
}
expect(point.toString()).toBe('(1, 2)');
expect(keys.sort()).toEqual(['x', 'y']);

View File

@ -1,15 +0,0 @@
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
class ZeroPoint extends Point {
constructor() {
super(0, 0);
}
}
expect(new ZeroPoint().x).toBe(0);
expect(new ZeroPoint().y).toBe(0);

View File

@ -1,4 +0,0 @@
class Obj extends null {}
expect(Obj.toString).toBe(Function.toString);
expect(new Obj().toString).toBeUndefined();

View File

@ -1,37 +0,0 @@
class Base {
get sound() {
return 'I am a ' + this.type + '.';
}
get name() {
return this._name;
}
set name(val) {
this._name = val;
}
}
class Animal extends Base {}
class Cat extends Animal {
get type() { return 'cat'; }
get sound() {
return super.sound + ' MEOW!';
}
get name() {
return super.name;
}
set name(val) {
super.name = val + ' Cat';
}
}
var cat = new Cat();
expect(cat.sound).toBe('I am a cat. MEOW!');
cat.name = 'Nyan';
expect(cat.name).toBe('Nyan Cat');

View File

@ -1,28 +0,0 @@
class Person {
constructor(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
get name() {
return this.firstName + ' ' + this.lastName;
}
set name(name) {
var parts = name.split(' ');
this.firstName = parts[0];
this.lastName = parts[1];
}
}
var mazer = new Person('Mazer', 'Rackham');
expect(mazer.name).toBe('Mazer Rackham');
mazer.name = 'Ender Wiggin';
expect(mazer.firstName).toBe('Ender');
expect(mazer.lastName).toBe('Wiggin');
var forLoopProperties = [];
for (var key in mazer) {
forLoopProperties.push(key);
}
expect(forLoopProperties).not.toEqual(expect.stringContaining('name'));

View File

@ -1,7 +0,0 @@
class Tripler {
triple(n) {
return n * 3;
}
}
expect(new Tripler().triple(2)).toBe(6);

View File

@ -1,12 +0,0 @@
var value;
class Foo {
foo() {
value = 1;
}
}
var foo = new Foo();
foo.foo = function() { value = 2; };
foo.foo();
expect(value).toBe(2);

View File

@ -1,28 +0,0 @@
class Joiner {
constructor(string) {
this.string = string;
}
join(...items) {
return items.join(this.string);
}
static join(string, ...items) {
var joiner = new this(string);
// TODO: use spread params here
return joiner.join.apply(joiner, items);
}
}
class ArrayLike {
constructor(...items) {
items.forEach(function(item, i) {
this[i] = item;
}.bind(this));
this.length = items.length;
}
}
var joiner = new Joiner(' & ');
expect(joiner.join(4, 5, 6)).toBe('4 & 5 & 6');
expect(new ArrayLike('a', 'b')[1]).toBe('b');

View File

@ -1,3 +0,0 @@
{
"plugins": ["transform-classes", "transform-block-scoping", "transform-parameters"]
}

View File

@ -1,12 +0,0 @@
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
static get ORIGIN() {
return new this(0, 0);
}
}
expect(Point.ORIGIN).toEqual(new Point(0, 0));

View File

@ -1,30 +0,0 @@
class Tripler {
static triple(n=1) {
return n * 3;
}
static toString() {
return '3' + super.toString() + '3';
}
}
class MegaTripler extends Tripler {
static triple(n=1) {
return super.triple(n) * super.triple(n);
}
}
var tripler = new Tripler();
expect(Tripler.triple()).toBe(3);
expect(Tripler.triple(2)).toBe(6);
expect(tripler.triple).toBeUndefined();
expect(Tripler.toString()).toBe('3' + Object.toString.call(Tripler) + '3');
var mega = new MegaTripler();
expect(MegaTripler.triple(2)).toBe(36);
expect(mega.triple).toBeUndefined();
expect(MegaTripler.toString()).toBe('3' + Object.toString.call(MegaTripler) + '3');

View File

@ -1,7 +0,0 @@
class Person {
static set DB(value) {
expect(value).toBe('mysql');
}
}
Person.DB = 'mysql';

Some files were not shown because too many files have changed in this diff Show More