Skip to content

fix(setup): remove registry-url — it served nobody and invited a harmful config - #55

Merged
usetheodev merged 1 commit into
mainfrom
workspace
Sep 5, 2026
Merged

fix(setup): remove registry-url — it served nobody and invited a harmful config#55
usetheodev merged 1 commit into
mainfrom
workspace

Conversation

@usetheodev

Copy link
Copy Markdown
Contributor

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.yml pass registry-url, so adopting the shared setup
meant losing npm authentication"
.

That number came from grep -c registry-url. Where registry-url appears in those workflows is
inside a comment explaining why it 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. The job would publish with a config declaring a credential that
does not exist."

Measured by matching the YAML key rather than the string:

registry-url as a key      : 0 of 9
mentioned in a comment     : 7 of 9
publishing through OIDC    : 9 of 9

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-node call so the
absence reads as a decision rather than an oversight, and the CI job asserts the opposite
property: that the action writes no _authToken npmrc on a caller's behalf.

What survives the correction

The finding that prompted #54 is unaffected and still the largest duplication here:

workflows setting up node/pnpm : 22
using actions/setup@v1         :  1 file

The difference is that the blocker I described never existed. The action was a drop-in for
release.yml all along — nothing had to be added first, and the twenty conversions can proceed
against @v1 as it stood before #54.

…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.
@usetheodev
usetheodev merged commit 75e19fa into main Sep 5, 2026
10 checks passed
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.

2 participants