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

Upgrade babel packages to v7 #241

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: ["@babel/preset-flow", "@babel/preset-env", "@babel/preset-react"],
plugins: ["@babel/plugin-transform-runtime", "@babel/plugin-proposal-class-properties"]
};
1 change: 0 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"lerna": "2.9.0",
"packages": [
"packages/*"
],
Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@
"publish": "yarn && lerna run clean && lerna run build && lerna publish --registry=https://registry.npmjs.org/"
},
"dependencies": {
"babel-cli": "^6.26.0",
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-stage-0": "^7.0.0",
Copy link
Contributor

@chicoxyzzy chicoxyzzy Apr 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which stage 0 features are used in codebase?

Copy link
Contributor Author

@harshjv harshjv May 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an extraneous dependency. I'll remove it.

"@babel/runtime": "^7.1.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime is necessary to handle babel helper aliasing in the codebase. Here: https://babeljs.io/docs/en/babel-plugin-transform-runtime#helper-aliasing

"babel-eslint": "^8.0.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"browserify": "^16.2.3",
"create-hash": "^1.1.3",
"documentation": "^6.1.0",
Expand All @@ -40,9 +42,9 @@
"eslint-plugin-react": "^7.11.1",
"flow-bin": "^0.68.0",
"flow-copy-source": "^1.2.2",
"flow-mono-cli": "^1.3.0",
"flow-mono-cli": "^1.4.3",
"flow-typed": "^2.4.0",
"lerna": "2.9.0",
"lerna": "^3.4.3",
"prettier": "^1.14.3",
"uglify-js": "^3.4.9"
}
Expand Down
2 changes: 1 addition & 1 deletion script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -e
cd ../..
PATH=$(yarn bin):$PATH
cd -
babel --source-maps -d lib src
babel --config-file ../../babel.config.js --source-maps -d lib src
flow-copy-source -v src lib
Loading