Skip to content

feat: un-hardcode NPM registry URL and get from npm config#22783

Open
entr0pia wants to merge 3 commits intoanomalyco:devfrom
entr0pia:dev
Open

feat: un-hardcode NPM registry URL and get from npm config#22783
entr0pia wants to merge 3 commits intoanomalyco:devfrom
entr0pia:dev

Conversation

@entr0pia
Copy link
Copy Markdown

@entr0pia entr0pia commented Apr 16, 2026

Issue for this PR

Closes #11387

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR removes hardcoded references to https://registry.npmjs.org in several core packages and scripts. Instead, it dynamically retrieves the configured NPM registry using the idiomatic bun shell ($) to execute
pm config get registry.

How did you verify your code works?

Verification steps:

  1. Configured a custom registry via
    pm config set registry <custom_url>.
  2. Verified that opencode correctly identifies the custom registry in background package management tasks.
  3. Confirmed that focused type checks pass in opencode and @opencode-ai/shared.
  4. Verified that @opencode-ai/script builds successfully.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found two potentially related PRs:

  1. PR fix: respect npm config cwd for plugin installs #22765: "fix: respect npm config cwd for plugin installs"

  2. PR feat(script): respect npm_config_registry for version lookup #11388: "feat(script): respect npm_config_registry for version lookup"

Both PRs are related to handling npm configuration dynamically rather than hardcoding values, which aligns with the goals of PR #22783. PR #11388 specifically targets npm registry configuration, making it the most closely related.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Version lookup ignores configured npm registry

1 participant