Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ node -v
`vfox search nodejs` lists every release, with the npm that comes with it and a
mark on the ones of an LTS line. In an interactive terminal it lets you pick one.

Behavior that only exists on `main` and not in the latest release is marked
"Unreleased" in the pages below. [docs/changes.md](docs/changes.md) lists it, and
[docs/source-build.md](docs/source-build.md) gets you `main`.

### Example: Ubuntu 26.04

```bash
Expand Down Expand Up @@ -70,9 +66,7 @@ The Node.js musl builds need `libstdc++`, and the ones of 26.8.0 and later need
`libatomic` as well. A stock Alpine image has neither, and the plugin does not
install system libraries. The install stops with a message that names the
missing package and the command that installs it (`apk add libatomic`; OpenWrt
calls `libstdc++` the `libstdcpp` package). Unreleased: release 0.5.2 checks for
`libstdc++` only, and a missing `libatomic` shows when `node` fails with `Error
loading shared library libatomic.so.1`. musl builds exist for x64 and arm64
calls `libstdc++` the `libstdcpp` package). musl builds exist for x64 and arm64
only. musl details (OpenWrt, tarball matrix, mirror fallback, which releases
have a build): see [docs/musl.md](docs/musl.md).

Expand All @@ -91,10 +85,9 @@ Node.js publishes packages for Linux (x64, arm64, ppc64le, s390x), macOS (x64 an
arm64) and Windows (x64, arm64, and x86 up to 22.x). Not every release has every
one of them: Windows on ARM starts at 19.9.0, Linux arm64 at 4.0.0, Apple silicon
at 16.0.0 (older releases install the x64 package under Rosetta 2). 32-bit ARM
Linux has packages up to 23.11.1. Unreleased: release 0.5.2 cannot install them.
riscv64 and loong64 are not supported. `vfox search` lists every release
whatever your platform is. See [docs/platforms.md](docs/platforms.md) for the
table.
Linux has packages up to 23.11.1. riscv64 and loong64 are not supported.
`vfox search` lists every release whatever your platform is. See
[docs/platforms.md](docs/platforms.md) for the table.

## npm and global packages

Expand Down
6 changes: 2 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ node -v

`vfox search nodejs` 会列出每个版本及其自带的 npm,属于 LTS 版本线的版本带有标记。在交互式终端里可以从中选一个。

只存在于 `main`、还没进入最新发布版的行为,在下面各页里标有“未发布”。[docs/zh-CN/changes.md](docs/zh-CN/changes.md) 里列出了这些行为,想直接用上 `main`,见 [docs/zh-CN/source-build.md](docs/zh-CN/source-build.md)。

### 示例:Ubuntu 26.04

```bash
Expand All @@ -54,15 +52,15 @@ vfox install nodejs@24
vfox use --global nodejs@24
```

Node.js 的 musl 构建需要 `libstdc++`,26.8.0 及以后的构建还需要 `libatomic`。原版 Alpine 镜像两者都没有,而插件不会安装系统库。安装会中止,并给出一条提示,写明缺少哪个包以及安装它的命令(`apk add libatomic`;OpenWrt 把 `libstdc++` 称为 `libstdcpp` 包)。未发布:0.5.2 只检查 `libstdc++`,缺少 `libatomic` 时,要到 `node` 运行失败、报 `Error loading shared library libatomic.so.1` 才能发现。musl 构建只提供 x64 和 arm64。musl 的详细情况(OpenWrt、压缩包对照表、镜像回退、哪些版本有构建)见 [docs/zh-CN/musl.md](docs/zh-CN/musl.md)。
Node.js 的 musl 构建需要 `libstdc++`,26.8.0 及以后的构建还需要 `libatomic`。原版 Alpine 镜像两者都没有,而插件不会安装系统库。安装会中止,并给出一条提示,写明缺少哪个包以及安装它的命令(`apk add libatomic`;OpenWrt 把 `libstdc++` 称为 `libstdcpp` 包)。musl 构建只提供 x64 和 arm64。musl 的详细情况(OpenWrt、压缩包对照表、镜像回退、哪些版本有构建)见 [docs/zh-CN/musl.md](docs/zh-CN/musl.md)。

## 版本与命名

版本就是版本号:`24.21.0`,也可以只写开头的部分,如 `24.21` 和 `24`,它们安装对应版本线的最新版本。`latest` 是所有版本线中最新的版本,不论是否属于 LTS。这里没有 `lts` 别名,请写明版本线(`nodejs@24`)。安装后的版本名就是版本号 `24.21.0`,`vfox uninstall` 需要写完整。`vfox use` 和 `vfox search` 怎样处理这些写法,详见 [docs/zh-CN/versions.md](docs/zh-CN/versions.md)。

## 平台

Node.js 为 Linux(x64、arm64、ppc64le、s390x)、macOS(x64 和 arm64)和 Windows(x64、arm64,以及到 22.x 为止的 x86)发布包。并不是每个版本都有上面所有的包:Windows on ARM 从 19.9.0 起,Linux arm64 从 4.0.0 起,Apple silicon 从 16.0.0 起(更早的版本在 Rosetta 2 下安装 x64 的包)。32 位 ARM Linux 到 23.11.1 为止有包。未发布:0.5.2 无法安装它们。不支持 riscv64 和 loong64。不论你的平台是什么,`vfox search` 都会列出所有版本。表格见 [docs/zh-CN/platforms.md](docs/zh-CN/platforms.md)。
Node.js 为 Linux(x64、arm64、ppc64le、s390x)、macOS(x64 和 arm64)和 Windows(x64、arm64,以及到 22.x 为止的 x86)发布包。并不是每个版本都有上面所有的包:Windows on ARM 从 19.9.0 起,Linux arm64 从 4.0.0 起,Apple silicon 从 16.0.0 起(更早的版本在 Rosetta 2 下安装 x64 的包)。32 位 ARM Linux 到 23.11.1 为止有包。不支持 riscv64 和 loong64。不论你的平台是什么,`vfox search` 都会列出所有版本。表格见 [docs/zh-CN/platforms.md](docs/zh-CN/platforms.md)。

## npm 与全局包

Expand Down
34 changes: 24 additions & 10 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@

What changed in each release, as a user notices it. GitHub's
[release pages](https://github.com/version-fox/vfox-nodejs/releases) list the
pull requests. The newest release at the time of writing is 0.5.2, and `main` is
ahead of it by everything under "Unreleased".
[source-build.md](source-build.md) gets you those changes now.
pull requests.

## Unreleased
## 0.5.3 (2026-10-20)

- 32-bit ARM Linux installs the `linux-armv7l` package, which Node.js published
up to 23.11.1: `vfox install nodejs@20` works there. vfox's `armv7` build
reports `arm`, and release 0.5.2 asks for `linux-arm`, which does not exist, so
every install on 32-bit ARM ends with `Node.js package
node-v20.19.5-linux-arm.tar.gz is not listed in ...`. From 24 on there is no
package, and the ARMv6 one is never chosen. See
[platforms.md](platforms.md#not-supported).
[platforms.md](platforms.md#not-supported)
([#41](https://github.com/version-fox/vfox-nodejs/pull/41)).
- On musl the install stops when the unpacked `node` cannot run for lack of a
library. After the unpack the plugin runs `node --version` once, and the dynamic
loader names what is missing. The musl packages of 26.8.0 and later need
Expand All @@ -27,7 +26,8 @@ ahead of it by everything under "Unreleased".
install succeeds and `node` fails with `Error loading shared library
libatomic.so.1`. The message about `libstdc++` names its command too, where
release 0.5.2 says `It is normally installed automatically`. See
[musl.md](musl.md#requirements).
[musl.md](musl.md#requirements)
([#41](https://github.com/version-fox/vfox-nodejs/pull/41)).
- `.nvmrc` and `.node-version` name a release by its numbers under
`legacyVersionFile.strategy` `latest_installed` and `latest_available`. With
22.9.0 and 22.23.3 installed, `22` selects 22.23.3, where release 0.5.2 selects
Expand All @@ -36,14 +36,28 @@ ahead of it by everything under "Unreleased".
nothing for `22.x`. Only a leading `v` is dropped, so `lts/<codename>` works for
a codename with a `v` in it. Text that is no release number (`node`, `(`,
`22[`) is left alone, where release 0.5.2 fails with `unfinished capture at
EOS` and vfox hides the error. See [nvmrc.md](nvmrc.md#how-a-prefix-is-matched).
EOS` and vfox hides the error. See
[nvmrc.md](nvmrc.md#how-a-prefix-is-matched)
([#41](https://github.com/version-fox/vfox-nodejs/pull/41)).
- A failed request for `SHASUMS256.txt` says why: `get checksum failed: HTTP 404
from https://nodejs.org/dist/v24.99.0/SHASUMS256.txt`, or the network error,
such as `x509: certificate signed by unknown authority`. Release 0.5.2 prints
`get checksum failed` and nothing else. See
[troubleshooting.md](troubleshooting.md#messages-from-the-plugin).
- `VFOX_NODEJS_MIRROR` may end in several slashes. Release 0.5.2 strips one.
- The documentation has a Chinese version, see [README_CN.md](../README_CN.md).
[troubleshooting.md](troubleshooting.md#messages-from-the-plugin)
([#41](https://github.com/version-fox/vfox-nodejs/pull/41)).
- `VFOX_NODEJS_MIRROR` may end in several slashes. Release 0.5.2 strips one
([#41](https://github.com/version-fox/vfox-nodejs/pull/41)).
- The documentation has a page for versions and names, platforms, `.nvmrc` and
`.node-version`, npm, troubleshooting, development and the changes, and a
Chinese version, see [README_CN.md](../README_CN.md)
([#41](https://github.com/version-fox/vfox-nodejs/pull/41)).
- The Windows e2e suite runs from the host through `tests/e2e/windows/run.ps1`,
which replaces the Docker Compose runner. The script fetches PowerShell,
PortableGit and Go into a cache that every combo container mounts read-only at
`C:\tools`, so no image runs the PowerShell MSI and the Git installer any
more, and CI starts all the Windows combos at once. See
[e2e.md](e2e.md#windows-11)
([#40](https://github.com/version-fox/vfox-nodejs/pull/40)).

## 0.5.2 (2026-10-17)

Expand Down
22 changes: 12 additions & 10 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ fallback when that finds nothing or the request fails.
`vfox` then selects the answer if it is installed. User-facing rules and
examples are in [nvmrc.md](nvmrc.md) and [lts.md](lts.md).

Unreleased: release 0.5.2 matches the query as a Lua pattern against the start of
each release, in the order vfox lists them, and takes the first one that matches.
See [nvmrc.md](nvmrc.md#how-a-prefix-is-matched).

## When Node.js promotes a line to LTS

Each October an even-numbered line gets a codename, see
Expand Down Expand Up @@ -253,12 +249,18 @@ Afterwards `plugins/nodejs.json` in
[vfox-plugins](https://github.com/version-fox/vfox-plugins) shows the version
that `vfox add nodejs` serves.

The documentation marks what is newer than the last release with "Unreleased"
("未发布" in Chinese). After a release, move those entries in
[changes.md](changes.md) under the new version and take the remarks out, in both
languages: `grep -rn -i -e unreleased -e 未发布 docs README*`. Also search for
the number of the previous release: a few sentences compare against it without
saying "Unreleased".
While `main` is ahead of the last release, the documentation marks what is newer
with "Unreleased" ("未发布" in Chinese): the entries sit under an "Unreleased"
heading at the top of [changes.md](changes.md), a page that describes the new
behavior adds a remark that starts with "Unreleased: release X.Y.Z" and tells
what the last release does, and the README has a paragraph that explains the
mark and points at [changes.md](changes.md) and
[source-build.md](source-build.md). After a release, move the entries in
[changes.md](changes.md) under the new version, with the pull request of each,
and take the remarks and the README paragraph out, in both languages:
`grep -rn -i -e unreleased -e 未发布 docs README*`. Also search for the number of
the previous release: a few sentences compare against it without saying
"Unreleased".

## Writing the docs

Expand Down
5 changes: 2 additions & 3 deletions docs/mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ VFOX_NODEJS_MIRROR=https://example.invalid/dist vfox search nodejs
```

On the same mirror `vfox install nodejs@24.21.0` fails with `get checksum failed:
Get "https://example.invalid/dist/v24.21.0/SHASUMS256.txt": ...` (Unreleased:
release 0.5.2 leaves out what follows `failed`). A mirror that serves no
`index.json` at that address fails the search with
Get "https://example.invalid/dist/v24.21.0/SHASUMS256.txt": ...`. A mirror that
serves no `index.json` at that address fails the search with
`Failed to fetch Node.js versions: HTTP 404`, see
[troubleshooting.md](troubleshooting.md#network). vfox caches the search for 12
hours, so after a change run `vfox config cache.availableHookDuration 0` or
Expand Down
9 changes: 5 additions & 4 deletions docs/musl.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ gets the message without a command. A symbol that the libraries lack, which the
loader reports as `Error relocating ...: symbol not found`, ends in `Node.js
(musl build) cannot run on this system: Error relocating ...`.

Unreleased: release 0.5.2 looks for `libstdc++` only, and its message says `It
is normally installed automatically; install it and reinstall.` instead of
naming the command. It does not look for `libatomic`: the install succeeds, and
`node` then fails.
The loader prints this for a missing `libatomic`, and the hook reads the name of
the library from it. Before 0.5.3 the plugin did not run `node` after the
unpack, so a release that an earlier version of the plugin installed fails with
these lines when you run it. Installing the library is all it needs, there is
nothing to reinstall:

```text
Error loading shared library libatomic.so.1: No such file or directory (needed by /root/.vfox/cache/nodejs/v-26.12.0/nodejs-26.12.0/bin/node)
Expand Down
10 changes: 0 additions & 10 deletions docs/nvmrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ Before it looks at the text, the plugin removes all whitespace, drops a leading
the newest release with that codename. A release number may end in `x`, `X` or
`*` for the parts it leaves open: `22.x`, `22.x.x` and `22.*` all mean 22.

Unreleased: release 0.5.2 drops every `v` of the file, so a codename with a `v`
in it does not match, and it does not know `22.x`.

The results on 2026-10-21 with 20.20.2, 22.23.3, 24.21.0, 25.9.0 and 26.12.0
installed, when 24.22.0 is the newest 24.x and 22.23.3 the newest 22.x:

Expand Down Expand Up @@ -126,13 +123,6 @@ starts with it:
22.3.0 and 22.23.3 installed, `22` selects 22.23.3 and `22.3` selects 22.3.0.
`vfox use nodejs@22` compares numbers as well.

Unreleased: release 0.5.2 compares text, and takes the first installed release
that starts with it. `22.2` also matches `22.23.3`, and with 22.9.0 and 22.23.3
installed `22` under `latest_installed` selects 22.9.0 (checked with 22.9.0,
22.3.0 and 22.23.3 installed). Keep one release per line installed, or write the
full release number, to get the same answer there. The text is also used as a
Lua pattern, so `22.*` happens to work and `22.x` does not.

## Not finding it

If the release does not switch:
Expand Down
6 changes: 2 additions & 4 deletions docs/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ in [development.md](development.md#refreshing-the-platform-table).
| Linux ppc64le | `linux-ppc64le.tar.gz` | 4.3.2 and later, except 5.0.0 to 5.6.0 |
| Linux s390x | `linux-s390x.tar.gz` | 6.6.0 and later |
| Linux 386 | `linux-x86.tar.gz` | 0.8.6 to 9.11.2, except 0.9.0, 0.11.4 and 0.11.6 |
| Linux arm | `linux-armv7l.tar.gz` | 4.0.0 to 23.11.1, except 8.1.1. Unreleased: release 0.5.2 asks for `linux-arm`, which Node.js never published, so every install fails |
| Linux arm | `linux-armv7l.tar.gz` | 4.0.0 to 23.11.1, except 8.1.1 |
| Linux amd64, musl | `linux-x64-musl.tar.gz` | see [musl.md](musl.md#which-releases-have-a-musl-build) |
| Linux arm64, musl | `linux-arm64-musl.tar.gz` | see [musl.md](musl.md#which-releases-have-a-musl-build) |
| macOS amd64 | `darwin-x64.tar.gz` | 0.8.6 and later, except 0.9.0, 0.11.4 and 0.11.6 |
Expand All @@ -65,9 +65,7 @@ above, see [troubleshooting.md](troubleshooting.md#messages-from-the-plugin).
Node.js published up to 23.11.1. From 24 on there is none, and the install
ends with `Node.js package node-v26.12.0-linux-armv7l.tar.gz is not listed in
...`. The ARMv6 package (`linux-armv6l`, 4.0.0 to 11.15.0 on nodejs.org) is
never chosen. Unreleased: release 0.5.2 asks for `linux-arm`, which Node.js
never published, so every install on 32-bit ARM fails with `Node.js package
node-v20.19.5-linux-arm.tar.gz is not listed in ...`.
never chosen.
- **Linux riscv64 and loong64.** nodejs.org has no packages for them. The
[Unofficial Builds](https://github.com/nodejs/unofficial-builds) site has
riscv64 (17.7.1 to 26.0.0) and loong64 (18.18.0 and later), but the plugin
Expand Down
2 changes: 1 addition & 1 deletion docs/source-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and `lib/` at its top level; that is the plugin package contract (see the
[shared workflow documentation](https://github.com/version-fox/plugin-manifest-action)).

A released plugin zip URL also works as `--source`, e.g.
`vfox add --source https://github.com/version-fox/vfox-nodejs/releases/download/v0.0.5/vfox-nodejs_0.0.5.zip`.
`vfox add --source https://github.com/version-fox/vfox-nodejs/releases/download/v0.5.3/vfox-nodejs-0.5.3.zip`.

Prerequisites on all systems: [vfox](https://github.com/version-fox/vfox)
itself plus `git`.
Expand Down
27 changes: 9 additions & 18 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ by unknown authority`, `... connection refused`, `... EOF`) means the server
could not be reached: a mirror that is down, a proxy, a TLS problem. See
[Network](#network).

Unreleased: release 0.5.2 prints `get checksum failed` and nothing else, so the
cause is hidden. `vfox search nodejs` asks the same server for the index and
prints the real error.

### `Node.js package node-v19.8.1-win-arm64.zip is not listed in https://nodejs.org/dist/v19.8.1/SHASUMS256.txt`

The release exists, and Node.js published no package for your platform under the
Expand Down Expand Up @@ -73,16 +69,11 @@ The message names the package, and the command that installs it on Alpine
after the unpack and nothing is registered. Install the library and run the
install again. See [musl.md](musl.md#requirements).

Unreleased: release 0.5.2 looks for `libstdc++` only, and its message has no
command. A missing `libatomic` shows later, as an error of `node` itself, see
below.

### `Node.js (musl build) cannot run on this system: Error relocating ...`

The unpacked `node` needs a symbol that no library of the system provides. The
install fails after the unpack and nothing is registered. Unreleased: release
0.5.2 does not run `node` after the unpack, and the error shows when you run it.
See [musl.md](musl.md#requirements).
install fails after the unpack and nothing is registered. See
[musl.md](musl.md#requirements).

### `checksum error`

Expand Down Expand Up @@ -142,12 +133,13 @@ These come from `node` after a successful install.
- `Error loading shared library libatomic.so.1: No such file or directory`,
followed by `Error relocating ...: __atomic_compare_exchange: symbol not
found`, on Alpine. The musl packages of 26.8.0 and later need `libatomic`:
`apk add libatomic`. Unreleased: the install itself stops with the message
above, and release 0.5.2 gets this far. See [musl.md](musl.md#requirements).
`apk add libatomic`. Since 0.5.3 the install itself stops with the message
above, so this is a release that an earlier version installed. See
[musl.md](musl.md#requirements).
- `Error relocating ... symbol not found` on a musl system, without the
`libatomic` line above. A library is missing or too old. Unreleased: the
install stops with `cannot run on this system`, and release 0.5.2 gets this
far. See [musl.md](musl.md#requirements).
`libatomic` line above. A library is missing or too old. Since 0.5.3 the
install stops with `cannot run on this system` when `node --version` fails
like this. See [musl.md](musl.md#requirements).

## Network

Expand Down Expand Up @@ -175,8 +167,7 @@ While `proxy.enable` is `false`, the usual `HTTP_PROXY`, `HTTPS_PROXY` and
as `proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused`.

The usual failures of `vfox search nodejs`. `vfox install` reports the same cause
after `get checksum failed:`. Unreleased: release 0.5.2 leaves it out, and only
the search prints it:
after `get checksum failed:`:

| After `Failed to fetch Node.js versions:` | Cause |
| --- | --- |
Expand Down
Loading
Loading