diff --git a/package.json b/package.json index 253f7525d..2d1bb11ff 100644 --- a/package.json +++ b/package.json @@ -27,11 +27,11 @@ ] }, "devDependencies": { - "babel-core": "^6.14.0", + "babel-core": "^6.18.0", "babel-jest": "^14.1.0", - "babel-plugin-transform-es2015-block-scoping": "^6.14.0", - "babel-preset-es2015": "^6.14.0", - "babel-traverse": "^6.14.0", + "babel-plugin-transform-es2015-block-scoping": "^6.18.0", + "babel-preset-es2015": "^6.18.0", + "babel-traverse": "^6.16.0", "bytes": "^2.1.0", "chalk": "^1.1.3", "cli-table": "^0.3.1", 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 285dae6ff..9f2a382bb 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 @@ -177,7 +177,7 @@ describe("mangle-names", () => { }); // https://phabricator.babeljs.io/T6957 - xit("labels should not shadow bindings", () => { + it("labels should not shadow bindings", () => { const source = unpad(` function foo() { var meh; @@ -201,6 +201,28 @@ describe("mangle-names", () => { expect(transform(source)).toBe(expected); }); + it("labels should not shadow bindings 2", () => { + const source = unpad(` + function f(a) { + try { + a: { + console.log(a); + } + } catch ($a) { } + } + `); + const expected = unpad(` + function f(b) { + try { + a: { + console.log(b); + } + } catch (c) {} + } + `); + expect(transform(source)).toBe(expected); + }); + it("should be order independent", () => { const source = unpad(` function foo() {