Skip to content

setup-node: read Node version from package.json by default - #6

Merged
david-crespo merged 2 commits into
mainfrom
setup-node-version-file
Aug 29, 2026
Merged

david-crespo merged 2 commits into
mainfrom
setup-node-version-file

Conversation

@david-crespo

Copy link
Copy Markdown
Collaborator

Add a node-version-file input defaulting to package.json so the consuming repo's engines.node (or volta.node / devEngines.runtime) is the single source of truth for its Node version. node-version in the calling repo's action is an override; when it's set, the file input isn't passed through, avoiding setup-node's both-inputs warning.

The smoke test now covers both paths: a version from the fixture's engines field, and an explicit node-version override.

david-crespo and others added 2 commits August 28, 2026 22:46
Add a node-version-file input defaulting to package.json so the consuming
repo's engines.node (or volta.node / devEngines.runtime) is the single
source of truth for its Node version. node-version becomes an explicit
override with no default; when it's set, the file input isn't passed
through, avoiding setup-node's both-inputs warning.

Smoke test now covers both paths: version from the fixture's engines
field, and an explicit node-version override.
@david-crespo
david-crespo merged commit 0f10e5e into main Aug 29, 2026
5 checks passed
@david-crespo
david-crespo deleted the setup-node-version-file branch August 29, 2026 03:53
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