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
No response
Reproduction steps
Install a git package within a subdirectory, creating the following entry in package.json:
{
"dependencies": {
"package-name": "github:user/repo#hash&path:my-subdir"
}
}
Describe the Bug
When using a Git dependency with a specified subdirectory (docs), the path "query param" gets removed from the lockfile during regular (related to that dependency or not) pnpm is:
package-name@https://codeload.github.com/user/repo/tar.gz/<hash>#path:my-subdir:
resolution: {gitHosted: true, path: my-subdir, tarball: https://codeload.github.com/user/repo/tar.gz/<hash>}
version: 0.0.1
The path property gets randomly (and frequently) removed, failing the package resolution.
Note that it's unaffected by whether a hash/branch is present for that dependency in the package.json (docs).
I don't know if it's relevant, but the repo contains a dot.
Expected Behavior
The property not to get removed
Which Node.js version are you using?
26.3.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Ubuntu
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
No response
Reproduction steps
Install a git package within a subdirectory, creating the following entry in
package.json:{ "dependencies": { "package-name": "github:user/repo#hash&path:my-subdir" } }Describe the Bug
When using a Git dependency with a specified subdirectory (docs), the
path"query param" gets removed from the lockfile during regular (related to that dependency or not)pnpm is:The
pathproperty gets randomly (and frequently) removed, failing the package resolution.Note that it's unaffected by whether a hash/branch is present for that dependency in the
package.json(docs).I don't know if it's relevant, but the
repocontains a dot.Expected Behavior
The property not to get removed
Which Node.js version are you using?
26.3.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Ubuntu