microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.75k stars 588 forks source link

[rush] Warn users they are trying to update a package to a later version which using `pnpm-config.json` globalOverrides. #3876

Open TheLarkInn opened 1 year ago

TheLarkInn commented 1 year ago

Summary

You get no warning and shrinkwrap errors appear if you attempt to update a package to a later version which is being overridden by pnpm-config.json's globalOverrides feature.

Repro steps

  1. Go to pnpm-config.json, add globalOverrides property and add an entry being setting it to current version of a package today.
  2. Run rush update --recheck a. You should see successful lockfile update created in git
  3. Try to update the version of that package (in some project)
  4. Run rush update

Expected result: Few Expectations:

This terminal feedback appears unclear as it looks like your build has successfully completed, however you don't have a new lockfile, and in CI your build will fail because of this error.

maggie-chen commented 1 year ago

same problem, and run rush install will fail, terminal print The shrinkwrap file is out of date. You need to run "rush update"