Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
fix(babel): Support only babel 6 (#80)
Browse files Browse the repository at this point in the history
The support for babel 7 was broken. In order to release v4, we're removing babel 7 temporary and we'll release babel 7 support in a v5.beta
  • Loading branch information
tleunen authored Dec 11, 2017
1 parent 9fb9c62 commit f01d29d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"resolve": "^1.4.0"
},
"devDependencies": {
"babel-cli": "^7.0.0-beta.2",
"babel-core": "^7.0.0-beta.2",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-jest": "^21.2.0",
"babel-plugin-module-resolver": "^3.0.0-beta.0",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^2.0.0-beta.2",
"eslint": "^4.8.0",
"eslint-config-airbnb-base": "^12.0.2",
Expand All @@ -50,19 +50,17 @@
"standard-version": "^4.2.0"
},
"peerDependencies": {
"babel-core": "^6.0.0 || >7.0.0-alpha",
"babel-core": "^6.0.0",
"babel-plugin-module-resolver": "^3.0.0-beta"
},
"scripts": {
"lint": "eslint src test",
"compile": "babel src --out-dir lib",
"babel:clean": "rimraf node_modules/babel-cli node_modules/babel-core node_modules/babel-plugin-transform-object-rest-spread",
"babel:6": "npm run babel:clean && npm i babel-cli@^6 babel-core@^6 babel-plugin-transform-object-rest-spread@^6",
"babel:7": "npm run babel:clean && npm i babel-cli@^7.0.0-beta babel-core@^7.0.0-beta babel-plugin-transform-object-rest-spread@^7.0.0-beta",
"test:babel:6": "npm run babel:6 && npm run test:suite",
"test:babel:7": "npm run babel:7 && npm run test:suite --coverage",
"pretest": "npm run lint",
"test": "npm run test:babel:6 && npm run test:babel:7",
"test": "npm run test:babel:6",
"test:suite": "jest",
"test:watch": "jest --watch",
"prepare": "npm run compile",
Expand Down
9 changes: 0 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ function getPlugins(file) {
filename: file,
});

// Babel 7.0.0
if (!OptionManager.memoisedPlugins) {
return result.plugins.filter((plugin) => {
const plug = plugin[0] || plugin;
return plug.key.indexOf('babel-plugin-module-resolver') > -1;
});
}

// Babel 6.0.0
return result.plugins.filter((plugin) => {
const plug = OptionManager.memoisedPlugins.find(item => item.plugin === plugin[0]);
return plug && plug.plugin && plug.plugin.key === 'module-resolver';
Expand Down

0 comments on commit f01d29d

Please sign in to comment.