diff --git a/common/changes/@microsoft/rush/main_2024-01-31-21-44.json b/common/changes/@microsoft/rush/main_2024-01-31-21-44.json new file mode 100644 index 00000000000..3cf96298765 --- /dev/null +++ b/common/changes/@microsoft/rush/main_2024-01-31-21-44.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix an issue where `rush update` would sometimes not correctly sync the `pnpm-lock.yaml` file back to `common/config/rush/` after a project's `package.json` has been updated.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts b/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts index 26ea11c1cb6..5784bca4956 100644 --- a/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts +++ b/libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts @@ -303,10 +303,11 @@ export class WorkspaceInstallManager extends BaseInstallManager { } // Now, we compare these two objects to see if they are equal or not - shrinkwrapIsUpToDate = objectsAreDeepEqual( - packagePathToDependenciesMetaInPackageJson, - packagePathToDependenciesMetaInShrinkwrapFile - ); + shrinkwrapIsUpToDate = + objectsAreDeepEqual( + packagePathToDependenciesMetaInPackageJson, + packagePathToDependenciesMetaInShrinkwrapFile + ) && shrinkwrapIsUpToDate; } // Write the common package.json