Skip to content

Commit

Permalink
Upgrade to Babel 7
Browse files Browse the repository at this point in the history
  • Loading branch information
boopathi committed Apr 3, 2017
1 parent f2e57e1 commit 2866a42
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
"coverageDirectory": "./coverage/"
},
"devDependencies": {
"babel-core": "^6.24.0",
"babel-core": "7.0.0-alpha.6",
"babel-eslint": "^7.2.1",
"babel-jest": "^19.0.0",
"babel-plugin-transform-es2015-block-scoping": "^6.23.0",
"babel-preset-env": "^1.2.2",
"babel-traverse": "^6.23.1",
"babel-traverse": "7.0.0-alpha.3",
"bytes": "^2.5.0",
"chalk": "^1.1.3",
"cli-table": "^0.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function getPath(source) {
babelrc: false,
plugins: [
function({ traverse }) {
traverse.clearCache();
traverse.cache.clear();
return {
visitor: {
Program(programPath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ module.exports = ({ types: t, traverse }) => {
} = {}
} = {}
) {
traverse.clearCache();
traverse.cache.clear();
path.scope.crawl();

markEvalScopes(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ describe("mangle-names", () => {
code: false
});

traverse.clearCache();
traverse.cache.clear();

const actual = babel.transformFromAst(first.ast, null, {
plugins: [require("../src/index")]
Expand Down Expand Up @@ -734,7 +734,7 @@ describe("mangle-names", () => {
code: false
});

traverse.clearCache();
traverse.cache.clear();

const actual = babel.transformFromAst(first.ast, null, {
plugins: [require("../src/index")]
Expand Down Expand Up @@ -847,7 +847,7 @@ describe("mangle-names", () => {
code: false
}).ast;

traverse.clearCache();
traverse.cache.clear();

const actual = babel.transformFromAst(ast, null, {
sourceType: "script",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-minify-mangle-names/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = ({ types: t, traverse }) => {
}

cleanup() {
traverse.clearCache();
traverse.cache.clear();
this.program.scope.crawl();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/babili/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"dependencies": {
"babel-preset-babili": "^0.0.12",
"babel-cli": "^6.10.1"
"babel-cli": "7.0.0-alpha.6"
},
"devDependencies": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ exports[`gulp-babili comments should remove comments by default except license a
exports[`gulp-babili comments should take a custom function 1`] = `"function foo(){}bar();/* YAC - yet another comment */var a=baz();"`;

exports[`gulp-babili 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()})()};"
`;
2 changes: 1 addition & 1 deletion packages/gulp-babili/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"babili"
],
"dependencies": {
"babel-core": "^6.22.1",
"babel-core": "7.0.0-alpha.6",
"babel-preset-babili": "^0.0.12",
"vinyl-sourcemaps-apply": "^0.2.1"
},
Expand Down

0 comments on commit 2866a42

Please sign in to comment.