-
Notifications
You must be signed in to change notification settings - Fork 657
[rush] Upgrade pnpm-sync-lib to v0.3.3 for pnpm v10 compatibility
#5254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
iclanton
merged 14 commits into
microsoft:main
from
gavinxgu:guxiang/upgrade-pnpm-sync-lib-to-0.3.3
Dec 23, 2025
Merged
[rush] Upgrade pnpm-sync-lib to v0.3.3 for pnpm v10 compatibility
#5254
iclanton
merged 14 commits into
microsoft:main
from
gavinxgu:guxiang/upgrade-pnpm-sync-lib-to-0.3.3
Dec 23, 2025
+1,444
−111
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b31e5f2 to
2985261
Compare
Contributor
Author
|
@iclanton Could you please review my code? Thank you! |
octogonz
reviewed
Jun 17, 2025
iclanton
approved these changes
Jun 18, 2025
e13d10a to
8790575
Compare
8790575 to
8055d31
Compare
Contributor
|
@gavinxgu Any updates updates here? Would love to see pnpm 10 support land ❤️ |
…de-pnpm-sync-lib-to-0.3.3 # Conflicts: # apps/lockfile-explorer/package.json # apps/lockfile-explorer/src/utils/shrinkwrap.ts # common/config/rush/browser-approved-packages.json # common/config/subspaces/build-tests-subspace/pnpm-lock.yaml # common/config/subspaces/build-tests-subspace/repo-state.json # common/config/subspaces/default/common-versions.json # common/config/subspaces/default/pnpm-lock.yaml # common/config/subspaces/default/repo-state.json # libraries/rush-lib/package.json # libraries/rush-lib/src/logic/base/BaseInstallManager.ts # libraries/rush-lib/src/logic/pnpm/IPnpmfile.ts # libraries/rush-lib/src/logic/pnpm/PnpmShrinkWrapFileConverters.ts # libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts # libraries/rush-sdk/package.json
…mplemented after this PR was started
octogonz
reviewed
Dec 3, 2025
octogonz
reviewed
Dec 3, 2025
octogonz
reviewed
Dec 3, 2025
iclanton
reviewed
Dec 11, 2025
This reverts commit 6ede3d3.
octogonz
approved these changes
Dec 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tiktok/pnpm-sync#40
tiktok/pnpm-sync#43
Summary
Upgrade
pnpm-sync-libto v0.3.3 for pnpm v10 compatibilityDetails
1. Upgrade pnpm-sync-lib to Version 0.3.3
Updated
package.jsonto upgrade pnpm-sync-lib from the previous version to 0.3.3, ensuring full compatibility with pnpm v10. This change builds upon the foundation established in tiktok/pnpm-sync#40 (pnpm v9 support) and tiktok/pnpm-sync#43 (pnpm v10 support).2. Adopt Official pnpm
readWantedLockfileMethodsIntegrated official pnpm methods in
BaseInstallManager.tsto support both v6 and v9 lockfile formats:This implementation provides backward compatibility while supporting the latest pnpm lockfile formats, with automatic detection based on lockfile version.
3. Enhanced Multi-Version pnpm Support
During the upgrade to pnpm v10, packages like
@pnpm/lockfile-fileand@pnpm/lockfile.fshave peer dependency requirements for@pnpm/logger, but these dependencies were not being properly satisfied, causing warnings or errors during installation.Solution Implementation
The solution leverages the
pnpm-kitarchitecture - a set of version-specific wrapper packages that encapsulate pnpm functionality for different pnpm versions. As part of this upgrade, three new rush-pnpm-kit packages were added (@rushstack/rush-pnpm-kit-v8,@rushstack/rush-pnpm-kit-v9, and@rushstack/rush-pnpm-kit-v10) to provide comprehensive support across pnpm versions. This modular approach allows Rush to support multiple pnpm versions simultaneously while ensuring proper dependency resolution.1. Adding @pnpm/logger as Direct Dependencies
@pnpm/loggerhas been added as a direct dependency in eachpnpm-kitpackage:libraries/rush-pnpm-kit-v8/package.json{ "dependencies": { "@pnpm/dependency-path-pnpm-v8": "npm:@pnpm/dependency-path@~2.1.8", "@pnpm/lockfile-file-pnpm-lock-v6": "npm:@pnpm/lockfile-file@~8.1.8", "@pnpm/logger": "~5.0.0" } }libraries/rush-pnpm-kit-v9/package.json{ "dependencies": { "@pnpm/dependency-path-pnpm-v9": "npm:@pnpm/dependency-path@~5.1.7", "@pnpm/lockfile.fs-pnpm-lock-v9": "npm:@pnpm/lockfile.fs@~1001.1.11", "@pnpm/logger": "~1001.0.0" } }libraries/rush-pnpm-kit-v10/package.json{ "dependencies": { "@pnpm/dependency-path-pnpm-v10": "npm:@pnpm/dependency-path@~1000.0.9", "@pnpm/lockfile.fs-pnpm-lock-v9": "npm:@pnpm/lockfile.fs@~1001.1.11", "@pnpm/logger": "~1001.0.0" } }2. Modular Encapsulation and Export
Each package exports similar modules with version-appropriate implementations:
3. Usage in Other Packages
In
libraries/rush-lib/src/logic/base/BaseInstallManager.ts, different kit versions are imported to handle different lockfile formats:How it was tested
Impacted documentation