Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Babel version to 7 #1141

Merged
merged 2 commits into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ install:
- travis_retry nvm install 8.11.3
- node -v
- travis_retry npm i -g yarn
- travis_retry yarn global add babel-cli
- travis_retry bundle install
- travis_retry yarn
- travis_retry yarn run build
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Changes since last non-beta release.
#### Fixed
- Ignore Arrays in Rails i18n yml files. [PR 1129](https://github.com/shakacode/react_on_rails/pull/1129) by [vcarel](https://github.com/vcarel).
- Fix to apply transform-runtime. And work with Babel 6 and 7. (Include revert of [PR 1136](https://github.com/shakacode/react_on_rails/pull/1136)) [PR 1140](https://github.com/shakacode/react_on_rails/pull/1140) by [Ryunosuke Sato](https://github.com/tricknotes).
- Upgrade Babel version to 7 [PR 1141](https://github.com/shakacode/react_on_rails/pull/1141) by [Ryunosuke Sato](https://github.com/tricknotes).

*Please add entries here for your pull requests that are not yet released.*

Expand Down
9 changes: 6 additions & 3 deletions node_package/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"presets": ["es2015", "stage-2", "react"],
"presets": [
["@babel/preset-env", {"useBuiltIns": "entry"}],
"@babel/preset-react"
],
"plugins": [
"transform-flow-strip-types",
"transform-runtime"
"@babel/plugin-transform-flow-strip-types",
["@babel/plugin-transform-runtime", {"corejs": 2}]
]
}
22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
"doc": "docs"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-react-transform": "^2.0.2",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-tape-runner": "^2.0.1",
"babel-types": "^6.25.0",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/types": "^7.0.0",
"babel-loader": "^8.0.2",
"babel-tape-runner": "^3.0.0",
"babelify": "^7.3.0",
"blue-tape": "^1.0.0",
"create-react-class": "^15.6.0",
Expand Down Expand Up @@ -87,6 +85,6 @@
},
"homepage": "https://github.com/shakacode/react_on_rails#readme",
"dependencies": {
"babel-runtime": "6"
"@babel/runtime-corejs2": "^7.0.0"
}
}
8 changes: 6 additions & 2 deletions spec/dummy/client/.babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"presets": [["es2015", {"modules": false}], "stage-2", "react"],
"presets": [
["@babel/preset-env", {"modules": false}],
"@babel/preset-react"
],
"plugins": [
"react-hot-loader/babel"
"react-hot-loader/babel",
"@babel/plugin-proposal-class-properties"
]
}
2 changes: 1 addition & 1 deletion spec/dummy/client/app/startup/clientRegistration.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'babel-polyfill';
import '@babel/polyfill';
import 'es5-shim';

import ReactOnRails from 'react-on-rails';
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/client/app/startup/serverRegistration.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'babel-polyfill';
import '@babel/polyfill';
import 'es5-shim';

// Shows the mapping from the exported object to the name used by the server rendering.
Expand Down
10 changes: 0 additions & 10 deletions spec/dummy/client/package-lock.json

This file was deleted.

21 changes: 10 additions & 11 deletions spec/dummy/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
},
"main": "js/app.js",
"dependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/runtime": "^7.0.0",
"autoprefixer": "^7.1.2",
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-runtime": "^6.25.0",
"babel-loader": "^8.0.2",
"css-loader": "^0.28.4",
"es5-shim": "^4.5.9",
"expose-loader": "^0.7.3",
Expand All @@ -29,12 +29,12 @@
"loader-utils": "^1.1.0",
"lodash": "^4.17.4",
"node-libs-browser": "^2.0.0",
"node-sass": "^4.5.3",
"node-sass": "^4.9.3",
"postcss-loader": "^1.3.3",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-helmet": "^5.1.3",
"react-hot-loader": "^3.0.0-beta.6",
"react-hot-loader": "^4.3.6",
"react-on-rails": "11.1.3",
"react-proptypes": "^1.0.0",
"react-redux": "^5.0.5",
Expand All @@ -51,7 +51,6 @@
"webpack-merge": "^4.1.0"
},
"devDependencies": {
"babel-plugin-react-transform": "^2.0.2",
"body-parser": "^1.17.1",
"eslint": "^3.19.0",
"eslint-config-shakacode": "^15.0.0",
Expand Down
Loading