[rush] rush update can not handle dependenciesMeta in pnpm
Closed this issue · 0 comments
g-chao commented
Summary
The PNPM has a setting called dependenciesMeta, see more details on PNPM
It is used to set up the injected settings for packages.
Right now, when users set up this in package.json
, rush update
does not update the pnpm-lock.yaml
Repro steps
This is a bug I found when I working on pnpm-sync-prototype
So, we can use this repo to reproduce the bug.
- Change the injected settings for any workspace dependencies. In this example, let's modify
package.json
forapps/app3
, add"dependenciesMeta": { "lib1": { "injected": true } }
- Run
rush update
- Check
pnpm-lock.yaml
undercommon/config/rush
, you will see there is no change forpnpm-lock.yaml
- However, if you check
common/temp
folder, you will seepnpm-lock.yaml
andpnpm-lock-preinstall.yaml
are different - Now, delete the
common/temp
folder, and runrush install
, you will the see PNPM complainsERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with ../../apps/app3/package.json
The expected behavior is that after we make some changes to dependenciesMeta
in package.json
, rush update
should update the pnpm-lock.yaml
under common/config/rush
. So that, the rush install
will not fail later.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question | Answer |
---|---|
@microsoft/rush globally installed version? |
5.109.1 |
rushVersion from rush.json? |
5.109.1 |
useWorkspaces from rush.json? |
pnpm workspace |
Operating system? | Mac |
Would you consider contributing a PR? | Yes |
Node.js version (node -v )? |
v16.20.2 |