diff --git a/.babelrc b/.babelrc index 47125d57a..24ff1ba04 100644 --- a/.babelrc +++ b/.babelrc @@ -1,13 +1,17 @@ { "presets": [ [ - "env", + "@babel/preset-env", { "targets": { "node": 4 }, - "include": ["transform-async-to-generator"], - "exclude": ["transform-regenerator"] + "include": [ + "transform-async-to-generator" + ], + "exclude": [ + "transform-regenerator" + ] } ] ] diff --git a/gulpfile.babel.js b/gulpfile.js similarity index 82% rename from gulpfile.babel.js rename to gulpfile.js index 8388d6348..b36b5dc40 100644 --- a/gulpfile.babel.js +++ b/gulpfile.js @@ -1,3 +1,5 @@ +"use strict"; + const through = require("through2"); const chalk = require("chalk"); const newer = require("gulp-newer"); @@ -6,9 +8,9 @@ const log = require("fancy-log"); const gulp = require("gulp"); const path = require("path"); -export const build = gulp.series(buildPackages, buildUtils); +const build = gulp.series(buildPackages, buildUtils); -export const watch = gulp.series(build, () => { +const watch = gulp.series(build, () => { const scripts = [ getBuildConfig("packages").scripts, getBuildConfig("utils").scripts @@ -16,15 +18,18 @@ export const watch = gulp.series(build, () => { gulp.watch(scripts, { debounceDelay: 200 }, build).on("error", () => {}); }); -export function buildPackages() { +function buildPackages() { return getBuildTask(getBuildConfig("packages")); } -export function buildUtils() { +function buildUtils() { return getBuildTask(getBuildConfig("utils")); } -export default build; +exports.build = build; +exports.watch = watch; +exports.buildPackages = buildPackages; +exports.buildUtils = buildUtils; function getBuildTask({ scripts, dest }) { return gulp diff --git a/package.json b/package.json index 296bcee2b..d33095420 100644 --- a/package.json +++ b/package.json @@ -19,39 +19,37 @@ "watch": "gulp watch" }, "devDependencies": { - "babel-core": "^6.26.0", - "babel-eslint": "^8.0.3", - "babel-jest": "^22.0.3", - "babel-plugin-transform-es2015-block-scoping": "^6.26.0", - "babel-preset-env": "^1.6.1", - "babel-preset-es2015": "^6.24.1", - "babel-traverse": "^6.26.0", + "@babel/core": "^7.0.0-beta.40", + "@babel/plugin-transform-block-scoping": "^7.0.0-beta.40", + "@babel/preset-env": "^7.0.0-beta.40", + "babel-core": "^7.0.0-bridge.0", + "babel-jest": "^22.2.2", "butternut": "^0.4.6", "bytes": "^3.0.0", - "chalk": "^2.3.0", + "chalk": "^2.3.1", "cli-table": "^0.3.1", "closure-compiler": "^0.2.12", "codecov": "^3.0.0", - "commander": "^2.12.2", - "eslint": "^4.13.1", - "eslint-plugin-prettier": "^2.4.0", + "commander": "^2.14.1", + "eslint": "^4.17.0", + "eslint-plugin-prettier": "^2.6.0", "fancy-log": "^1.3.2", "fs-readdir-recursive": "^1.1.0", - "google-closure-compiler-js": "^20171203.0.0", + "google-closure-compiler-js": "^20180204.0.0", "gulp": "github:gulpjs/gulp#4.0", - "gulp-babel": "^7.0.0", - "gulp-newer": "^1.3.0", - "jest-cli": "^22.0.3", - "lerna": "^2.5.1", + "gulp-babel": "^8.0.0-beta.1", + "gulp-newer": "^1.4.0", + "jest-cli": "^22.3.0", + "lerna": "^2.9.0", "lerna-changelog": "^0.7.0", - "lint-staged": "^6.0.1", + "lint-staged": "^6.1.0", "markdown-table": "^1.1.1", "minimist": "^1.2.0", - "prettier": "^1.9.2", + "prettier": "^1.10.2", "request": "^2.83.0", "rimraf": "^2.6.2", "through2": "^2.0.3", - "uglify-js": "^3.2.2", + "uglify-js": "^3.3.10", "util.promisify": "^1.0.0" }, "engines": { diff --git a/packages/babel-helper-mark-eval-scopes/__tests__/helper-mark-eval-scopes-test.js b/packages/babel-helper-mark-eval-scopes/__tests__/helper-mark-eval-scopes-test.js index 7325638ab..5c233df85 100644 --- a/packages/babel-helper-mark-eval-scopes/__tests__/helper-mark-eval-scopes-test.js +++ b/packages/babel-helper-mark-eval-scopes/__tests__/helper-mark-eval-scopes-test.js @@ -1,6 +1,6 @@ jest.autoMockOff(); -const babel = require("babel-core"); +const babel = require("@babel/core"); const helper = require("../src"); function getPath(source) { diff --git a/packages/babel-minify/package.json b/packages/babel-minify/package.json index 3772b23a3..7c7e5f0fc 100644 --- a/packages/babel-minify/package.json +++ b/packages/babel-minify/package.json @@ -18,11 +18,11 @@ }, "repository": "https://github.com/babel/minify/tree/master/packages/babel-minify", "dependencies": { - "babel-core": "^6.26.0", + "@babel/core": "^7.0.0-beta.40", "babel-preset-minify": "^0.3.0", "fs-readdir-recursive": "^1.1.0", "mkdirp": "^0.5.1", "util.promisify": "^1.0.0", - "yargs-parser": "^8.0.0" + "yargs-parser": "^9.0.2" } } diff --git a/packages/babel-minify/src/index.js b/packages/babel-minify/src/index.js index fee17028d..a9b5de5d4 100644 --- a/packages/babel-minify/src/index.js +++ b/packages/babel-minify/src/index.js @@ -1,4 +1,4 @@ -const babelCore = require("babel-core"); +const babelCore = require("@babel/core"); const babelPresetMinify = require("babel-preset-minify"); module.exports = function babelMinify( @@ -9,7 +9,7 @@ module.exports = function babelMinify( // overrides and other options { minified = true, - inputSourceMap = null, + inputSourceMap, sourceMaps = false, // to override the default babelCore used diff --git a/packages/babel-plugin-minify-builtins/README.md b/packages/babel-plugin-minify-builtins/README.md index 9ccbf5a42..4619e7748 100644 --- a/packages/babel-plugin-minify-builtins/README.md +++ b/packages/babel-plugin-minify-builtins/README.md @@ -45,7 +45,7 @@ babel --plugins minify-builtins script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-builtins"] }); ``` diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-methods/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-methods/expected.js index cfdde1901..75be64a8d 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-methods/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-methods/expected.js @@ -1,6 +1,5 @@ function c() { var _Mathmax = Math.max; - let a = 10; const d = false; _Mathmax(a, b) + _Mathmax(b, a); diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-props/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-props/expected.js index 2fca55e67..a5073a1c8 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-props/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/builtin-props/expected.js @@ -1,7 +1,6 @@ function a() { var _MathPI = Math.PI; var _NumberNAN = Number.NAN; - _NumberNAN + _NumberNAN; return _MathPI + _MathPI + Number.EPSILON + _NumberNAN; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/deep-occurences/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/deep-occurences/expected.js index 0e18329ab..d7733abff 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/deep-occurences/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/deep-occurences/expected.js @@ -1,11 +1,14 @@ function a() { Math.max(c, a); + const b = () => { var _Mathmin = Math.min; var _Mathfloor = Math.floor; const a = _Mathfloor(c); + _Mathmin(b, a) * _Mathfloor(b); + function c() { _Mathfloor(c) + _Mathmin(b, a); } diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-class-methods/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-class-methods/expected.js index 59377df7f..6bcea0b81 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-class-methods/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-class-methods/expected.js @@ -3,19 +3,26 @@ class Test { var _Mathmax = Math.max; _Mathmax(a, d); + _Mathmax(a, d); + const c = function () { var _Mathfloor = Math.floor; _Mathmax(c, d); + _Mathfloor(m); + _Mathfloor(m); }; } + bar() { var _Mathmin = Math.min; _Mathmin(c, d); + _Mathmin(c, d); } + } \ No newline at end of file diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-function-scope/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-function-scope/expected.js index 8fac44bf2..ee6ee1984 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-function-scope/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/in-function-scope/expected.js @@ -2,21 +2,24 @@ var a = () => { var _Mathfloor = Math.floor; _Mathfloor(b); + _Mathfloor(b); + c: () => { _Mathfloor(d); + 2; }; }; + A.b("asdas", function () { var _Mathmax = Math.max; - Math.floor(d) + _Mathmax(d, e); + _Mathmax(e, d); }); A.b("asdas1", function () { var _Mathfloor2 = Math.floor; - _Mathfloor2(d) + _Mathfloor2(d, e); Math.max(e, d); }); \ No newline at end of file diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/multiple-occurences/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/multiple-occurences/expected.js index eab445aa3..30b561578 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/multiple-occurences/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/multiple-occurences/expected.js @@ -1,5 +1,4 @@ function a() { var _Mathfloor = Math.floor; - _Mathfloor(a) + _Mathfloor(b) + Math.min(a, b); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/program-scope/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/program-scope/expected.js index 515ac6d18..90e6b9a10 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/program-scope/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/program-scope/expected.js @@ -1,7 +1,8 @@ Math.max(c, d); + function a() { var _Mathmax = Math.max; - _Mathmax(b, a) + _Mathmax(c, d); } + Math.max(e, f); \ No newline at end of file diff --git a/packages/babel-plugin-minify-builtins/__tests__/fixtures/without-lca/expected.js b/packages/babel-plugin-minify-builtins/__tests__/fixtures/without-lca/expected.js index 5eeef93f9..6ce6cd031 100644 --- a/packages/babel-plugin-minify-builtins/__tests__/fixtures/without-lca/expected.js +++ b/packages/babel-plugin-minify-builtins/__tests__/fixtures/without-lca/expected.js @@ -2,10 +2,12 @@ function b() { var _Mathfloor = Math.floor; _Mathfloor(as, bb); + function d() { _Mathfloor(as, bb); } } + const a = { c: () => Math.floor(bbb) + Math.floor(bbb), d: () => { @@ -13,32 +15,41 @@ const a = { var _Mathfloor2 = Math.floor; _Mathabs(aa); + _Mathabs(aa); + _Mathfloor2(aa); + return () => { _Mathfloor2(aa); }; }, e: () => Math.abs(aa) + Math.abs(aa) }; + class A { constructor() { var _Mathfloor3 = Math.floor; let a = _Mathfloor3(b, c) + _Mathfloor3(b, c); } + c() { var _Mathfloor4 = Math.floor; _Mathfloor4(asdas); + _Mathfloor4(dasda); } + d() { var _Mathfloor5 = Math.floor; - var a = _Mathfloor5; a(aa, bb); + _Mathfloor5(aa, bb); } + } + new A(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-builtins/src/index.js b/packages/babel-plugin-minify-builtins/src/index.js index bb55ec519..800b85bec 100644 --- a/packages/babel-plugin-minify-builtins/src/index.js +++ b/packages/babel-plugin-minify-builtins/src/index.js @@ -45,7 +45,7 @@ module.exports = function({ types: t }) { if ( !isComputed(path) && isBuiltin(path) && - !path.getFunctionParent().isProgram() + !getFunctionParent(path).isProgram() ) { const expName = memberToString(path.node); addToMap(context.pathsToUpdate, expName, path); @@ -68,7 +68,7 @@ module.exports = function({ types: t }) { // Math.floor(1) --> 1 if (result.confident && hasPureArgs(path)) { path.replaceWith(t.valueToNode(result.value)); - } else if (!callee.getFunctionParent().isProgram()) { + } else if (!getFunctionParent(callee).isProgram()) { const expName = memberToString(callee.node); addToMap(context.pathsToUpdate, expName, callee); } @@ -180,7 +180,7 @@ function getSegmentedSubPaths(paths) { segments.set(lastCommon, paths); return; } else if ( - !(fnParent = lastCommon.getFunctionParent()).isProgram() && + !(fnParent = getFunctionParent(lastCommon)).isProgram() && fnParent.get("body").isBlockStatement() ) { segments.set(fnParent, paths); @@ -225,3 +225,11 @@ function isComputed(path) { const { node } = path; return node.computed; } + +/** + * Babel-7 returns null if there is no function parent + * and uses getProgramParent to get Program + */ +function getFunctionParent(path) { + return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path; +} diff --git a/packages/babel-plugin-minify-constant-folding/README.md b/packages/babel-plugin-minify-constant-folding/README.md index 555be1be3..1a6187836 100644 --- a/packages/babel-plugin-minify-constant-folding/README.md +++ b/packages/babel-plugin-minify-constant-folding/README.md @@ -80,7 +80,7 @@ babel --plugins minify-constant-folding script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-constant-folding"] }); ``` diff --git a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/array-literals-methods/expected.js b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/array-literals-methods/expected.js index 316a6aed9..02587997b 100644 --- a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/array-literals-methods/expected.js +++ b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/array-literals-methods/expected.js @@ -1,6 +1,5 @@ 4; 4; - "1,2,3"; "a,b,c"; "a@b@c"; @@ -8,31 +7,24 @@ [/xyz/im, true].join("abc"); [`a${xyz}`].join("1"); "abc"; - 3; 2; 2; void 0; - void 0; 2; - [1, 2, 3]; [2, 3]; [1, 2]; [1, 2, 3].slice(0, -1); - 3; c; void 0; - [c, b, a]; [3, 2, 1]; - -[2, 3]; [2, 3]; +[2, 3]; // bad calls -// bad calls [1, 2, 3][concat]([4, 5, 6]); [a, "b", "c"].join(); ["a", "b", "c"].join(a); diff --git a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/basic/expected.js b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/basic/expected.js index f46097413..38f5ffece 100644 --- a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/basic/expected.js +++ b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/basic/expected.js @@ -4,5 +4,5 @@ 7; a(), b(); var x = 1; -foo(x); +foo(1); "b" + a + "cd" + g + z + "fhz"; \ No newline at end of file diff --git a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/spread-element/expected.js b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/spread-element/expected.js index 0b86acf9d..5ce5f9f85 100644 --- a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/spread-element/expected.js +++ b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/spread-element/expected.js @@ -1,6 +1,7 @@ function foo() { return [...iter].length; } + function bar() { return [...iter][0]; } diff --git a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/string-literal-methods/expected.js b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/string-literal-methods/expected.js index 3d37387db..58ebb7e0f 100644 --- a/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/string-literal-methods/expected.js +++ b/packages/babel-plugin-minify-constant-folding/__tests__/fixtures/string-literal-methods/expected.js @@ -9,7 +9,6 @@ void 0; 97; 98; 3; - 55357; 56397; 128077; diff --git a/packages/babel-plugin-minify-constant-folding/src/index.js b/packages/babel-plugin-minify-constant-folding/src/index.js index 4c7f3acf4..98a855bc0 100644 --- a/packages/babel-plugin-minify-constant-folding/src/index.js +++ b/packages/babel-plugin-minify-constant-folding/src/index.js @@ -42,7 +42,7 @@ function swap(path, member, handlers, ...args) { module.exports = babel => { const replacements = require("./replacements.js")(babel); const seen = Symbol("seen"); - const { types: t, traverse } = babel; + const { types: t } = babel; return { name: "minify-constant-folding", @@ -116,12 +116,6 @@ module.exports = babel => { return; } - if ( - traverse.hasType(node, path.scope, "Identifier", t.FUNCTION_TYPES) - ) { - return; - } - // -0 maybe compared via dividing and then checking against -Infinity // Also -X will always be -X. if ( diff --git a/packages/babel-plugin-minify-dead-code-elimination/README.md b/packages/babel-plugin-minify-dead-code-elimination/README.md index 19183bb5c..73934671d 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/README.md +++ b/packages/babel-plugin-minify-dead-code-elimination/README.md @@ -61,7 +61,7 @@ babel --plugins minify-dead-code-elimination script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-dead-code-elimination"] }); ``` diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/dead-code-elimination-test.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/dead-code-elimination-test.js index dd48bf027..d50f98da3 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/dead-code-elimination-test.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/dead-code-elimination-test.js @@ -1,6 +1,6 @@ jest.autoMockOff(); -const babel = require("babel-core"); +const babel = require("@babel/core"); const unpad = require("unpad"); const deadcode = require("../src/index"); const simplify = require("../../babel-plugin-minify-simplify/src/index"); @@ -13,99 +13,7 @@ function transformWithSimplify(code) { } describe("dce-plugin", () => { - thePlugin( - "should not remove used expressions", - ` - var n = 1; - if (foo) n; - console.log(n); - - function bar(a) { - var a = a ? a : a; - } - `, - ` - var n = 1; - if (foo) ; - console.log(n); - - function bar(a) { - var a = a ? a : a; - } - ` - ); - - thePlugin( - "should handle case blocks ", - ` - function a() { - switch (foo) { - case 6: - return bar; - break; - } - } - `, - ` - function a() { - switch (foo) { - case 6: - return bar; - break; - } - } - ` - ); - - // NCE = Named Class Expressions - thePlugin( - "should remove names from named class expressions", - ` - var Foo = class Bar {}; - `, - ` - var Foo = class {}; - ` - ); - - thePlugin( - "should not remove names from named class expressions when the name is used", - ` - var Foo = class Bar { - constructor() { - console.log(Bar); - } - }; - ` - ); - - thePlugin( - "should handle variable declarations with same name as the class expression name", - ` - (function () { - var A = class A { - constructor() { - this.class = A; - } - } - var B = class B {}; - exports.A = A; - exports.B = B; - })(); - `, - ` - (function () { - exports.A = class A { - constructor() { - this.class = A; - } - }; - exports.B = class {}; - })(); - ` - ); - - thePlugin( + thePlugin.skip( "should latch on to exisiting vars", ` function x(a) { @@ -145,20 +53,6 @@ describe("dce-plugin", () => { ` ); - thePlugin( - "should not evaluate to false and remove conditional", - ` - function foo(obj) { - return obj && typeof obj === "object" ? x() : obj; - } - `, - ` - function foo(obj) { - return obj && typeof obj === "object" ? x() : obj; - } - ` - ); - // https://github.com/babel/minify/issues/265 it("should integrate with simplify plugin changing scopes", () => { const source = unpad(` diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/array-object-patterns/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/array-object-patterns/expected.js index ef39aa482..9a0c3d209 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/array-object-patterns/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/array-object-patterns/expected.js @@ -7,25 +7,30 @@ const me = lyfe => { const me2 = lyfe => { const [swag, yolo] = lyfe; return swag && yolo; -}; +}; // https://github.com/babel/minify/issues/232 + -// https://github.com/babel/minify/issues/232 const a = { lol: input => { const [hello, world] = input.split("|"); + if (hello === "t" || hello === "top") { return "top"; } + return "bottom"; } }; function foo() { - const { bar1, bar2 } = baz(); + const { + bar1, + bar2 + } = baz(); return bar1; -} +} // issue#617 + -// issue#617 function bar(arr) { let [a, b] = arr; console.log(a); @@ -33,10 +38,13 @@ function bar(arr) { function baz() { return getPromise().then(arr => { - let { a, b } = arr; + let { + a, + b + } = arr; console.log(a); }); -} +} // extracting vars should ignore pattern + -// extracting vars should ignore pattern function quux() {} \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/case-blocks/actual.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/case-blocks/actual.js new file mode 100644 index 000000000..1a159f2c2 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/case-blocks/actual.js @@ -0,0 +1,7 @@ +function a() { + switch (foo) { + case 6: + return bar; + break; + } +} diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/case-blocks/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/case-blocks/expected.js new file mode 100644 index 000000000..a6d53662c --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/case-blocks/expected.js @@ -0,0 +1,7 @@ +function a() { + switch (foo) { + case 6: + return bar; + break; + } +} \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/closures/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/closures/expected.js index 4c5c2ca04..e2b698e47 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/closures/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/closures/expected.js @@ -3,12 +3,15 @@ function a() { function c() { "wow".bar(); } + c(); c(); } + function d() { bar(25); } + d(); d(); b(); diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/conditionals-bail/actual.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/conditionals-bail/actual.js new file mode 100644 index 000000000..594044db5 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/conditionals-bail/actual.js @@ -0,0 +1,3 @@ +function foo(obj) { + return obj && typeof obj === "object" ? x() : obj; +} diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/conditionals-bail/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/conditionals-bail/expected.js new file mode 100644 index 000000000..cda960c02 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/conditionals-bail/expected.js @@ -0,0 +1,3 @@ +function foo(obj) { + return obj && typeof obj === "object" ? x() : obj; +} \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/constant-violations/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/constant-violations/expected.js index b5cee9635..dbb36d870 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/constant-violations/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/constant-violations/expected.js @@ -1,5 +1,4 @@ function bar() { foo(); - bar(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-if-stmts/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-if-stmts/expected.js index cb534fd7a..3d662f3e5 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-if-stmts/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-if-stmts/expected.js @@ -1,4 +1,2 @@ - foo(); - bar(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-vars-in-for/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-vars-in-for/expected.js index d9fe38aac..7e9cb36a5 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-vars-in-for/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/dead-vars-in-for/expected.js @@ -1,5 +1,6 @@ function foo() { for (var i in x) console.log("foo"); + for (var j of y) console.log("foo"); } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/empty-if-else-blocks/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/empty-if-else-blocks/expected.js index 16e0dfa41..430c412c7 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/empty-if-else-blocks/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/empty-if-else-blocks/expected.js @@ -4,9 +4,9 @@ if (!a) { if (b) { bar(); -} +} // should optimize alternate after replacement + -// should optimize alternate after replacement if (!baz) { console.log("foo" + "bar"); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/eval/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/eval/expected.js index c39663a9f..be9950792 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/eval/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/eval/expected.js @@ -2,6 +2,7 @@ function a(b, c, d) { eval(";"); return b; } + function b(c) { (1, eval)(";"); return c; @@ -22,15 +23,15 @@ function foo(bar, baz) { console.log("foox1"); } } + function fooy() { console.log("fooy"); } -} +} // DO NOT optimize + -// DO NOT optimize function quux() { bar(); - var x = 5; return x; diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/externally-called-fns/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/externally-called-fns/expected.js index f4991ef5b..61b5b6669 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/externally-called-fns/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/externally-called-fns/expected.js @@ -1,5 +1,4 @@ (function () { - (function () { console.log("this function was included!"); })(); diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-params/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-params/expected.js index 4410e7f7a..78efe2372 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-params/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-params/expected.js @@ -8,26 +8,30 @@ function baz() { return function wow() { return wow(); }; -} +} // shadowed + -// shadowed function foo() { - return function () { + return function wow() { var wow = foo; wow(); return wow; }; -} +} // setters + -// setters function foo() { var x = { set a(b) {} + }; + class A { set c(d) { x.a = 5; } + } + return new A(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-recursion/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-recursion/expected.js index f36e8c794..42baa270a 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-recursion/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fn-recursion/expected.js @@ -3,17 +3,19 @@ function test1() { return foo; }; } + function test2() { exports.foo = function foo() { return foo; }; -} +} // mutual recursion + -// mutual recursion function baz() { function foo() { return bar(); } + function bar() { return foo(); } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fns-called-only-from-within/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fns-called-only-from-within/expected.js index ffae9acee..1059fb494 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fns-called-only-from-within/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/fns-called-only-from-within/expected.js @@ -1,3 +1,5 @@ function test1() {} + function test2() {} + function test3() {} \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/hoist-vars-in-dead-blocks/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/hoist-vars-in-dead-blocks/expected.js index 0adb9a658..89b5baaa9 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/hoist-vars-in-dead-blocks/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/hoist-vars-in-dead-blocks/expected.js @@ -2,17 +2,19 @@ function a() { if (x()) { var foo = 1; } + bar(foo); } function b() { if (x()) var foo = 1; bar(foo); -} +} // loops + -// loops function c() { for (;;) var foo = 1; + bar(foo); } @@ -20,14 +22,13 @@ function d() { for (;;) { bar(1); } -} +} // remove-able if statements + + +function e() {} // switch statement -// remove-able if statements -function e() {} -// switch statement var a, b; var a, b; - var a = 1; var b = 2; \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/impure-test/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/impure-test/expected.js index 924d6280e..60429698d 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/impure-test/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/impure-test/expected.js @@ -1,24 +1,22 @@ // if statements a.b(); - foo(); a.b(); b.c(); - var bar = bar1; bar(); var baz; -var foo; - -// loops +var foo; // loops function foo() { do { bar(); } while ((bar(), false)); + for (; bar(), false;) { bar(); } + while (bar(), false) { bar(); } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-fns/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-fns/expected.js index 1b17caa54..8e9a7ae20 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-fns/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-fns/expected.js @@ -3,19 +3,20 @@ function foo() { (function () { return 1; })(); -} +} // expr + -// expr function bar() { (function () { return 1; })(); -} +} // handle different scopes + -// handle different scopes function baz() { var x = function (a) { return a; }; + while (1) x(1); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-function/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-function/expected.js index 9dabfbc88..5894afbbc 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-function/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-function/expected.js @@ -6,31 +6,47 @@ function a(p) { } function foo() { - var x = { y: 1 }, + var x = { + y: 1 + }, y = ["foo"], z = function () {}; + f(function () { foo(x, y, z); }); -} +} // multiple scopes + -// multiple scopes function x() { function y() { console.log(1); } + y(); y(); -} +} // preserve vars from removed blocks + -// preserve vars from removed blocks function foo() { var a = 1; - var bar = { x: { z: a, v: a } }; - var wow = { x: 1 }; - var baz = { x: function () {} }; - var boo = { x: { y: function () {} } }; - + var bar = { + x: { + z: a, + v: a + } + }; + var wow = { + x: 1 + }; + var baz = { + x: function () {} + }; + var boo = { + x: { + y: function () {} + } + }; return function () { var a = 2; maa(wow, bar, baz, boo, a, a); diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-if/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-if/expected.js index 924b52990..4fb3f987a 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-if/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-if/expected.js @@ -1,3 +1,5 @@ function foo() { - if (wat) foo({ y: 1 }, ["foo"], function () {}); + if (wat) foo({ + y: 1 + }, ["foo"], function () {}); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-loops/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-loops/expected.js index 78e5a71ec..4c8d4a431 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-loops/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-in-loops/expected.js @@ -1,14 +1,22 @@ // handle loops - should NOT inline function foo() { - var x = { y: 1 }; + var x = { + y: 1 + }; + while (true) foo(x); - var y = { y: 1 }; + var y = { + y: 1 + }; + for (;;) foo(y); var z = ["foo"]; + while (true) foo(z); var bar = function () {}; + while (true) foo(bar); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-one-ref-bindings/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-one-ref-bindings/expected.js index 150c61c03..2d5664067 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-one-ref-bindings/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inline-one-ref-bindings/expected.js @@ -1,13 +1,15 @@ function foo() { console.log(1); -} +} // NOTE: This isn’t considered pure. (it should be) + -// NOTE: This isn’t considered pure. (it should be) function bar() { - foo.exports = { y: 1 }; -} + foo.exports = { + y: 1 + }; +} // handle var hoisting + -// handle var hoisting function baz() { bar = void 0; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inlining-with-shadow/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inlining-with-shadow/expected.js index 7f5504820..6cc0ba9f7 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inlining-with-shadow/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/inlining-with-shadow/expected.js @@ -1,6 +1,5 @@ function foo() { wow(1); - return function () { wow(2); }; @@ -9,9 +8,11 @@ function foo() { function bar() { var a = 1; var b = a; + function x(a) { return a + b; } + x(); x(); return a; @@ -19,9 +20,11 @@ function bar() { function foo() { var a = c + d; + function x(c, d) { return a + c + d; } + x(); x(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-611/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-611/expected.js index 1ffe17430..0162eedcc 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-611/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-611/expected.js @@ -4,5 +4,6 @@ function foo() { bar(count); return count; } + return count; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-685/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-685/expected.js index 62b3623b5..b9cf0e048 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-685/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-685/expected.js @@ -1,11 +1,13 @@ function loop() { var end = 0; var start = end; + while (end < 10) { console.log(start, end); var end = end + 1; } } + loop(); function bar() { diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-691-binary-in/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-691-binary-in/expected.js index 7462db53b..23916d669 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-691-binary-in/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-691-binary-in/expected.js @@ -1,6 +1,7 @@ function foo(props) { let bar = "width" in props; delete props.width; + if (bar) { console.log("foo"); } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-78/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-78/expected.js index 046c50d50..0cd20cb03 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-78/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/issue-78/expected.js @@ -3,6 +3,7 @@ constructor(x) { console.log(x); } + }; self.addEventListener(function (event) { new B(event); diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-class-name/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-class-name/expected.js index 550e49c96..c9ec2ba8d 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-class-name/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-class-name/expected.js @@ -1,7 +1,5 @@ (function () { exports.A = class A {}; - exports.B = class B {}; - new class AA {}(); })(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-args/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-args/expected.js index a85307d9c..2538eb045 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-args/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-args/expected.js @@ -1,17 +1,22 @@ function foo(p) { return 1; } + function bar(q) { return q + 1; } + class A { foo(p) { return p; } + bar(q) { return 1; } + } + foo(); bar(); new A(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-name/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-name/expected.js index d0c716c3f..cdc1f6cee 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-name/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/keep-fn-name/expected.js @@ -2,5 +2,6 @@ exports.A = function A() {}; exports.B = function B() {}; + onClick(function C() {}); })(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loop-if-return/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loop-if-return/expected.js index 4e9822537..1e2da9201 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loop-if-return/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loop-if-return/expected.js @@ -1,6 +1,7 @@ // https://github.com/babel/minify/issues/265 function getParentConditionalPath(path) { let parentPath; + while (parentPath = path.parentPath) { if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { if (path.key === "test") { diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loops/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loops/expected.js index e4c382aa8..4e95ee2bf 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loops/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/loops/expected.js @@ -1,33 +1,35 @@ - +// while while (true) { bar(); -} // while +} while (x) { baz(); -} +} // for + -// for for (var i = 0; i < 8; i++) { foo(); } + for (;;) { bar(); } - // do_while do { foo(); } while (1); + { bar(); } + do { baz(); -} while (a); +} while (a); // optimize confident do...while statements with break + -// optimize confident do...while statements with break function foo() { do { if (x) break; @@ -54,9 +56,9 @@ function foo() { if (x) break bar5; } } while (false); -} +} // confident do...while statements with continue + -// confident do...while statements with continue function foo() { do { if (x) continue; diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/multiple-refs/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/multiple-refs/expected.js index 1f6b21f94..6f38edaf1 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/multiple-refs/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/multiple-refs/expected.js @@ -4,6 +4,7 @@ function foo() { y = 1; } }; + x(); x(); var y = null; diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr-used/actual.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr-used/actual.js new file mode 100644 index 000000000..4d8bea181 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr-used/actual.js @@ -0,0 +1,5 @@ +var Foo = class Bar { + constructor() { + console.log(Bar); + } +}; diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr-used/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr-used/expected.js new file mode 100644 index 000000000..a663d8585 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr-used/expected.js @@ -0,0 +1,6 @@ +var Foo = class Bar { + constructor() { + console.log(Bar); + } + +}; \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr/actual.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr/actual.js new file mode 100644 index 000000000..f3d7be5cf --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr/actual.js @@ -0,0 +1 @@ +var Foo = class Bar {}; diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr/expected.js new file mode 100644 index 000000000..3b00b30c2 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/named-class-expr/expected.js @@ -0,0 +1 @@ +var Foo = class {}; \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/no-refs-bindings/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/no-refs-bindings/expected.js index 8b7ba0fc1..eada7419f 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/no-refs-bindings/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/no-refs-bindings/expected.js @@ -1,7 +1,7 @@ // basic -function foo() {} +function foo() {} // impure right + -// impure right function bar() { f(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/orphaned-returns/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/orphaned-returns/expected.js index 88cac6a1f..8c0e06bde 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/orphaned-returns/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/orphaned-returns/expected.js @@ -1,24 +1,28 @@ var a = true; + function foo() { if (a) return; x(); -} +} // with value + -// with value var b = true; + function bar() { if (b) return 1; x(); -} +} // orphaned redundant returns + -// orphaned redundant returns var x = true; + function baz() { if (t) { if (x) { z(); return; } + y(); } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-returns/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-returns/expected.js index 27e3bdeaf..6dfafc341 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-returns/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-returns/expected.js @@ -11,15 +11,17 @@ function bar() { function baz() { if (a) { y(); + if (b) {} } -} +} // keep non-redundant returns + -// keep non-redundant returns function foo1() { if (a) { y(); return; } + x(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-use-strict/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-use-strict/expected.js index 368a6f812..7fe309e25 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-use-strict/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/redundant-use-strict/expected.js @@ -4,5 +4,6 @@ function foo() { function bar() { bar(); } + bar.call(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/regression-1/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/regression-1/expected.js index c9f7906da..0d0c3b845 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/regression-1/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/regression-1/expected.js @@ -1,5 +1,6 @@ function boo() { var bar = foo || []; + if (!bar || baz.length === 0) { return "wow"; } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/shadow-class-name/actual.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/shadow-class-name/actual.js new file mode 100644 index 000000000..35ac4c5de --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/shadow-class-name/actual.js @@ -0,0 +1,10 @@ +(function() { + var A = class A { + constructor() { + this.class = A; + } + }; + var B = class B {}; + exports.A = A; + exports.B = B; +})(); diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/shadow-class-name/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/shadow-class-name/expected.js new file mode 100644 index 000000000..622118c6d --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/shadow-class-name/expected.js @@ -0,0 +1,9 @@ +(function () { + exports.A = class A { + constructor() { + this.class = A; + } + + }; + exports.B = class {}; +})(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/switch-case/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/switch-case/expected.js index f91febd89..56369e5cd 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/switch-case/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/switch-case/expected.js @@ -1,45 +1,44 @@ // basic -foo(); +foo(); // one case is not evaluatable -// one case is not evaluatable switch (a) { case 1: break; } + switch (100) { default: foo(); + case a: foo(); break; -} +} // impure expressions in cases + -// impure expressions in cases function bazz() { let i = 0; + let bar = () => console.log("foo"); + switch (1) { case ++i: foo(); break; + case bar(): baz(); } -} - -// no break -foo(); +} // no break -bar(); -baz(); - -// handle defaults foo(); +bar(); +baz(); // handle defaults foo(); +foo(); // break statements within blocks -// break statements within blocks foo(); var i; @@ -51,53 +50,53 @@ while (true) { break; } -foo(); +foo(); // bail out when break label is above the switch’s scope -// bail out when break label is above the switch’s scope x: switch (1) { case 1: break x; } + y: switch (0) { case 0: while (true) { break y; } + } + z: switch (2) { case 2: { break z; } -} +} // DO NOT bail out when break label is inside the switch’s scope + -// DO NOT bail out when break label is inside the switch’s scope bar1: while (true) { break bar1; -} +} // nested switch statements -// nested switch statements -foo(); -bar(); - -// break correctly when there is a repeated break statement foo(); +bar(); // break correctly when there is a repeated break statement -// break correctly for the correct break statement -foo(); +foo(); // break correctly for the correct break statement + +foo(); // bail out for `break` statements inside a non-pure conditional -// bail out for `break` statements inside a non-pure conditional switch (0) { case 0: foo(); if (a) break; + case 1: bar(); -} +} // DO NOT bail out for `break` statements inside a non-pure conditional inside a loop + -// DO NOT bail out for `break` statements inside a non-pure conditional inside a loop foo(); + while (1) { if (x) break; } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unreachable-code-after-return/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unreachable-code-after-return/expected.js index 32406a703..34765079a 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unreachable-code-after-return/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unreachable-code-after-return/expected.js @@ -1,37 +1,39 @@ function foo() { z(); -} +} // fn-decls are hoisted + -// fn-decls are hoisted function bar() { z(); z(); return 22; + function z() { wow(); } -} +} // vars + -// vars function baz() { a = 1; return a; var a; -} +} // lets - remove + -// lets - remove function foo1() { a = 1; b = 2; return a + b; -} +} // vars after return + -// vars after return function f() { return void 0; } var yy = 0; + function f1() { return function () { return yy; diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-decl-and-assignments/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-decl-and-assignments/expected.js index 3fa97c85a..774cb9d41 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-decl-and-assignments/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-decl-and-assignments/expected.js @@ -1,8 +1,9 @@ -function a() {} +function a() {} // bail case + -// bail case function b() { var x = 1; + while (a) wow = x += 1; } diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-params/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-params/expected.js index 2bb0e51ff..8ea9f8f0f 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-params/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/unused-params/expected.js @@ -18,25 +18,41 @@ bar(); class A { foo() {} + } -new A(); -// except the ones with side-effects +new A(); // except the ones with side-effects + function a(foo) { return foo; } + function b(foo, bar, baz) { return baz; } -function c(foo, { bar }) { + +function c(foo, { + bar +}) { return bar; } -function d({ foo }, { bar }) { + +function d({ + foo +}, { + bar +}) { return foo; } -function e({ foo }, bar = sideEffect()) { + +function e({ + foo +}, bar = sideEffect()) { return foo; } -function e({ foo }, bar = {}) { + +function e({ + foo +}, bar = {}) { return foo; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/used-expressions/actual.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/used-expressions/actual.js new file mode 100644 index 000000000..8c6fca84d --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/used-expressions/actual.js @@ -0,0 +1,7 @@ +var n = 1; +if (foo) n; +console.log(n); + +function bar(a) { + var a = a ? a : a; +} diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/used-expressions/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/used-expressions/expected.js new file mode 100644 index 000000000..50f0ac9e9 --- /dev/null +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/used-expressions/expected.js @@ -0,0 +1,7 @@ +var n = 1; +if (foo) ; +console.log(n); + +function bar(a) { + var a = a ? a : a; +} \ No newline at end of file diff --git a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/vars-to-for/expected.js b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/vars-to-for/expected.js index 3893a8591..24e11b157 100644 --- a/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/vars-to-for/expected.js +++ b/packages/babel-plugin-minify-dead-code-elimination/__tests__/fixtures/vars-to-for/expected.js @@ -1,15 +1,18 @@ function x(a) { wow(); + for (var x in a) wow(); } function foo(a) { var x, y; wow(y); + for (x in a) wow(y); } function bar() { for (var key in o); + for (key in o2); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-flip-comparisons/README.md b/packages/babel-plugin-minify-flip-comparisons/README.md index c81f7f4ec..0fc7f9cb0 100644 --- a/packages/babel-plugin-minify-flip-comparisons/README.md +++ b/packages/babel-plugin-minify-flip-comparisons/README.md @@ -49,7 +49,7 @@ babel --plugins minify-flip-comparisons script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-flip-comparisons"] }); ``` diff --git a/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-constants-first/expected.js b/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-constants-first/expected.js index a968934cc..6aa9780f5 100644 --- a/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-constants-first/expected.js +++ b/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-constants-first/expected.js @@ -1,6 +1,5 @@ // constants first -1 === a; - 100 * x; x + 100; x - 100; diff --git a/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-pures-first/expected.js b/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-pures-first/expected.js index 6c6c45ec8..0b0ed69da 100644 --- a/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-pures-first/expected.js +++ b/packages/babel-plugin-minify-flip-comparisons/__tests__/fixtures/binary-expr-pures-first/expected.js @@ -1,7 +1,5 @@ // pures first - null === a; - ({}) === a; function foo() { @@ -9,6 +7,7 @@ function foo() { var bar; bar = baz; } + x(); return x; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-guarded-expressions/README.md b/packages/babel-plugin-minify-guarded-expressions/README.md index 10b36cfa8..c3e974158 100644 --- a/packages/babel-plugin-minify-guarded-expressions/README.md +++ b/packages/babel-plugin-minify-guarded-expressions/README.md @@ -43,7 +43,7 @@ babel --plugins minify-guarded-expressions script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-guarded-expressions"] }); ``` diff --git a/packages/babel-plugin-minify-infinity/README.md b/packages/babel-plugin-minify-infinity/README.md index 2e27f6314..27bd37f58 100644 --- a/packages/babel-plugin-minify-infinity/README.md +++ b/packages/babel-plugin-minify-infinity/README.md @@ -41,7 +41,7 @@ babel --plugins minify-infinity script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-infinity"] }); ``` diff --git a/packages/babel-plugin-minify-infinity/__tests__/fixtures/destructure/expected.js b/packages/babel-plugin-minify-infinity/__tests__/fixtures/destructure/expected.js index d3aac08e4..7b4be7c7c 100644 --- a/packages/babel-plugin-minify-infinity/__tests__/fixtures/destructure/expected.js +++ b/packages/babel-plugin-minify-infinity/__tests__/fixtures/destructure/expected.js @@ -1,3 +1,5 @@ -({ Infinity } = 1); +({ + Infinity +} = 1); [Infinity] = foo; [...Infinity] = foo; \ No newline at end of file diff --git a/packages/babel-plugin-minify-infinity/__tests__/fixtures/fn-param/expected.js b/packages/babel-plugin-minify-infinity/__tests__/fixtures/fn-param/expected.js index 3a2243a48..493c12124 100644 --- a/packages/babel-plugin-minify-infinity/__tests__/fixtures/fn-param/expected.js +++ b/packages/babel-plugin-minify-infinity/__tests__/fixtures/fn-param/expected.js @@ -1,3 +1,7 @@ function a(Infinity) {} + function b(...Infinity) {} -function c({ Infinity }) {} \ No newline at end of file + +function c({ + Infinity +}) {} \ No newline at end of file diff --git a/packages/babel-plugin-minify-infinity/__tests__/fixtures/property/expected.js b/packages/babel-plugin-minify-infinity/__tests__/fixtures/property/expected.js index 499939117..fc92bfacb 100644 --- a/packages/babel-plugin-minify-infinity/__tests__/fixtures/property/expected.js +++ b/packages/babel-plugin-minify-infinity/__tests__/fixtures/property/expected.js @@ -1,2 +1,4 @@ -var x = { Infinity: 0 }; +var x = { + Infinity: 0 +}; x.Infinity; \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/README.md b/packages/babel-plugin-minify-mangle-names/README.md index 5a4ee1e04..5ce1a44e1 100644 --- a/packages/babel-plugin-minify-mangle-names/README.md +++ b/packages/babel-plugin-minify-mangle-names/README.md @@ -65,7 +65,7 @@ babel --plugins minify-mangle-names script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-mangle-names"] }); ``` diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/basic/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/basic/expected.js index 2f2e63e63..333d67f2d 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/basic/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/basic/expected.js @@ -1,5 +1,6 @@ function foo() { var a = 1; + if (a) { console.log(a); } diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/classes/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/classes/expected.js index 978cb62d2..2c7f278a8 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/classes/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/classes/expected.js @@ -1,10 +1,15 @@ class A {} + class B {} + new A(); new B(); + function a() { class a {} + class b {} + new a(); new b(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures-2/expected.js index c3eb19107..b7ce1f237 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures-2/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures-2/expected.js @@ -4,5 +4,6 @@ function foo() { b(); }; } + function b() {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures/expected.js index 7499b266e..7647ee469 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/closures/expected.js @@ -1,9 +1,11 @@ function foo() { function a() { var a; + if (a) { b(); } } + function b() {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-2/expected.js index 3176d3f23..201dee3ca 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-2/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-2/expected.js @@ -3,6 +3,7 @@ b--; var b = 10; a(b); + function a() { var a = 10; a++; diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-4/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-4/expected.js index 7bd5abf07..9a4bce3d2 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-4/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/constant-violations-4/expected.js @@ -6,6 +6,7 @@ function foo() { var a; a; a; + function b() { var a; a; diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/destructuring/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/destructuring/expected.js index 45b5cc634..01c25ae87 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/destructuring/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/destructuring/expected.js @@ -1,15 +1,23 @@ // issue#326 function a() { let a, b, c; - ({ foo: a, bar: b, baz: c } = {}); - return { foo: a, bar: b, baz: c }; -} -// issue#369 + ({ + foo: a, + bar: b, + baz: c + } = {}); + return { + foo: a, + bar: b, + baz: c + }; +} // issue#369 + + function decodeMessage(a) { let b; let c; let d = null; - [, b, c, d] = a.split(",") || []; console.log(c); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope-ignore/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope-ignore/expected.js index ec9cd40af..575257214 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope-ignore/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope-ignore/expected.js @@ -1,8 +1,10 @@ function foo() { var a = 1; + (function () { var a = 2; eval("..."); + (function () { var a = 1; })(); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope/expected.js index 710d5d539..ab0c7cb9e 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/eval-scope/expected.js @@ -1,8 +1,10 @@ function foo() { var inScopeOuter = 1; + (function () { var inScopeInner = 2; eval("inScopeInner + inScopeOuter"); + (function () { var a = 1; })(); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/actual.js new file mode 100644 index 000000000..3bac6adf5 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/actual.js @@ -0,0 +1 @@ +export const Foo = foo; diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/babel.json new file mode 100644 index 000000000..2104ca432 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/babel.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/expected.js new file mode 100644 index 000000000..37fb2f40d --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/expected.js @@ -0,0 +1 @@ +export const Foo = foo; \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/options.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/options.json new file mode 100644 index 000000000..b66891133 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-2/options.json @@ -0,0 +1,3 @@ +{ + "topLevel": true +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/actual.js new file mode 100644 index 000000000..b0839ada9 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/actual.js @@ -0,0 +1,2 @@ +const Foo = a; +export { Foo }; diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/babel.json new file mode 100644 index 000000000..2104ca432 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/babel.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/expected.js new file mode 100644 index 000000000..15a0c650f --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/expected.js @@ -0,0 +1,2 @@ +const b = a; +export { b as Foo }; \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/options.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/options.json new file mode 100644 index 000000000..b66891133 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-3/options.json @@ -0,0 +1,3 @@ +{ + "topLevel": true +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/actual.js new file mode 100644 index 000000000..f5a593f29 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/actual.js @@ -0,0 +1,2 @@ +const Foo = a; +export { Foo as Bar }; diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/babel.json new file mode 100644 index 000000000..2104ca432 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/babel.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/expected.js new file mode 100644 index 000000000..58ed5dc6e --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/expected.js @@ -0,0 +1,2 @@ +const b = a; +export { b as Bar }; \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/options.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/options.json new file mode 100644 index 000000000..b66891133 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl-4/options.json @@ -0,0 +1,3 @@ +{ + "topLevel": true +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/actual.js new file mode 100644 index 000000000..f4bfd80ae --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/actual.js @@ -0,0 +1,11 @@ +const foo = 1; +export { foo }; +export const bar = 2; +export function baz(bar, foo) { + bar(); + foo(); +} +export default function(bar, baz) { + bar(); + baz(); +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/babel.json new file mode 100644 index 000000000..2104ca432 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/babel.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/expected.js new file mode 100644 index 000000000..645e73b78 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/export-decl/expected.js @@ -0,0 +1,11 @@ +const foo = 1; +export { foo }; +export const bar = 2; +export function baz(a, b) { + a(); + b(); +} +export default function (a, b) { + a(); + b(); +} \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/fn-only-thunk/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/fn-only-thunk/expected.js index cf7822e0b..796dac86b 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/fn-only-thunk/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/fn-only-thunk/expected.js @@ -4,5 +4,6 @@ function foo() { b(a, c); } } + function b() {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/global-conflicts/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/global-conflicts/expected.js index 975e3d9cd..34ea7ca62 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/global-conflicts/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/global-conflicts/expected.js @@ -2,5 +2,6 @@ function e() { function a() { b = c(); } + function c() {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/globals-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/globals-2/expected.js index 2806a9458..1e53c0226 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/globals-2/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/globals-2/expected.js @@ -1,5 +1,7 @@ class A {} + class B extends A {} + (function () { class a { constructor() { @@ -7,5 +9,6 @@ class B extends A {} new B(); a; } + } })(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/hoisted/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/hoisted/expected.js index 217428cf6..e88c7f877 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/hoisted/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/hoisted/expected.js @@ -2,7 +2,6 @@ function a() { { var a = true; - { b(); } diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/actual.js new file mode 100644 index 000000000..f198005a4 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/actual.js @@ -0,0 +1 @@ +export class App extends Object {} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/babel.json new file mode 100644 index 000000000..2104ca432 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/babel.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/expected.js new file mode 100644 index 000000000..3b0e97ba2 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-138/expected.js @@ -0,0 +1 @@ +export class App extends Object {} \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365-toplevel/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365-toplevel/expected.js index b153f29d4..742de3b1b 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365-toplevel/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365-toplevel/expected.js @@ -1,3 +1,5 @@ class A {} + class B {} + eval(""); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365/expected.js index f940f071e..201212d59 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-365/expected.js @@ -1,5 +1,7 @@ function foo() { eval(""); + class A {} + class B {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-366/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-366/expected.js index f3a35bb19..94102ef5a 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-366/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-366/expected.js @@ -1,4 +1,5 @@ function myEval(code, _var_) { eval(code); } + myEval("console.log(_var_)", "myValue"); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-411/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-411/expected.js index d730ce9a2..eafcdbb54 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-411/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/issue-411/expected.js @@ -2,6 +2,7 @@ function a(a) { foo(a); } + return function () { return a(); }; diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-class-name/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-class-name/expected.js index 9258a897a..9bad602fe 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-class-name/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-class-name/expected.js @@ -1,9 +1,12 @@ (function () { class Foo {} + const b = class Bar extends Foo {}; var c = class Baz {}; + function a() { new c(); } + a(); })(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-fn-name/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-fn-name/expected.js index 32123742a..f46a8322f 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-fn-name/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/keep-fn-name/expected.js @@ -2,9 +2,11 @@ var a = function foo() { foo(); }; + function bar() { a(); } + bar(); var b = a; b(); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/labels-3/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/labels-3/expected.js index 41767dba6..067ca5db9 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/labels-3/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/labels-3/expected.js @@ -1,9 +1,11 @@ // https://phabricator.babeljs.io/T6957 function foo() { var a; + meh: for (;;) { break meh; } + return a; } diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/name-collisions/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/name-collisions/expected.js index fa5b33ae0..7116ce234 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/name-collisions/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/name-collisions/expected.js @@ -1,6 +1,7 @@ function foo() { var a = 2; var b = 1; + if (b) { console.log(b + a); } diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/order-independence/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/order-independence/expected.js index 6f168b66c..c5981c557 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/order-independence/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/order-independence/expected.js @@ -2,10 +2,12 @@ function foo() { function a(a, c, d) { b(a, c, d); } + function b() { var a = who(); a.bam(); } + a(); } diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/reuse/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/reuse/expected.js index d9bdcc365..436f278ad 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/reuse/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/reuse/expected.js @@ -5,6 +5,7 @@ function Foo() { ba, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y; z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y; Z, $; + function aa() { var aa, a, b, c, d, e, f, g, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y; var z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y; @@ -12,6 +13,7 @@ function Foo() { aa, a, b, c, d, e, f, g, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y; z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y; Z, $; + function h() { var aa, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y; var z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y; @@ -20,7 +22,9 @@ function Foo() { z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y; Z, $; } + h(); } + aa(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-2/expected.js index 24c938f3f..b8d6838e8 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-2/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-2/expected.js @@ -1,22 +1,44 @@ function a(b) { for (b = 0;;); + for (b of x); + for (x of b); + for (b in x); + for (x in b); + for (;; b++); + for (;; b = 1); for (let a;;); + for (let a of x); + for (const a of x); + for (let a in x); + for (const a in x); + for (let [a, d] of x); + for (const [a, d] of x); + for (let [a, d] in x); + for (const [a, d] in x); - for (let { c: { b: { a: c } } } = x;;); + + for (let { + c: { + b: { + a: c + } + } + } = x;;); + for (;; () => { let b = 1; }); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-3/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-3/expected.js index 55bba4313..270680e65 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-3/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops-3/expected.js @@ -1,22 +1,44 @@ var a = function (b) { for (b = 0;;); + for (b of x); + for (x of b); + for (b in x); + for (x in b); + for (;; b++); + for (;; b = 1); for (let a;;); + for (let a of x); + for (const a of x); + for (let a in x); + for (const a in x); + for (let [a, d] of x); + for (const [a, d] of x); + for (let [a, d] in x); + for (const [a, d] in x); - for (let { c: { b: { a: c } } } = x;;); + + for (let { + c: { + b: { + a: c + } + } + } = x;;); + for (;; () => { let b = 1; }); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops/expected.js index 81d69b1f3..f76825593 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-shadowing-loops/expected.js @@ -1,23 +1,45 @@ function a(b) { { for (b = 0;;); + for (b of x); + for (x of b); + for (b in x); + for (x in b); + for (;; b++); + for (;; b = 1); for (let b;;); + for (let b of x); + for (const b of x); + for (let b in x); + for (const b in x); + for (let [c, a] of x); + for (const [c, a] of x); + for (let [c, a] in x); + for (const [c, a] in x); - for (let { c: { b: { a: b } } } = x;;); + + for (let { + c: { + b: { + a: b + } + } + } = x;;); + for (;; () => { let b = 1; }); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-toplevel-loops/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-toplevel-loops/expected.js index ba893cb32..7032ed16e 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-toplevel-loops/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/safari-toplevel-loops/expected.js @@ -1,23 +1,45 @@ var a; for (a = 0;;); + for (a of x); + for (x of a); + for (a in x); + for (x in a); + for (;; a++); + for (;; a = 1); for (let a;;); + for (let a of x); + for (const a of x); + for (let a in x); + for (const a in x); + for (let [a, b] of x); + for (const [a, b] of x); + for (let [a, b] in x); + for (const [a, b] in x); -for (let { c: { b: { a: b } } } = x;;); + +for (let { + c: { + b: { + a: b + } + } +} = x;;); + for (;; () => { let b = 1; }); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadow-outer/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadow-outer/expected.js index afdf5efd5..ac44d8945 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadow-outer/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadow-outer/expected.js @@ -2,5 +2,6 @@ function bar() { function a(e, a, b) { d(e, a, b); } + function d() {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing-2/expected.js index 6a50e18ed..9d13cc70c 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing-2/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing-2/expected.js @@ -4,5 +4,6 @@ function foo() { a(b, c); }; } + function b() {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing/expected.js index 2a3994a70..f0719e7e9 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/shadowing/expected.js @@ -1,6 +1,8 @@ var a = 1; + function foo() { var a = 1; + if (a) { console.log(a); } diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/toplevel/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/toplevel/expected.js index 1067b4207..3295a5193 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/toplevel/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/toplevel/expected.js @@ -3,12 +3,16 @@ function a() { c.call(); } } + const b = "production"; + var c = function e() { new d({ [b]: "foo", a: a(c) }); }; + class d {} + a(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/try-catch/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/try-catch/expected.js index 58cec1a38..30c96093e 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/try-catch/expected.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/try-catch/expected.js @@ -1,4 +1,5 @@ function xoo() { var a; + try {} catch (a) {} } \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/actual.js new file mode 100644 index 000000000..556ab4ba6 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/actual.js @@ -0,0 +1,11 @@ +(function() { + function bar() { + if (smth) { + let entries = blah(); + entries(); + } + foo(); + } + function foo() {} + module.exports = { bar }; +})(); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/babel.json new file mode 100644 index 000000000..249da380e --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/babel.json @@ -0,0 +1,5 @@ +{ + "plugins": [ + "@babel/plugin-transform-block-scoping" + ] +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/expected.js new file mode 100644 index 000000000..c65c7a67a --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-1/expected.js @@ -0,0 +1,16 @@ +(function () { + function a() { + if (smth) { + var a = blah(); + a(); + } + + b(); + } + + function b() {} + + module.exports = { + bar: a + }; +})(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/actual.js new file mode 100644 index 000000000..219889b4a --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/actual.js @@ -0,0 +1,10 @@ +// #issue55, #issue57 +(function() { + (function() { + for (let x in y) y[x]; + f(() => { + g(); + }); + })(); + function g() {} +})(); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/babel.json new file mode 100644 index 000000000..a29ac9986 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/babel.json @@ -0,0 +1,5 @@ +{ + "presets": [ + "@babel/preset-env" + ] +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/expected.js new file mode 100644 index 000000000..6035e950a --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping-2/expected.js @@ -0,0 +1,14 @@ +// #issue55, #issue57 +(function () { + (function () { + for (var b in y) { + y[b]; + } + + f(function () { + a(); + }); + })(); + + function a() {} +})(); \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/actual.js new file mode 100644 index 000000000..155f39b28 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/actual.js @@ -0,0 +1,9 @@ +function f(x) { + for (let i = 0; i; i++) { + let n; + if (n) { + return; + } + g(() => n); + } +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/babel.json new file mode 100644 index 000000000..249da380e --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/babel.json @@ -0,0 +1,5 @@ +{ + "plugins": [ + "@babel/plugin-transform-block-scoping" + ] +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/expected.js new file mode 100644 index 000000000..1255f8f9d --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-block-scoping/expected.js @@ -0,0 +1,18 @@ +function f(a) { + var b = function (a) { + var b = void 0; + + if (b) { + return { + v: void 0 + }; + } + + g(() => b); + }; + + for (var d = 0; d; d++) { + var c = b(d); + if (typeof c === "object") return c.v; + } +} \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/actual.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/actual.js new file mode 100644 index 000000000..929d11b17 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/actual.js @@ -0,0 +1,5 @@ +function foo() { + if (x) return; + function bar() {} + bar(a); +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/babel.json b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/babel.json new file mode 100644 index 000000000..44e473075 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/babel.json @@ -0,0 +1,5 @@ +{ + "plugins": [ + "minify-simplify" + ] +} diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/expected.js b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/expected.js new file mode 100644 index 000000000..3fadff396 --- /dev/null +++ b/packages/babel-plugin-minify-mangle-names/__tests__/fixtures/with-simplify/expected.js @@ -0,0 +1,5 @@ +function foo() { + function b() {} + + x || b(a); +} \ No newline at end of file diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/mangle-names-test.js b/packages/babel-plugin-minify-mangle-names/__tests__/mangle-names-test.js index f543dffb3..26b844cdc 100644 --- a/packages/babel-plugin-minify-mangle-names/__tests__/mangle-names-test.js +++ b/packages/babel-plugin-minify-mangle-names/__tests__/mangle-names-test.js @@ -9,6 +9,7 @@ describe("mangle-names", () => { ` (function () { var arguments = void 0; + (function () { console.log(arguments); })("argument"); @@ -27,121 +28,11 @@ describe("mangle-names", () => { `, ` function eval() {} + function foo() { var a = 1; eval("..."); } ` ); - - thePlugin( - "should handle export declarations", - ` - const foo = 1; - export { foo }; - export const bar = 2; - export function baz(bar, foo) { - bar(); - foo(); - }; - export default function (bar, baz) { - bar(); - baz(); - } - `, - ` - const foo = 1; - export { foo }; - export const bar = 2; - export function baz(a, b) { - a(); - b(); - }; - export default function (a, b) { - a(); - b(); - } - `, - { - sourceType: "module" - } - ); - - // https://github.com/babel/minify/issues/138 - thePlugin( - "should handle class exports in modules - issue#138", - ` - export class App extends Object {}; - `, - { - sourceType: "module" - } - ); - - thePlugin( - "should work with if_return optimization changing function scope", - ` - function foo() { - if (x) - return; - function bar() {} - bar(a); - } - `, - ` - function foo() { - function b() {} - x || b(a); - } - `, - { - plugins: [ - require("../../babel-plugin-minify-simplify/src/index"), - mangler - ] - } - ); - - thePlugin( - "should not mangle named exports - 1", - ` - export const Foo = foo; - `, - { - sourceType: "module", - plugins: [[mangler, { topLevel: true }]] - } - ); - - thePlugin( - "should not mangle named exports - 2", - ` - const Foo = a; - export {Foo}; - `, - ` - const b = a; - export { b as Foo }; - `, - { - sourceType: "module", - plugins: [[mangler, { topLevel: true }]] - } - ); - - thePlugin( - "should not mangle named exports - 3", - ` - const Foo = a; - export {Foo as Bar}; - `, - ` - const b = a; - export { b as Bar }; - `, - { - sourceType: "module", - plugins: [[mangler, { topLevel: true }]] - } - ); }); diff --git a/packages/babel-plugin-minify-mangle-names/__tests__/mangler-block-scoping.js b/packages/babel-plugin-minify-mangle-names/__tests__/mangler-block-scoping.js deleted file mode 100644 index 83c67a98b..000000000 --- a/packages/babel-plugin-minify-mangle-names/__tests__/mangler-block-scoping.js +++ /dev/null @@ -1,139 +0,0 @@ -jest.autoMockOff(); - -const babel = require("babel-core"); -const unpad = require("unpad"); -const traverse = require("babel-traverse").default; - -describe("mangler with block-scoping", () => { - it("should integrate with block scoping plugin", () => { - const srcTxt = unpad(` - function f(x) { - for (let i = 0; i; i++) { - let n; - if (n) { - return; - } - g(() => n); - } - } - `); - - const first = babel.transform(srcTxt, { - plugins: ["transform-es2015-block-scoping"], - code: false - }); - - (traverse.clearCache || traverse.cache.clear)(); - - const actual = babel.transformFromAst(first.ast, null, { - plugins: [require("../src/index")] - }).code; - - const expected = unpad(` - function f(a) { - var b = function (a) { - var b = void 0; - if (b) { - return { - v: void 0 - }; - } - g(() => b); - }; - - for (var d = 0; d; d++) { - var c = b(d); - if (typeof c === "object") return c.v; - } - } - `); - - expect(actual).toBe(expected); - }); - - it("should integrate with block scoping plugin 2", () => { - const srcTxt = unpad(` - (function () { - function bar() { - if (smth) { - let entries = blah(); - entries(); - } - foo(); - } - function foo() { } - module.exports = { bar }; - })(); - `); - - const first = babel.transform(srcTxt, { - plugins: ["transform-es2015-block-scoping"], - code: false - }); - - (traverse.clearCache || traverse.cache.clear)(); - - const actual = babel.transformFromAst(first.ast, null, { - plugins: [require("../src/index")] - }).code; - - const expected = unpad(` - (function () { - function a() { - if (smth) { - var a = blah(); - a(); - } - b(); - } - function b() {} - module.exports = { bar: a }; - })(); - `); - - expect(actual).toBe(expected); - }); - - // #issue55, #issue57 - it("should correctly mangle function declarations in different order", () => { - const source = unpad(` - (function(){ - (function() { - for (let x in y) y[x]; - f(() => { g() }); - })(); - function g() {} - })(); - `); - - const ast = babel.transform(source, { - presets: ["env"], - sourceType: "script", - code: false - }).ast; - - (traverse.clearCache || traverse.cache.clear)(); - - const actual = babel.transformFromAst(ast, null, { - sourceType: "script", - plugins: [require("../src/index")] - }).code; - - const expected = unpad(` - "use strict"; - - (function () { - (function () { - for (var b in y) { - y[b]; - }f(function () { - a(); - }); - })(); - function a() {} - })(); - `); - - expect(actual).toBe(expected); - }); -}); diff --git a/packages/babel-plugin-minify-mangle-names/src/index.js b/packages/babel-plugin-minify-mangle-names/src/index.js index 579e10a8e..53f1432b6 100644 --- a/packages/babel-plugin-minify-mangle-names/src/index.js +++ b/packages/babel-plugin-minify-mangle-names/src/index.js @@ -112,7 +112,6 @@ module.exports = babel => { /** * Same usage as in DCE, whichever runs first */ - if (!isEvalScopesMarked(mangler.program)) { markEvalScopes(mangler.program); } @@ -134,6 +133,7 @@ module.exports = babel => { scopeTracker.addBinding(scope.bindings[name]); }); }, + /** * This is necessary because, in Babel, the scope.references * does NOT contain the references in that scope. Only the program @@ -144,13 +144,17 @@ module.exports = babel => { * is considered as scope referencing that identifier */ ReferencedIdentifier(path) { - if (isLabelIdentifier(path)) return; + if (isLabelIdentifier(path)) { + return; + } const { scope, node: { name } } = path; const binding = scope.getBinding(name); if (!binding) { // Do not collect globals as they are already available via // babel's API - if (scope.hasGlobal(name)) return; + if (scope.hasGlobal(name)) { + return; + } // This should NOT happen ultimately. Panic if this code block is // reached throw new Error( @@ -162,54 +166,6 @@ module.exports = babel => { // Add it to our scope tracker if everything is fine scopeTracker.addReference(scope, binding, name); } - }, - - /** - * This is useful to detect binding ids and add them to the - * scopeTracker's bindings - * - * TODO: - * - * This visitor is probably unnecessary. It was added to capture the - * bindings that was not present in scope.bindings. But, now, it looks - * like the unit and smoke tests pass without this. - */ - BindingIdentifier(path) { - if (isLabelIdentifier(path)) return; - - const { scope, node: { name } } = path; - const binding = scope.getBinding(name); - - /** - * We have already captured the bindings when traversing through - * Scopables, if a binding identifier doesn't have a binding, it - * probably means that another transformation created a new binding, - * refer https://github.com/babel/minify/issues/549 for example - - * binding created by plugin transform-es2015-function-name - * - * So we just don't care about bindings that do not exist - * - * TODO: - * - * this deopts in DCE as this name can be removed for this particular - * case (es2015-function-name) - */ - if (!binding) return; - - /** - * Detect constant violations - * - * If it's a constant violation, then add the Identifier Path as - * a Reference instead of Binding - This is because the ScopeTracker - * tracks these Re-declaration and mutation of variables as References - * as it is simple to rename them - */ - if (binding.identifier === path.node) { - scopeTracker.addBinding(binding); - } else { - // constant violation - scopeTracker.addReference(scope, binding, name); - } } }; @@ -273,14 +229,18 @@ module.exports = babel => { const { scopeTracker } = mangler; // Unsafe Scope - if (!mangler.eval && hasEval(scope)) return; + if (!mangler.eval && hasEval(scope)) { + return; + } // Already visited // This is because for a function, in Babel, the function and // the function body's BlockStatement has the same scope, and will // be visited twice by the Scopable handler, and we want to mangle // it only once - if (mangler.visitedScopes.has(scope)) return; + if (mangler.visitedScopes.has(scope)) { + return; + } mangler.visitedScopes.add(scope); // Helpers to generate names @@ -379,8 +339,9 @@ module.exports = babel => { if (name !== oldName) continue; for (const idPath of bindingIds[name]) { if (predicate(idPath)) { - this.renamedNodes.add(idPath.node); - idPath.replaceWith(t.identifier(newName)); + idPath.node.name = newName; + // babel-7 don't requeue + // idPath.replaceWith(t.identifier(newName)); this.renamedNodes.add(idPath.node); } } @@ -456,8 +417,10 @@ module.exports = babel => { if (actualBinding !== binding) { return; } - mangler.renamedNodes.add(refPath.node); - refPath.replaceWith(t.identifier(newName)); + + refPath.node.name = newName; + // babel-7 don't requeue + // refPath.replaceWith(t.identifier(newName)); mangler.renamedNodes.add(refPath.node); scopeTracker.updateReference( @@ -470,8 +433,10 @@ module.exports = babel => { }); } else if (!isLabelIdentifier(path)) { if (path.node.name === oldName) { - mangler.renamedNodes.add(path.node); - path.replaceWith(t.identifier(newName)); + path.node.name = newName; + + // babel-7 don't requeue + // path.replaceWith(t.identifier(newName)); mangler.renamedNodes.add(path.node); scopeTracker.updateReference(path.scope, binding, oldName, newName); } else if (mangler.renamedNodes.has(path.node)) { @@ -491,7 +456,10 @@ module.exports = babel => { // else label identifier - silently ignore } - // update babel's scope tracking + // update babel's internal tracking + binding.identifier.name = newName; + + // update babel's internal scope tracking const { bindings } = scope; bindings[newName] = binding; delete bindings[oldName]; diff --git a/packages/babel-plugin-minify-mangle-names/src/scope-tracker.js b/packages/babel-plugin-minify-mangle-names/src/scope-tracker.js index 6655cac46..983098a5b 100644 --- a/packages/babel-plugin-minify-mangle-names/src/scope-tracker.js +++ b/packages/babel-plugin-minify-mangle-names/src/scope-tracker.js @@ -136,7 +136,7 @@ module.exports = class ScopeTracker { maybeFor.isForStatement({ init: maybeDecl.node }) || maybeFor.isForXStatement({ left: maybeDecl.node }); if (isForLoopBinding) { - const fnParent = maybeFor.getFunctionParent(); + const fnParent = getFunctionParent(maybeFor); if (fnParent.isFunction({ body: maybeFor.parent })) { const parentFunctionBinding = this.bindings .get(fnParent.scope) @@ -208,7 +208,7 @@ module.exports = class ScopeTracker { } /** - * Moves Binding from it's own Scope to {toScope} + * Moves Binding from it's own Scope to {@param toScope} * * required for fixup-var-scope * @@ -241,3 +241,11 @@ module.exports = class ScopeTracker { bindings.delete(oldName); } }; + +/** + * Babel-7 returns null if there is no function parent + * and uses getProgramParent to get Program + */ +function getFunctionParent(path) { + return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path; +} diff --git a/packages/babel-plugin-minify-numeric-literals/README.md b/packages/babel-plugin-minify-numeric-literals/README.md index ef490d4e7..705985825 100644 --- a/packages/babel-plugin-minify-numeric-literals/README.md +++ b/packages/babel-plugin-minify-numeric-literals/README.md @@ -43,7 +43,7 @@ babel --plugins minify-numeric-literals script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-numeric-literals"] }); ``` diff --git a/packages/babel-plugin-minify-replace/README.md b/packages/babel-plugin-minify-replace/README.md index 49769d00f..5abc21f06 100644 --- a/packages/babel-plugin-minify-replace/README.md +++ b/packages/babel-plugin-minify-replace/README.md @@ -85,7 +85,7 @@ babel --plugins minify-replace script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-replace"] }); ``` diff --git a/packages/babel-plugin-minify-replace/__tests__/replace-test.js b/packages/babel-plugin-minify-replace/__tests__/replace-test.js index bb4ab3ac9..13ec4545f 100644 --- a/packages/babel-plugin-minify-replace/__tests__/replace-test.js +++ b/packages/babel-plugin-minify-replace/__tests__/replace-test.js @@ -29,6 +29,7 @@ describe("replace-plugin", () => { if (0) { foo(); } + if (!0) { foo(); } @@ -56,6 +57,7 @@ describe("replace-plugin", () => { if (0) { foo(); } + if (a.__DEV__) { foo(); } diff --git a/packages/babel-plugin-minify-simplify/README.md b/packages/babel-plugin-minify-simplify/README.md index 7c7784a88..6ed7474a5 100644 --- a/packages/babel-plugin-minify-simplify/README.md +++ b/packages/babel-plugin-minify-simplify/README.md @@ -75,7 +75,7 @@ babel --plugins minify-simplify script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-simplify"] }); ``` diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block-empty/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block-empty/expected.js index 34ef9cd09..646222e51 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block-empty/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block-empty/expected.js @@ -1,2 +1,3 @@ const a = () => {}; + const b = () => {}; \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block/expected.js index d6cdea725..f6610e054 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/arrow-block/expected.js @@ -1,2 +1,3 @@ const a = () => (3, 4); + const b = () => 3; \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/common-conditional-expression-patterns/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/common-conditional-expression-patterns/expected.js index 31f7f67f5..72bfc7ed1 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/common-conditional-expression-patterns/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/common-conditional-expression-patterns/expected.js @@ -1,48 +1,63 @@ function f1() { return !(a != b) || x; } + function f2() { return a != b && x; } + function f3() { return !!(a < b) || x; } + function f4() { return !(a < b) && x; } + function f5() { return !!c || x; } + function f6() { return !c && x; } + function f7() { return !c || x; } + function f8() { return !!c && x; } + function g1() { return a != b || x; } + function g2() { return !(a != b) && x; } + function g3() { return !(a < b) || x; } + function g4() { return !!(a < b) && x; } + function g5() { return !c || x; } + function g6() { return !!c && x; } + function g7() { return !!c || x; } + function g8() { return !c && x; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/early-returns/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/early-returns/expected.js index 084aa9c39..f4e4a3f2d 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/early-returns/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/early-returns/expected.js @@ -1,13 +1,15 @@ function foo(a) { lol || (doThings(), doOtherThings()); } + function bar(a) { if (!lol) try { - doThings(); - } catch (e) { - doOtherThings(); - } + doThings(); + } catch (e) { + doOtherThings(); + } } + function baz() { for (; wow;) if (lol) return; diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/empty-blocks-to-empty-statements/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/empty-blocks-to-empty-statements/expected.js index 756add0a3..bc1e04383 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/empty-blocks-to-empty-statements/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/empty-blocks-to-empty-statements/expected.js @@ -1,7 +1,10 @@ function foo() { for (i in p); + for (;;); + switch (1) {} + try { a; } catch (e) {} diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/flip-logical-expr/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/flip-logical-expr/expected.js index a17fecaa0..66e27b251 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/flip-logical-expr/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/flip-logical-expr/expected.js @@ -1,2 +1 @@ - if (!x && foo(), null != r) for (;;); \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/hoist-functions/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/hoist-functions/expected.js index 38be96a2f..5b71869e2 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/hoist-functions/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/hoist-functions/expected.js @@ -1,4 +1,5 @@ function foo() { function bar() {} + a(), b(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-conditional-return-4/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-conditional-return-4/expected.js index 35d6cffd4..c012f29b6 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-conditional-return-4/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-conditional-return-4/expected.js @@ -1,7 +1,6 @@ function foo() { if (x) { var f = wow; - if (delete x.x, bar()) return; } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-else-blocks/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-else-blocks/expected.js index a90a948a9..1a449ddb9 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-else-blocks/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-else-blocks/expected.js @@ -1,5 +1,7 @@ if (false) { - let { a } = foo(); + let { + a + } = foo(); } else if (true) { const x = bar(); } else { diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-2/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-2/expected.js index b72d76d15..fb601e055 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-2/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-2/expected.js @@ -3,5 +3,6 @@ function foo() { if (bar) return false; if (baz) return false; } + return true; } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-4/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-4/expected.js index 1568d86d8..7b1c49794 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-4/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-4/expected.js @@ -1,6 +1,6 @@ function x() { if (bar) { - var x = foo; - if (foo && y) throw y; - } + var x = foo; + if (foo && y) throw y; + } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-5/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-5/expected.js index 8d33d87ee..5ecb5f787 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-5/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-5/expected.js @@ -1,9 +1,11 @@ function x() { var x = foo; + if (hi) { var y = z; if (!foo) return; if (x) throw y; } + x(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-hoisted-fn/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-hoisted-fn/expected.js index dcc00c881..1c358147b 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-hoisted-fn/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/if-return-hoisted-fn/expected.js @@ -4,6 +4,8 @@ function foo() { } if (bar(), !x) { - const { a } = b; - } + const { + a + } = b; + } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-198/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-198/expected.js index 8a14b13e4..118edb879 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-198/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-198/expected.js @@ -1,6 +1,8 @@ function foo() { let a, - { b } = x; + { + b + } = x; for (; true;) bar(a, b); diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-281/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-281/expected.js index 928868cd7..7d9e2c204 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-281/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-281/expected.js @@ -1,4 +1,5 @@ function foo() { function bar() {} + x || bar(a); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-455/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-455/expected.js index 8fd7d74bb..5bcab8046 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-455/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-455/expected.js @@ -1,9 +1,10 @@ function foo(param) { if (param !== null) { - let thingA = param.a; - let thingB = param.b; - if (thingA || thingB) { - let thingC = param.c; - } + let thingA = param.a; + let thingB = param.b; + + if (thingA || thingB) { + let thingC = param.c; } + } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-560/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-560/expected.js index 19b81c12a..be1675604 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-560/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-560/expected.js @@ -1,6 +1,10 @@ function foo() { for (; true;) { - const { x } = a; - const { y } = b; + const { + x + } = a; + const { + y + } = b; } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-637/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-637/expected.js index d3ec1b882..dbcdcaf6f 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-637/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/issue-637/expected.js @@ -1,7 +1,9 @@ function test(a) { const clash = () => {}; + if (a) return clash();else { const clash = () => {}; + return clash(); } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/merge-if-5/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/merge-if-5/expected.js index b0a295026..166ec5c31 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/merge-if-5/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/merge-if-5/expected.js @@ -1,3 +1,3 @@ if (x) try { - foo(); - } catch (e) {} else if (y) if (a) bar();else if (b) baz();else for (;;) 1; \ No newline at end of file + foo(); +} catch (e) {} else if (y) if (a) bar();else if (b) baz();else for (;;) 1; \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/super-assignments/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/super-assignments/expected.js index 4c8311604..367ae1c92 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/super-assignments/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/super-assignments/expected.js @@ -2,4 +2,7 @@ class Foo { foo() { ++super.foo; } -}; \ No newline at end of file + +} + +; \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break-2/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break-2/expected.js index d7a4cda0d..bfbc5d4dd 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break-2/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break-2/expected.js @@ -2,6 +2,7 @@ loop: for (; foo;) { switch (bar) { case 47: } + switch (baz) { default: break loop; diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break/expected.js index 9d76b97dc..336b28f44 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-last-break/expected.js @@ -2,7 +2,7 @@ switch (foo) { case 'foo': throw bar(); break; + case 'bar': wow(); - } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-sequence-test/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-sequence-test/expected.js index d1b16729d..6c902b8f4 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-sequence-test/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-sequence-test/expected.js @@ -2,6 +2,5 @@ function bar() { switch (wow(), foo) { case 'foo': throw x(); - } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-to-sequence/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-to-sequence/expected.js index 589ad3712..e4c7d2f56 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-to-sequence/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/switch-expr-to-sequence/expected.js @@ -2,10 +2,9 @@ function bar() { switch (foo) { case 'foo': bar(), foo(); - break; + case 'bar': return wow(), wo; - } } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr-2/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr-2/expected.js index 79c2b7656..4a3a313ad 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr-2/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr-2/expected.js @@ -1,6 +1,9 @@ function bar() { var z; - for (z in c(), { a: 1 }) x(z); + for (z in c(), { + a: 1 + }) x(z); + z(); } \ No newline at end of file diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr/expected.js index 602a2a928..fbabedc3c 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence-expr/expected.js @@ -1,15 +1,16 @@ function foo() { a(); - var x = bar(); b(x), this.d = x; } + function bar() { for (x(); x;) x && x(); try { y(); } catch (e) {} + var z = x(); for (z(); a;) b(); diff --git a/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence/expected.js b/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence/expected.js index 61fc6a21a..4b1fa3aee 100644 --- a/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence/expected.js +++ b/packages/babel-plugin-minify-simplify/__tests__/fixtures/to-sequence/expected.js @@ -4,4 +4,5 @@ for (var x = 0; x < 10; x++) { var z = foo(); console.log(z), console.log(z); } + a(), b = 1; \ No newline at end of file diff --git a/packages/babel-plugin-minify-type-constructors/README.md b/packages/babel-plugin-minify-type-constructors/README.md index 9bb9789d5..670511995 100644 --- a/packages/babel-plugin-minify-type-constructors/README.md +++ b/packages/babel-plugin-minify-type-constructors/README.md @@ -53,7 +53,7 @@ babel --plugins minify-type-constructors script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["minify-type-constructors"] }); ``` diff --git a/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/array/expected.js b/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/array/expected.js index 754b331fe..50b626f98 100644 --- a/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/array/expected.js +++ b/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/array/expected.js @@ -6,19 +6,16 @@ [[]]; Array(t); Array(a.b); -Array((() => 5)()); +Array((() => 5)()); // numbers -// numbers []; [,]; [,,,,,,]; -Array(7); +Array(7); // Array(n>6) -// Array(n>6) [,,,,,,]; -Array(7); +Array(7); // multiple args -// multiple args ["a", "b"]; ["0", "1", {}]; [10, Symbol(), foo()]; \ No newline at end of file diff --git a/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object-2/expected.js b/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object-2/expected.js index 63958966e..bd1982976 100644 --- a/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object-2/expected.js +++ b/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object-2/expected.js @@ -1,3 +1,7 @@ ({}); + var foo = () => ({}); -var bar = () => ({ baz: 3 }); \ No newline at end of file + +var bar = () => ({ + baz: 3 +}); \ No newline at end of file diff --git a/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object/expected.js b/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object/expected.js index e1e3194a1..5dd3938bc 100644 --- a/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object/expected.js +++ b/packages/babel-plugin-minify-type-constructors/__tests__/fixtures/object/expected.js @@ -1,18 +1,20 @@ var x = {}; +var x = {}; // TODO: add Object(Array()) -var x = {}; - -// TODO: add Object(Array()) -[{}, {}, {}]; - -// TODO: add Object(Array()) -[{}, { a: b }, { a: b, c: d }]; +[{}, {}, {}]; // TODO: add Object(Array()) +[{}, { + a: b +}, { + a: b, + c: d +}]; [[], [1], [1, 2], [null]]; function a() {} -[function () {}, a, Object(Array)]; +[function () {}, a, Object(Array)]; [Object("undefined"), Object(nulled), Object(0), Object(false), Object(stuff())]; - -[Object("function"), Object(Symbol), Object(true), Object(1), Object(call({ me: true }))]; \ No newline at end of file +[Object("function"), Object(Symbol), Object(true), Object(1), Object(call({ + me: true +}))]; \ No newline at end of file diff --git a/packages/babel-plugin-minify-type-constructors/__tests__/type-constructors-test.js b/packages/babel-plugin-minify-type-constructors/__tests__/type-constructors-test.js index 4f573d283..fe0dff585 100644 --- a/packages/babel-plugin-minify-type-constructors/__tests__/type-constructors-test.js +++ b/packages/babel-plugin-minify-type-constructors/__tests__/type-constructors-test.js @@ -1,6 +1,6 @@ jest.autoMockOff(); -const babel = require("babel-core"); +const babel = require("@babel/core"); const plugin = require("../src/index"); const unpad = require("unpad"); const thePlugin = require("test-transform")(plugin); diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/README.md b/packages/babel-plugin-transform-inline-consecutive-adds/README.md index d0201346e..56b717617 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/README.md +++ b/packages/babel-plugin-transform-inline-consecutive-adds/README.md @@ -60,7 +60,7 @@ babel --plugins transform-inline-consecutive-adds script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-inline-consecutive-adds"] }); ``` diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/array-non-int-index/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/array-non-int-index/expected.js index d0cfce008..b31e65d87 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/array-non-int-index/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/array-non-int-index/expected.js @@ -1,5 +1,4 @@ var foo = []; foo[2.1] = "blah"; - var bar = []; bar["2.1"] = "blah"; \ No newline at end of file diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/basic/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/basic/expected.js index c4336c78a..fbcbeffb8 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/basic/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/basic/expected.js @@ -5,8 +5,6 @@ const foo = { c: bar(), d: "str" }; - - var bar = { a: 0, b: 2 diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties-2/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties-2/expected.js index 5efc01a6a..5b4d6c96a 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties-2/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties-2/expected.js @@ -1,5 +1,6 @@ var foo = {}; foo[bar()] = 0; + function bar() { console.log(foo); return 0; diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties/expected.js index ba32353b5..39d4175eb 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/computed-properties/expected.js @@ -2,7 +2,5 @@ var foo = { "a": 0, 4: 1 }; - - var bar = {}; bar[global] = 0; \ No newline at end of file diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/dependent-properties/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/dependent-properties/expected.js index 7715f605e..9ae583598 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/dependent-properties/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/dependent-properties/expected.js @@ -3,5 +3,4 @@ const foo = { console.log(3); } }; - foo.b = foo.a(); \ No newline at end of file diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties-2/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties-2/expected.js index 0665956aa..61ae51324 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties-2/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties-2/expected.js @@ -1,10 +1,11 @@ var foo = { a: 4 }; - foo.b = cat(); + function cat() { return bar(); + function bar() { console.log(foo); return 0; @@ -14,6 +15,7 @@ function cat() { function baz() { var foo = {}; foo.a = 0, foo.b = bar(); + function bar() { console.log(foo); return 0; diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties/expected.js index 6a3b96c8c..f04851396 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/indirect-dependent-properties/expected.js @@ -1,11 +1,12 @@ var foo = { a: 4 }; - foo.b = cat(); + function cat() { return bar(); } + function bar() { console.log(foo); return 0; diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/last-expr-stmt/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/last-expr-stmt/expected.js index 706cbb07c..a316e9064 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/last-expr-stmt/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/last-expr-stmt/expected.js @@ -1,5 +1,4 @@ const foo = { a: 42 }; - console.log(foo); \ No newline at end of file diff --git a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/set-add/expected.js b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/set-add/expected.js index c6d0ad546..678b2b6b0 100644 --- a/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/set-add/expected.js +++ b/packages/babel-plugin-transform-inline-consecutive-adds/__tests__/fixtures/set-add/expected.js @@ -1,4 +1,2 @@ var foo = new Set([1, 2, 3]); - - var bar = new Set([1, 2, 3]); \ No newline at end of file diff --git a/packages/babel-plugin-transform-inline-environment-variables/README.md b/packages/babel-plugin-transform-inline-environment-variables/README.md index b9e708980..9525f008c 100644 --- a/packages/babel-plugin-transform-inline-environment-variables/README.md +++ b/packages/babel-plugin-transform-inline-environment-variables/README.md @@ -56,7 +56,7 @@ babel --plugins transform-inline-environment-variables script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-inline-environment-variables"] }); ``` diff --git a/packages/babel-plugin-transform-member-expression-literals/README.md b/packages/babel-plugin-transform-member-expression-literals/README.md index 97ad382ce..5b01f963f 100644 --- a/packages/babel-plugin-transform-member-expression-literals/README.md +++ b/packages/babel-plugin-transform-member-expression-literals/README.md @@ -49,7 +49,7 @@ babel --plugins transform-member-expression-literals script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-member-expression-literals"] }); ``` diff --git a/packages/babel-plugin-transform-merge-sibling-variables/README.md b/packages/babel-plugin-transform-merge-sibling-variables/README.md index 24a619ff7..d08072a7f 100644 --- a/packages/babel-plugin-transform-merge-sibling-variables/README.md +++ b/packages/babel-plugin-transform-merge-sibling-variables/README.md @@ -54,7 +54,7 @@ babel --plugins transform-merge-sibling-variables script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-merge-sibling-variables"] }); ``` diff --git a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/block-scoped-for/expected.js b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/block-scoped-for/expected.js index 86890ac6b..9eb0077c4 100644 --- a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/block-scoped-for/expected.js +++ b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/block-scoped-for/expected.js @@ -1,5 +1,7 @@ let i = 0; + for (let x = 0; x < 10; x++) console.log(i + x); const j = 0; + for (const x = 0;;) console.log(j + x); \ No newline at end of file diff --git a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var-for-loop/expected.js b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var-for-loop/expected.js index ba12d4ebf..917e276a0 100644 --- a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var-for-loop/expected.js +++ b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var-for-loop/expected.js @@ -1,2 +1 @@ - for (var i = 0, j = 0, x = 0; x < 10; x++) console.log(i + x); \ No newline at end of file diff --git a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-destructuring-var/expected.js b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-destructuring-var/expected.js index fd02755a4..2431b7c99 100644 --- a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-destructuring-var/expected.js +++ b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-destructuring-var/expected.js @@ -1,6 +1,9 @@ for (var i = 0; i < 0; i++) { var [j] = jj(); } + for (var i = 0; i < 0; i++) { - var { j } = jj(); + var { + j + } = jj(); } \ No newline at end of file diff --git a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-no-loop-intializer/expected.js b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-no-loop-intializer/expected.js index 127ace573..ed53e60cb 100644 --- a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-no-loop-intializer/expected.js +++ b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-no-loop-intializer/expected.js @@ -1,2 +1,3 @@ for (;;) {} + for (;;) var i = 0; \ No newline at end of file diff --git a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-var-declars/expected.js b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-var-declars/expected.js index a5b9bc324..9552ff906 100644 --- a/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-var-declars/expected.js +++ b/packages/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-var-declars/expected.js @@ -1,4 +1,5 @@ for (var i = 0, j; i < 0; i++) { j = jj(); } + for (var i = 0, j;;) j = 0; \ No newline at end of file diff --git a/packages/babel-plugin-transform-minify-booleans/README.md b/packages/babel-plugin-transform-minify-booleans/README.md index 4345893e0..a7d8370f4 100644 --- a/packages/babel-plugin-transform-minify-booleans/README.md +++ b/packages/babel-plugin-transform-minify-booleans/README.md @@ -45,7 +45,7 @@ babel --plugins transform-minify-booleans script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-minify-booleans"] }); ``` diff --git a/packages/babel-plugin-transform-node-env-inline/README.md b/packages/babel-plugin-transform-node-env-inline/README.md index 7d86ddb8d..7cd97545a 100644 --- a/packages/babel-plugin-transform-node-env-inline/README.md +++ b/packages/babel-plugin-transform-node-env-inline/README.md @@ -50,7 +50,7 @@ babel --plugins transform-node-env-inline script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-node-env-inline"] }); ``` diff --git a/packages/babel-plugin-transform-property-literals/README.md b/packages/babel-plugin-transform-property-literals/README.md index 39f20d8fc..e8ecd20fd 100644 --- a/packages/babel-plugin-transform-property-literals/README.md +++ b/packages/babel-plugin-transform-property-literals/README.md @@ -11,7 +11,7 @@ var foo = { // changed "bar": function () {}, "1": function () {}, - + // not changed "default": 1, [a]: 2, @@ -59,7 +59,7 @@ babel --plugins transform-property-literals script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-property-literals"] }); ``` diff --git a/packages/babel-plugin-transform-property-literals/__tests__/fixtures/es5-unicode-property/expected.js b/packages/babel-plugin-transform-property-literals/__tests__/fixtures/es5-unicode-property/expected.js index 822cd5577..b17f0297d 100644 --- a/packages/babel-plugin-transform-property-literals/__tests__/fixtures/es5-unicode-property/expected.js +++ b/packages/babel-plugin-transform-property-literals/__tests__/fixtures/es5-unicode-property/expected.js @@ -1,6 +1,5 @@ // FIXME: The test name states that the property names should be transformed, // but the `12e34` one isn’t transformed in the test - // prettier-ignore ({ ಠ_ಠ: "bar", diff --git a/packages/babel-plugin-transform-property-literals/__tests__/fixtures/strip-quotes/expected.js b/packages/babel-plugin-transform-property-literals/__tests__/fixtures/strip-quotes/expected.js index 13e7148e7..c814436ae 100644 --- a/packages/babel-plugin-transform-property-literals/__tests__/fixtures/strip-quotes/expected.js +++ b/packages/babel-plugin-transform-property-literals/__tests__/fixtures/strip-quotes/expected.js @@ -1,2 +1,6 @@ // prettier-ignore -var x = { foo: "bar", 1: "baz", test: null }; \ No newline at end of file +var x = { + foo: "bar", + 1: "baz", + test: null +}; \ No newline at end of file diff --git a/packages/babel-plugin-transform-regexp-constructors/README.md b/packages/babel-plugin-transform-regexp-constructors/README.md index 3eb2c9460..81249830a 100644 --- a/packages/babel-plugin-transform-regexp-constructors/README.md +++ b/packages/babel-plugin-transform-regexp-constructors/README.md @@ -45,7 +45,7 @@ babel --plugins transform-regexp-constructors script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-regexp-constructors"] }); ``` diff --git a/packages/babel-plugin-transform-remove-console/README.md b/packages/babel-plugin-transform-remove-console/README.md index e83975b84..d20002e8c 100644 --- a/packages/babel-plugin-transform-remove-console/README.md +++ b/packages/babel-plugin-transform-remove-console/README.md @@ -51,7 +51,7 @@ babel --plugins transform-remove-console script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-remove-console"] }); ``` diff --git a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/bound-excludes/expected.js b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/bound-excludes/expected.js index 12267be31..52d37513b 100644 --- a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/bound-excludes/expected.js +++ b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/bound-excludes/expected.js @@ -1,5 +1,6 @@ function foo() { const a = function () {}; + a(); const b = console.error.bind(console); b("asdf"); diff --git a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/local-binding/expected.js b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/local-binding/expected.js index 26c59ac95..e8139ddc3 100644 --- a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/local-binding/expected.js +++ b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/local-binding/expected.js @@ -2,9 +2,14 @@ function foo(console) { console.foo("hi"); const bar = console.foo.bind(console); } + function bar(a) { - const { console } = a; + const { + console + } = a; + a.b = console => console.bar("bar"); + if (console.foo.call(console, "bar")) { return; } diff --git a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-assignment-no-op/expected.js b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-assignment-no-op/expected.js index 8cc5f973f..7214ed086 100644 --- a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-assignment-no-op/expected.js +++ b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-assignment-no-op/expected.js @@ -1,4 +1,5 @@ function foo() { console.foo = function () {}; + console.error = function () {}; } \ No newline at end of file diff --git a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-no-op/expected.js b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-no-op/expected.js index cb22ebcca..7aa90a724 100644 --- a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-no-op/expected.js +++ b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/member-expr-no-op/expected.js @@ -1,8 +1,12 @@ const a = function () {}; + a(); + const b = function () {}; + b("asdf"); var x = function () {} ? void 0 : foo(); + function foo() { if (function () {}) {} } \ No newline at end of file diff --git a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/replace-with-empty-block/expected.js b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/replace-with-empty-block/expected.js index 0547a38c7..b0f7fa1a9 100644 --- a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/replace-with-empty-block/expected.js +++ b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/replace-with-empty-block/expected.js @@ -1,6 +1,11 @@ if (blah) {} + for (;;) {} + for (var blah in []) {} + for (var blah of []) {} + while (blah) {} + do {} while (blah); \ No newline at end of file diff --git a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/top-level-stmts/expected.js b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/top-level-stmts/expected.js index 2f13a633d..3d4b14b5d 100644 --- a/packages/babel-plugin-transform-remove-console/__tests__/fixtures/top-level-stmts/expected.js +++ b/packages/babel-plugin-transform-remove-console/__tests__/fixtures/top-level-stmts/expected.js @@ -1,2 +1 @@ - blah(); \ No newline at end of file diff --git a/packages/babel-plugin-transform-remove-debugger/README.md b/packages/babel-plugin-transform-remove-debugger/README.md index 50d67d050..db797dbcc 100644 --- a/packages/babel-plugin-transform-remove-debugger/README.md +++ b/packages/babel-plugin-transform-remove-debugger/README.md @@ -42,7 +42,7 @@ babel --plugins transform-remove-debugger script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-remove-debugger"] }); ``` diff --git a/packages/babel-plugin-transform-remove-debugger/__tests__/fixtures/empty-block/expected.js b/packages/babel-plugin-transform-remove-debugger/__tests__/fixtures/empty-block/expected.js index 0547a38c7..b0f7fa1a9 100644 --- a/packages/babel-plugin-transform-remove-debugger/__tests__/fixtures/empty-block/expected.js +++ b/packages/babel-plugin-transform-remove-debugger/__tests__/fixtures/empty-block/expected.js @@ -1,6 +1,11 @@ if (blah) {} + for (;;) {} + for (var blah in []) {} + for (var blah of []) {} + while (blah) {} + do {} while (blah); \ No newline at end of file diff --git a/packages/babel-plugin-transform-remove-undefined/README.md b/packages/babel-plugin-transform-remove-undefined/README.md index 32f7f5a52..b356cc1cc 100644 --- a/packages/babel-plugin-transform-remove-undefined/README.md +++ b/packages/babel-plugin-transform-remove-undefined/README.md @@ -53,7 +53,7 @@ babel --plugins babel-plugin-transform-remove-undefined script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["babel-plugin-transform-remove-undefined"] }); ``` diff --git a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/lval-ref-fn-decl/expected.js b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/lval-ref-fn-decl/expected.js index 5206ba088..42a6e40de 100644 --- a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/lval-ref-fn-decl/expected.js +++ b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/lval-ref-fn-decl/expected.js @@ -2,6 +2,7 @@ function foo() { bar(); var x = undefined; console.log(x); + function bar() { x = 3; } diff --git a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/mutually-recursive/expected.js b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/mutually-recursive/expected.js index 9b3ee39d4..c184792eb 100644 --- a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/mutually-recursive/expected.js +++ b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/mutually-recursive/expected.js @@ -1,9 +1,11 @@ function foo() { a(); var c = undefined; + function a() { b(); } + function b() { a(); c = 3; diff --git a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/not-referenced/expected.js b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/not-referenced/expected.js index 552cc3710..4577d1792 100644 --- a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/not-referenced/expected.js +++ b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/not-referenced/expected.js @@ -2,6 +2,7 @@ function foo() { var x; bar(); console.log(x); + function bar() { x = 3; } diff --git a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/referenced-vars-nested/expected.js b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/referenced-vars-nested/expected.js index c6ab312a9..75b3cd594 100644 --- a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/referenced-vars-nested/expected.js +++ b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/referenced-vars-nested/expected.js @@ -1,4 +1,7 @@ function foo() { aa = 3; - var { a: aa, b: bb } = undefined; + var { + a: aa, + b: bb + } = undefined; } \ No newline at end of file diff --git a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/sequence-expr-last-undef/expected.js b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/sequence-expr-last-undef/expected.js index aa2c8d11d..d874faa63 100644 --- a/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/sequence-expr-last-undef/expected.js +++ b/packages/babel-plugin-transform-remove-undefined/__tests__/fixtures/sequence-expr-last-undef/expected.js @@ -1,6 +1,7 @@ if (foo.bar(), void 0) { foo.baz(); } + function bar() { return a.b(), void 0; } \ No newline at end of file diff --git a/packages/babel-plugin-transform-simplify-comparison-operators/README.md b/packages/babel-plugin-transform-simplify-comparison-operators/README.md index 1144d9cef..3aed38eb9 100644 --- a/packages/babel-plugin-transform-simplify-comparison-operators/README.md +++ b/packages/babel-plugin-transform-simplify-comparison-operators/README.md @@ -43,7 +43,7 @@ babel --plugins transform-simplify-comparison-operators script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-simplify-comparison-operators"] }); ``` diff --git a/packages/babel-plugin-transform-undefined-to-void/README.md b/packages/babel-plugin-transform-undefined-to-void/README.md index 3eff783e2..a71e22c88 100644 --- a/packages/babel-plugin-transform-undefined-to-void/README.md +++ b/packages/babel-plugin-transform-undefined-to-void/README.md @@ -45,7 +45,7 @@ babel --plugins transform-undefined-to-void script.js ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { plugins: ["transform-undefined-to-void"] }); ``` diff --git a/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/basic/expected.js b/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/basic/expected.js index 258854821..47b0a3938 100644 --- a/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/basic/expected.js +++ b/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/basic/expected.js @@ -1 +1,2 @@ -var foo;foo === void 0; \ No newline at end of file +var foo; +foo === void 0; \ No newline at end of file diff --git a/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/member-expression/expected.js b/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/member-expression/expected.js index e8a829d60..1001d9667 100644 --- a/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/member-expression/expected.js +++ b/packages/babel-plugin-transform-undefined-to-void/__tests__/fixtures/member-expression/expected.js @@ -1 +1,2 @@ -var foo;foo === (void 0).foo; \ No newline at end of file +var foo; +foo === (void 0).foo; \ No newline at end of file diff --git a/packages/babel-preset-minify/README.md b/packages/babel-preset-minify/README.md index 5ebef54f7..957383e77 100644 --- a/packages/babel-preset-minify/README.md +++ b/packages/babel-preset-minify/README.md @@ -49,7 +49,7 @@ babel script.js --presets minify ### Via Node API ```javascript -require("babel-core").transform("code", { +require("@babel/core").transform("code", { presets: ["minify"] }); ``` diff --git a/packages/babel-preset-minify/__tests__/babili-es2015-tests.js b/packages/babel-preset-minify/__tests__/minify-env-tests.js similarity index 83% rename from packages/babel-preset-minify/__tests__/babili-es2015-tests.js rename to packages/babel-preset-minify/__tests__/minify-env-tests.js index b09b3f6ff..8f1f5a24e 100644 --- a/packages/babel-preset-minify/__tests__/babili-es2015-tests.js +++ b/packages/babel-preset-minify/__tests__/minify-env-tests.js @@ -1,44 +1,41 @@ jest.autoMockOff(); -const es2015 = require("babel-preset-es2015"); +const envPreset = require("@babel/preset-env"); const minifyPreset = require("../src/index"); const thePlugin = require("test-transform")(null, { plugins: [], minified: false, - presets: [minifyPreset, es2015] + presets: [minifyPreset, envPreset] }); -describe("preset along with es2015", () => { +describe("preset along with env", () => { thePlugin( "should fix issue #630", ` - const obj = {cat: 'dog'}; - let cat; - ({cat} = obj); - `, + const obj = {cat: 'dog'}; + let cat; + ({cat} = obj); + `, + ` + var cat, + obj = { + cat: 'dog' + }, + _obj = obj; + cat = _obj.cat, _obj; ` - 'use strict'; - - var cat, - obj = { cat: 'dog' }, - _obj = obj; - cat = _obj.cat, _obj; - ` ); thePlugin( - "should fix simplify with es2015 - issue#632", + "should fix simplify with env - issue#632", ` let obj, key; if (1) ({k: key} = obj); foo(); `, ` - "use strict"; - - var obj, - key = void 0; + var obj, key; key = obj.k, foo(); ` ); @@ -53,8 +50,6 @@ describe("preset along with es2015", () => { } `, ` - "use strict"; - function _classCallCheck(a, b) { if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); } function a() { @@ -77,10 +72,9 @@ describe("preset along with es2015", () => { } `, ` - "use strict"; - function getSum(a) { for (var b = 0, c = 0; c < a.length; c++) b += a[c]; + return b; } ` @@ -101,8 +95,6 @@ describe("preset along with es2015", () => { }); `, ` - "use strict"; - for (var tabs = [1, 2, 3, 4, 5], tabIdx = 0, i = 0; i < tabs.length; i++); console.log({ @@ -128,8 +120,6 @@ describe("preset along with es2015", () => { } `, ` - 'use strict'; - { var count = 0; setInterval(function () { @@ -161,10 +151,7 @@ describe("preset along with es2015", () => { } `, ` - 'use strict'; - function test() { - for (var a = ['a', 'b', 'c'], b = a.length, c = null, d = 0; d < b; d++) c = a[d]; return c || {}; diff --git a/packages/babel-preset-minify/__tests__/preset-tests.js b/packages/babel-preset-minify/__tests__/preset-tests.js index ddf000d5f..72cb3b447 100644 --- a/packages/babel-preset-minify/__tests__/preset-tests.js +++ b/packages/babel-preset-minify/__tests__/preset-tests.js @@ -83,6 +83,7 @@ describe("preset", () => { `, ` function a() {} + a(); ` ); @@ -121,8 +122,15 @@ describe("preset", () => { ` function a() { let a, b, c; - - return ({ foo: a, bar: b, baz: c } = {}), { foo: a, bar: b, baz: c }; + return ({ + foo: a, + bar: b, + baz: c + } = {}), { + foo: a, + bar: b, + baz: c + }; } ` ); @@ -137,7 +145,6 @@ describe("preset", () => { ` (function () { var a = Math.pi; - return [a, a]; })(); ` diff --git a/packages/gulp-babel-minify/README.md b/packages/gulp-babel-minify/README.md index 1dd3b6c07..0954e5c42 100644 --- a/packages/gulp-babel-minify/README.md +++ b/packages/gulp-babel-minify/README.md @@ -37,5 +37,5 @@ These are passed on to the minify preset. Refer https://github.com/babel/minify/ Default: `{}` -+ `babel`: Use a custom `babel-core` ++ `babel`: Use a custom `@babel/core` + `minifyPreset`: Use a custom `babel-preset-minify` diff --git a/packages/gulp-babel-minify/__tests__/__snapshots__/gulp-babili-test.js.snap b/packages/gulp-babel-minify/__tests__/__snapshots__/gulp-babili-test.js.snap index c15682ab8..3d33d96eb 100644 --- a/packages/gulp-babel-minify/__tests__/__snapshots__/gulp-babili-test.js.snap +++ b/packages/gulp-babel-minify/__tests__/__snapshots__/gulp-babili-test.js.snap @@ -12,6 +12,6 @@ exports[`gulp-babel-minify comments should remove comments by default except lic exports[`gulp-babel-minify comments should take a custom function 1`] = `"function foo(){}bar();/* YAC - yet another comment */var a=baz();"`; exports[`gulp-babel-minify should remove comments while doing DCE and simplify 1`] = ` -"var a=function(){(function(){foo(),bar(),baz();// comments should be optimized away -})()};" +"var a=function(){(function(){// comments should be optimized away +foo(),bar(),baz()})()};" `; diff --git a/packages/gulp-babel-minify/__tests__/gulp-babili-test.js b/packages/gulp-babel-minify/__tests__/gulp-babili-test.js index 53fb7754a..d8d04e322 100644 --- a/packages/gulp-babel-minify/__tests__/gulp-babili-test.js +++ b/packages/gulp-babel-minify/__tests__/gulp-babili-test.js @@ -1,7 +1,7 @@ jest.autoMockOff(); -const gutil = require("gulp-util"); -const babelCore = require("babel-core"); +const File = require("vinyl"); +const babelCore = require("@babel/core"); const minifyPreset = require("babel-preset-minify"); const unpad = require("unpad"); @@ -27,7 +27,7 @@ describe("gulp-babel-minify", () => { stream.on("error", reject); stream.write( - new gutil.File({ + new File({ path: "defaults.js", contents: new Buffer(source) }) @@ -59,7 +59,7 @@ describe("gulp-babel-minify", () => { stream.on("error", reject); stream.write( - new gutil.File({ + new File({ path: "options.js", contents: new Buffer(source) }) @@ -101,7 +101,7 @@ describe("gulp-babel-minify", () => { stream.on("error", reject); stream.write( - new gutil.File({ + new File({ path: "custom-transformers.js", contents: new Buffer("foo()") }) @@ -127,7 +127,7 @@ describe("gulp-babel-minify", () => { let file; beforeEach(() => { - file = new gutil.File({ + file = new File({ path: "comments.js", contents: new Buffer(source) }); @@ -223,7 +223,7 @@ describe("gulp-babel-minify", () => { stream.on("error", reject); stream.write( - new gutil.File({ + new File({ path: "options.js", contents: new Buffer(source) }) diff --git a/packages/gulp-babel-minify/package.json b/packages/gulp-babel-minify/package.json index 1e4d1dc7f..97a7f983e 100644 --- a/packages/gulp-babel-minify/package.json +++ b/packages/gulp-babel-minify/package.json @@ -13,9 +13,9 @@ "main": "lib/index.js", "repository": "https://github.com/babel/minify/tree/master/packages/gulp-babel-minify", "dependencies": { - "babel-core": "^6.26.0", + "@babel/core": "7.0.0-beta.40", "babel-preset-minify": "^0.3.0", - "plugin-error": "^0.1.2", + "plugin-error": "^1.0.1", "through2": "^2.0.3", "vinyl-sourcemaps-apply": "^0.2.1" } diff --git a/packages/gulp-babel-minify/src/index.js b/packages/gulp-babel-minify/src/index.js index f85f247a1..7806cb257 100644 --- a/packages/gulp-babel-minify/src/index.js +++ b/packages/gulp-babel-minify/src/index.js @@ -1,4 +1,4 @@ -const babelCore = require("babel-core"); +const babelCore = require("@babel/core"); const through2 = require("through2"); const PluginError = require("plugin-error"); const applySourceMap = require("vinyl-sourcemaps-apply"); diff --git a/scripts/benchmark.js b/scripts/benchmark.js index 507a6728e..7517815c5 100755 --- a/scripts/benchmark.js +++ b/scripts/benchmark.js @@ -9,7 +9,7 @@ const CLITable = require("cli-table"); const child = require("child_process"); const bytes = require("bytes"); const chalk = require("chalk"); -const babel = require("babel-core"); +const babel = require("@babel/core"); const zlib = require("zlib"); const fs = require("fs"); const path = require("path"); diff --git a/scripts/plugin-contribution.js b/scripts/plugin-contribution.js index 21aa295ee..5715602fd 100755 --- a/scripts/plugin-contribution.js +++ b/scripts/plugin-contribution.js @@ -2,7 +2,7 @@ const fs = require("fs"); const path = require("path"); -const { transform } = require("babel-core"); +const { transform } = require("@babel/core"); const Table = require("cli-table"); const zlib = require("zlib"); const chalk = require("chalk"); diff --git a/scripts/plugin-timing.js b/scripts/plugin-timing.js index e66ee1831..3124d0230 100755 --- a/scripts/plugin-timing.js +++ b/scripts/plugin-timing.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -const babel = require("babel-core"); +const babel = require("@babel/core"); const preset = require("../packages/babel-preset-minify"); const fs = require("fs"); const Table = require("cli-table"); diff --git a/smoke/run.js b/smoke/run.js index 69115c3b4..9fcbe59f0 100644 --- a/smoke/run.js +++ b/smoke/run.js @@ -73,7 +73,7 @@ run(); // const otherTests = [ // { // dir: "babel", -// files: "packages/babel-core/src/helpers/resolve.js", +// files: "packages/@babel/core/src/helpers/resolve.js", // build: "make bootstrap", // test: "make test-only", // babelOptions: { diff --git a/smoke/smoke-test.js b/smoke/smoke-test.js index 33c352a44..3e1a4cff3 100644 --- a/smoke/smoke-test.js +++ b/smoke/smoke-test.js @@ -1,7 +1,7 @@ const { exec } = require("child_process"); const fs = require("fs"); const path = require("path"); -const babel = require("babel-core"); +const babel = require("@babel/core"); const chalk = require("chalk"); const glob = require("glob"); const minifyPreset = require("../packages/babel-preset-minify"); diff --git a/utils/test-runner/src/index.js b/utils/test-runner/src/index.js index 760d0cadb..91a5182a2 100644 --- a/utils/test-runner/src/index.js +++ b/utils/test-runner/src/index.js @@ -2,31 +2,48 @@ jest.setTimeout(25000); const fs = require("./fs"); const path = require("path"); -const babel = require("babel-core"); +const babel = require("@babel/core"); const parseArgs = require("./argParser"); +/** + * Jest changes __dirname to relative path and the require of relative path + * that doesn't start with "." will be a module require - + * + * require("./packages/babel-plugin...") vs require("packages/babel-plugin.."); + * + * So we start the path with a "./" + */ +function pathJoin(...parts) { + if (path.isAbsolute(parts[0])) { + return path.join(...parts); + } + return "." + path.sep + path.join(...parts); +} + function testRunner(dir) { - const pkgDir = path.join(dir, "../"); + const pkgDir = pathJoin(dir, "../"); + const packageJson = JSON.parse( - fs.readFileSync(path.join(pkgDir, "package.json")) + fs.readFileSync(pathJoin(pkgDir, "package.json")) ); const pkgName = packageJson.name; - const fixturesDir = path.join(pkgDir, "__tests__/fixtures"); + const fixturesDir = pathJoin(pkgDir, "__tests__/fixtures"); const fixtures = fs .readdirSync(fixturesDir) - .filter(dir => fs.isDirectorySync(path.join(fixturesDir, dir))); + .filter(dir => fs.isDirectorySync(pathJoin(fixturesDir, dir))); const flags = parseArgs(process.argv); const updateFixtures = Boolean(flags["update-fixtures"]); describe(pkgName, () => { for (const fixture of fixtures) { - const actualFile = path.join(fixturesDir, fixture, "actual.js"); - const expectedFile = path.join(fixturesDir, fixture, "expected.js"); - const skipFile = path.join(fixturesDir, fixture, "skip"); - const optionsFile = path.join(fixturesDir, fixture, "options.json"); + const actualFile = pathJoin(fixturesDir, fixture, "actual.js"); + const expectedFile = pathJoin(fixturesDir, fixture, "expected.js"); + const skipFile = pathJoin(fixturesDir, fixture, "skip"); + const optionsFile = pathJoin(fixturesDir, fixture, "options.json"); + const babelOptionsFile = pathJoin(fixturesDir, fixture, "babel.json"); if (fs.isFileSync(skipFile)) { test.skip(fixture, () => {}); @@ -41,11 +58,20 @@ function testRunner(dir) { options = JSON.parse(await fs.readFile(optionsFile)); } - const pluginPath = path.join(pkgDir, "src/index.js"); + let babelOpts = {}; + if (await fs.isFile(babelOptionsFile)) { + babelOpts = JSON.parse(await fs.readFile(babelOptionsFile)); + } + + const currentPlugin = pathJoin(pkgDir, "src/index.js"); + + if (Array.isArray(babelOpts.plugins)) { + babelOpts.plugins = [[currentPlugin, options], ...babelOpts.plugins]; + } else { + babelOpts.plugins = [[currentPlugin, options]]; + } - const actualTransformed = babel.transform(actual, { - plugins: [[pluginPath, options]] - }).code; + const actualTransformed = babel.transform(actual, babelOpts).code; if (!await fs.isFile(expectedFile)) { await fs.writeFile(expectedFile, actualTransformed); diff --git a/utils/test-transform/src/test-transform.js b/utils/test-transform/src/test-transform.js index e7ab0d267..1050b27c6 100644 --- a/utils/test-transform/src/test-transform.js +++ b/utils/test-transform/src/test-transform.js @@ -1,4 +1,4 @@ -const babel = require("babel-core"); +const babel = require("@babel/core"); const unpad = require("unpad"); diff --git a/yarn.lock b/yarn.lock index d9bc0ab08..3744e09dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,11 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz#473d021ecc573a2cce1c07d5b509d5215f46ba35" +"@babel/code-frame@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + "@babel/highlight" "7.0.0-beta.40" "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.35" @@ -18,46 +16,428 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/helper-function-name@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.31.tgz#afe63ad799209989348b1109b44feb66aa245f57" +"@babel/core@7.0.0-beta.40", "@babel/core@^7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.40.tgz#455464dd81d499fd97d32b473f0331f74379a33f" + dependencies: + "@babel/code-frame" "7.0.0-beta.40" + "@babel/generator" "7.0.0-beta.40" + "@babel/helpers" "7.0.0-beta.40" + "@babel/template" "7.0.0-beta.40" + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + babylon "7.0.0-beta.40" + convert-source-map "^1.1.0" + debug "^3.0.1" + json5 "^0.5.0" + lodash "^4.2.0" + micromatch "^2.3.11" + resolve "^1.3.2" + source-map "^0.5.0" + +"@babel/generator@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.40.tgz#ab61f9556f4f71dbd1138949c795bb9a21e302ea" + dependencies: + "@babel/types" "7.0.0-beta.40" + jsesc "^2.5.1" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-annotate-as-pure@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.40.tgz#095dd4c70b231eba17ebf61c3434e6f9d71bd574" + dependencies: + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-beta.40.tgz#bec4240c95d8b646812c5d4ac536a5579dbcdd53" + dependencies: + "@babel/helper-explode-assignable-expression" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-call-delegate@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-beta.40.tgz#5d5000d0bf76c68ee6866961e0b7eb6e9ed52438" + dependencies: + "@babel/helper-hoist-variables" "7.0.0-beta.40" + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-define-map@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0-beta.40.tgz#ad64c548dd98e7746305852f113ed04dc74329c0" + dependencies: + "@babel/helper-function-name" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + lodash "^4.2.0" + +"@babel/helper-explode-assignable-expression@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-beta.40.tgz#0ef579288d894a987c60bf0577c074ad18cfa9dd" + dependencies: + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-function-name@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.40.tgz#9d033341ab16517f40d43a73f2d81fc431ccd7b6" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.40" + "@babel/template" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-get-function-arity@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz#ac0419cf067b0ec16453e1274f03878195791c6e" + dependencies: + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-hoist-variables@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.40.tgz#59d47fd133782d60db89af0d18083ad3c9f4801c" dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.31" - "@babel/template" "7.0.0-beta.31" - "@babel/traverse" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.40" -"@babel/helper-get-function-arity@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.31.tgz#1176d79252741218e0aec872ada07efb2b37a493" +"@babel/helper-module-imports@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.40.tgz#251cbb6404599282e8f7356a5b32c9381bef5d2d" dependencies: - "@babel/types" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.40" + lodash "^4.2.0" + +"@babel/helper-module-transforms@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.40.tgz#e5240afd47bd98f6ae65874b9ae508533abfee76" + dependencies: + "@babel/helper-module-imports" "7.0.0-beta.40" + "@babel/helper-simple-access" "7.0.0-beta.40" + "@babel/template" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + lodash "^4.2.0" + +"@babel/helper-optimise-call-expression@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-beta.40.tgz#f0e7f70d455bff8ab6a248a84f0221098fa468ac" + dependencies: + "@babel/types" "7.0.0-beta.40" -"@babel/template@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.31.tgz#577bb29389f6c497c3e7d014617e7d6713f68bda" +"@babel/helper-regex@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0-beta.40.tgz#b47018ecca8ff66bb390c34a95ff71bc01495833" dependencies: - "@babel/code-frame" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" - babylon "7.0.0-beta.31" lodash "^4.2.0" -"@babel/traverse@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.31.tgz#db399499ad74aefda014f0c10321ab255134b1df" +"@babel/helper-remap-async-to-generator@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-beta.40.tgz#33414d1cc160ebf0991ebc60afebe36b08feae05" + dependencies: + "@babel/helper-annotate-as-pure" "7.0.0-beta.40" + "@babel/helper-wrap-function" "7.0.0-beta.40" + "@babel/template" "7.0.0-beta.40" + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-replace-supers@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-beta.40.tgz#2ab0c9e7fa17d313745f1634ce6b7bccaa5dd5fe" + dependencies: + "@babel/helper-optimise-call-expression" "7.0.0-beta.40" + "@babel/template" "7.0.0-beta.40" + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helper-simple-access@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.40.tgz#018f765090a3d25153778958969f235dc6ce5b57" dependencies: - "@babel/code-frame" "7.0.0-beta.31" - "@babel/helper-function-name" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" - babylon "7.0.0-beta.31" + "@babel/template" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + lodash "^4.2.0" + +"@babel/helper-wrap-function@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.40.tgz#4db4630cdaf4fd47fa2c45b5b7a9ecc33ff3f2be" + dependencies: + "@babel/helper-function-name" "7.0.0-beta.40" + "@babel/template" "7.0.0-beta.40" + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/helpers@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.40.tgz#82f8e144f56b2896b1d624ca88ac4603023ececd" + dependencies: + "@babel/template" "7.0.0-beta.40" + "@babel/traverse" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + +"@babel/highlight@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/plugin-proposal-async-generator-functions@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.0.0-beta.40.tgz#64f4aebc3fff33d2ae8f0a0870f0dfe2ff6815d6" + dependencies: + "@babel/helper-remap-async-to-generator" "7.0.0-beta.40" + "@babel/plugin-syntax-async-generators" "7.0.0-beta.40" + +"@babel/plugin-proposal-object-rest-spread@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0-beta.40.tgz#ce35d2240908e52706a612eb26d67db667cd700f" + dependencies: + "@babel/plugin-syntax-object-rest-spread" "7.0.0-beta.40" + +"@babel/plugin-proposal-optional-catch-binding@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0-beta.40.tgz#e76ddcb21880eea0225f1dcde20a5e97ca85fd39" + dependencies: + "@babel/plugin-syntax-optional-catch-binding" "7.0.0-beta.40" + +"@babel/plugin-proposal-unicode-property-regex@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0-beta.40.tgz#1fb2c29c8bd88d5fff82ec080dbe24e7126ec460" + dependencies: + "@babel/helper-regex" "7.0.0-beta.40" + regexpu-core "^4.1.3" + +"@babel/plugin-syntax-async-generators@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0-beta.40.tgz#6c45889569add3b3721cc9a481ae99906f240874" + +"@babel/plugin-syntax-object-rest-spread@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0-beta.40.tgz#d5e04536062e4df685c203ae48bb19bfe2cf235c" + +"@babel/plugin-syntax-optional-catch-binding@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0-beta.40.tgz#2e3de0919d05136bb658172ef9ba9ef7e84bce9e" + +"@babel/plugin-transform-arrow-functions@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-beta.40.tgz#0842045b16835d6da0c334d0b09d575852f27962" + +"@babel/plugin-transform-async-to-generator@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.0.0-beta.40.tgz#9195e2473a435b9a9aabc0b64572e9d1ec1c57cb" + dependencies: + "@babel/helper-module-imports" "7.0.0-beta.40" + "@babel/helper-remap-async-to-generator" "7.0.0-beta.40" + +"@babel/plugin-transform-block-scoped-functions@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0-beta.40.tgz#491e61f860cabe69379233983fe7ca14f879e41f" + +"@babel/plugin-transform-block-scoping@7.0.0-beta.40", "@babel/plugin-transform-block-scoping@^7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-beta.40.tgz#23197ee6f696b7e5ace884f0dc5434df20d7dd97" + dependencies: + lodash "^4.2.0" + +"@babel/plugin-transform-classes@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-beta.40.tgz#c7a752009df4bb0f77179027daa0783f9a036b0b" + dependencies: + "@babel/helper-annotate-as-pure" "7.0.0-beta.40" + "@babel/helper-define-map" "7.0.0-beta.40" + "@babel/helper-function-name" "7.0.0-beta.40" + "@babel/helper-optimise-call-expression" "7.0.0-beta.40" + "@babel/helper-replace-supers" "7.0.0-beta.40" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-beta.40.tgz#e4bd53455d9f96882cc8e9923895d71690f6969e" + +"@babel/plugin-transform-destructuring@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-beta.40.tgz#503a4719eb9ed8c933b50d4ec3f106ed371852ee" + +"@babel/plugin-transform-dotall-regex@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0-beta.40.tgz#89b5ccff477624b97129f9a7e262a436437d7ae2" + dependencies: + "@babel/helper-regex" "7.0.0-beta.40" + regexpu-core "^4.1.3" + +"@babel/plugin-transform-duplicate-keys@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0-beta.40.tgz#91599be229d4409cf3c9bbd094fb04d354bd8068" + +"@babel/plugin-transform-exponentiation-operator@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-beta.40.tgz#bf0bafdd5aad7061c25dba25e29e12329838baeb" + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "7.0.0-beta.40" + +"@babel/plugin-transform-for-of@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-beta.40.tgz#67920d749bac4840ceeae9907d918dad33908244" + +"@babel/plugin-transform-function-name@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-beta.40.tgz#37b5ca4f90fba207d359c0be3af5bfecdc737a3d" + dependencies: + "@babel/helper-function-name" "7.0.0-beta.40" + +"@babel/plugin-transform-literals@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-beta.40.tgz#a6bf8808f97accf42a171b27a133802aa0650d3e" + +"@babel/plugin-transform-modules-amd@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-beta.40.tgz#1882f1a02b16d261a332c87c035c9aeefd402683" + dependencies: + "@babel/helper-module-transforms" "7.0.0-beta.40" + +"@babel/plugin-transform-modules-commonjs@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.40.tgz#a85f8c311f498a94a45531cc4ed5ff98b338a70a" + dependencies: + "@babel/helper-module-transforms" "7.0.0-beta.40" + "@babel/helper-simple-access" "7.0.0-beta.40" + +"@babel/plugin-transform-modules-systemjs@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0-beta.40.tgz#808b372bdbe06a28bf7a3870d8e810bd7298227a" + dependencies: + "@babel/helper-hoist-variables" "7.0.0-beta.40" + +"@babel/plugin-transform-modules-umd@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.0.0-beta.40.tgz#5bd4e395a2673e687ed592608ad2fd4883a5a119" + dependencies: + "@babel/helper-module-transforms" "7.0.0-beta.40" + +"@babel/plugin-transform-new-target@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0-beta.40.tgz#ee52bb87fbf325ac054811ec739b25fbce97809e" + +"@babel/plugin-transform-object-super@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0-beta.40.tgz#c64f9ba3587610d76c2edfdd8f507a59ea3ba63d" + dependencies: + "@babel/helper-replace-supers" "7.0.0-beta.40" + +"@babel/plugin-transform-parameters@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-beta.40.tgz#efa366fab0dcbd0221b46aa2662c324b4b414d1d" + dependencies: + "@babel/helper-call-delegate" "7.0.0-beta.40" + "@babel/helper-get-function-arity" "7.0.0-beta.40" + +"@babel/plugin-transform-regenerator@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-beta.40.tgz#f8a89ce89a0fae8e9cdfc2f2768104811517374a" + dependencies: + regenerator-transform "^0.12.3" + +"@babel/plugin-transform-shorthand-properties@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.40.tgz#421835237b0fcab0e67c941726d95dfc543514f4" + +"@babel/plugin-transform-spread@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.40.tgz#881578938e5750137301750bef7fdd0e01be76be" + +"@babel/plugin-transform-sticky-regex@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0-beta.40.tgz#5b44b31f8539fc66af18962e55752b82298032ee" + dependencies: + "@babel/helper-regex" "7.0.0-beta.40" + +"@babel/plugin-transform-template-literals@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-beta.40.tgz#5ef3377d1294aee39b913768a1f884806a45393b" + dependencies: + "@babel/helper-annotate-as-pure" "7.0.0-beta.40" + +"@babel/plugin-transform-typeof-symbol@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0-beta.40.tgz#67f0b8a5dd298b0aa5b347c3b6738c9c7baf1bcf" + +"@babel/plugin-transform-unicode-regex@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0-beta.40.tgz#a956187aad2965d7c095d64b1ae87eba10e0a2c6" + dependencies: + "@babel/helper-regex" "7.0.0-beta.40" + regexpu-core "^4.1.3" + +"@babel/preset-env@^7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.0.0-beta.40.tgz#713292f9e410f76b3f4301330756c89343c4b2e4" + dependencies: + "@babel/plugin-proposal-async-generator-functions" "7.0.0-beta.40" + "@babel/plugin-proposal-object-rest-spread" "7.0.0-beta.40" + "@babel/plugin-proposal-optional-catch-binding" "7.0.0-beta.40" + "@babel/plugin-proposal-unicode-property-regex" "7.0.0-beta.40" + "@babel/plugin-syntax-async-generators" "7.0.0-beta.40" + "@babel/plugin-syntax-object-rest-spread" "7.0.0-beta.40" + "@babel/plugin-syntax-optional-catch-binding" "7.0.0-beta.40" + "@babel/plugin-transform-arrow-functions" "7.0.0-beta.40" + "@babel/plugin-transform-async-to-generator" "7.0.0-beta.40" + "@babel/plugin-transform-block-scoped-functions" "7.0.0-beta.40" + "@babel/plugin-transform-block-scoping" "7.0.0-beta.40" + "@babel/plugin-transform-classes" "7.0.0-beta.40" + "@babel/plugin-transform-computed-properties" "7.0.0-beta.40" + "@babel/plugin-transform-destructuring" "7.0.0-beta.40" + "@babel/plugin-transform-dotall-regex" "7.0.0-beta.40" + "@babel/plugin-transform-duplicate-keys" "7.0.0-beta.40" + "@babel/plugin-transform-exponentiation-operator" "7.0.0-beta.40" + "@babel/plugin-transform-for-of" "7.0.0-beta.40" + "@babel/plugin-transform-function-name" "7.0.0-beta.40" + "@babel/plugin-transform-literals" "7.0.0-beta.40" + "@babel/plugin-transform-modules-amd" "7.0.0-beta.40" + "@babel/plugin-transform-modules-commonjs" "7.0.0-beta.40" + "@babel/plugin-transform-modules-systemjs" "7.0.0-beta.40" + "@babel/plugin-transform-modules-umd" "7.0.0-beta.40" + "@babel/plugin-transform-new-target" "7.0.0-beta.40" + "@babel/plugin-transform-object-super" "7.0.0-beta.40" + "@babel/plugin-transform-parameters" "7.0.0-beta.40" + "@babel/plugin-transform-regenerator" "7.0.0-beta.40" + "@babel/plugin-transform-shorthand-properties" "7.0.0-beta.40" + "@babel/plugin-transform-spread" "7.0.0-beta.40" + "@babel/plugin-transform-sticky-regex" "7.0.0-beta.40" + "@babel/plugin-transform-template-literals" "7.0.0-beta.40" + "@babel/plugin-transform-typeof-symbol" "7.0.0-beta.40" + "@babel/plugin-transform-unicode-regex" "7.0.0-beta.40" + browserslist "^3.0.0" + invariant "^2.2.2" + semver "^5.3.0" + +"@babel/template@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8" + dependencies: + "@babel/code-frame" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + babylon "7.0.0-beta.40" + lodash "^4.2.0" + +"@babel/traverse@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.40.tgz#d140e449b2e093ef9fe1a2eecc28421ffb4e521e" + dependencies: + "@babel/code-frame" "7.0.0-beta.40" + "@babel/generator" "7.0.0-beta.40" + "@babel/helper-function-name" "7.0.0-beta.40" + "@babel/types" "7.0.0-beta.40" + babylon "7.0.0-beta.40" debug "^3.0.1" - globals "^10.0.0" + globals "^11.1.0" invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@7.0.0-beta.31": - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4" +"@babel/types@7.0.0-beta.40": + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14" dependencies: esutils "^2.0.2" lodash "^4.2.0" @@ -154,6 +534,12 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" +ansi-colors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.0.1.tgz#e94c6c306005af8b482240241e2f3dea4b855ff3" + dependencies: + ansi-wrap "^0.1.0" + ansi-cyan@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" @@ -202,7 +588,7 @@ ansi-styles@^3.1.0, ansi-styles@^3.2.0: dependencies: color-convert "^1.9.0" -ansi-wrap@0.1.0: +ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -269,6 +655,10 @@ arr-diff@^2.0.0: dependencies: arr-flatten "^1.0.1" +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + arr-filter@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" @@ -289,9 +679,9 @@ arr-union@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d" -array-differ@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" array-each@^1.0.0, array-each@^1.0.1: version "1.0.1" @@ -336,7 +726,7 @@ array-union@^1.0.1: dependencies: array-uniq "^1.0.1" -array-uniq@^1.0.1, array-uniq@^1.0.2: +array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -360,6 +750,10 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" @@ -449,38 +843,9 @@ babel-core@^6.0.0, babel-core@^6.24.1: slash "^1.0.0" source-map "^0.5.0" -babel-core@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.7" - slash "^1.0.0" - source-map "^0.5.6" - -babel-eslint@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.3.tgz#f29ecf02336be438195325cd47c468da81ee4e98" - dependencies: - "@babel/code-frame" "7.0.0-beta.31" - "@babel/traverse" "7.0.0-beta.31" - "@babel/types" "7.0.0-beta.31" - babylon "7.0.0-beta.31" +babel-core@^7.0.0-bridge.0: + version "7.0.0-bridge.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" babel-generator@^6.18.0, babel-generator@^6.25.0: version "6.25.0" @@ -495,447 +860,51 @@ babel-generator@^6.18.0, babel-generator@^6.25.0: source-map "^0.5.0" trim-right "^1.0.1" -babel-generator@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.6" - trim-right "^1.0.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - lodash "^4.2.0" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - babel-helper-is-nodes-equiv@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz#34e9b300b1479ddd98ec77ea0bbe9342dfe39684" -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - lodash "^4.2.0" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - babel-helpers@^6.24.1: version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.0.3.tgz#c9d7a786c57ee94cee15b5826468fd55f69d4b4c" - dependencies: - babel-plugin-istanbul "^4.1.5" - babel-preset-jest "^22.0.3" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" - -babel-plugin-jest-hoist@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.0.3.tgz#62cde5fe962fd41ae89c119f481ca5cd7dd48bb4" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - -babel-plugin-syntax-object-rest-spread@^6.13.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - -babel-plugin-transform-async-to-generator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - lodash "^4.2.0" - -babel-plugin-transform-es2015-block-scoping@^6.24.1, babel-plugin-transform-es2015-block-scoping@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" dependencies: babel-runtime "^6.22.0" + babel-template "^6.24.1" -babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" +babel-jest@^22.2.2: + version "22.2.2" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.2.2.tgz#eda38dca284e32cc5257f96a9b51351975de4e04" dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" + babel-plugin-istanbul "^4.1.5" + babel-preset-jest "^22.2.0" -babel-plugin-transform-exponentiation-operator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^6.22.0" -babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" +babel-plugin-istanbul@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" dependencies: - regenerator-transform "0.9.11" + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.5" + test-exclude "^4.1.1" -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" +babel-plugin-jest-hoist@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.2.0.tgz#bd34f39d652406669713b8c89e23ef25c890b993" -babel-preset-env@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^2.1.2" - invariant "^2.2.2" - semver "^5.3.0" +babel-plugin-syntax-object-rest-spread@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-preset-es2015@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.24.1" - babel-plugin-transform-es2015-classes "^6.24.1" - babel-plugin-transform-es2015-computed-properties "^6.24.1" - babel-plugin-transform-es2015-destructuring "^6.22.0" - babel-plugin-transform-es2015-duplicate-keys "^6.24.1" - babel-plugin-transform-es2015-for-of "^6.22.0" - babel-plugin-transform-es2015-function-name "^6.24.1" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-plugin-transform-es2015-modules-systemjs "^6.24.1" - babel-plugin-transform-es2015-modules-umd "^6.24.1" - babel-plugin-transform-es2015-object-super "^6.24.1" - babel-plugin-transform-es2015-parameters "^6.24.1" - babel-plugin-transform-es2015-shorthand-properties "^6.24.1" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.24.1" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.22.0" - babel-plugin-transform-es2015-unicode-regex "^6.24.1" - babel-plugin-transform-regenerator "^6.24.1" - -babel-preset-jest@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.0.3.tgz#e2bb6f6b4a509d3ea0931f013db78c5a84856693" - dependencies: - babel-plugin-jest-hoist "^22.0.3" +babel-preset-jest@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.2.0.tgz#f77b43f06ef4d8547214b2e206cc76a25c3ba0e2" + dependencies: + babel-plugin-jest-hoist "^22.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" babel-register@^6.24.1: @@ -950,19 +919,7 @@ babel-register@^6.24.1: mkdirp "^0.5.1" source-map-support "^0.4.2" -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0: +babel-runtime@^6.22.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c" dependencies: @@ -986,17 +943,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0: babylon "^6.17.2" lodash "^4.2.0" -babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.24.1: +babel-traverse@^6.18.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1" dependencies: @@ -1010,7 +957,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1: invariant "^2.2.0" lodash "^4.2.0" -babel-traverse@^6.25.0, babel-traverse@^6.26.0: +babel-traverse@^6.25.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -1024,7 +971,7 @@ babel-traverse@^6.25.0, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.25.0: +babel-types@^6.18.0, babel-types@^6.25.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e" dependencies: @@ -1042,9 +989,9 @@ babel-types@^6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@7.0.0-beta.31: - version "7.0.0-beta.31" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.31.tgz#7ec10f81e0e456fd0f855ad60fa30c2ac454283f" +babylon@7.0.0-beta.40: + version "7.0.0-beta.40" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a" babylon@^6.17.2: version "6.17.4" @@ -1078,18 +1025,10 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -beeper@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" - binary-extensions@^1.0.0: version "1.9.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.9.0.tgz#66506c16ce6f4d6928a5b3cd6a33ca41e941e37b" -bindings@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7" - block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" @@ -1143,12 +1082,12 @@ browser-resolve@^1.11.2: dependencies: resolve "1.1.7" -browserslist@^2.1.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.3.1.tgz#39500a2090330b2a090120ea6c7fc78b6e091c5e" +browserslist@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.1.0.tgz#6a1ccc302ddf48e70480e2ee1a9acc293eceb306" dependencies: - caniuse-lite "^1.0.30000712" - electron-to-chromium "^1.3.17" + caniuse-lite "^1.0.30000808" + electron-to-chromium "^1.3.33" bser@^2.0.0: version "2.0.0" @@ -1233,9 +1172,9 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -caniuse-lite@^1.0.30000712: - version "1.0.30000715" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000715.tgz#c327f5e6d907ebcec62cde598c3bf0dd793fb9a0" +caniuse-lite@^1.0.30000808: + version "1.0.30000808" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000808.tgz#7d759b5518529ea08b6705a19e70dbf401628ffc" capture-stack-trace@^1.0.0: version "1.0.0" @@ -1270,13 +1209,13 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" +chalk@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" dependencies: - ansi-styles "^3.1.0" + ansi-styles "^3.2.0" escape-string-regexp "^1.0.5" - supports-color "^4.0.0" + supports-color "^5.2.0" chokidar@^1.4.3: version "1.7.0" @@ -1458,9 +1397,9 @@ commander@^2.11.0, commander@^2.9.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" -commander@^2.12.2, commander@~2.12.1: - version "2.12.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" +commander@^2.14.1, commander@~2.14.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" compare-func@^1.3.1: version "1.3.2" @@ -1489,46 +1428,46 @@ content-type-parser@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" -conventional-changelog-angular@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.0.tgz#50b2d45008448455fdf67e06ea01972fbd08182a" +conventional-changelog-angular@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.4.tgz#47debaf92b75b0bd6b39fcba8f9c70dd97552be6" dependencies: compare-func "^1.3.1" q "^1.4.1" -conventional-changelog-atom@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" +conventional-changelog-atom@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.2.2.tgz#2c7326a8f24686f51500a290ed897d47612be4c3" dependencies: q "^1.4.1" -conventional-changelog-cli@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.3.tgz#ca38f229a27ec14036021b1786a48f5b8d48d7ff" +conventional-changelog-cli@^1.3.13: + version "1.3.13" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.13.tgz#8cb5855bc3c684aa8f5dc96e848d1fa5a82eee1e" dependencies: add-stream "^1.0.0" - conventional-changelog "^1.1.5" + conventional-changelog "^1.1.15" lodash "^4.1.0" meow "^3.7.0" tempfile "^1.1.1" -conventional-changelog-codemirror@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz#3cc925955f3b14402827b15168049821972d9459" +conventional-changelog-codemirror@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.2.tgz#65ef0ab738c40bdf953951edfdb0cb17302606aa" dependencies: q "^1.4.1" -conventional-changelog-core@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.1.tgz#ddf767c405850dfc8df31726c80fa1a6a10bdc7b" +conventional-changelog-core@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-2.0.3.tgz#30797b91d5f510188288d5ff54905e5cf4628e3c" dependencies: - conventional-changelog-writer "^2.0.1" - conventional-commits-parser "^2.0.0" + conventional-changelog-writer "^3.0.2" + conventional-commits-parser "^2.1.3" dateformat "^1.0.12" get-pkg-repo "^1.0.0" - git-raw-commits "^1.2.0" + git-raw-commits "^1.3.2" git-remote-origin-url "^2.0.0" - git-semver-tags "^1.2.1" + git-semver-tags "^1.3.2" lodash "^4.0.0" normalize-package-data "^2.3.5" q "^1.4.1" @@ -1536,21 +1475,21 @@ conventional-changelog-core@^1.9.1: read-pkg-up "^1.0.1" through2 "^2.0.0" -conventional-changelog-ember@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.7.tgz#c6aff35976284e7222649f81c62bd96ff3217bd2" +conventional-changelog-ember@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.3.4.tgz#76240e769b2f5298e78e85cb4eda69ef2f1358d2" dependencies: q "^1.4.1" -conventional-changelog-eslint@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz#b4b9b5dc09417844d87c7bcfb16bdcc686c4b1c1" +conventional-changelog-eslint@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.2.tgz#3f9e6b0b60f98042f6f4dfc85a611a50b5e79cf9" dependencies: q "^1.4.1" -conventional-changelog-express@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz#8d666ad41b10ebf964a4602062ddd2e00deb518d" +conventional-changelog-express@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.3.2.tgz#f5af4770a31f147986db548b49f9952fc55e3eb6" dependencies: q "^1.4.1" @@ -1566,19 +1505,23 @@ conventional-changelog-jscs@^0.1.0: dependencies: q "^1.4.1" -conventional-changelog-jshint@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz#63ad7aec66cd1ae559bafe80348c4657a6eb1872" +conventional-changelog-jshint@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.2.tgz#4d45d2601c944687abceabbc1789323719234cbe" dependencies: compare-func "^1.3.1" q "^1.4.1" -conventional-changelog-writer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz#47c10d0faba526b78d194389d1e931d09ee62372" +conventional-changelog-preset-loader@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.4.tgz#5096165f2742a18dc0e33ff2ab9ee08dc9d77f08" + +conventional-changelog-writer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-3.0.2.tgz#f3f934028379c0cab90aecfcaf009bf8a187ef14" dependencies: compare-func "^1.3.1" - conventional-commits-filter "^1.0.0" + conventional-commits-filter "^1.1.3" dateformat "^1.0.11" handlebars "^4.0.2" json-stringify-safe "^5.0.1" @@ -1588,31 +1531,32 @@ conventional-changelog-writer@^2.0.1: split "^1.0.0" through2 "^2.0.0" -conventional-changelog@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.5.tgz#4c46fb64b2986cab19888d8c4b87ca7c0e431bfd" - dependencies: - conventional-changelog-angular "^1.5.0" - conventional-changelog-atom "^0.1.1" - conventional-changelog-codemirror "^0.2.0" - conventional-changelog-core "^1.9.1" - conventional-changelog-ember "^0.2.7" - conventional-changelog-eslint "^0.2.0" - conventional-changelog-express "^0.2.0" +conventional-changelog@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.15.tgz#a5c3d281efb40f61c7d21eeffb19e6f6a8429df0" + dependencies: + conventional-changelog-angular "^1.6.4" + conventional-changelog-atom "^0.2.2" + conventional-changelog-codemirror "^0.3.2" + conventional-changelog-core "^2.0.3" + conventional-changelog-ember "^0.3.4" + conventional-changelog-eslint "^1.0.2" + conventional-changelog-express "^0.3.2" conventional-changelog-jquery "^0.1.0" conventional-changelog-jscs "^0.1.0" - conventional-changelog-jshint "^0.2.0" + conventional-changelog-jshint "^0.3.2" + conventional-changelog-preset-loader "^1.1.4" -conventional-commits-filter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039" +conventional-commits-filter@^1.1.1, conventional-commits-filter@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.3.tgz#5bf591bc4882fc8c9bd329e5a83ca1fa8721d9fb" dependencies: is-subset "^0.1.1" modify-values "^1.0.0" -conventional-commits-parser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" +conventional-commits-parser@^2.1.1, conventional-commits-parser@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.3.tgz#fbbfcfe4901ccbae63bb3834f982325e0b7c663f" dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -1622,19 +1566,19 @@ conventional-commits-parser@^2.0.0: through2 "^2.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c" +conventional-recommended-bump@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz#1b7137efb5091f99fe009e2fe9ddb7cc490e9375" dependencies: concat-stream "^1.4.10" - conventional-commits-filter "^1.0.0" - conventional-commits-parser "^2.0.0" - git-raw-commits "^1.2.0" - git-semver-tags "^1.2.1" + conventional-commits-filter "^1.1.1" + conventional-commits-parser "^2.1.1" + git-raw-commits "^1.3.0" + git-semver-tags "^1.3.0" meow "^3.3.0" object-assign "^4.0.1" -convert-source-map@^1.1.0, convert-source-map@^1.1.1, convert-source-map@^1.4.0, convert-source-map@^1.5.0: +convert-source-map@^1.1.0, convert-source-map@^1.1.1, convert-source-map@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" @@ -1660,10 +1604,6 @@ core-js@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" -core-js@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1752,10 +1692,6 @@ dateformat@^1.0.11, dateformat@^1.0.12: get-stdin "^4.0.1" meow "^3.3.0" -dateformat@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" - debug@2: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1863,9 +1799,9 @@ diff@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" -doctrine@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.2.tgz#68f96ce8efc56cc42651f1faadb4f175273b0075" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" dependencies: esutils "^2.0.2" @@ -1879,12 +1815,6 @@ dot-prop@^3.0.0: dependencies: is-obj "^1.0.0" -duplexer2@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" - dependencies: - readable-stream "~1.1.9" - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -1915,9 +1845,9 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -electron-to-chromium@^1.3.17: - version "1.3.18" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.18.tgz#3dcc99da3e6b665f6abbc71c28ad51a2cd731a9c" +electron-to-chromium@^1.3.33: + version "1.3.33" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545" elegant-spinner@^1.0.1: version "1.0.1" @@ -2029,9 +1959,9 @@ escodegen@^1.9.0: optionalDependencies: source-map "~0.5.6" -eslint-plugin-prettier@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" +eslint-plugin-prettier@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz#33e4e228bdb06142d03c560ce04ec23f6c767dd7" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" @@ -2043,21 +1973,25 @@ eslint-scope@^3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint@^4.13.1: - version "4.13.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.13.1.tgz#0055e0014464c7eb7878caf549ef2941992b444f" +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + +eslint@^4.17.0: + version "4.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.17.0.tgz#dc24bb51ede48df629be7031c71d9dc0ee4f3ddf" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" chalk "^2.1.0" concat-stream "^1.6.0" cross-spawn "^5.1.0" - debug "^3.0.1" - doctrine "^2.0.2" + debug "^3.1.0" + doctrine "^2.1.0" eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" espree "^3.5.2" esquery "^1.0.0" - estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" @@ -2167,6 +2101,10 @@ exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -2191,16 +2129,16 @@ expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/expect/-/expect-22.0.3.tgz#bb486de7d41bf3eb60d3b16dfd1c158a4d91ddfa" +expect@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-22.3.0.tgz#b1cb7db27a951ab6055f43937277152a9f668028" dependencies: ansi-styles "^3.2.0" - jest-diff "^22.0.3" - jest-get-type "^22.0.3" - jest-matcher-utils "^22.0.3" - jest-message-util "^22.0.3" - jest-regex-util "^22.0.3" + jest-diff "^22.1.0" + jest-get-type "^22.1.0" + jest-matcher-utils "^22.2.0" + jest-message-util "^22.2.0" + jest-regex-util "^22.1.0" extend-shallow@^1.1.2: version "1.1.4" @@ -2214,6 +2152,13 @@ extend-shallow@^2.0.1: dependencies: is-extendable "^0.1.0" +extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" @@ -2548,9 +2493,9 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -git-raw-commits@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c" +git-raw-commits@^1.3.0, git-raw-commits@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.2.tgz#0766c14d33566ba0094869697e13b0eb06147c07" dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -2565,9 +2510,9 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490" +git-semver-tags@^1.3.0, git-semver-tags@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.3.2.tgz#94afa43c9070ae527a3ab86b978e59ae207803cc" dependencies: meow "^3.3.0" semver "^5.0.1" @@ -2657,14 +2602,14 @@ global-prefix@^0.1.4: is-windows "^0.2.0" which "^1.2.12" -globals@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-10.1.0.tgz#4425a1881be0d336b4a823a82a7be725d5dd987c" - globals@^11.0.1: version "11.1.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4" +globals@^11.1.0: + version "11.3.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" + globals@^9.0.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -2696,9 +2641,9 @@ glogg@^1.0.0: dependencies: sparkles "^1.0.0" -google-closure-compiler-js@^20171203.0.0: - version "20171203.0.0" - resolved "https://registry.yarnpkg.com/google-closure-compiler-js/-/google-closure-compiler-js-20171203.0.0.tgz#2abb18b890386b8dae0b49d218663d1f1df1becd" +google-closure-compiler-js@^20180204.0.0: + version "20180204.0.0" + resolved "https://registry.yarnpkg.com/google-closure-compiler-js/-/google-closure-compiler-js-20180204.0.0.tgz#05920e0c2e743702a0c293898caf3b49af7a88bb" dependencies: minimist "^1.2.0" vinyl "^2.0.1" @@ -2732,12 +2677,12 @@ growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" -gulp-babel@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-7.0.0.tgz#7b93c975159f7a0553e4263b4a55100ccc239b28" +gulp-babel@^8.0.0-beta.1: + version "8.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-8.0.0-beta.1.tgz#0c90f3e667b5133277b596de9e1599c7955e84b7" dependencies: - gulp-util "^3.0.0" - replace-ext "0.0.1" + plugin-error "^1.0.1" + replace-ext "^1.0.0" through2 "^2.0.0" vinyl-sourcemaps-apply "^0.2.0" @@ -2764,13 +2709,13 @@ gulp-cli@^1.0.0: wreck "^6.3.0" yargs "^3.28.0" -gulp-newer@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/gulp-newer/-/gulp-newer-1.3.0.tgz#d50ecacbb822eda492b57324a6c85a07fd9a55c1" +gulp-newer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/gulp-newer/-/gulp-newer-1.4.0.tgz#25243ed6eac8f5462b95894e0d41937b112e65f3" dependencies: glob "^7.0.3" - gulp-util "^3.0.7" kew "^0.7.0" + plugin-error "^0.1.2" gulp-sourcemaps@1.6.0: version "1.6.0" @@ -2782,29 +2727,6 @@ gulp-sourcemaps@1.6.0: through2 "^2.0.0" vinyl "^1.0.0" -gulp-util@^3.0.0, gulp-util@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" - dependencies: - array-differ "^1.0.0" - array-uniq "^1.0.2" - beeper "^1.0.0" - chalk "^1.0.0" - dateformat "^2.0.0" - fancy-log "^1.1.0" - gulplog "^1.0.0" - has-gulplog "^0.1.0" - lodash._reescape "^3.0.0" - lodash._reevaluate "^3.0.0" - lodash._reinterpolate "^3.0.0" - lodash.template "^3.0.0" - minimist "^1.1.0" - multipipe "^0.1.2" - object-assign "^3.0.0" - replace-ext "0.0.1" - through2 "^2.0.0" - vinyl "^0.5.0" - "gulp@github:gulpjs/gulp#4.0": version "4.0.0-alpha.2" resolved "https://codeload.github.com/gulpjs/gulp/tar.gz/6d71a658c61edb3090221579d8f97dbe086ba2ed" @@ -2866,11 +2788,9 @@ has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" -has-gulplog@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" - dependencies: - sparkles "^1.0.0" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" has-unicode@^2.0.0: version "2.0.1" @@ -2987,6 +2907,13 @@ ignore@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" +import-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -3131,6 +3058,12 @@ is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + dependencies: + is-plain-object "^2.0.4" + is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" @@ -3155,6 +3088,10 @@ is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" +is-generator-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" @@ -3219,7 +3156,7 @@ is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" -is-plain-object@^2.0.1, is-plain-object@^2.0.3: +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" dependencies: @@ -3406,40 +3343,42 @@ istanbul-reports@^1.1.3: dependencies: handlebars "^4.0.3" -jest-changed-files@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.0.3.tgz#3771315acfa24a0ed7e6c545de620db6f1b2d164" +jest-changed-files@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e" dependencies: throat "^4.0.0" -jest-cli@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.0.3.tgz#575c5257ae0c51c142dfaab9eed9914c40f62611" +jest-cli@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.3.0.tgz#3fd986f2674f4168c91965be56ab9917a82a45db" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" + exit "^0.1.2" glob "^7.1.2" graceful-fs "^4.1.11" + import-local "^1.0.0" is-ci "^1.0.10" istanbul-api "^1.1.14" istanbul-lib-coverage "^1.1.1" istanbul-lib-instrument "^1.8.0" istanbul-lib-source-maps "^1.2.1" - jest-changed-files "^22.0.3" - jest-config "^22.0.3" - jest-environment-jsdom "^22.0.3" - jest-get-type "^22.0.3" - jest-haste-map "^22.0.3" - jest-message-util "^22.0.3" - jest-regex-util "^22.0.3" - jest-resolve-dependencies "^22.0.3" - jest-runner "^22.0.3" - jest-runtime "^22.0.3" - jest-snapshot "^22.0.3" - jest-util "^22.0.3" - jest-worker "^22.0.3" + jest-changed-files "^22.2.0" + jest-config "^22.3.0" + jest-environment-jsdom "^22.3.0" + jest-get-type "^22.1.0" + jest-haste-map "^22.3.0" + jest-message-util "^22.2.0" + jest-regex-util "^22.1.0" + jest-resolve-dependencies "^22.1.0" + jest-runner "^22.3.0" + jest-runtime "^22.3.0" + jest-snapshot "^22.2.0" + jest-util "^22.3.0" + jest-worker "^22.2.2" micromatch "^2.3.11" - node-notifier "^5.1.2" + node-notifier "^5.2.1" realpath-native "^1.0.0" rimraf "^2.5.4" slash "^1.0.0" @@ -3448,108 +3387,108 @@ jest-cli@^22.0.3: which "^1.2.12" yargs "^10.0.3" -jest-config@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.0.3.tgz#633d600962af7496584e0061d7a8de1252b6f3f2" +jest-config@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.3.0.tgz#94c7149f123933a872ee24c1719687419c4a623c" dependencies: chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^22.0.3" - jest-environment-node "^22.0.3" - jest-get-type "^22.0.3" - jest-jasmine2 "^22.0.3" - jest-regex-util "^22.0.3" - jest-resolve "^22.0.3" - jest-util "^22.0.3" - jest-validate "^22.0.3" - pretty-format "^22.0.3" - -jest-diff@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.0.3.tgz#ffed5aba6beaf63bb77819ba44dd520168986321" + jest-environment-jsdom "^22.3.0" + jest-environment-node "^22.3.0" + jest-get-type "^22.1.0" + jest-jasmine2 "^22.3.0" + jest-regex-util "^22.1.0" + jest-resolve "^22.3.0" + jest-util "^22.3.0" + jest-validate "^22.2.2" + pretty-format "^22.1.0" + +jest-diff@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.1.0.tgz#0fad9d96c87b453896bf939df3dc8aac6919ac38" dependencies: chalk "^2.0.1" diff "^3.2.0" - jest-get-type "^22.0.3" - pretty-format "^22.0.3" + jest-get-type "^22.1.0" + pretty-format "^22.1.0" jest-docblock@^21.0.0: version "21.1.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.1.0.tgz#43154be2441fb91403e36bb35cb791a5017cea81" -jest-docblock@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.0.3.tgz#c33aa22682b9fc68a5373f5f82994428a2ded601" +jest-docblock@^22.2.2: + version "22.2.2" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.2.2.tgz#617f13edb16ec64202002b3c336cd14ae36c0631" dependencies: detect-newline "^2.1.0" -jest-environment-jsdom@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.0.3.tgz#7bc2efae12eabcac16974016fa69f7b34e473ab4" +jest-environment-jsdom@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.3.0.tgz#c267a063e5dc16219fba0e07542d8aa2576a1c88" dependencies: - jest-mock "^22.0.3" - jest-util "^22.0.3" + jest-mock "^22.2.0" + jest-util "^22.3.0" jsdom "^11.5.1" -jest-environment-node@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.0.3.tgz#be65d7fa56c448bbcd09c967285e799363764061" +jest-environment-node@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.3.0.tgz#97d34d9706a718d743075149d1950555c10338c0" dependencies: - jest-mock "^22.0.3" - jest-util "^22.0.3" + jest-mock "^22.2.0" + jest-util "^22.3.0" jest-get-type@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" -jest-get-type@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.0.3.tgz#fa894b677c0fcd55eff3fd8ee28c7be942e32d36" +jest-get-type@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" -jest-haste-map@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.0.3.tgz#c9ecb5c871c5465d4bde4139e527fa0dc784aa2d" +jest-haste-map@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.3.0.tgz#e7f048a88735bae07ca12de8785eb8bc522adeab" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-docblock "^22.0.3" - jest-worker "^22.0.3" + jest-docblock "^22.2.2" + jest-worker "^22.2.2" micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.0.3.tgz#fd080869cf376c5ba2b58c7e21150918cfae1fc0" +jest-jasmine2@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.3.0.tgz#ea127dfbb04c6e03998ae0358225435e47520666" dependencies: callsites "^2.0.0" chalk "^2.0.1" - expect "^22.0.3" + co "^4.6.0" + expect "^22.3.0" graceful-fs "^4.1.11" - jest-diff "^22.0.3" - jest-matcher-utils "^22.0.3" - jest-message-util "^22.0.3" - jest-snapshot "^22.0.3" + is-generator-fn "^1.0.0" + jest-diff "^22.1.0" + jest-matcher-utils "^22.2.0" + jest-message-util "^22.2.0" + jest-snapshot "^22.2.0" source-map-support "^0.5.0" -jest-leak-detector@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.0.3.tgz#b64904f0e8954a11edb79b0809ff4717fa762d99" +jest-leak-detector@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.1.0.tgz#08376644cee07103da069baac19adb0299b772c2" dependencies: - pretty-format "^22.0.3" - optionalDependencies: - weak "^1.0.1" + pretty-format "^22.1.0" -jest-matcher-utils@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.0.3.tgz#2ec15ca1af7dcabf4daddc894ccce224b948674e" +jest-matcher-utils@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.2.0.tgz#5390f823c18c748543d463825aa8e4df0db253ca" dependencies: chalk "^2.0.1" - jest-get-type "^22.0.3" - pretty-format "^22.0.3" + jest-get-type "^22.1.0" + pretty-format "^22.1.0" -jest-message-util@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.0.3.tgz#bf674b2762ef2dd53facf2136423fcca264976df" +jest-message-util@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.2.0.tgz#84a6bb34186d8b9af7e0732fabbef63f7355f7b2" dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" @@ -3557,57 +3496,59 @@ jest-message-util@^22.0.3: slash "^1.0.0" stack-utils "^1.0.1" -jest-mock@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.0.3.tgz#c875e47b5b729c6c020a2fab317b275c0cf88961" +jest-mock@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7" -jest-regex-util@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.0.3.tgz#c5c10229de5ce2b27bf4347916d95b802ae9aa4d" +jest-regex-util@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53" -jest-resolve-dependencies@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.0.3.tgz#202ddf370069702cd1865a1952fcc7e52c92720e" +jest-resolve-dependencies@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31" dependencies: - jest-regex-util "^22.0.3" + jest-regex-util "^22.1.0" -jest-resolve@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.0.3.tgz#7a2692dc2b5da7b9efcc7cf29f2bc830880ad06e" +jest-resolve@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.3.0.tgz#648e797f708e8701071a0fa9fac652c577bb66d9" dependencies: browser-resolve "^1.11.2" chalk "^2.0.1" -jest-runner@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.0.3.tgz#49f0f62d9aca053f2d57715f7a8e94ba62b78cee" - dependencies: - jest-config "^22.0.3" - jest-docblock "^22.0.3" - jest-haste-map "^22.0.3" - jest-jasmine2 "^22.0.3" - jest-leak-detector "^22.0.3" - jest-message-util "^22.0.3" - jest-runtime "^22.0.3" - jest-util "^22.0.3" - jest-worker "^22.0.3" +jest-runner@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.3.0.tgz#70393f62770be754e2d14f5ca3d896e408aa001a" + dependencies: + exit "^0.1.2" + jest-config "^22.3.0" + jest-docblock "^22.2.2" + jest-haste-map "^22.3.0" + jest-jasmine2 "^22.3.0" + jest-leak-detector "^22.1.0" + jest-message-util "^22.2.0" + jest-runtime "^22.3.0" + jest-util "^22.3.0" + jest-worker "^22.2.2" throat "^4.0.0" -jest-runtime@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.0.3.tgz#6fa825bd8da9488f06e035fdf3f8a3aeec4eb624" +jest-runtime@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.3.0.tgz#1883d6a4227c1f6af276ead3ed27654257d1ef8c" dependencies: babel-core "^6.0.0" - babel-jest "^22.0.3" + babel-jest "^22.2.2" babel-plugin-istanbul "^4.1.5" chalk "^2.0.1" convert-source-map "^1.4.0" + exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^22.0.3" - jest-haste-map "^22.0.3" - jest-regex-util "^22.0.3" - jest-resolve "^22.0.3" - jest-util "^22.0.3" + jest-config "^22.3.0" + jest-haste-map "^22.3.0" + jest-regex-util "^22.1.0" + jest-resolve "^22.3.0" + jest-util "^22.3.0" json-stable-stringify "^1.0.1" micromatch "^2.3.11" realpath-native "^1.0.0" @@ -3616,27 +3557,27 @@ jest-runtime@^22.0.3: write-file-atomic "^2.1.0" yargs "^10.0.3" -jest-snapshot@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.0.3.tgz#a949b393781d2fdb4773f6ea765dd67ad1da291e" +jest-snapshot@^22.2.0: + version "22.2.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.2.0.tgz#0c0ba152d296ef70fa198cc84977a2cc269ee4cf" dependencies: chalk "^2.0.1" - jest-diff "^22.0.3" - jest-matcher-utils "^22.0.3" + jest-diff "^22.1.0" + jest-matcher-utils "^22.2.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^22.0.3" + pretty-format "^22.1.0" -jest-util@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.0.3.tgz#e61179c6abecf91218e4496bed9243c8f6667b87" +jest-util@^22.3.0: + version "22.3.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.3.0.tgz#d05bff567a3a86c0e9b3838d812f8290aa768097" dependencies: callsites "^2.0.0" chalk "^2.0.1" graceful-fs "^4.1.11" is-ci "^1.0.10" - jest-message-util "^22.0.3" - jest-validate "^22.0.3" + jest-message-util "^22.2.0" + jest-validate "^22.2.2" mkdirp "^0.5.1" jest-validate@^21.1.0: @@ -3648,18 +3589,18 @@ jest-validate@^21.1.0: leven "^2.1.0" pretty-format "^21.2.1" -jest-validate@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.0.3.tgz#2850d949a36c48b1a40f7eebae1d8539126f7829" +jest-validate@^22.2.2: + version "22.2.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.2.2.tgz#9cdce422c93cc28395e907ac6bbc929158d9a6ba" dependencies: chalk "^2.0.1" - jest-get-type "^22.0.3" + jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^22.0.3" + pretty-format "^22.1.0" -jest-worker@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.0.3.tgz#30433faca67814a8f80559f75ab2ceaa61332fd2" +jest-worker@^22.2.2: + version "22.2.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390" dependencies: merge-stream "^1.0.1" @@ -3722,6 +3663,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -3752,7 +3697,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json5@^0.5.0, json5@^0.5.1: +json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -3846,17 +3791,17 @@ lerna-changelog@^0.7.0: string.prototype.padend "^3.0.0" yargs "^6.6.0" -lerna@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.5.1.tgz#d07099bd3051ee799f98c753328bd69e96c6fab8" +lerna@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.9.0.tgz#303f70bc50b1c4541bdcf54eda13c36fe54401f3" dependencies: async "^1.5.0" chalk "^2.1.0" cmd-shim "^2.0.2" columnify "^1.5.4" command-join "^2.0.0" - conventional-changelog-cli "^1.3.2" - conventional-recommended-bump "^1.0.1" + conventional-changelog-cli "^1.3.13" + conventional-recommended-bump "^1.2.1" dedent "^0.7.0" execa "^0.8.0" find-up "^2.1.0" @@ -3869,7 +3814,7 @@ lerna@^2.5.1: hosted-git-info "^2.5.0" inquirer "^3.2.2" is-ci "^1.0.10" - load-json-file "^3.0.0" + load-json-file "^4.0.0" lodash "^4.17.4" minimatch "^3.0.4" npmlog "^4.1.2" @@ -3877,11 +3822,12 @@ lerna@^2.5.1: package-json "^4.0.1" path-exists "^3.0.0" read-cmd-shim "^1.0.1" - read-pkg "^2.0.0" + read-pkg "^3.0.0" rimraf "^2.6.1" safe-buffer "^5.1.1" semver "^5.4.1" signal-exit "^3.0.2" + slash "^1.0.0" strong-log-transformer "^1.0.6" temp-write "^3.3.0" write-file-atomic "^2.3.0" @@ -3914,9 +3860,9 @@ liftoff@^2.3.0: rechoir "^0.6.2" resolve "^1.1.7" -lint-staged@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-6.0.1.tgz#855f2993ab4a265430e2fd9828427e648d65e6b4" +lint-staged@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-6.1.0.tgz#28f600c10a6cbd249ceb003118a1552e53544a93" dependencies: app-root-path "^2.0.0" chalk "^2.1.0" @@ -4006,13 +3952,13 @@ load-json-file@^2.0.0: pify "^2.0.0" strip-bom "^3.0.0" -load-json-file@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-3.0.0.tgz#7eb3735d983a7ed2262ade4ff769af5369c5c440" +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" dependencies: graceful-fs "^4.1.2" - parse-json "^3.0.0" - pify "^2.0.0" + parse-json "^4.0.0" + pify "^3.0.0" strip-bom "^3.0.0" locate-path@^2.0.0: @@ -4022,60 +3968,14 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basetostring@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" - -lodash._basevalues@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - -lodash._reescape@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" - -lodash._reevaluate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" - -lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: +lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" -lodash._root@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - lodash.debounce@^4.0.6: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" -lodash.escape@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" - dependencies: - lodash._root "^3.0.0" - -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - lodash.isequal@^4.0.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" @@ -4092,22 +3992,10 @@ lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - lodash.mapvalues@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" -lodash.restparam@^3.0.0: - version "3.6.1" - resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" - lodash.some@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" @@ -4116,20 +4004,6 @@ lodash.sortby@^4.5.0, lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" -lodash.template@^3.0.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" - dependencies: - lodash._basecopy "^3.0.0" - lodash._basetostring "^3.0.0" - lodash._basevalues "^3.0.0" - lodash._isiterateecall "^3.0.0" - lodash._reinterpolate "^3.0.0" - lodash.escape "^3.0.0" - lodash.keys "^3.0.0" - lodash.restparam "^3.0.0" - lodash.templatesettings "^3.0.0" - lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" @@ -4137,13 +4011,6 @@ lodash.template@^4.0.2: lodash._reinterpolate "~3.0.0" lodash.templatesettings "^4.0.0" -lodash.templatesettings@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.escape "^3.0.0" - lodash.templatesettings@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" @@ -4349,7 +4216,7 @@ minimist@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -4405,12 +4272,6 @@ ms@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" -multipipe@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" - dependencies: - duplexer2 "0.0.2" - mute-stdout@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.0.tgz#5b32ea07eb43c9ded6130434cf926f46b2a7fd4d" @@ -4419,10 +4280,6 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.0.5: - version "2.8.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" - nan@^2.3.0: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" @@ -4443,14 +4300,14 @@ node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" -node-notifier@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" +node-notifier@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" dependencies: growly "^1.3.0" - semver "^5.3.0" - shellwords "^0.1.0" - which "^1.2.12" + semver "^5.4.1" + shellwords "^0.1.1" + which "^1.3.0" node-pre-gyp@^0.6.36: version "0.6.36" @@ -4539,10 +4396,6 @@ oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" - object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -4728,12 +4581,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse-json@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13" - dependencies: - error-ex "^1.3.1" - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -4765,7 +4612,7 @@ path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: +path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -4805,6 +4652,12 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -4831,6 +4684,12 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + plugin-error@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" @@ -4841,6 +4700,15 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" +plugin-error@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" + dependencies: + ansi-colors "^1.0.1" + arr-diff "^4.0.0" + arr-union "^3.1.0" + extend-shallow "^3.0.2" + pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" @@ -4861,9 +4729,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827" +prettier@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93" pretty-format@^21.2.1: version "21.2.1" @@ -4872,9 +4740,9 @@ pretty-format@^21.2.1: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.0.3.tgz#a2bfa59fc33ad24aa4429981bb52524b41ba5dd7" +pretty-format@^22.1.0: + version "22.1.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.1.0.tgz#2277605b40ed4529ae4db51ff62f4be817647914" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -4883,7 +4751,7 @@ pretty-hrtime@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" -private@^0.1.6, private@^0.1.7: +private@^0.1.6: version "0.1.7" resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" @@ -5010,6 +4878,14 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" @@ -5031,15 +4907,6 @@ read-pkg@^2.0.0: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -5068,9 +4935,15 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" -regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" +regenerate-unicode-properties@^5.1.1: + version "5.1.3" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-5.1.3.tgz#54f5891543468f36f2274b67c6bc4c033c27b308" + dependencies: + regenerate "^1.3.3" + +regenerate@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" regenerator-runtime@^0.10.0: version "0.10.5" @@ -5080,12 +4953,10 @@ regenerator-runtime@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" -regenerator-transform@0.9.11: - version "0.9.11" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" +regenerator-transform@^0.12.3: + version "0.12.3" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.12.3.tgz#459adfb64f6a27164ab991b7873f45ab969eca8b" dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" private "^0.1.6" regex-cache@^0.4.2: @@ -5095,13 +4966,16 @@ regex-cache@^0.4.2: is-equal-shallow "^0.1.3" is-primitive "^2.0.0" -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" +regexpu-core@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.1.3.tgz#fb81616dbbc2a917a7419b33f8379144f51eb8d0" dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" + regenerate "^1.3.3" + regenerate-unicode-properties "^5.1.1" + regjsgen "^0.3.0" + regjsparser "^0.2.1" + unicode-match-property-ecmascript "^1.0.3" + unicode-match-property-value-ecmascript "^1.0.1" registry-auth-token@^3.0.1: version "3.3.1" @@ -5116,13 +4990,13 @@ registry-url@^3.0.3: dependencies: rc "^1.0.1" -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" +regjsgen@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.3.0.tgz#0ee4a3e9276430cda25f1e789ea6c15b87b0cb43" -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" +regjsparser@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.2.1.tgz#c3787553faf04e775c302102ef346d995000ec1c" dependencies: jsesc "~0.5.0" @@ -5239,6 +5113,12 @@ require-uncached@^1.0.3: caller-path "^0.1.0" resolve-from "^1.0.0" +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + resolve-dir@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" @@ -5250,6 +5130,10 @@ resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + resolve@1.1.7, resolve@~1.1.6: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -5260,6 +5144,12 @@ resolve@^1.1.6, resolve@^1.1.7: dependencies: path-parse "^1.0.5" +resolve@^1.3.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + dependencies: + path-parse "^1.0.5" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -5383,9 +5273,9 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shellwords@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" @@ -5449,12 +5339,6 @@ source-list-map@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - dependencies: - source-map "^0.5.6" - source-map-support@^0.4.2: version "0.4.15" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" @@ -5703,6 +5587,12 @@ supports-color@^4.0.0: dependencies: has-flag "^2.0.0" +supports-color@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a" + dependencies: + has-flag "^3.0.0" + symbol-observable@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" @@ -5917,11 +5807,11 @@ uglify-js@^2.6: optionalDependencies: uglify-to-browserify "~1.0.0" -uglify-js@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6" +uglify-js@^3.3.10: + version "3.3.10" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.10.tgz#8e47821d4cf28e14c1826a0078ba0825ed094da8" dependencies: - commander "~2.12.1" + commander "~2.14.1" source-map "~0.6.1" uglify-to-browserify@~1.0.0: @@ -5954,6 +5844,25 @@ undertaker@^1.0.0: object.reduce "^1.0.0" undertaker-registry "^1.0.0" +unicode-canonical-property-names-ecmascript@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.3.tgz#f6119f417467593c0086357c85546b6ad5abc583" + +unicode-match-property-ecmascript@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.3.tgz#db9b1cb4ffc67e0c5583780b1b59370e4cbe97b9" + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.2" + unicode-property-aliases-ecmascript "^1.0.3" + +unicode-match-property-value-ecmascript@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.1.tgz#fea059120a016f403afd3bf586162b4db03e0604" + +unicode-property-aliases-ecmascript@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.3.tgz#ac3522583b9e630580f916635333e00c5ead690d" + unique-filename@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" @@ -6067,14 +5976,6 @@ vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1: dependencies: source-map "^0.5.1" -vinyl@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" - dependencies: - clone "^1.0.0" - clone-stats "^0.0.1" - replace-ext "0.0.1" - vinyl@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" @@ -6114,13 +6015,6 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" -weak@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/weak/-/weak-1.0.1.tgz#ab99aab30706959aa0200cb8cf545bb9cb33b99e" - dependencies: - bindings "^1.2.1" - nan "^2.0.5" - webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -6154,7 +6048,7 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.2.10, which@^1.2.12, which@^1.2.9: +which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: @@ -6273,8 +6167,14 @@ yargs-parser@^7.0.0: camelcase "^4.1.0" yargs-parser@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.0.0.tgz#21d476330e5a82279a4b881345bf066102e219c6" + version "8.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" + dependencies: + camelcase "^4.1.0" + +yargs-parser@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" dependencies: camelcase "^4.1.0"