You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Rush repo, with PNPM as package manager, add a dependency to a file
Do a rush update
Then change globalPackageExtension
Do a rush update
Expected result:
Rush should update the lockfile
Actual result:
Rush skips the checks and didn't update lockfile
Workaround is that we should run rush update --recheck
Details
When globalPackageExtension has been updated and libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts needs to mark shrinkwrapIsUpToDate as false too.
However, package extension is represented as a checksum in the shrinkwrap file (packageExtensionsChecksum). That means we need to calculate the checksum of pnpm-config.json's globalPackageExtension and compare it wit the checksum from the shrinkwrap file.
I checked how pnpm did it (ref) and I guess we can copy the part, but what's missing is the sortKeys function. In pnpm, it is using [email protected] but not sure if we should introduce an external dependencies for this case... What do you think?
Summary
Similar to #4820
Discovered when doing #4898
Repro steps
rush update
rush update
Expected result:
Rush should update the lockfile
Actual result:
Rush skips the checks and didn't update lockfile
Workaround is that we should run
rush update --recheck
Details
When
globalPackageExtension
has been updated andlibraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts
needs to markshrinkwrapIsUpToDate
as false too.However, package extension is represented as a checksum in the shrinkwrap file (
packageExtensionsChecksum
). That means we need to calculate the checksum of pnpm-config.json'sglobalPackageExtension
and compare it wit the checksum from the shrinkwrap file.I checked how pnpm did it (ref) and I guess we can copy the part, but what's missing is the
sortKeys
function. In pnpm, it is using [email protected] but not sure if we should introduce an external dependencies for this case... What do you think?Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?The text was updated successfully, but these errors were encountered: