From 50a5072f5fde0214e9e5e99ad246e2f743b9ac46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Fri, 22 Mar 2019 11:05:08 +0100 Subject: [PATCH] Update webpack dependencies --- build.gradle | 4 +- server/sonar-vsts/babel.config.js | 1 + server/sonar-vsts/config/polyfills.js | 3 +- server/sonar-vsts/config/webpack.config.js | 3 +- server/sonar-vsts/package.json | 45 +++++++++++---------- server/sonar-web/babel.config.js | 1 + server/sonar-web/babel.config.legacy.js | 1 + server/sonar-web/config/polyfills.js | 3 +- server/sonar-web/config/webpack.config.js | 4 +- server/sonar-web/package.json | 47 +++++++++++----------- 10 files changed, 58 insertions(+), 54 deletions(-) diff --git a/build.gradle b/build.gradle index 4be44556c85..69b9146dafa 100644 --- a/build.gradle +++ b/build.gradle @@ -317,8 +317,8 @@ subprojects { apply plugin: 'com.moowork.node' node { - version = '8.11.4' - yarnVersion = '1.9.4' + version = '10.15.3' + yarnVersion = '1.15.2' download = true } } diff --git a/server/sonar-vsts/babel.config.js b/server/sonar-vsts/babel.config.js index ec306c89e37..61b0735df04 100644 --- a/server/sonar-vsts/babel.config.js +++ b/server/sonar-vsts/babel.config.js @@ -16,6 +16,7 @@ module.exports = { 'IE 11' ] }, + corejs: 3, useBuiltIns: 'entry' } ], diff --git a/server/sonar-vsts/config/polyfills.js b/server/sonar-vsts/config/polyfills.js index 7934db84cb8..aeb84b8e3e2 100644 --- a/server/sonar-vsts/config/polyfills.js +++ b/server/sonar-vsts/config/polyfills.js @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import '@babel/polyfill'; +import 'core-js/stable'; +import 'regenerator-runtime/runtime'; import 'whatwg-fetch'; diff --git a/server/sonar-vsts/config/webpack.config.js b/server/sonar-vsts/config/webpack.config.js index 830b1182ed8..3956fabd8b2 100644 --- a/server/sonar-vsts/config/webpack.config.js +++ b/server/sonar-vsts/config/webpack.config.js @@ -69,8 +69,7 @@ module.exports = ({ production = true }) => ({ ].filter(Boolean) }, plugins: [ - // `allowExternal: true` to remove files outside of the current dir - production && new CleanWebpackPlugin([paths.appBuild], { allowExternal: true, verbose: false }), + production && new CleanWebpackPlugin(), production && new CopyWebpackPlugin([ diff --git a/server/sonar-vsts/package.json b/server/sonar-vsts/package.json index 5543c146179..cd3f7b93433 100644 --- a/server/sonar-vsts/package.json +++ b/server/sonar-vsts/package.json @@ -6,40 +6,41 @@ "license": "LGPL-3.0", "private": true, "dependencies": { - "@babel/polyfill": "7.0.0", "classnames": "2.2.6", + "core-js": "3.0.0", "lodash": "4.17.11", "react": "16.8.5", "react-dom": "16.8.5", - "whatwg-fetch": "2.0.3" + "regenerator-runtime": "0.13.2", + "whatwg-fetch": "2.0.4" }, "devDependencies": { - "@babel/core": "7.1.2", - "@babel/plugin-proposal-class-properties": "7.1.0", - "@babel/plugin-proposal-object-rest-spread": "7.0.0", - "@babel/plugin-syntax-dynamic-import": "7.0.0", - "@babel/plugin-transform-react-constant-elements": "7.0.0", - "@babel/plugin-transform-react-jsx-self": "7.0.0", - "@babel/plugin-transform-react-jsx-source": "7.0.0", - "@babel/preset-env": "7.1.0", + "@babel/core": "7.4.0", + "@babel/plugin-proposal-class-properties": "7.4.0", + "@babel/plugin-proposal-object-rest-spread": "7.4.0", + "@babel/plugin-syntax-dynamic-import": "7.2.0", + "@babel/plugin-transform-react-constant-elements": "7.2.0", + "@babel/plugin-transform-react-jsx-self": "7.2.0", + "@babel/plugin-transform-react-jsx-source": "7.2.0", + "@babel/preset-env": "7.4.2", "@babel/preset-react": "7.0.0", "@types/classnames": "2.2.6", "@types/enzyme": "3.9.1", "@types/jest": "24.0.11", - "@types/lodash": "4.14.117", + "@types/lodash": "4.14.123", "@types/react": "16.8.8", "@types/react-dom": "16.8.3", "@typescript-eslint/parser": "1.5.0", - "autoprefixer": "9.3.1", + "autoprefixer": "9.5.0", "babel-core": "7.0.0-bridge.0", "babel-jest": "24.5.0", - "babel-loader": "8.0.4", + "babel-loader": "8.0.5", "babel-plugin-dynamic-import-node": "2.2.0", "babel-plugin-lodash": "3.3.4", "chalk": "2.4.1", - "clean-webpack-plugin": "0.1.19", - "copy-webpack-plugin": "4.5.4", - "css-loader": "1.0.0", + "clean-webpack-plugin": "2.0.1", + "copy-webpack-plugin": "5.0.1", + "css-loader": "1.0.1", "enzyme": "3.9.0", "enzyme-adapter-react-16": "1.10.0", "enzyme-to-json": "3.3.5", @@ -53,8 +54,8 @@ "eslint-plugin-sonarjs": "0.3.0", "html-webpack-plugin": "3.2.0", "jest": "24.5.0", - "postcss-calc": "7.0.0", - "postcss-custom-properties": "8.0.8", + "postcss-calc": "7.0.1", + "postcss-custom-properties": "8.0.9", "postcss-loader": "3.0.0", "prettier": "1.14.3", "react-dev-utils": "5.0.0", @@ -64,9 +65,9 @@ "ts-jest": "24.0.0", "ts-loader": "5.3.3", "typescript": "3.3.3333", - "webpack": "4.22.0", - "webpack-bundle-analyzer": "3.0.3", - "webpack-dev-server": "3.1.10" + "webpack": "4.29.6", + "webpack-bundle-analyzer": "3.1.0", + "webpack-dev-server": "3.2.1" }, "scripts": { "start": "node scripts/start.js", @@ -81,7 +82,7 @@ "validate-ci": "yarn lint-report && yarn ts-check && yarn format-check && yarn test --coverage" }, "engines": { - "node": ">=6" + "node": ">=8" }, "browserslist": [ "last 3 Chrome versions", diff --git a/server/sonar-web/babel.config.js b/server/sonar-web/babel.config.js index 3359ae2714b..2f732dd1ee9 100644 --- a/server/sonar-web/babel.config.js +++ b/server/sonar-web/babel.config.js @@ -12,6 +12,7 @@ module.exports = { 'last 2 Edge versions' ] }, + corejs: 3, useBuiltIns: 'entry' } ], diff --git a/server/sonar-web/babel.config.legacy.js b/server/sonar-web/babel.config.legacy.js index 2c525fffc4b..9f2c94870fb 100644 --- a/server/sonar-web/babel.config.legacy.js +++ b/server/sonar-web/babel.config.legacy.js @@ -13,6 +13,7 @@ module.exports = { 'IE 11' ] }, + corejs: 3, useBuiltIns: 'entry' } ], diff --git a/server/sonar-web/config/polyfills.js b/server/sonar-web/config/polyfills.js index 7934db84cb8..aeb84b8e3e2 100644 --- a/server/sonar-web/config/polyfills.js +++ b/server/sonar-web/config/polyfills.js @@ -17,5 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import '@babel/polyfill'; +import 'core-js/stable'; +import 'regenerator-runtime/runtime'; import 'whatwg-fetch'; diff --git a/server/sonar-web/config/webpack.config.js b/server/sonar-web/config/webpack.config.js index ebd2bffa49a..97aa7dc4eef 100644 --- a/server/sonar-web/config/webpack.config.js +++ b/server/sonar-web/config/webpack.config.js @@ -153,9 +153,7 @@ module.exports = ({ production = true }) => { ] }, plugins: [ - // `allowExternal: true` to remove files outside of the current dir - production && - new CleanWebpackPlugin([paths.appBuild], { allowExternal: true, verbose: false }), + production && new CleanWebpackPlugin(), production && new CopyWebpackPlugin([ diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index b9245fe732e..62aa05a7824 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -5,9 +5,9 @@ "repository": "SonarSource/sonarqube", "license": "LGPL-3.0", "dependencies": { - "@babel/polyfill": "7.0.0", "classnames": "2.2.6", "clipboard": "2.0.1", + "core-js": "3.0.0", "create-react-class": "15.6.3", "d3-array": "1.2.4", "d3-hierarchy": "1.1.8", @@ -40,6 +40,7 @@ "redux": "4.0.1", "redux-logger": "3.0.6", "redux-thunk": "2.3.0", + "regenerator-runtime": "0.13.2", "remark-custom-blocks": "2.3.0", "remark-slug": "5.1.0", "remark-toc": "5.0.0", @@ -48,14 +49,14 @@ "whatwg-fetch": "2.0.4" }, "devDependencies": { - "@babel/core": "7.1.2", - "@babel/plugin-proposal-class-properties": "7.1.0", - "@babel/plugin-proposal-object-rest-spread": "7.0.0", - "@babel/plugin-syntax-dynamic-import": "7.0.0", - "@babel/plugin-transform-react-constant-elements": "7.0.0", - "@babel/plugin-transform-react-jsx-self": "7.0.0", - "@babel/plugin-transform-react-jsx-source": "7.0.0", - "@babel/preset-env": "7.1.0", + "@babel/core": "7.4.0", + "@babel/plugin-proposal-class-properties": "7.4.0", + "@babel/plugin-proposal-object-rest-spread": "7.4.0", + "@babel/plugin-syntax-dynamic-import": "7.2.0", + "@babel/plugin-transform-react-constant-elements": "7.2.0", + "@babel/plugin-transform-react-jsx-self": "7.2.0", + "@babel/plugin-transform-react-jsx-source": "7.2.0", + "@babel/preset-env": "7.4.2", "@babel/preset-react": "7.0.0", "@types/classnames": "2.2.6", "@types/clipboard": "2.0.1", @@ -68,7 +69,7 @@ "@types/enzyme": "3.9.1", "@types/jest": "24.0.11", "@types/keymaster": "1.6.28", - "@types/lodash": "4.14.117", + "@types/lodash": "4.14.123", "@types/prop-types": "15.7.0", "@types/react": "16.8.8", "@types/react-dom": "16.8.3", @@ -81,16 +82,16 @@ "@types/react-virtualized": "9.21.0", "@types/valid-url": "1.0.2", "@typescript-eslint/parser": "1.5.0", - "autoprefixer": "9.3.1", + "autoprefixer": "9.5.0", "babel-core": "7.0.0-bridge.0", "babel-jest": "24.5.0", - "babel-loader": "8.0.4", + "babel-loader": "8.0.5", "babel-plugin-dynamic-import-node": "2.2.0", "babel-plugin-lodash": "3.3.4", "chalk": "2.4.1", - "clean-webpack-plugin": "0.1.19", - "copy-webpack-plugin": "4.5.4", - "css-loader": "1.0.0", + "clean-webpack-plugin": "2.0.1", + "copy-webpack-plugin": "5.0.1", + "css-loader": "1.0.1", "enzyme": "3.9.0", "enzyme-adapter-react-16": "1.10.0", "enzyme-to-json": "3.3.5", @@ -109,12 +110,12 @@ "jest": "24.5.0", "lint-staged": "7.3.0", "lodash-webpack-plugin": "0.11.5", - "mini-css-extract-plugin": "0.4.4", - "postcss-calc": "7.0.0", - "postcss-custom-properties": "8.0.8", + "mini-css-extract-plugin": "0.5.0", + "postcss-calc": "7.0.1", + "postcss-custom-properties": "8.0.9", "postcss-loader": "3.0.0", "prettier": "1.14.3", - "raw-loader": "0.5.1", + "raw-loader": "2.0.0", "react-dev-utils": "5.0.1", "react-error-overlay": "1.0.7", "react-test-renderer": "16.8.5", @@ -124,9 +125,9 @@ "ts-jest": "24.0.0", "ts-loader": "5.3.3", "typescript": "3.3.3333", - "webpack": "4.27.1", - "webpack-bundle-analyzer": "3.0.3", - "webpack-dev-server": "3.1.10" + "webpack": "4.29.6", + "webpack-bundle-analyzer": "3.1.0", + "webpack-dev-server": "3.2.1" }, "scripts": { "start": "node scripts/start.js", @@ -142,7 +143,7 @@ "precommit": "yarn ts-check && lint-staged" }, "engines": { - "node": ">=6" + "node": ">=8" }, "browserslist": [ "last 3 Chrome versions", -- 2.39.5