mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-20 12:42:38 -04:00
The migration block that copies a git-hosted tarball entry from the legacy gitHostedStoreIndexKey to storeIndexKey(integrity, pkgId) was calling storeIndex.has() on every fetch, including all npm-registry packages it has no business probing — a SELECT per package, multiplied across thousands of dependencies. Reorder so the URL prefix check (isGitHostedPkgUrl) and the integrity presence check run first, and the SQLite lookup only runs for git-hosted resolutions with integrity in the lockfile. Same migration behaviour, ~zero overhead on the hot path. --- Written by an agent (Claude Code, claude-opus-4-7).