Skip to content

feat: add npmrc_config input for enterprise npm registry#1202

Open
Ankurjain1121 wants to merge 1 commit intoanthropics:mainfrom
Ankurjain1121:feat/npmrc-config-input
Open

feat: add npmrc_config input for enterprise npm registry#1202
Ankurjain1121 wants to merge 1 commit intoanthropics: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

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
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