Repository navigation
V5: Bundle the registry index as the offline fallback for lousho add - #685
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinuxDevil
force-pushed
the
v5-registry-bundled-fallback
branch
from
October 19, 2026 22:34
2c32a29 to
7723f53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes audit finding DX-13 (Vercel competitor audit, 2026-10-19).
What was wrong
lousho addhad no registry at all when the host did not resolve, GitHub was unreachable or the version's tag was never pushed (offline, outage).What changed
package.jsonfilesnow includesregistry/dist(index + item documents).openRegistryfalls back to the bundledregistry/dist/index.json(found viafindSdkRoot()) after the network URLs fail, printing a one-line stderr notice that the bundled (possibly older) registry is used. Items resolve relative to the local index path, so they load from the bundle too.--registry/LOUSHO_REGISTRYstill throwLOUSHO_REGISTRY_UNREACHABLE.openRegistryintoopenDefaultFallback(fallow complexity).docs/registry.mdupdated, llms regenerated.npm pack --dry-runlistsregistry/dist/index.json. size-check passes (12.62 MB vs 15.15 MB budget), budget untouched.Tests
src/cli/add.test.ts: with fetch failing for every URL,--listandadd code-reviewsucceed from the bundled path with the notice and receipt pointing at the bundled index; explicit--registryfailure still givesLOUSHO_REGISTRY_UNREACHABLEwith no bundled notice. Ran tsc, typecheck:tests, lint, test:coverage (needed --retry on Windows for load-flaky tests) and fallow (exit 0), docs:llms:check, size-check.Changelog:
lousho addfalls back to the registry bundled in the npm package when the default registry and its GitHub fallbacks are unreachable.🤖 Generated with Claude Code