Skip to content

chore(release): stop mutating global registry config in local-registry#5922

Merged
Coly010 merged 1 commit into
developfrom
kanad-claude/localhost-dependency-resolution-2a99c0
Jul 22, 2026
Merged

chore(release): stop mutating global registry config in local-registry#5922
Coly010 merged 1 commit into
developfrom
kanad-claude/localhost-dependency-resolution-2a99c0

Conversation

@kanadgupta

Copy link
Copy Markdown
Contributor

What

pnpm local-registry (the local Verdaccio helper for release testing) no longer redirects the global npm and pnpm registry config to localhost:4873 on startup, and no longer needs to restore it on shutdown. The cleanup handler now just kills Verdaccio, and additionally handles SIGHUP so closing the terminal window doesn't orphan the server. CONTRIBUTING.md is updated to match, and the troubleshooting table now covers recovering from the stale override left behind by older versions of the script.

Why

The restore path had holes that could leave a developer's machine pointed at a dead localhost registry, making every subsequent pnpm i fail:

  • The Verdaccio-crash path called process.exit(1) without restoring the registry.
  • SIGHUP (closing the terminal) wasn't handled, so no cleanup ran at all.
  • A partial restore failure only printed a warning, right as the terminal session was being torn down.

This bit for real: pnpm persists the override in its own global config (~/Library/Preferences/pnpm/auth.ini on macOS) rather than ~/.npmrc, so an ~/.npmrc-focused manual cleanup makes npm look healthy while pnpm silently keeps resolving from localhost:4873.

The global redirect was also unnecessary: local-release.ts already passes --registry explicitly to every publish command and writes a scoped .npmrc (with the auth token) into its temp publish dir, and the suggested npx / npm install -g smoke-test commands carry the flag too. With the redirect gone, there is no cleanup left to get wrong — a crash or hard kill can no longer corrupt the developer's registry config.

🤖 Generated with Claude Code

The local Verdaccio helper redirected the global npm and pnpm registry
config to localhost:4873 on startup and restored it in a SIGINT/SIGTERM
handler. That restore had holes — the verdaccio-crash path exited
without restoring, SIGHUP (closed terminal) wasn't handled, and a
partial failure only printed a warning — leaving developers' machines
pointed at a dead localhost registry. pnpm made this worse by
persisting the override in its own global auth.ini rather than ~/.npmrc,
where nobody looks.

The redirect was also unnecessary: local-release.ts already passes
--registry explicitly to every publish command and writes a scoped
.npmrc with the auth token into its temp publish dir, and the suggested
npx/npm smoke-test commands carry the flag too. Drop the global
set/restore entirely so there is no cleanup left to get wrong, and
handle SIGHUP so closing the terminal still kills verdaccio.

Update CONTRIBUTING.md to match and replace the stale troubleshooting
row with one that helps recover from the override left behind by older
versions of the script.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kanadgupta
kanadgupta requested a review from a team as a code owner July 21, 2026 22:16
@github-actions

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@61143e314e4196b650ab454e5af0838e7a8411de

Preview package for commit 61143e3.

@kanadgupta
kanadgupta marked this pull request as draft July 21, 2026 22:49
@kanadgupta
kanadgupta marked this pull request as ready for review July 22, 2026 00:10
@Coly010
Coly010 added this pull request to the merge queue Jul 22, 2026
Merged via the queue into develop with commit e44a2bd Jul 22, 2026
31 checks passed
@Coly010
Coly010 deleted the kanad-claude/localhost-dependency-resolution-2a99c0 branch July 22, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants