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

Ouverte
#1,657 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
62/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
github-actions, node.js, typescript
Domaine
ci-cd, devops

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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
Langage dominant
TypeScript
Étoiles
5k
Forks
1.7k
Merge moyen
2 j 4 h
PR mergées (30 j)
1

Préparer son environnement

  • Aucun Dockerfile ni fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de actions/setup-node

Toutes les issues de actions/setup-node

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.