From 91670aef88d3406766736440de6ba6349adca5f6 Mon Sep 17 00:00:00 2001 From: piglovesyou Date: Wed, 20 Feb 2019 01:01:03 +0900 Subject: [PATCH] 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 --- .eslintrc.js | 3 + babel.config.js | 5 +- package.json | 137 +- src/components/Html.js | 4 +- tools/webpack.config.js | 7 +- yarn.lock | 3638 +++++++++++++++++++-------------------- 6 files changed, 1868 insertions(+), 1926 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d5f44b0b5..5658e072a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -87,6 +87,9 @@ module.exports = { // ESLint plugin for prettier formatting // https://github.com/prettier/eslint-plugin-prettier 'prettier/prettier': 'error', + + 'react/forbid-prop-types': 'off', + 'react/destructuring-assignment': 'off', }, settings: { diff --git a/babel.config.js b/babel.config.js index aceed26eb..fdbbc882a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -19,9 +19,12 @@ module.exports = { }, }, ], - ['@babel/preset-stage-2', { decoratorsLegacy: true }], '@babel/preset-flow', '@babel/preset-react', ], + plugins: [ + '@babel/plugin-proposal-class-properties', + '@babel/plugin-syntax-dynamic-import', + ], ignore: ['node_modules', 'build'], }; diff --git a/package.json b/package.json index 77ec4a440..23f459ca0 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "not ie < 9" ], "dependencies": { - "@babel/polyfill": "^7.0.0-beta.51", + "@babel/polyfill": "^7.0.0", "body-parser": "^1.18.3", "classnames": "^2.2.6", "cookie-parser": "^1.4.3", @@ -24,98 +24,99 @@ "history": "^4.7.2", "isomorphic-style-loader": "^4.0.0", "jsonwebtoken": "^8.3.0", - "node-fetch": "^2.1.2", + "node-fetch": "^2.2.0", "normalize.css": "^8.0.0", "passport": "^0.4.0", "passport-facebook": "^2.1.1", "pretty-error": "^2.1.1", - "prop-types": "^15.6.1", + "prop-types": "^15.6.2", "query-string": "^6.1.0", - "react": "^16.4.1", - "react-dom": "^16.4.1", - "sequelize": "^4.37.10", + "react": "^16.5.2", + "react-dom": "^16.5.2", + "sequelize": "^4.38.1", "serialize-javascript": "^1.5.0", - "source-map-support": "^0.5.6", - "sqlite3": "^4.0.0", + "source-map-support": "^0.5.9", + "sqlite3": "^4.0.2", "universal-router": "^6.0.0", - "whatwg-fetch": "^2.0.4" + "whatwg-fetch": "^3.0.0" }, "devDependencies": { - "@babel/core": "^7.0.0-beta.51", - "@babel/node": "^7.0.0-beta.51", - "@babel/plugin-transform-react-constant-elements": "^7.0.0-beta.51", - "@babel/plugin-transform-react-inline-elements": "^7.0.0-beta.51", - "@babel/preset-env": "^7.0.0-beta.51", - "@babel/preset-flow": "^7.0.0-beta.51", - "@babel/preset-react": "^7.0.0-beta.51", - "@babel/preset-stage-2": "^7.0.0-beta.51", - "autoprefixer": "^8.6.3", - "babel-core": "^7.0.0-0", - "babel-eslint": "^8.2.3", - "babel-jest": "^23.0.1", - "babel-loader": "^7.1.4", - "babel-plugin-transform-react-remove-prop-types": "^0.4.13", - "browser-sync": "^2.24.4", + "@babel/core": "^7.0.0", + "@babel/node": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-transform-react-constant-elements": "^7.0.0", + "@babel/plugin-transform-react-inline-elements": "^7.0.0", + "@babel/preset-env": "^7.1.0", + "@babel/preset-flow": "^7.0.0", + "@babel/preset-react": "^7.0.0", + "autoprefixer": "^9.1.5", + "babel-core": "^7.0.0-bridge.0", + "babel-eslint": "^9.0.0", + "babel-jest": "^23.6.0", + "babel-loader": "^8.0.0", + "babel-plugin-transform-react-remove-prop-types": "^0.4.18", + "browser-sync": "^2.24.7", "chokidar": "^2.0.4", - "css-loader": "^0.28.11", - "enzyme": "^3.3.0", - "eslint": "^4.19.0", - "eslint-config-airbnb": "^16.1.0", - "eslint-config-prettier": "^2.9.0", + "css-loader": "^1.0.0", + "enzyme": "^3.6.0", + "eslint": "^5.6.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-config-prettier": "^3.0.1", "eslint-import-resolver-node": "^0.3.2", - "eslint-loader": "^2.0.0", - "eslint-plugin-css-modules": "^2.7.5", - "eslint-plugin-flowtype": "^2.49.3", - "eslint-plugin-import": "^2.12.0", - "eslint-plugin-jsx-a11y": "^6.0.3", - "eslint-plugin-prettier": "^2.6.0", - "eslint-plugin-react": "^7.9.1", - "file-loader": "^1.1.11", - "flow-bin": "^0.74.0", + "eslint-loader": "^2.1.1", + "eslint-plugin-css-modules": "^2.9.1", + "eslint-plugin-flowtype": "^2.50.1", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jsx-a11y": "^6.1.1", + "eslint-plugin-prettier": "^2.6.2", + "eslint-plugin-react": "^7.11.1", + "file-loader": "^2.0.0", + "flow-bin": "^0.81.0", "front-matter": "^2.3.0", - "glob": "^7.1.2", - "husky": "^0.14.3", + "glob": "^7.1.3", + "husky": "^1.0.0-rc.15", "identity-obj-proxy": "^3.0.0", - "jest": "^23.1.0", - "lint-staged": "^7.2.0", - "markdown-it": "^8.4.1", + "jest": "^23.6.0", + "lint-staged": "^7.3.0", + "markdown-it": "^8.4.2", "mkdirp": "^0.5.1", "null-loader": "^0.1.1", "opn-cli": "^3.1.0", "pixrem": "^4.0.1", "pleeease-filters": "^4.0.0", - "postcss": "^6.0.22", + "postcss": "^7.0.2", "postcss-calc": "^6.0.1", "postcss-color-function": "^4.0.1", - "postcss-custom-media": "^6.0.0", - "postcss-custom-properties": "^7.0.0", - "postcss-custom-selectors": "^4.0.1", - "postcss-flexbugs-fixes": "^3.3.1", - "postcss-import": "^11.1.0", - "postcss-loader": "^2.1.5", - "postcss-media-minmax": "^3.0.0", - "postcss-nested": "^3.0.0", - "postcss-nesting": "^6.0.0", + "postcss-custom-media": "^7.0.3", + "postcss-custom-properties": "^8.0.5", + "postcss-custom-selectors": "^5.1.2", + "postcss-flexbugs-fixes": "^4.1.0", + "postcss-import": "^12.0.0", + "postcss-loader": "^3.0.0", + "postcss-media-minmax": "^4.0.0", + "postcss-nested": "^4.1.0", + "postcss-nesting": "^7.0.0", "postcss-pseudoelements": "^5.0.0", - "postcss-selector-matches": "^3.0.1", - "postcss-selector-not": "^3.0.1", - "prettier": "^1.13.5", + "postcss-selector-matches": "^4.0.0", + "postcss-selector-not": "^4.0.0", + "prettier": "^1.14.3", "raw-loader": "^0.5.1", - "react-deep-force-update": "^2.1.1", - "react-dev-utils": "^5.0.1", - "react-error-overlay": "^4.0.0", - "react-test-renderer": "^16.4.1", + "react-deep-force-update": "^2.1.3", + "react-dev-utils": "^5.0.2", + "react-error-overlay": "^4.0.1", + "react-test-renderer": "^16.5.2", "rimraf": "^2.6.2", - "stylelint": "^9.3.0", + "stylelint": "^9.5.0", "stylelint-config-standard": "^18.2.0", - "stylelint-order": "^0.8.1", + "stylelint-order": "^1.0.0", "svg-url-loader": "^2.3.2", - "url-loader": "^1.0.1", - "webpack": "^4.12.0", - "webpack-assets-manifest": "^3.0.1", - "webpack-bundle-analyzer": "^2.13.1", - "webpack-dev-middleware": "^3.1.3", - "webpack-hot-middleware": "^2.22.2", + "url-loader": "^1.1.1", + "webpack": "^4.19.1", + "webpack-assets-manifest": "^3.0.2", + "webpack-bundle-analyzer": "^3.0.2", + "webpack-dev-middleware": "^3.3.0", + "webpack-hot-middleware": "^2.24.2", "webpack-node-externals": "^1.7.2" }, "lint-staged": { diff --git a/src/components/Html.js b/src/components/Html.js index 3c56b12e1..bee8b27d3 100644 --- a/src/components/Html.js +++ b/src/components/Html.js @@ -62,7 +62,9 @@ class Html extends React.Component {