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

Bump Node.js used in GitHub workflows to 18 #28

Merged

Conversation

pmeinhardt
Copy link
Collaborator

Node.js 18 is the current, active Node.js version slated to enter LTS in
a couple of days on October 25 (2022):

https://github.com/nodejs/release#release-schedule

Node.js 18 is the current, active Node.js version slated to enter LTS in
a couple of days on October 25 (2022):

https://github.com/nodejs/release#release-schedule
@pmeinhardt
Copy link
Collaborator Author

Alternatively, the value for node-version could be set to lts/* or current (as per https://github.com/actions/setup-node#usage) to avoid having to (remember to) update this from time to time – at the expense of future builds starting to break due to version incompatibilities (which might even be considered desirable). Thoughts?

@klappradla
Copy link
Member

I like the idea of switching to lts and maybe even combining that with a .nvmrc which points out to use lts for development. The tickety tick repo has a similar setup and it's the - for now - only place where this package is used.

Doing the switch to lts in tickety tick decreased some of the maintenance efforts there from what I remember.

I'd therefore vote for lts instead of 18. But happy about more opinions 👀

@pmeinhardt
Copy link
Collaborator Author

pmeinhardt commented Oct 13, 2022

Sweet @klappradla. I'll update this PR to switch to lts/* instead (and will add a .nvmrc).

Some additional findings:

While checking the setup-node action's documentation on adding a version file I saw there is some discussion around a .node-version file instead of .nvmrc. I personally like that the name is much clearer and it neatly aligns with other version file conventions such as .ruby-version and .python-version. Unfortunately nvm - as of now - does not have support for this and might never have. Its maintainer raises some concerns over lacking standardization and "fluid" version identifiers like lts/* in particular seem to not be supported by all Node.js version managers.

I still think your suggestion of having a .nvmrc version file is valuable. Both because a lot of developers use nvm and because it also provides a single place to inspect and update the desired Node.js version (with the GitHub workflow files referencing the file). This seems like a worthwhile improvement.

For additional reading, see:

- Switch to Node.js LTS for development and GitHub actions
- Add .nvmrc file
Copy link
Member

@klappradla klappradla left a comment

Choose a reason for hiding this comment

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

Perfect ✨

I'd of course also prefer .node-version as a filename, but as long as it's discoverable and readable by version managers and Co, I don't have super strong feelings.

I'm not even using nvm, but if I remember correctly, asdf can also work with the lts identifiers.

@klappradla klappradla merged commit 24e3383 into bitcrowd:main Oct 18, 2022
@pmeinhardt pmeinhardt deleted the update-workflow-node-version-to-lts-16 branch October 18, 2022 11:42
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.

3 participants