Skip to content

Commit 8d6c018

Browse files
piglovesyoulangpavel
authored andcommitted
Upgrade all dependencies including Babel 7 (#1673)
* Upgrade all dependencies including Babel 7 1. ncu --upgradeAll 4. Leave "graphql" to be "^13.2.0" that apollo packages depend on 2. Apply patch of "npx babel-upgrade" output 3. Leave only necessary babel plugins 4. Pass "yarn fix" by disabling stricter rules fixes #1654 #1626 #1607 * Also ignore babel config file from webpack.config.js
1 parent 81c96d8 commit 8d6c018

File tree

6 files changed

+1868
-1926
lines changed

6 files changed

+1868
-1926
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ module.exports = {
8787
// ESLint plugin for prettier formatting
8888
// https://github.com/prettier/eslint-plugin-prettier
8989
'prettier/prettier': 'error',
90+
91+
'react/forbid-prop-types': 'off',
92+
'react/destructuring-assignment': 'off',
9093
},
9194

9295
settings: {

babel.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ module.exports = {
1919
},
2020
},
2121
],
22-
['@babel/preset-stage-2', { decoratorsLegacy: true }],
2322
'@babel/preset-flow',
2423
'@babel/preset-react',
2524
],
25+
plugins: [
26+
'@babel/plugin-proposal-class-properties',
27+
'@babel/plugin-syntax-dynamic-import',
28+
],
2629
ignore: ['node_modules', 'build'],
2730
};

package.json

Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"not ie < 9"
1414
],
1515
"dependencies": {
16-
"@babel/polyfill": "^7.0.0-beta.51",
16+
"@babel/polyfill": "^7.0.0",
1717
"body-parser": "^1.18.3",
1818
"classnames": "^2.2.6",
1919
"cookie-parser": "^1.4.3",
@@ -24,98 +24,99 @@
2424
"history": "^4.7.2",
2525
"isomorphic-style-loader": "^4.0.0",
2626
"jsonwebtoken": "^8.3.0",
27-
"node-fetch": "^2.1.2",
27+
"node-fetch": "^2.2.0",
2828
"normalize.css": "^8.0.0",
2929
"passport": "^0.4.0",
3030
"passport-facebook": "^2.1.1",
3131
"pretty-error": "^2.1.1",
32-
"prop-types": "^15.6.1",
32+
"prop-types": "^15.6.2",
3333
"query-string": "^6.1.0",
34-
"react": "^16.4.1",
35-
"react-dom": "^16.4.1",
36-
"sequelize": "^4.37.10",
34+
"react": "^16.5.2",
35+
"react-dom": "^16.5.2",
36+
"sequelize": "^4.38.1",
3737
"serialize-javascript": "^1.5.0",
38-
"source-map-support": "^0.5.6",
39-
"sqlite3": "^4.0.0",
38+
"source-map-support": "^0.5.9",
39+
"sqlite3": "^4.0.2",
4040
"universal-router": "^6.0.0",
41-
"whatwg-fetch": "^2.0.4"
41+
"whatwg-fetch": "^3.0.0"
4242
},
4343
"devDependencies": {
44-
"@babel/core": "^7.0.0-beta.51",
45-
"@babel/node": "^7.0.0-beta.51",
46-
"@babel/plugin-transform-react-constant-elements": "^7.0.0-beta.51",
47-
"@babel/plugin-transform-react-inline-elements": "^7.0.0-beta.51",
48-
"@babel/preset-env": "^7.0.0-beta.51",
49-
"@babel/preset-flow": "^7.0.0-beta.51",
50-
"@babel/preset-react": "^7.0.0-beta.51",
51-
"@babel/preset-stage-2": "^7.0.0-beta.51",
52-
"autoprefixer": "^8.6.3",
53-
"babel-core": "^7.0.0-0",
54-
"babel-eslint": "^8.2.3",
55-
"babel-jest": "^23.0.1",
56-
"babel-loader": "^7.1.4",
57-
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
58-
"browser-sync": "^2.24.4",
44+
"@babel/core": "^7.0.0",
45+
"@babel/node": "^7.0.0",
46+
"@babel/plugin-proposal-class-properties": "^7.0.0",
47+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
48+
"@babel/plugin-transform-react-constant-elements": "^7.0.0",
49+
"@babel/plugin-transform-react-inline-elements": "^7.0.0",
50+
"@babel/preset-env": "^7.1.0",
51+
"@babel/preset-flow": "^7.0.0",
52+
"@babel/preset-react": "^7.0.0",
53+
"autoprefixer": "^9.1.5",
54+
"babel-core": "^7.0.0-bridge.0",
55+
"babel-eslint": "^9.0.0",
56+
"babel-jest": "^23.6.0",
57+
"babel-loader": "^8.0.0",
58+
"babel-plugin-transform-react-remove-prop-types": "^0.4.18",
59+
"browser-sync": "^2.24.7",
5960
"chokidar": "^2.0.4",
60-
"css-loader": "^0.28.11",
61-
"enzyme": "^3.3.0",
62-
"eslint": "^4.19.0",
63-
"eslint-config-airbnb": "^16.1.0",
64-
"eslint-config-prettier": "^2.9.0",
61+
"css-loader": "^1.0.0",
62+
"enzyme": "^3.6.0",
63+
"eslint": "^5.6.0",
64+
"eslint-config-airbnb": "^17.1.0",
65+
"eslint-config-prettier": "^3.0.1",
6566
"eslint-import-resolver-node": "^0.3.2",
66-
"eslint-loader": "^2.0.0",
67-
"eslint-plugin-css-modules": "^2.7.5",
68-
"eslint-plugin-flowtype": "^2.49.3",
69-
"eslint-plugin-import": "^2.12.0",
70-
"eslint-plugin-jsx-a11y": "^6.0.3",
71-
"eslint-plugin-prettier": "^2.6.0",
72-
"eslint-plugin-react": "^7.9.1",
73-
"file-loader": "^1.1.11",
74-
"flow-bin": "^0.74.0",
67+
"eslint-loader": "^2.1.1",
68+
"eslint-plugin-css-modules": "^2.9.1",
69+
"eslint-plugin-flowtype": "^2.50.1",
70+
"eslint-plugin-import": "^2.14.0",
71+
"eslint-plugin-jsx-a11y": "^6.1.1",
72+
"eslint-plugin-prettier": "^2.6.2",
73+
"eslint-plugin-react": "^7.11.1",
74+
"file-loader": "^2.0.0",
75+
"flow-bin": "^0.81.0",
7576
"front-matter": "^2.3.0",
76-
"glob": "^7.1.2",
77-
"husky": "^0.14.3",
77+
"glob": "^7.1.3",
78+
"husky": "^1.0.0-rc.15",
7879
"identity-obj-proxy": "^3.0.0",
79-
"jest": "^23.1.0",
80-
"lint-staged": "^7.2.0",
81-
"markdown-it": "^8.4.1",
80+
"jest": "^23.6.0",
81+
"lint-staged": "^7.3.0",
82+
"markdown-it": "^8.4.2",
8283
"mkdirp": "^0.5.1",
8384
"null-loader": "^0.1.1",
8485
"opn-cli": "^3.1.0",
8586
"pixrem": "^4.0.1",
8687
"pleeease-filters": "^4.0.0",
87-
"postcss": "^6.0.22",
88+
"postcss": "^7.0.2",
8889
"postcss-calc": "^6.0.1",
8990
"postcss-color-function": "^4.0.1",
90-
"postcss-custom-media": "^6.0.0",
91-
"postcss-custom-properties": "^7.0.0",
92-
"postcss-custom-selectors": "^4.0.1",
93-
"postcss-flexbugs-fixes": "^3.3.1",
94-
"postcss-import": "^11.1.0",
95-
"postcss-loader": "^2.1.5",
96-
"postcss-media-minmax": "^3.0.0",
97-
"postcss-nested": "^3.0.0",
98-
"postcss-nesting": "^6.0.0",
91+
"postcss-custom-media": "^7.0.3",
92+
"postcss-custom-properties": "^8.0.5",
93+
"postcss-custom-selectors": "^5.1.2",
94+
"postcss-flexbugs-fixes": "^4.1.0",
95+
"postcss-import": "^12.0.0",
96+
"postcss-loader": "^3.0.0",
97+
"postcss-media-minmax": "^4.0.0",
98+
"postcss-nested": "^4.1.0",
99+
"postcss-nesting": "^7.0.0",
99100
"postcss-pseudoelements": "^5.0.0",
100-
"postcss-selector-matches": "^3.0.1",
101-
"postcss-selector-not": "^3.0.1",
102-
"prettier": "^1.13.5",
101+
"postcss-selector-matches": "^4.0.0",
102+
"postcss-selector-not": "^4.0.0",
103+
"prettier": "^1.14.3",
103104
"raw-loader": "^0.5.1",
104-
"react-deep-force-update": "^2.1.1",
105-
"react-dev-utils": "^5.0.1",
106-
"react-error-overlay": "^4.0.0",
107-
"react-test-renderer": "^16.4.1",
105+
"react-deep-force-update": "^2.1.3",
106+
"react-dev-utils": "^5.0.2",
107+
"react-error-overlay": "^4.0.1",
108+
"react-test-renderer": "^16.5.2",
108109
"rimraf": "^2.6.2",
109-
"stylelint": "^9.3.0",
110+
"stylelint": "^9.5.0",
110111
"stylelint-config-standard": "^18.2.0",
111-
"stylelint-order": "^0.8.1",
112+
"stylelint-order": "^1.0.0",
112113
"svg-url-loader": "^2.3.2",
113-
"url-loader": "^1.0.1",
114-
"webpack": "^4.12.0",
115-
"webpack-assets-manifest": "^3.0.1",
116-
"webpack-bundle-analyzer": "^2.13.1",
117-
"webpack-dev-middleware": "^3.1.3",
118-
"webpack-hot-middleware": "^2.22.2",
114+
"url-loader": "^1.1.1",
115+
"webpack": "^4.19.1",
116+
"webpack-assets-manifest": "^3.0.2",
117+
"webpack-bundle-analyzer": "^3.0.2",
118+
"webpack-dev-middleware": "^3.3.0",
119+
"webpack-hot-middleware": "^2.24.2",
119120
"webpack-node-externals": "^1.7.2"
120121
},
121122
"lint-staged": {

src/components/Html.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ class Html extends React.Component {
6262
<script
6363
dangerouslySetInnerHTML={{ __html: `window.App=${serialize(app)}` }}
6464
/>
65-
{scripts.map(script => <script key={script} src={script} />)}
65+
{scripts.map(script => (
66+
<script key={script} src={script} />
67+
))}
6668
{config.analytics.googleTrackingId && (
6769
<script
6870
dangerouslySetInnerHTML={{

tools/webpack.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const config = {
8383

8484
// https://babeljs.io/docs/usage/options/
8585
babelrc: false,
86+
configFile: false,
8687
presets: [
8788
// A Babel preset that can automatically determine the Babel plugins and polyfills
8889
// https://github.com/babel/babel-preset-env
@@ -98,9 +99,6 @@ const config = {
9899
debug: false,
99100
},
100101
],
101-
// Experimental ECMAScript proposals
102-
// https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-
103-
['@babel/preset-stage-2', { decoratorsLegacy: true }],
104102
// Flow
105103
// https://github.com/babel/babel/tree/master/packages/babel-preset-flow
106104
'@babel/preset-flow',
@@ -109,6 +107,9 @@ const config = {
109107
['@babel/preset-react', { development: isDebug }],
110108
],
111109
plugins: [
110+
// Experimental ECMAScript proposals
111+
'@babel/plugin-proposal-class-properties',
112+
'@babel/plugin-syntax-dynamic-import',
112113
// Treat React JSX elements as value types and hoist them to the highest scope
113114
// https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-constant-elements
114115
...(isDebug ? [] : ['@babel/transform-react-constant-elements']),

0 commit comments

Comments
 (0)