Verify latest release
pnpm version
12.1.0
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/eblocha/pnpm-link-directory
Reproduction steps
The linked repo is set up to reproduce by running pnpm i. It will link project-a's dist instead of the source.
Set up a workspace where project-b depends on project-a, and project-a uses publishConfig.directory pointed at dist.
Run pnpm i
Now change project-a to set publishConfig.linkDirectory to false, then rerun pnpm i
The dist directory under project-a is still linked in project-b's node_modules, and the lockfile is unchanged.
Describe the Bug
pnpm does not recheck publishConfig.linkDirectory when running pnpm i.
Expected Behavior
pnpm i should update the lockfile + workspace layout to link to the correct location specified. If --frozen-lockfile is used, the command should fail if the location in the lockfile and the location described by publishConfig do not match.
Which Node.js version are you using?
24.20.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
Verify latest release
pnpm version
12.1.0
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/eblocha/pnpm-link-directory
Reproduction steps
The linked repo is set up to reproduce by running
pnpm i. It will linkproject-a'sdistinstead of the source.Set up a workspace where
project-bdepends onproject-a, andproject-ausespublishConfig.directorypointed atdist.Run
pnpm iNow change
project-ato setpublishConfig.linkDirectorytofalse, then rerunpnpm iThe
distdirectory underproject-ais still linked inproject-b'snode_modules, and the lockfile is unchanged.Describe the Bug
pnpm does not recheck
publishConfig.linkDirectorywhen runningpnpm i.Expected Behavior
pnpm ishould update the lockfile + workspace layout to link to the correct location specified. If--frozen-lockfileis used, the command should fail if the location in the lockfile and the location described bypublishConfigdo not match.Which Node.js version are you using?
24.20.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response