-
Notifications
You must be signed in to change notification settings - Fork 659
Closed
Description
Summary
During the process of upgrading the project from [email protected] to [email protected], an error occurred as shown in the following image when executing rush update --recheck.
Repro steps
Find a package in pnpm-lock.yaml with sha1 integrity. Use [email protected] and run rush update --recheck.
Expected result: Update the lockfile successfully.
Actual result: Failed.
Details
I think the problem is here:
rushstack/libraries/rush-lib/src/logic/pnpm/PnpmShrinkwrapFile.ts
Lines 602 to 615 in 745aec6
| /** | |
| * Normalize dependency paths for PNPM shrinkwrap files. | |
| * Example: "/[email protected]([email protected])" --> "/[email protected]" | |
| * Example: "/@typescript-eslint/experimental-utils/[email protected][email protected]" --> "/@typescript-eslint/experimental-utils/5.9.1" | |
| */ | |
| private _parseDependencyPath(packagePath: string): string { | |
| let depPath: string = packagePath; | |
| if (this.shrinkwrapFileMajorVersion >= ShrinkwrapFileMajorVersion.V6) { | |
| depPath = this._convertLockfileV6DepPathToV5DepPath(packagePath); | |
| } | |
| const pkgInfo: ReturnType<typeof pnpmKitV8.dependencyPath.parse> = | |
| pnpmKitV8.dependencyPath.parse(depPath); | |
| return this._getPackageId(pkgInfo.name as string, pkgInfo.version as string); | |
| } |
I think the code above need to handle the lockfile version v9 scenario.
Tried to fix this issue in #5525
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/rush globally installed version? |
5.164.0 |
rushVersion from rush.json? |
5.164.0 |
pnpmVersion, npmVersion, or yarnVersion from rush.json? |
[email protected] |
(if pnpm) useWorkspaces from pnpm-config.json? |
Yes |
| Operating system? | Mac |
| Would you consider contributing a PR? | Yes |
Node.js version (node -v)? |
22.20.0 |
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Closed