setup-node icon indicating copy to clipboard operation
setup-node copied to clipboard

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

Open mk-pmb opened this issue 1 year ago • 1 comments

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.

mk-pmb avatar Jun 12 '24 10:06 mk-pmb

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

HarithaVattikuti avatar Jun 12 '24 22:06 HarithaVattikuti

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!

priyagupta108 avatar Apr 11 '25 05:04 priyagupta108

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.

mk-pmb avatar Apr 11 '25 13:04 mk-pmb

@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 avatar Apr 18 '25 05:04 priyagupta108

@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!

priyagupta108 avatar May 02 '25 03:05 priyagupta108