Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
Lockfile
Link to the code that reproduces this issue or a replay of the bug
https://github.com/DASPRiD/pnpm-issue-workspace-unlinking
Reproduction steps
- Clone repository
- Run
pnpm i
- Check
pnpm-lock.yaml and see that @pnpm-issue-workspace-unlinking/b has version link:../b
- CD into
packages/a and run pnpm i redis && pnpm rm redis (or any other package, doesn't matter)
- Check
pnpm-lock.yaml again, the version of @pnpm-issue-workspace-unlinking/b is now file:packages/b
Describe the Bug
For some reason, upon package removal in a workspace package, all workspace:* links in the pnpm-lock.yaml file for that package are changed from link: to file: protocol, which breaks how they are included.
Expected Behavior
Workspace packages should stay as version link: protocol.
Which Node.js version are you using?
22.15.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
PopOS 22.04
Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
Lockfile
Link to the code that reproduces this issue or a replay of the bug
https://github.com/DASPRiD/pnpm-issue-workspace-unlinking
Reproduction steps
pnpm ipnpm-lock.yamland see that@pnpm-issue-workspace-unlinking/bhas versionlink:../bpackages/aand runpnpm i redis && pnpm rm redis(or any other package, doesn't matter)pnpm-lock.yamlagain, the version of@pnpm-issue-workspace-unlinking/bis nowfile:packages/bDescribe the Bug
For some reason, upon package removal in a workspace package, all
workspace:*links in thepnpm-lock.yamlfile for that package are changed fromlink:tofile:protocol, which breaks how they are included.Expected Behavior
Workspace packages should stay as version
link:protocol.Which Node.js version are you using?
22.15.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
PopOS 22.04