Skip to content
Open
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
8 changes: 4 additions & 4 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@babel/runtime": "7.0.0-beta.46",
"autoprefixer": "8.5.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "8.2.3",
"babel-eslint": "10.1.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The update of babel-eslint to version 10.1.0 introduces a breaking change that will cause the build to fail.

  • Peer Dependency Conflict: babel-eslint@10.1.0 has a peer dependency on eslint@>=6, but this project uses eslint@4.19.1. This version mismatch will lead to installation errors and break the linting process.
  • Package Deprecation: babel-eslint is deprecated and has been superseded by @babel/eslint-parser. A proper upgrade should involve migrating to the new package and updating eslint and its related configurations accordingly.

"babel-jest": "22.4.3",
"babel-loader": "8.0.0-beta.0",
"babel-plugin-named-asset-import": "^0.1.0",
Expand Down Expand Up @@ -58,17 +58,17 @@
"postcss-loader": "2.1.5",
"promise": "8.0.1",
"raf": "3.4.0",
"react-dev-utils": "^5.0.0",
"react-dev-utils": "^12.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The major version upgrade of react-dev-utils from ^5.0.0 to ^12.0.0 introduces significant breaking API changes that will break the development server.

For example, the createCompiler function from react-dev-utils/WebpackDevServerUtils has changed its signature. The existing code in scripts/start.js calls it with positional arguments, but the new version expects a single options object. This will cause a runtime error when starting the development server.

A manual migration of the scripts using this utility is required to accommodate the new API.

"resolve": "1.6.0",
"sass-loader": "7.0.1",
"style-loader": "0.21.0",
"svgr": "1.9.2",
"sw-precache-webpack-plugin": "0.11.5",
"thread-loader": "1.1.5",
"uglifyjs-webpack-plugin": "1.2.5",
"uglifyjs-webpack-plugin": "2.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This PR updates uglifyjs-webpack-plugin from 1.2.5 to 2.0.0. While this fixes a vulnerability, it's important to note that this package is deprecated. The recommended replacement is terser-webpack-plugin, which is used in modern versions of create-react-app and provides better ES6+ minification support.

Given that other dependencies in this PR are major versions with breaking changes, a piecemeal upgrade is risky. It would be safer to perform a more holistic upgrade of the build toolchain, including moving to terser-webpack-plugin.

"url-loader": "1.0.1",
"webpack": "4.8.3",
"webpack-dev-server": "3.1.4",
"webpack-dev-server": "4.7.3",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Upgrading webpack-dev-server from v3 to v4 is a major undertaking with numerous breaking changes that will break the development server.

  1. Configuration Incompatibility: The configuration file config/webpackDevServer.config.js uses many options that were removed or renamed in v4 (e.g., disableHostCheck, contentBase, quiet, before). The server will fail to start with the current configuration.
  2. Constructor Change: The WebpackDevServer constructor signature changed from new WebpackDevServer(compiler, options) to new WebpackDevServer(options, compiler). The call in scripts/start.js uses the old signature and will fail.

This update requires a complete rewrite of the webpack dev server configuration and instantiation logic.

"webpack-manifest-plugin": "2.0.3",
"whatwg-fetch": "2.0.4"
},
Expand Down