Skip to content

feat(resolver): support lts/-N LTS offset notation - #42

Merged
coreybutler merged 1 commit into
mainfrom
feat/lts-offset-notation
Nov 25, 2026
Merged

coreybutler merged 1 commit into
mainfrom
feat/lts-offset-notation

Conversation

@coreybutler

Copy link
Copy Markdown
Contributor

What

Add unix-nvm-compatible lts/-N version offsets in common/resolver. lts/-1 resolves to the previous unique LTS line (newest-first catalog). Names under lts/ that start with - are offset syntax only.

Why

Cross-platform CI configs use lts/-N (nvm-sh). Without this, NVM for Windows treats lts/-1 as an unknown codename. Refs nvm-windows/nvm#917.

Testing

  • go test common/resolver via nvm cli/src replace paths (unit fixtures for happy path, syntax errors, out-of-range).
  • Cases: lts/-1/lts/-2, lts/-0, lts/-, lts/-1x, lts/--1, lts/-10+1, oversized offset, empty LTS catalog.

Risk

Low. Additive alias only. Invalid forms that previously failed as unknown codenames now fail with clearer offset errors.

Match unix nvm: lts/-1 is the previous LTS line. Reject
invalid offsets (lts/-0, non-digits) with clear errors.

Refs #917

Signed-off-by: Corey Butler <770982+coreybutler@users.noreply.github.com>
@coreybutler
coreybutler merged commit bb4aea5 into main Nov 25, 2026
2 checks passed
@coreybutler
coreybutler deleted the feat/lts-offset-notation branch November 25, 2026 05:10
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.

1 participant