mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-20 12:42:38 -04:00
Once the lockfile pins integrity for git-hosted tarballs, every
post-fetch reader (pkg-finder, store status, FUSE mounter,
skipIfHasSideEffectsCache in building/after-install) looks the package
up under storeIndexKey(integrity, pkgId). Three issues were exposed:
1. pkg-finder ran parse(packageId) and rebuilt name@version, but
packageIdFromSnapshot returns the URL alone for git-hosted (the
`:` in `https://` makes tryGetPackageId strip the `name@`
prefix). parse(URL) returns {} and the lookup key became
`…\tundefined@undefined`. Use packageId directly — that's the
form the writer in package-requester uses.
2. The FUSE handler and the after-install side-effects-cache lookup
used `${name}@${version}`, which doesn't match the resolver's
pkg.id for git-hosted (URL). Use
`nonSemverVersion ?? ${name}@${version}` so the readers compute
the same key the writer uses.
3. On the first install, integrity isn't known when
getFilesIndexFilePath runs, so the writer parks the index under
gitHostedStoreIndexKey. Once the worker computes integrity, the
git-hosted fetcher now also registers the entry under
storeIndexKey(integrity, pkgId), so subsequent integrity-based
lookups (the same install or any later one) resolve to the same
data without a refetch.
The license test that walks the lockfile right after install now
passes locally; that's the case that was failing in CI.
---
Written by an agent (Claude Code, claude-opus-4-7).
@pnpm/modules-mounter.daemon
Mounts a node_modules directory with FUSE
Installation
pnpm add @pnpm/modules-mounter.daemon --global
Usage
Before mounting the modules directory, all the packages should be fetched to the store. This can be done by running:
pnpm install --lockfile-only
Once the packages are in the store, run:
mount-modules
If something goes wrong and the modules directory will be not accessible, unmount it using:
unmount <path to node_modules>
License
MIT