Fix vulnerability issues reported by 'yarn audit'. Replace the deprecated uglifyjs-webpack-plugin with a terser-webpack-plugin. Fixes #5004.

pull/27/head
Aditya Toshniwal 2019-12-11 14:02:27 +05:30 committed by Akshay Joshi
parent 3247223595
commit 43d37e3b4c
5 changed files with 621 additions and 449 deletions

View File

@ -11,6 +11,7 @@ notes for it.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
release_notes_4_17
release_notes_4_16 release_notes_4_16
release_notes_4_15 release_notes_4_15
release_notes_4_14 release_notes_4_14

View File

@ -0,0 +1,20 @@
************
Version 4.17
************
Release date: 2020-01-09
This release contains a number of bug fixes and new features since the release of pgAdmin4 4.16.
New features
************
Housekeeping
************
Bug fixes
*********
| `Issue #5004 <https://redmine.postgresql.org/issues/5004>`_ - Fix vulnerability issues reported by 'yarn audit'. Replace the deprecated uglifyjs-webpack-plugin with a terser-webpack-plugin.

View File

@ -13,7 +13,7 @@
"axios-mock-adapter": "^1.17.0", "axios-mock-adapter": "^1.17.0",
"babel-loader": "~8.0.5", "babel-loader": "~8.0.5",
"babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3", "babel-plugin-transform-object-rest-spread": "^7.0.0-beta.3",
"copy-webpack-plugin": "^5.0.4", "copy-webpack-plugin": "^5.1.0",
"core-js": "^3.2.1", "core-js": "^3.2.1",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"eslint": "5.15.1", "eslint": "5.15.1",
@ -41,9 +41,9 @@
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"sass-resources-loader": "^2.0.0", "sass-resources-loader": "^2.0.0",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",
"uglifyjs-webpack-plugin": "^2.1.2", "terser-webpack-plugin": "^2.2.2",
"url-loader": "^1.1.2", "url-loader": "^1.1.2",
"webpack": "^4.29.6", "webpack": "^4.41.2",
"webpack-bundle-analyzer": "^3.5.1", "webpack-bundle-analyzer": "^3.5.1",
"webpack-cli": "^3.2.3", "webpack-cli": "^3.2.3",
"webpack-require-from": "^1.8.0", "webpack-require-from": "^1.8.0",

View File

@ -18,7 +18,7 @@ const sourceDir = __dirname + '/pgadmin/static';
const webpackShimConfig = require('./webpack.shim'); const webpackShimConfig = require('./webpack.shim');
const PRODUCTION = process.env.NODE_ENV === 'production'; const PRODUCTION = process.env.NODE_ENV === 'production';
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const extractStyle = new MiniCssExtractPlugin({ const extractStyle = new MiniCssExtractPlugin({
filename: '[name].css', filename: '[name].css',
@ -518,13 +518,12 @@ module.exports = [{
poll: 1000, poll: 1000,
ignored: /node_modules/, ignored: /node_modules/,
}, },
// Webpack 4: uglifyPlugin moved from plugins to optimization
optimization: { optimization: {
minimizer: [ minimizer: [
new UglifyJsPlugin({ new TerserPlugin({
parallel: true, parallel: true,
cache: true, cache: true,
uglifyOptions: { terserOptions: {
compress: true, compress: true,
extractComments: true, extractComments: true,
output: { output: {

File diff suppressed because it is too large Load Diff