rush-resolver-cache-plugin: add pnpm 10 / lockfile v9 compatibility#5749
Open
rush-resolver-cache-plugin: add pnpm 10 / lockfile v9 compatibility#5749
Conversation
6034479 to
3ff472b
Compare
dmichon-msft
reviewed
Apr 7, 2026
rush-plugins/rush-resolver-cache-plugin/src/test/__snapshots__/helpers.test.ts.snap
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/test/helpers.test.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/afterInstallAsync.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/afterInstallAsync.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/afterInstallAsync.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/computeResolverCacheFromLockfileAsync.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/computeResolverCacheFromLockfileAsync.ts
Outdated
Show resolved
Hide resolved
bmiddha
added a commit
that referenced
this pull request
Apr 8, 2026
- Hoist regexes in depPathToFilename to module-level constants - Unify v6/v9 branches in getDescriptionFileRootFromKey using offset - Check specifier against packages list instead of regex heuristic - Extract detectV9Lockfile helper (iterates with early return, no clone) - Store version on IResolverContext when parsing lockfile keys - Extract getStoreIndexPath helper in afterInstallAsync - Use context.version instead of .split() on hot path - Fix undefined in snapshot test names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dmichon-msft
approved these changes
Apr 8, 2026
rush-plugins/rush-resolver-cache-plugin/src/afterInstallAsync.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/computeResolverCacheFromLockfileAsync.ts
Outdated
Show resolved
Hide resolved
rush-plugins/rush-resolver-cache-plugin/src/computeResolverCacheFromLockfileAsync.ts
Outdated
Show resolved
Hide resolved
bmiddha
added a commit
that referenced
this pull request
Apr 8, 2026
- Use readdirSync with { withFileTypes: true } to match only files
- Use lockfile.shrinkwrapFileMajorVersion directly (no cast needed)
- Extract extractNameAndVersionFromKey helper with unit tests
- Add comment explaining why depPathToFilename is inlined vs @pnpm/dependency-path
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add IPnpmVersionHelpers interface with version-specific implementations for dep-path hashing, lockfile key format, and store index paths - Vendor pnpm depPathToFilename from exact source commits for v8, v9, v10 - Organize helpers into pnpm/ subdirectory with shared modules for keys (v6/v9), store (v3/v10), depPath (v8/v9/v10), and hash functions - Detect pnpm major version from rush.json config or lockfile format - Add v9 lockfile test fixture and integration tests for pnpm 9 and 10 - Add unit tests for detectPnpmMajorVersion, getPnpmVersionHelpersAsync, resolveDependencyKey (33 tests total, up from 7) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
396e5a5 to
8bbb017
Compare
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
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.
Summary
add pnpm 10 / lockfile v9 compatibility to rush-resolver-cache-plugin
Details
rush-resolver-cache-plugin does not support v9 pnpm lockfile format
support pnpm lockfile format v9 and update tests for v6 and v9 format.
How it was tested
unit tests and manually tested integration with pnpm 10 repo.
Impacted documentation