Skip to content

feat: add npmrc_config input for enterprise npm registry - #1202

Open
Ankurjain1121 wants to merge 2 commits into
anthropics:mainfrom
Ankurjain1121:feat/npmrc-config-input
Open

Ankurjain1121 wants to merge 2 commits into
anthropics:mainfrom
Ankurjain1121:feat/npmrc-config-input

Conversation

@Ankurjain1121

Copy link
Copy Markdown

Summary

  • Adds npmrc_config action input for configuring private npm registries in air-gapped/enterprise environments
  • Writes provided content to ~/.npmrc before the Claude Code install step
  • Uses appendFile to avoid clobbering any existing .npmrc content

Relates to

Relates to #1188

Changes

  • action.yml — new npmrc_config input + INPUT_NPMRC_CONFIG env mapping
  • src/entrypoints/run.ts — writes .npmrc before installClaudeCode() when input is set

Test plan

  • Verify action runs without npmrc_config (no behavior change)
  • Verify with npmrc_config set — check ~/.npmrc contains the content before install step
  • Verify air-gapped environment can resolve packages via internal registry

Ankurjain1121 and others added 2 commits April 10, 2026 00:10
Add a new optional `npmrc_config` input that writes content to ~/.npmrc
before the install step. This allows users in air-gapped or enterprise
environments to configure private npm registries so bun install does not
hang trying to reach registry.npmjs.org.

Closes anthropics#1188
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GNnC84kKsCBPcUAy7gB3R4

This branch has not been deployed

No deployments
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.

1 participant