Resolve mise aliases such as `lts` when reading mise.toml

Abierto
#1,670 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 7 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, node.js, typescript
Área
ci-cd, devops, tooling

Línea de trabajo

Start by tracing how mise.toml values flow from getNodeVersionFromFile into isLtsAlias and version resolution. Check the existing tests for mise version files and LTS aliases, then add coverage for node = "lts"; done means it resolves as the current LTS or returns a clear error for unsupported mise aliases.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Description:

node-version-file: mise.toml (added in v7.1.0, #1421) reads [tools] node and passes the value through unchanged. Values that are valid for mise but are not in setup-node's version syntax then fail to resolve.

The common case is LTS:

# mise.toml
[tools]
node = "lts"
- uses: actions/[email protected]
  with:
    node-version-file: mise.toml

getNodeVersionFromFile returns lts. isLtsAlias only matches values that start with lts/, so lts is treated as a semver range, matches no release, and the step fails.

Proposal: when the version comes from mise.toml, translate mise's aliases to setup-node's syntax before resolving. At minimum, map lts to lts/*. Other mise-specific aliases could be handled the same way, or rejected with a clear error that names the unsupported value.

Justification:

A mise.toml is written for mise, and node = "lts" is the usual way to ask mise for the current LTS. Users who adopt the new mise.toml support expect the file they already have to work. Today the only option is to rewrite it as lts/*, which makes the file depend on setup-node's syntax instead of mise's, or to keep a separate node-version input in the workflow, which defeats the point of reading the file.

Are you willing to submit a PR?

Not at this time.

Lenguaje dominante
TypeScript
Estrellas
5k
Forks
1.7k
Merge medio
5 d 1 h
PR fusionados (30 d)
1

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de actions/setup-node

Todos los issues de actions/setup-node

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.