Files
pnpm/modules-mounter/daemon
Zoltan Kochan ec6473e95e fix: align git-hosted store readers with the integrity-keyed writer
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).
2026-05-06 02:00:36 +02:00
..
2023-05-14 17:26:00 +03:00
2026-05-05 19:50:32 +02:00
2026-05-05 19:50:32 +02:00
2023-05-14 17:26:00 +03:00

@pnpm/modules-mounter.daemon

Mounts a node_modules directory with FUSE

npm version

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