Provide `allow-prereleases` option for Node.js 27 Alpha

未关闭
#1,657 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
62/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, node.js, typescript
领域
ci-cd, devops

调研方向

Read the version input handling and Node.js version resolution entry points, then compare how actions/setup-python handles allow-prereleases, as linked in the issue. Check the existing tests for version selection and add coverage for the default false behavior and enabling prerelease resolution. Done when node-version: 27 selects the available alpha only with the option enabled.

由索引模型根据 Issue 内容生成。

描述

feature request

Description:

Add an option allow-prereleases, like in actions/setup-python, so that Node.js 27 Alpha can be selected simply using:

    - uses: actions/setup-node@v7
      with:
        node-version: 27
        allow-prereleases: true

allow-prereleases should default to false.

Justification:

Evolving the Node.js Release Schedule explains how Node.js has introduced a 6 month Alpha phase for new Node.js release lines. This is important for pre-testing and it replaces the previous system of odd- and even-numbered releases, where only the even-numbered release lines were promoted to LTS (Long Term Support).

For ongoing CI testing during the 6 month Alpha phase, GitHub Actions workflows need to be able to specify a generic version of Node.js 27 without having to update a workflow every time there is a new Alpha release (probably every 2 weeks):

None of the following are currently recognized:

  • 27
  • 27.0.0
  • 27.0.0-alpha

only the explicit 27.0.0-alpha.0.0.0 is working:

    - uses: actions/setup-node@v7
        with:
        node-version: 27.0.0-alpha.0.0.0

Are you willing to submit a PR?

No, I won't be able to do this.

Workaround

Specify the exact Node.js Alpha version or latest:

    - uses: actions/setup-node@v7
        with:
        node-version: 27.0.0-alpha.0.0.0
    - uses: actions/setup-node@v7
        with:
        node-version: latest

Logs

Run actions/setup-node@v7
Attempting to download 27.0.0-alpha.0.0.0...
Not found in manifest. Falling back to download directly from Node
Acquiring 27.0.0-alpha.0.0.0 - x64 from https://nodejs.org/dist/v27.0.0-alpha.0.0.0/node-v27.0.0-alpha.0.0.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/c05d6fa5-ba28-44d7-91cc-40190b158d8f -f /home/runner/work/_temp/92c81dc9-5787-4156-bc71-a2b3900392cf
Adding to the cache ...
Done
Environment details
  node: v27.0.0-alpha.0.0.0
  npm: 12.1.0
  yarn: 1.22.22
主要语言
TypeScript
星标
5k
派生
1.7k
平均合并
2 天 4 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

actions/setup-node 的其他 Issue

查看 actions/setup-node 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。