-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
pnpm version:
9.12.0, 10.0.0-alpha.2, 10.6.3
Code to reproduce the issue:
.npmrc:
dedupe-peer-dependents = false
pnpm-workspace.yaml:
packages:
- 'a'
- 'b'a/package.json:
{
"dependencies": {
"terser-webpack-plugin": "5.2.4",
"webpack": "5.61.0",
"webpack-cli": "4.9.1"
}
}b/package.json:
{
"dependencies": {
"terser-webpack-plugin": "5.2.4",
"webpack": "5.61.0"
}
}Steps to reproduce:
- Run
pnpm install. - In
a, runpnpm update. - Save a copy of
pnpm-lock.yaml. - In
b, runpnpm update. - Save a copy of
pnpm-lock.yaml.
Expected behavior:
Saved copies of pnpm-lock.yaml are identical, as nothing has changed in the updates.
Actual behavior:
Saved copies differ. When update was last run in a, "terser-webpack-plugin@5.2.4(webpack@5.61.0)" shows a dependency on "webpack: 5.61.0(webpack-cli@4.9.1)". When last run in b, it shows "webpack: 5.61.0" instead.
Additional information:
node -vprints: v20.17.0- Windows, macOS, or Linux?: Linux
Notes:
terser-webpack-plugin has a peer dependency on webpack but not webpack-cli, which makes sense since it doesn't actually depend on the latter. webpack itself has an optional peer dependency on webpack-cli.
We've seen something similar with react-with-styles-interface-css, which has a peer dependency on react-with-styles but not react or react-dom, while react-with-styles itself does have peer deps on react and react-dom.
In our code in these two cases this doesn't seem to actually break anything, it just clutters our git diffs.