Skip to content

Releases: kmalakoff/node-version-use

binary-v1.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Aug 17:03
Run nvu <version> <command> directly from the Go binary

Every `nvu` invocation was handed off to the JS CLI, and the binary located
that CLI under the version returned by resolveVersion() — the version the
user's command was meant to run under, not the version the CLI itself is
installed in. Those are different questions, and conflating them broke two
things:

- `nvu system <command>` could never work. The version argument is never
  parsed by the binary, so the "system" branch in runNvuCli was reachable
  only when .nvmrc or ~/.nvu/default already said "system".
- If node-version-use was not globally installed under the resolved version,
  nvu failed with "not installed in Node <version>" — including `nvu default`,
  the command needed to change the resolved version.

runDirect() now handles the cases the binary can already resolve on its own:
"system", or a single concrete version that is installed. It execs the command
directly, with that version's bin directory prepended to PATH and ~/.nvu/bin
stripped so the command's children resolve to real binaries rather than shims.

Everything else falls through to the CLI unchanged: subcommands, flags, version
lists (22,20,18), ranges, "engines", versions that are not installed yet, and
commands the version does not provide.

Ship it as binaryVersion 1.2.0, and put the version in the downloaded archive's
cache name. The cache key was the platform archive name alone, so an upgrade
found the previous release's archive, re-extracted the old binary, and then
wrote the new binaryVersion to nvu.json — marking the upgrade complete while
leaving the old binary in place. Without this, 1.2.0 could not reach anyone who
had installed before.

Only cache the archive after it extracts cleanly, and drop a cached archive
that fails to extract. get-file writes a 404 body to disk without reporting an
error, so a download attempted before the release assets were live cached the
9-byte string "Not Found"; every later run then logged "Using cached binary..."
and failed, with no path back short of clearing the cache by hand.

Also upgrade modules and bump CI to Node 26.

binary-v1.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Dec 20:08
Fix windows resolution

binary-v1.0.0

Choose a tag to compare

@github-actions github-actions released this 26 Dec 20:08
Fix windows resolution

v1.5.0

Choose a tag to compare

@kmalakoff kmalakoff released this 11 Jan 18:44

v1.4.10...v1.5.0

v1.4.10

Choose a tag to compare

@kmalakoff kmalakoff released this 11 Jan 18:27

v1.4.9...v1.4.10

v1.4.8

Choose a tag to compare

@kmalakoff kmalakoff released this 06 Jan 02:44

v1.4.7...v1.4.8

v1.4.7

Choose a tag to compare

@kmalakoff kmalakoff released this 05 Jan 21:35

v1.4.6...v1.4.7

v1.4.6

Choose a tag to compare

@kmalakoff kmalakoff released this 05 Jan 16:38

v1.4.5...v1.4.6

v1.4.5

Choose a tag to compare

@kmalakoff kmalakoff released this 05 Jan 16:16

v1.4.4...v1.4.5

v1.4.4

Choose a tag to compare

@kmalakoff kmalakoff released this 05 Jan 15:28

v1.4.3...v1.4.4