Skip to content

ci: build with node v27 - #7573

Open
shivarm wants to merge 1 commit into
expressjs:masterfrom
shivarm:ci-1
Open

shivarm wants to merge 1 commit into
expressjs:masterfrom
shivarm:ci-1

Conversation

@shivarm

@shivarm shivarm commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

let's wait for stable release- https://github.com/nodejs/node/releases

@shivarm
shivarm marked this pull request as draft October 31, 2026 08:11

@UlisesGascon UlisesGascon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that might want to make a specific step for alpha versions as we do for the legacy (https://github.com/expressjs/express/blob/master/.github/workflows/legacy.yml)?

Also seems like we need to wait a bit until this is solved: actions/setup-node#1657

@shivarm

shivarm commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

I think that might want to make a specific step for alpha versions as we do for the legacy (https://github.com/expressjs/express/blob/master/.github/workflows/legacy.yml)?

Yes! We can have new workflow

Also seems like we need to wait a bit until this is solved: actions/setup-node#1657

We can use node-version: latest or explicit version like node-version: 27.0.0-alpha.0.0.0

@shivarm
shivarm marked this pull request as ready for review October 31, 2026 14:52
@shivarm
shivarm requested a review from UlisesGascon October 31, 2026 14:52

@subhiandrews subhiandrews left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

code-check review

1 warning

Reviewed with code-check · Apache-2.0

# Workaround for actions/setup-node#1657: `27`, `27.0.0` and `27.0.0-alpha`
# are not recognized yet, but `latest` currently resolves to the newest Alpha.
# Once setup-node adds `allow-prereleases: true`, switch to `node-version: 27`.
node-version: [latest]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning · ci

node-version: [latest] is a floating alias, not Node 27, yet this workflow exists to test Node 27 (PR title: 'build with node v27'). Nothing in the job checks which version was installed: the 'Output Node and NPM versions' step only echoes node -v. setup-node's latest normally resolves to the newest stable release, and only the comment on lines 33-36 says it currently picks the Alpha. If latest resolves to stable, this job repeats the Node 26 run already in ci.yml (line 49) and still passes. It reports nothing about 27, and with continue-on-error: true nobody would notice. It will also drift to 27.0.0 stable and then 28 with no change to this file, and the job label will just read 'latest'. Note that the reviewers' suggested pins (27.0.0-alpha) are the very values the comment says setup-node does not accept yet, so add a version guard instead. Also confirm from a run log that v27.x is installed. The PR description itself suggests waiting for setup-node support.

Suggested change
node-version: [latest]
- name: Assert Node.js 27
shell: bash
run: node -e "if (process.versions.node.split('.')[0] !== '27') { console.error('Expected Node 27, got ' + process.version); process.exit(1) }"

code-check · architect, pragmatist, skeptic

@shivarm shivarm Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. You're right that latest is a floating alias and nothing in the job verifies that Node 27 was actually installed so this could silently run on stable and still pass.

suggestion replaces line 37 node-version: [latest] which sits inside the matrix: block. That would put a step into the matrix and remove matrix.node-version which the job name and the setup-node step both use. I've kept the matrix as it is and added the same assertion as a separate step right after setup-node so the job fails if the installed major version isn't 27.

I'm keeping latest for now because 27, 27.0.0 and 27.0.0-alpha aren't accepted by setup-node actions/setup-node#1657 so pinning isn't an option. The comment in the matrix explains this and I'll switch to node-version: 27 and drop the guard once that's supported.

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