Skip to content

fix: ensure version file has precedence over default#163

Merged
Toolo merged 1 commit intomainfrom
b/fix_node_version_file_overrides
Jan 29, 2026
Merged

fix: ensure version file has precedence over default#163
Toolo merged 1 commit intomainfrom
b/fix_node_version_file_overrides

Conversation

@Toolo
Copy link
Contributor

@Toolo Toolo commented Jan 29, 2026

Description

The inline docs used to indicate that node-version-file would have priority over node-version but it wasn't true: node-version always has precedence. This PR modifies the action to match the expectation.

From actions/setup-node README:
image

Changes

  • fix: ensure version file has precedence over default

🚀 PR created with fotingo

@Toolo Toolo requested a review from a team as a code owner January 29, 2026 11:08
@github-actions
Copy link

Release notes preview

Below is a preview of the release notes if your PR gets merged.


3.3.3 (2026-01-29)

Bug Fixes

  • ensure version file has precedence over default (b06f839)

# Default to node 20 but use the .node-version file if it exists in the consumer repo
node-version: "24"
node-version-file: .node-version
node-version: ${{ steps.node-version.outputs.version }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only downside of this approach is that renovatebot won't be able to pick this up for automated node version bumps

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably do it with a regex https://docs.renovatebot.com/modules/manager/regex/#regular-expression-capture-groups + tweaking the file

Copy link

@antoninmorvan antoninmorvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 . Strange that this error didn't occurred before 🤔

# Default to node 20 but use the .node-version file if it exists in the consumer repo
node-version: "24"
node-version-file: .node-version
node-version: ${{ steps.node-version.outputs.version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably do it with a regex https://docs.renovatebot.com/modules/manager/regex/#regular-expression-capture-groups + tweaking the file

@Toolo Toolo merged commit 9072ea0 into main Jan 29, 2026
11 checks passed
@Toolo Toolo deleted the b/fix_node_version_file_overrides branch January 29, 2026 17:24
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.

4 participants