react-scripts@3.4.1 has higher dependency versions than react-scripts@3.4.3?
See original GitHub issueIs your proposal related to a problem?
Starting a project with npx create-react-app app-name
currently uses react-scripts@3.4.3. I was surprised to see that this brought in the dependency of left-pad. Digging into it further, I noticed that there were several dependencies that were higher-versioned in react-scripts@3.4.1 than they are in @3.4.3. Here’s a table of the dependencies listed in the two package.json versions of react-scripts. In bold are the dependencies that have a higher version listed in 3.4.1.
Dependency | React Scripts @3.4.1 | React Scripts @3.4.3 |
---|---|---|
@babel/core | 7.11.6 | 7.9.0 |
@pmmmwh/react-refresh-webpack-plugin | 0.4.2 | - |
@svgr/webpack | 5.4.0 | 4.3.3 |
@typescript-eslint/eslint-plugin | ^4.1.0 | ^2.10.0 |
@typescript-eslint/parser | ^4.1.0 | ^2.10.0 |
babel-eslint | ^10.1.0 | 10.1.0 |
babel-jest | ^26.3.0 | ^24.9.0 |
babel-loader | 8.1.0 | 8.1.0 |
babel-plugin-named-asset-import | ^0.3.6 | ^0.3.6 |
babel-preset-react-app | ^9.1.2 | ^9.1.2 |
bfj | ^7.0.2 | - |
camelcase | ^6.0.0 | ^5.3.1 |
case-sensitive-paths-webpack-plugin | 2.3.0 | 2.3.0 |
css-loader | 4.3.0 | 3.4.2 |
dotenv | 8.2.0 | 8.2.0 |
dotenv-expand | 5.1.0 | 5.1.0 |
eslint | ^7.9.0 | ^6.6.0 |
eslint-config-react-app | ^5.2.1 | ^5.2.1 |
eslint-loader | ^4.0.2 | 3.0.3 |
eslint-plugin-flowtype | ^5.2.0 | 4.6.0 |
eslint-plugin-import | ^2.22.0 | 2.20.1 |
eslint-plugin-jest | ^24.0.1 | - |
eslint-plugin-jsx-a11y | ^6.3.1 | 6.2.3 |
eslint-plugin-react | ^7.20.6 | 7.19.0 |
eslint-plugin-react-hooks | ^4.1.2 | ^1.6.1 |
file-loader | 6.1.0 | 4.3.0 |
fs-extra | ^9.0.0 | ^8.1.0 |
html-webpack-plugin | 4.4.1 | 4.0.0-beta.11 |
identity-obj-proxy | 3.0.0 | 3.0.0 |
jest | 26.4.2 | 24.9.0 |
jest-circus | 26.4.2 | - |
jest-resolve | 26.4.0 | 24.9.0 |
jest-watch-typeahead | 0.6.1 | 0.4.2 |
mini-css-extract-plugin | 0.11.2 | 0.9.0 |
optimize-css-assets-webpack-plugin | 5.0.4 | 5.0.3 |
pnp-webpack-plugin | 1.6.4 | 1.6.4 |
postcss-flexbugs-fixes | 4.2.1 | 4.1.0 |
postcss-loader | 3.0.0 | 3.0.0 |
postcss-normalize | 8.0.1 | 8.0.1 |
postcss-preset-env | 6.7.0 | 6.7.0 |
postcss-safe-parser | 5.0.0 | 4.0.1 |
react-app-polyfill | ^1.0.6 | ^1.0.6 |
react-dev-utils | ^10.2.1 | ^10.2.1 |
react-refresh | ^0.8.3 | - |
resolve | 1.17.0 | 1.15.0 |
resolve-url-loader | 3.1.1 | 3.1.1 |
sass-loader | 8.0.2 | 8.0.2 |
semver | 7.3.2 | 6.3.0 |
style-loader | 1.2.1 | 0.23.1 |
terser-webpack-plugin | 4.2.0 | 2.3.8 |
ts-pnp | 1.2.0 | 1.1.6 |
url-loader | 4.1.0 | 2.3.0 |
webpack | 4.44.1 | 4.42.0 |
webpack-dev-server | 3.11.0 | 3.11.0 |
webpack-manifest-plugin | 2.2.0 | 2.2.0 |
workbox-webpack-plugin | 5.1.4 | 4.3.1 |
fsevents | - | 2.1.2 |
jest-environment-jsdom-fourteen | - | 1.0.1 |
Describe the solution you’d like
Upgrade the dependencies in react-scripts@3.4.3 to be consistent with what versions they were in @3.4.1 (unless these were intentionally lower-versioned between versions of react-scripts… though the changelog seems to suggest that dependencies were only meant to be upgraded, not downgraded).
Describe alternatives you’ve considered
If the downgrading of these versions was intentional, make a note in the documentation/changelog to reflect that. The fact that the version of react-scripts that’s versioned in Github is different than the one that resolves if one uses create-react-app is also very confusing as a user.
Additional context
A few of the issues currently open seem to be related to these changes. https://github.com/facebook/create-react-app/issues/9707 https://github.com/facebook/create-react-app/issues/9737 https://github.com/facebook/create-react-app/issues/8529
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:22 (6 by maintainers)
Top GitHub Comments
Ok this makes sense now. Thanks @danielruf and @AmyShackles for the extra details.
Both
3.4.1
,3.4.2
, and3.4.3
have the “lower” versions. There is no difference between them except for the two packages I mentioned above.However, the versions you get if you git clone the repo are going to be higher because the
master
branch is much ahead of what’s on npm. Themaster
branch has no relation to the3.4.1
release, even thoughpackage.json
on themaster
branch still says3.4.1
. This is just because there hasn’t been a release frommaster
since3.4.1
, so the version has not been edited on GitHub since then.When
4.0.0
is released, the versions on GitHub will match what’s on npm. In the meantime, you’re welcome to try the 4.x beta (4.0.0-next.98
) which has the “higher” versions.No worries. Thanks to this I found the
4.0.0-next.98
pre-release on npm which uses eslint 7 so we could continue with our project. The version string in the package.json file here in the repo and the missing .2 and .3 releases were also confusing to me. So it was very helpful as @gaearon could clear the things up.