-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: add support node
is an alias for the latest version
#418
Conversation
@bluelovers this should also add @bahagia97 any idea when this will be released? We go to production on the latest LTS but also want to test with the latest version to know ahead of time what our compatibility will be with the next LTS, so we currently use a node-version matrix like: matrix:
node-version: ['lts/*', '17'] but this would require updates to hundreds of repos when we get versions 18 and 19. This change will allow us to use matrix:
node-version: ['lts/*', 'node'] (or preferably |
Hi @bluelovers, This branch has conflicts with the main branch, so could you please resolve it. Also, you need to run npm build, to update the content of the /dist folder. There are some small spacing mistakes in the version.yaml workflow so can you please fix that as well. Cheers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment of @panticmilos.
And an additional stable
alias I would also prefer.
Edit:
Since NVM says "stable: this alias is deprecated, and only truly applies to node v0.12 and earlier. Currently, this is an alias for node" I would not add stable
alias.
@@ -373,6 +373,10 @@ async function queryDistForMatch( | |||
let versions: string[] = []; | |||
let nodeVersions = await getVersionsFromDist(); | |||
|
|||
if (versionSpec === 'node') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather go with latest
here. I get that there's prior art for node
, but it doesn't make much sense to me on its own merits.
The meaning of latest
is self-evident and matches other usage in Actions (ubuntu-latest
, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM does not support latest
.
So if you use a .nvmrc
file, like here described, latest
is not an option.
From the nvm docs:
…
- node: this installs the latest version of node
- iojs: this installs the latest version of io.js
- stable: this alias is deprecated, and only truly applies to node v0.12 and earlier. Currently, this is an alias for node.
- unstable: this alias points to node v0.11 - the last "unstable" node release, since post-1.0, all node versions are stable. (in SemVer, versions communicate breakage, not stability).
…
I would prefer to use the same aliases as NVM.
But I understand your thoughts on this.
Co-authored-by: Alexander Böhm <3983539+mheob@users.noreply.github.com>
c5d261e
to
91bdfe3
Compare
i can't build it from my env, so if can, can u build it afiter merge? |
Hi @bluelovers, Right now I am working on this feature. My PR will be really similar to yours, with some additional stuff added, so I will prepare everything. Cheers |
Hello everyone. Support for node alias was added. For now I'm going to close the issue. If you have any concerns feel free to ping us. |
I got error.
``
|
Same error if |
Hello @zdm. I've tried to use this snippet, but it works as expected. - name: Setup Node
uses: actions/setup-node@v3
with:
node-version: current
architecture: x64 Could you please share a link to the public repository to reproduce the issue. |
try matrix, pls |
error is when node-version: current used in matrix |
@zdm I've tried this one and everything works as expected: jobs:
test-setup-node:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
version: [current, latest, node]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- run: node --version
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
architecture: x64
- run: node --version |
ah, sorry, this is my mistake, array is required, i was confused by your example |
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.2 to 10.9.1. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](TypeStrong/ts-node@v10.8.2...v10.9.1) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/nvm-sh/nvm#usage
#279