Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .node-version by default #683

Open
stevelacey opened this issue Jan 30, 2023 · 3 comments
Open

Support .node-version by default #683

stevelacey opened this issue Jan 30, 2023 · 3 comments
Labels
feature request New feature or request to improve the current logic

Comments

@stevelacey
Copy link

stevelacey commented Jan 30, 2023

Description:
In addition to supporting the node-version and node-version-file inputs, the workflow should check .node-version when neither input is supplied, and only fallback to latest if neither input was supplied, and that file does not exist.

Justification:
Specifying node-version/node-version-file in every setup-node usage is tedious and inconsistent with other setup-{lang} actions which usually check a version file by default in addition to supporting a {lang}-version-file input.

The setup-python and setup-ruby actions already do this, they use .python-version/.ruby-version files if they exist and no inputs are passed, and setup-php will automatically use .php-version once shivammathur/setup-php#690 is released.

Are you willing to submit a PR?
Yes, absolutely, it may be worth supporting .nvmrc too given it's popularity, but maybe that's contentious, I haven't found any other actions that support a version manager's version file, though IIRC Heroku does honor it.

@stevelacey stevelacey added feature request New feature or request to improve the current logic needs triage labels Jan 30, 2023
@stevelacey stevelacey changed the title Support .nvmrc and .node-version by default Support .node-version by default Jan 30, 2023
stevelacey added a commit to stevelacey/setup-node that referenced this issue Jan 30, 2023
@MaksimZhukov
Copy link
Contributor

Hello @stevelacey ! Thank you for the suggested idea!
We will consider adding this feature and will let you know as soon as we have any decision.

@amq
Copy link

amq commented Mar 22, 2023

For comparison, ruby/setup-ruby supports this:
https://github.com/ruby/setup-ruby#supported-version-syntax

@taylorkline
Copy link

taylorkline commented Mar 27, 2024

@MaksimZhukov I am dropping by, not to +1, but to ask if there are any updates on the follow-up:

We will consider adding this feature and will let you know as soon as we have any decision.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

5 participants
@stevelacey @taylorkline @amq @MaksimZhukov and others