Skip to content

docs: Node version file: Clarify effect of version range in engines.node #1081

Closed
@mk-pmb

Description

@mk-pmb

Description:
In docs/advanced-usage.md#node-version-file, explain what effect "engines": { "node": ">=16.0.0" } would have had if it was not overridden by the volta option.

Justification:
I cannot tell from reading whether the example would install node 16, 20, 21 or 22.

Are you willing to submit a PR?
Yes.

Activity

HarithaVattikuti

HarithaVattikuti commented on Jun 12, 2024

@HarithaVattikuti
Contributor

Hello @mk-pmb
We appreciate your suggestion for a new feature! We'll make sure to address it when we have the opportunity

self-assigned this
on Apr 9, 2025
priyagupta108

priyagupta108 commented on Apr 11, 2025

@priyagupta108
Contributor

Hi @mk-pmb 👋, thank you for your feedback!

When "engines": { "node": ">=16.0.0" } is specified and not overridden by volta.node, the action will install the highest available version that satisfies this range, in line with SemVer guidelines. This could include versions like 16.x, 18.x, 20.x, or any newer version that meets the requirement.

For more details on how version matching works, please refer to the SemVer documentation on ranges.

I hope this clears things up! Please feel free to reach out if you have further questions or suggestions. We truly appreciate your input!

mk-pmb

mk-pmb commented on Apr 11, 2025

@mk-pmb
Author

Thanks for the clarification! Next step would be to check if the example in the file still is confusing, and if so, add the clarification there. Maybe I can do that soon.

priyagupta108

priyagupta108 commented on Apr 18, 2025

@priyagupta108
Contributor

@mk-pmb 👋,
Sounds great — really appreciate your initiative on this!
If anything feels unclear while reviewing the example or if you think something could use more context, feel free to let us know. We're happy to help clarify or collaborate on improvements.

priyagupta108

priyagupta108 commented on May 2, 2025

@priyagupta108
Contributor

@mk-pmb,
Thanks for the suggestion! As discussed in PR #1284, we’ve decided not to add the npm docs link, as the use of engines.node with the setup-node action is already well-documented. To keep the documentation focused and relevant to this action, we’re closing this issue. Feel free to reach out with any further suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature requestNew feature or request to improve the current logic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @mk-pmb@HarithaVattikuti@priyagupta108

    Issue actions

      docs: Node version file: Clarify effect of version range in engines.node · Issue #1081 · actions/setup-node