[PR #998] [MERGED] Enhance private npm registry support #9773

Closed
opened 2026-02-16 18:14:08 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/998
Author: @nipuna-perera
Created: 7/15/2025
Status: Merged
Merged: 7/16/2025
Merged by: @thdxr

Base: devHead: add-npmrc-support


📝 Commits (1)

  • a35a620 feat: Enhance .npmrc detection for private registry configuration

📊 Changes

4 files changed (+238 additions, -164 deletions)

View changed files

📝 bun.lock (+146 -150)
📝 packages/opencode/src/bun/index.ts (+12 -14)
packages/opencode/test/bun.test.ts (+53 -0)
📝 packages/web/src/content/docs/docs/enterprise.mdx (+27 -0)

📄 Description

Fixes #409

This pull request refactors the package installation logic in bun/index.ts to improve flexibility by relying on Bun's native registry resolution and updates the documentation and tests accordingly. The most important changes include removing hardcoded registry parameters, adding tests to ensure proper behavior, and documenting support for private NPM registries.

Code Refactoring:

  • Removed hardcoded registry parameters from the BunProc.run command in bun/index.ts, allowing Bun to handle registry resolution automatically based on .npmrc files. Added logging to indicate this behavior.

Testing Enhancements:

  • Added new tests in bun.test.ts to verify that no hardcoded registry parameters are present, that Bun's default registry resolution is used, and that the command structure is correct without specifying a registry.

Documentation Updates:

  • Added a new section in enterprise.mdx explaining how to configure private NPM registries using .npmrc files, including examples for authentication with enterprise registries.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/998 **Author:** [@nipuna-perera](https://github.com/nipuna-perera) **Created:** 7/15/2025 **Status:** ✅ Merged **Merged:** 7/16/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `add-npmrc-support` --- ### 📝 Commits (1) - [`a35a620`](https://github.com/anomalyco/opencode/commit/a35a6209eccd3a72cd4c59f8373e054b960ec5bc) feat: Enhance .npmrc detection for private registry configuration ### 📊 Changes **4 files changed** (+238 additions, -164 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+146 -150) 📝 `packages/opencode/src/bun/index.ts` (+12 -14) ➕ `packages/opencode/test/bun.test.ts` (+53 -0) 📝 `packages/web/src/content/docs/docs/enterprise.mdx` (+27 -0) </details> ### 📄 Description Fixes #409 This pull request refactors the package installation logic in `bun/index.ts` to improve flexibility by relying on Bun's native registry resolution and updates the documentation and tests accordingly. The most important changes include removing hardcoded registry parameters, adding tests to ensure proper behavior, and documenting support for private NPM registries. ### Code Refactoring: * Removed hardcoded registry parameters from the `BunProc.run` command in `bun/index.ts`, allowing Bun to handle registry resolution automatically based on `.npmrc` files. Added logging to indicate this behavior. ### Testing Enhancements: * Added new tests in `bun.test.ts` to verify that no hardcoded registry parameters are present, that Bun's default registry resolution is used, and that the command structure is correct without specifying a registry. ### Documentation Updates: * Added a new section in `enterprise.mdx` explaining how to configure private NPM registries using `.npmrc` files, including examples for authentication with enterprise registries. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:08 -05:00
yindo closed this issue 2026-02-16 18:14:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9773