[PR #11388] feat(script): respect npm_config_registry for version lookup #13769

Open
opened 2026-02-16 18:18:36 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11388

State: open
Merged: No


What does this PR do?

The script fetches from registry.npmjs.org to get the latest published version, but ignores the user's configured npm registry. This reads from npm_config_registry env var (automatically set by npm/bun from user config) and falls back to the default.

Useful for airgapped environments or internal mirrors.

How did you verify your code works?

npm config set registry https://internal-mirror/
bun run script/build.ts

Fixes: #11387

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11388 **State:** open **Merged:** No --- ### What does this PR do? The script fetches from `registry.npmjs.org` to get the latest published version, but ignores the user's configured npm registry. This reads from `npm_config_registry` env var (automatically set by npm/bun from user config) and falls back to the default. Useful for airgapped environments or internal mirrors. ### How did you verify your code works? ```bash npm config set registry https://internal-mirror/ bun run script/build.ts ``` Fixes: #11387
yindo added the pull-request label 2026-02-16 18:18:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13769