fix(setup): remove registry-url — it served nobody and invited a harmful config - #55
Merged
Conversation
…ful config The input added in #54 was justified by 'seven of the nine release.yml pass registry-url'. That number came from a grep that counted the word wherever it appeared, and where it appears is inside a comment in seven of those workflows explaining why the setting is deliberately absent: NO registry-url. It looks harmless and is not: setup-node writes //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} into an npmrc UNCONDITIONALLY and points NPM_CONFIG_USERCONFIG at it, then exports NODE_AUTH_TOKEN only if the caller supplied one -- which, under OIDC, nobody does. Matching the YAML key instead of the string: zero of nine use it, and all nine publish through actions/npm-oidc. The input served nobody and its docstring invited the exact configuration this ecosystem had already found and documented as harmful. The reasoning now lives beside the setup-node call so the absence reads as a decision, and the CI job asserts the opposite property: the action writes no _authToken npmrc on a caller's behalf. The finding that prompted #54 survives: 22 workflows set up Node and pnpm by hand and one file uses this action. The blocker was imagined; the duplication is real and the action was a drop-in all along.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corrects #54, which I opened, justified and merged an hour ago on a false premise.
The premise, and why it was false
#54 said: "seven of the nine
release.ymlpassregistry-url, so adopting the shared setupmeant losing npm authentication".
That number came from
grep -c registry-url. Whereregistry-urlappears in those workflows isinside a comment explaining why it is deliberately absent:
Measured by matching the YAML key rather than the string:
So the input served nobody, and its docstring — "a publishing job needs it" — invited the exact
configuration this ecosystem had already found, understood, and written down as harmful. An unused
input is inert; an unused input with confident wrong documentation is a trap for the next person
converting a release workflow.
What this does
Removes the input and the passthrough. The reasoning moves next to the
setup-nodecall so theabsence reads as a decision rather than an oversight, and the CI job asserts the opposite
property: that the action writes no
_authTokennpmrc on a caller's behalf.What survives the correction
The finding that prompted #54 is unaffected and still the largest duplication here:
The difference is that the blocker I described never existed. The action was a drop-in for
release.ymlall along — nothing had to be added first, and the twenty conversions can proceedagainst
@v1as it stood before #54.