Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

perf(pm): skip registry fetches on lockfile hits during install#76

Merged
viniciusdacal merged 1 commit into
mainfrom
viniciusdacal/skip-resolved-deps
Apr 1, 2026
Merged

perf(pm): skip registry fetches on lockfile hits during install#76
viniciusdacal merged 1 commit into
mainfrom
viniciusdacal/skip-resolved-deps

Conversation

@viniciusdacal
Copy link
Copy Markdown
Contributor

Summary

  • Adds bin and scripts fields to LockfileEntry so the lockfile is self-contained
  • On lockfile cache hits, resolve_recursive() now constructs ResolvedPackage directly from lockfile data — zero registry fetches when the lockfile is up-to-date
  • Updates lockfile parser/writer to serialize and parse the new bin: and scripts: sections (backward-compatible: old lockfiles without these fields default to empty maps)
  • Adds 4 new lockfile round-trip tests; all 3,616 existing tests pass

Previously, every vertz install with a lockfile still fetched full metadata from npm for every package (to get bin and scripts), making resolution slow even when nothing changed. This eliminates that bottleneck entirely.

🤖 Generated with Claude Code

Store bin and scripts in lockfile entries so that resolve_recursive()
can construct ResolvedPackage directly from lockfile data without
fetching metadata from the npm registry. This eliminates all network
calls during dependency resolution when the lockfile is up-to-date.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@viniciusdacal viniciusdacal merged commit c818dfc into main Apr 1, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant