fix: remove registry-url from setup-node to avoid conflicts with semantic-release#48
fix: remove registry-url from setup-node to avoid conflicts with semantic-release#48
Conversation
📝 WalkthroughWalkthroughThe setup-node-and-install action now accepts a new optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Integration Test Resultsnpm-pr-version action test:
The action is working correctly! 🎉 |
Previously, registry-url was hardcoded to 'https://registry.npmjs.org/' which could conflict with semantic-release's npm authentication. Changes: - Made registry-url an optional input parameter (defaults to not set) - When not provided, no .npmrc authentication is configured - Added comprehensive documentation on when to use (or not use) this parameter This allows users to: - Skip registry-url when using semantic-release (recommended) - Skip registry-url when only installing dependencies (most common use case) - Explicitly set registry-url when needed for manual npm publish workflows See semantic-release docs for more context: https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#important-avoid-registry-url-in-setup-node
f2e248e to
ce21910
Compare
|
Claude encountered an error —— View job Code Review in Progress
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@setup-node-and-install/README.md`:
- Line 93: The README row for `registry-url` is inside the auto-generated
section between the HTML markers <!-- start inputs --> and <!-- end inputs -->
and must not be manually edited; re-run the README generation tool that produces
docs from action.yml so the `registry-url` input (and its row) is regenerated
from action.yml instead of hand-editing the README, ensuring content between
those markers is only updated by the generator.
| | `node-version` | Node.js version to install (e.g. "24", "lts/\*"). Precedence: node-version input > .node-version > .nvmrc > package.json volta.node. | No | - | | ||
| | `install-options` | Extra command-line options to pass to npm/pnpm/yarn install. | No | - | | ||
| | `working-directory` | Directory containing package.json and lockfile. | No | `.` | | ||
| | `registry-url` | Registry URL for npm authentication (e.g. "https://registry.npmjs.org/"). See [Registry URL Configuration](#registry-url-configuration) below. | No | - | |
There was a problem hiding this comment.
This line is inside auto-generated markers and may be overwritten.
Line 93 falls between <!-- start inputs --> and <!-- end inputs --> markers. Per coding guidelines, content between HTML comment markers is auto-generated and should not be manually edited. Ensure the auto-generation tool is run so this row is produced from action.yml rather than hand-edited here.
As per coding guidelines, "NEVER edit content between HTML comment markers in README files (doctoc markers, action docs markers, inputs/outputs markers). These indicate auto-generated content that will be overwritten."
🤖 Prompt for AI Agents
In `@setup-node-and-install/README.md` at line 93, The README row for
`registry-url` is inside the auto-generated section between the HTML markers
<!-- start inputs --> and <!-- end inputs --> and must not be manually edited;
re-run the README generation tool that produces docs from action.yml so the
`registry-url` input (and its row) is regenerated from action.yml instead of
hand-editing the README, ensuring content between those markers is only updated
by the generator.

Previously, registry-url was hardcoded to 'https://registry.npmjs.org/' which could conflict with semantic-release's npm authentication.
Changes:
registry-urlan optional input parameter (defaults to not set).npmrcauthentication is configuredGuidance:
registry-urlwhen using semantic-release (recommended)registry-urlwhen only installing dependencies (most common use case)registry-urlwhen needed for manual npm publish workflowsSee semantic-release docs for more context: https://semantic-release.gitbook.io/semantic-release/recipes/ci-configurations/github-actions#important-avoid-registry-url-in-setup-node
Summary by CodeRabbit
New Features
registry-urlinput parameter for npm registry authentication setupDocumentation