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

Open
#1,670 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions, node.js, typescript
Domain
ci-cd, devops, tooling

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
5k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from actions/setup-node

All issues in actions/setup-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.