Repository navigation
npm Connect panel: show the replace-registry-host command - #835
Merged
Merged
Conversation
An npm repository's Connect sidebar lists `npm config set registry` and the scoped variant; it now also offers `npm config set replace-registry-host <package-lock.json-host>`, so a package-lock.json written against another registry downloads its tarballs through this one. npm rewrites registry.npmjs.org URLs by itself; another registry's host it has to be told. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012e6DJXfcjjRxskuvtSWDNo
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.
An npm repository's Connect sidebar (repository page,
PackageConnect) already listsnpm config set registry …and the scopednpm config set @<scope>:registry …. It now also lists:The new line is labelled Install a package-lock.json written against another registry and sits between the scope line and
npm login. With it set, npm downloads the tarballs of a lockfile written against another registry through this repository. npm already rewritesregistry.npmjs.orgURLs on its own, so the setting is only needed for other hosts.No issue asks for this UI change, so this pull request fixes none, following AGENTS.md. Its changelog fragment uses a short name:
docs/changes/2.2.0/npm-replace-registry-host.feature.md. The full guide to moving lockfiles is #655, a docs issue. That guide explains howreplace-registry-hostbehaves in each npm version, including which lockfile URLs a bare host name rewrites correctly, and it stays a pull request of its own.Changes
web/src/components/PackageConnect.tsx: the new npm snippet.web/src/components/PackageConnect.test.ts: the expected npm commands include it.docs/changes/2.2.0/npm-replace-registry-host.feature.md: changelog fragment.Testing
pnpm run tsc: clean.pnpm exec vitest run src/components/PackageConnect.test.ts src/routes: 26 files, 353 tests pass.cargo xtask changelog --check: 57 fragments, all for milestones after 2.1.0.Generated by Claude Code