v0.41.02026-11-04
New Stuff
- select versions by category: alpha, lts, non-lts, iojs; exclude alphas by default
- nvm alias: store --lts and --lts=<name>
- record every node version's LTS status
- nvm ls-remote: annotate versions with the node alias and local aliases (#3920)
- add nvmhasitalics, to detect terminal italics support via terminfo
Bug Fixes
- nvm: treat a bare --only like an empty --only=
- nvmlsremote, nvmremoteversion: match dots between version components literally (#3982)
- nvmnvmrcinvalid_msg: respect --silent
- nvmdownload: pass $NVMAUTH_HEADER to curl and GNU Wget in a config file, not as an argument
- nvmlsremoteindextab, nvmremoteversion, nvmlscached: pass the version pattern to grep with -e
- nvmdieon_prefix: never let a project .npmrc choose which npmrc file --delete-prefix edits
- nvmdownloadartifact: only put an archive in the cache once its checksum has passed
- nvmnormalizelts, nvmlsremoteindextab: keep untrusted text out of shell arithmetic and LTS aliases
- nvm install: keep nvm options after the version out of ./configure (#3981)
- nvm install: apply --alias, --default and --save after every install (#3981)
- nvm install: don't leave NVMNOPROGRESS set in the caller's shell
- nvmgetdefault_packages: ignore CRLF line endings (#3979)
- install.sh: ignore commented-out profile source lines (#3860)
- nvmprintimplicit_alias: keep STABLE bound, and STABLE and UNSTABLE independent of the caller (#3975)
- nvm_ls: treat a version dir with only hidden entries as empty (#3974)
- ls: list versions whose directory is a symlink (#3973)
- nvmdieon_prefix: check a nonexistent prefix on Windows (#3972)
- install.sh: only write $HOME when $NVM_DIR is inside it (#3962)
- nvmisversionoralias: reject uppercase LTS names in every locale
- nvmprocessnvmrc: don't show the content of a symlinked .nvmrc
- nvmwritenvmrc: don't write through a symlinked .nvmrc
- nvmls: match NVMDIR literally
- nvm use: do not pile up PATH entries in nested sessions (#3959)
- nvmfilterinstalledversions, nvmfilterltsversions, nvmrecordltsstatus, nvmgetdefaultpackages: keep backslashes in NVM_DIR paths
- nvmstrippath: preserve literal backslashes in NVM_DIR (#3958)
- nvmfindup, nvmfindproject_dir: stop at a Windows drive root instead of looping forever (#3968)
- nvmlscached: match dots in the version literally, and ignore a trailing dot (#3961)
- install.sh: nvmcheckglobal_modules: don't run a Windows npm under WSL (#3966)
- nvm: ignore option variables set by the caller
- nvm reinstall-packages: don't print VERSION='' in zsh
- nvmalias, nvmlsremoteindex_tab, nvm use: return the exit code of a failed check
- nvmprintversions: don't mark N/A as installed
- nvm_ls: no blank line before system when nothing is installed
- nvmprintversions: widen the version column for long versions
- nvm_ls: match a prerelease only up to a .
- nvm_ls: list every installed prerelease, in semver order
- nvm uninstall: only remove aliases that point at the uninstalled version
- nvmlscached: only match whole version numbers
- nvm debug: don't let the shell read stdin when asked for its version
- nvmdownload: with GNU Wget, follow only same-origin redirects when sending $NVMAUTH_HEADER
- nvmdownload: only send $NVMAUTH_HEADER to URLs under a mirror it applies to
- install.sh: don't let a git repository in the current directory affect git ls-remote
- nvmremoteversions: only consult io.js's version list for majors 1 through 3
- nvmremoteversions: place io.js versions by major version, not at the literal v4.0.0
- nvm.sh: detect NVMDIR without $0/$; fall back to the default install location instead of the working directory
- nvmprocessnvmrc_content: reject control characters
- nvmdownloadartifact, nvm debug: mask credentials in mirror URLs when printing them
- nvminstallbinary, nvminstallsource: only use a tarball that nvmdownloadartifact put in the cache
- nvmdownload, nvmget_latest, install.sh: pass -q to curl first, so .curlrc is ignored again
- nvmisversioninstalled: fail when nvmversion_path fails
- nvm use, nvm-exec: stop option parsing at --
- nvm install: validate an inherited NVMMAKEJOBS like -j
- nvmisnatural_num: reject anything but digits
- nvmremoteversion: match the requested version as a whole version component
- install.sh: a failed script-method download no longer clobbers the install or reports success
- nvm_ls: match the version pattern literally
- bash_completion: list alias and version names without expanding them
- nvmsanitizeauth_header: strip newlines, so wrapped base64 credentials work
- nvm_cd: bypass a user-defined cd function (#3836)
- nvm use: handle regex-special characters in $NVM_DIR (#3939)
- install.sh: start a new line before appending to a profile that does not end with one (#3952)
- Handle filesystem identity when checking path containment (#3921)
- nvm alias: do not drop output from background jobs on bash 3.2
- nvm: do not change or export the caller's IFS
- nvm install: do not remove the caller's TMPDIR after a failed download
- nvm exec/nvm run: do not treat filenames with digits as versions
Refactors
- install.sh: check profile lines through one comment-aware helper (#3976)
Robustness
- nvmnvmrcinvalid_msg: only show an excerpt of the parsed content
- install.sh, nvm uninstall: pass the version to grep with -e
Performance
- nvmprintimplicit_alias: classify implicit aliases in one awk pass (#3980)
- nvmisinstalledexactversion: also take the fast path for an exact prerelease
- nvmversiongreater, nvmversiongreaterthanorequalto: avoid awk where possible (#3949)
- nvmisvalidversion, nvmvalidateimplicitalias: avoid forks (#3949)
- nvm_echo: use the printf shell builtin under zsh (#3949)
- nvmgetos: read /etc/os-release instead of forking uname -a (#3949)
- nvmnpmrcbadnewsbears: scan npmrc files without forking grep (#3949)
- nvmdieon_prefix: detect the OS only when it is needed (#3949)
- nvmversion: resolve an exact, installed version without nvmls (#3949)
- nvmisversion_installed: check the modern layout's path before the full lookup (#3949)
- nvmresolvelocalalias: skip nvmversion for an exact, installed version (#3937)
- nvm use: skip re-resolving an exact, installed version (#3937)
Docs
- [readme] cdnvm: let nvm parse .nvmrc, so a symlinked .nvmrc's content is not printed
- [readme] Fix a Docker warning from using Docker installation instructions (#3927)
- [readme] explain the misleading npm install error from npm run test/fast (#3944)
Misc
- [meta] Makefile: default NVM_DIR to the checkout when it is not set
- [meta] release-notes.sh: replace control characters in commit subjects
Tests
- make fast tests pass as root, without sudo, and without a terminal
- [actions] TOC: use node/install instead of setup-node
- pin --lts and node installs to end-of-life lines, so a new node release can't break them
- bash_completion: don't let zsh's compinit wait for an answer
- [actions] tests-alpine: time out jobs well before GitHub's 6-hour limit
- nvm_download: point the httpbin Authorization check at a configured mirror
- nvmgetarchunofficial: set NVMDIR when sourcing nvm.sh in the chroots
- nvm install v1 works: get the version from nvmremoteversion, not the ls-remote display
- [actions] cache container images, verified agains
v0.40.82026-09-21
Bug Fixes
- nvmalias, nvmversion_path: reject .. path components
- nvmgetmake_jobs: count cores on platforms the case does not name
- nvm-exec: improve the no-version failure message
- nvm use: do not clobber man's default search path (#3890)
- nvmerr, nvmerrwithcolors: do not fail when stderr is closed (#3907)
- nvmhashreset: only run hash -r where the shell supports it
- nvm_alias: unset zsh's extendedglob while reading an alias file (#3891)
- zsh: restore nomatch and markdirs rather than clobbering them
- nvm --help: render the set-colors legend in color (#3915)
- nvm unload: drop the undefined nvmformathelpmessagecolors
- nvmgetmirror: allow ports, userinfo, IPv6 hosts, and percent-encoding
- nvmsanitizeauth_header: allow ~, completing RFC 7235 token68 (#3751)
Refactors
- nvm --help: extract the set-colors legend into nvmprintcolor_legend
Performance
- Optimize nvmtreecontains_path with in-memory POSIX parent-walk (#3912)
Docs
- [readme] document platforms with no official node binaries
- install.sh: Fix missing words in bash/zsh completion message (#3887)
- Remove stray closing HTML tag (#3919)
Misc
- [meta] remove CLAUDE.md symlink in favor of AGENTS.md (#3928)
- [meta] add release-notes.sh, the release notes generator
Tests
- homebrew/actions changed their default branch
- [actions] WSL: pin every distribution, and test the newest of each line
- nvmprintcolor_legend: look up the function with PATH emptied
- nvmprintcolor_legend: check for the function, not a same-named file
- nvmprintcolor_legend: fix the fast suite on GNU userlands
- [actions] release.yml: provide GH_TOKEN so release-notes PR lookup can run
v0.40.72026-08-18
New Stuff
- nvm install: serialize concurrent installs of the same version
- nvm install: add NVMNOSOURCE_FALLBACK to disable the source fallback
Robustness
- nvm install: reject a structurally broken installed version
- nvminstallbinary_extract: replace a broken version dir atomically
- install.sh: nvm_download: avoid eval so arguments aren't re-parsed by the shell
Docs
- [readme] link every referenced person and project to its canonical page
Misc
- [Dev Deps] update markdown-link-check
Tests
- installnvmfrom_git: don't fail when master is at the latest release tag
v0.40.62026-07-15
New Stuff
- install: add support for loongarch64 architecture (#3693)
Bug Fixes
- support arm64-musl on Alpine Linux (#3845)
- nvmlscached: include source-cached and io.js artifacts
- auth header: Add all valid base64 chars to sanitize function (#3846)
- Parse commented nvmrc content in nvm_ls
- bypass aliased curl (#2932)
- nvmdownload, nvmget_latest, install: only select a downloader that exists as an executable
- use command to bypass curl/wget shell functions and aliases
- install: use darwin-x64 for all binary on mac for node < v16 (#3709)
- nvm install: migrate packages/set alias when target is already installed
- focused error on missing/invalid args for several subcommands
- nvmrcversion: clarify error when no version and no .nvmrc
- nvm exec/nvm run: warn when no version and no .nvmrc
Refactors
- nvm_alias: one-pass trailing whitespace strip
- nvm_alias: use [[:space:]] instead of literal tab
- nvmalias, nvmresolve_alias: use builtins
Robustness
- reject unsafe LTS alias names from a mirror's index.tab
- avoid a set -u error when $_ is unset (#3845)
- nvmgetarch: only apply the Alpine musl suffix when the OS is linux (#3845)
- nvm_alias: explicitly succeed when the alias file is unreadable
Docs
- [readme] Docker: build time is "several" minutes, not 8 (#3875)
- [readme] Docker: Just say "Ubuntu" (no version) for base image (#3873)
- document nvm reinstall-packages as a standalone command
- document current and clarify .nvmrc fallback in help/README
- threat model: document the mirror payload/metadata trust boundary
Tests
- [actions] nodejs.org PR: sync the fork before branching, and surface create-ref errors
- [actions] nodejs.org PR: fix force boolean and grab the latest tag on dispatch
- [actions] fall back to the canonical nvmrc submodule when a fork lacks its own
- [actions] update workflows
- [actions] nvm-install-test: turn the expected v0.40.0 failures green
- [actions] add tests-alpine: a green fast suite and a musl-binary regression matrix (#3845)
- make the fast suite pass on Alpine (#3845)
- nvmls handles hash in pattern: fix cleanup, isolate NVMDIR, cover the sed path (#3854)
- installation_node: only match top-level global packages
- installation_node: use a published is-nan version
- run every remaining test file: exec bits, fixes; add check-exec to CI (#2232)
- nvmofflineversion: make it executable; pin nvmlscached cache visibility
- aliases: cover the regex-metachar cycle fix; clean up fixtures in teardown (#3787)
v0.40.52026-06-04
Security fix
Note this release addresses CVE-2026-10796.
New Stuff
- nvm install --offline: install from cache without network access
Bug Fixes
- nvmdownloadartifact: reject version strings with disallowed characters
- nvmgetchecksum: pass the tarball name to awk as data, not program text
- nvm_download: avoid eval so mirror-supplied version strings can't inject commands
- nvm_download: send a well-formed Authorization header on the wget path
- avoid an unbound variable
- Add local for sanitized_header (#3837)
- fix same owner for root when install from binary (#3834)
- nvmnormalizelts: only reject uppercase for LTS names, not regular aliases
- install.sh: check mkdir return codes
- install.sh: fix POSIX compliance, printf format strings, and profile detection
- nvm which: show alias name in infinite loop error message
- nvm uninstall: fix alias cleanup glob expansion
- nvm debug: use default empty values for potentially unset variables
- nvmiojsversionhassolaris_binary: fix comparison to detect non-iojs versions
- nvmdownloadartifact: fix error propagation from subshells
- nvminstallbinary: return failure when binary download fails with -b
- nvmgetarch: only apply musl suffix on x64 Alpine
- nvmgetarch: add command prefix to uname call
- nvmresolvelocal_alias: avoid using variable as printf format string
- nvmgetmirror: fix awk URL validation to actually reject invalid URLs
- nvmlsremote_combined: propagate iojs remote listing failures
- nvm install: fix nvm err typo to nvm_err for -s/-b conflict
- nvm alias: fix colors not showing by default
Refactors
- nvmrcversion: use fd 3 instead of exported env var for multiple return
Docs
- fix --offline help line alignment
- Clean up wording in docs and shell comments (#3806)
- fix CONTRIBUTING grammar (#3804)
- do not use tilde expansion in ENV of Dockerfile (#3821)
- [readme] use tilde expansion instead of "$HOME" for consistency (#3799)
- [readme] use "$HOME" instead of hardcoded "/home/user"
- [readme] Revise Node.js version usage examples (#3802)
Misc
- [meta] Update .gitmodules with relative submodule path (#3839)
- [meta] Submodule nvmrc update protocol from git to https (#3839)
- [meta] Align and enhance AGENTS.md instructions (#3774)
Tests
- installnvmfrom_git: stop git background gc/maintenance racing with cleanup
- installnvmfrom_git: fix malformed test command (missing space before ])
- reduce CI flakiness from transient Docker registry failures
- remove double-substitution in assertok and assertnot_ok (#3826)
- fix 4 test failures
- add try/try_err helpers; convert tests to use them
- [actions] add workflow to update nodejs.org nvm version
- [actions] set per-job permissions in the nvm install workflow
- [actions] allow DockerHub's CloudFront CDN so image pulls aren't blocked
- [actions] upgrade vampire/setup-wsl (#3775)
v0.40.42026-01-29
Bug Fixes
- sanitize NVMAUTHHEADER in wget path
- nvmhascolors: also check if stdout is a terminal
- nvmstrippath: avoid gawk-specific RT variable for mawk compatibility
- nvmgetdefault_packages: use portable awk patterns
- nvminstallsource: explicitly set SHELL=/bin/sh for make
- install.sh: do not log when user has requested no profile modifications (#2131)
- nvm exec: Do a version check on nvm-exec (#3308)
- Reject bare LTS codenames in nvm install (#3718)
- prevent sed errors when pattern contains #
- install.sh: Force remote name of cloned repo to be 'origin' (#3654)
- sh lacks -O; thanks shellcheck
- show system Node.js version in nvm ls (#1287)
Docs
- [readme] add missing colon (#3516)
- [readme] add background on io.js (#3641)
- [readme] fix typo (#3687)
- [readme] update installation by docker to v0.40.3 (#3590)
Tests
- [actions] add permissions to GHA workflow
- Improve uninstall error message for missing versions (#3768)
- [Tests] add retry logic (#2232)
- [Tests] add a timeout
- [actions] add a finisher to lint
- [actions] migrate Travis CI tests to GitHub Actions
- [Tests] mock node in nvmdieon_prefix test
- [Tests] clean up .nvmrc after nvm-exec test
- [Tests] set $_ before sourcing nvm.sh in fast tests
- [actions] update outdated GitHub Actions versions (#3762)
- [actions] fix WSL tests: properly handle Debian apt sources issue
- [actions] fix workflow permissions; add codeQL
- [actions] temporary fix for WSL issue
- [actions] add new github asset domain to harden-runner
- [actions] Fix Cygwin workflow HOME variable and add debug output (#3611)
Misc
- Migrate GitHub Copilot instructions to AGENTS.md and CLAUDE.md (#3655)
- [security] add security escalation policy (#3658)
- [meta] Add comprehensive .github/copilot-instructions.md for better AI code assistance (#3609)
- [meta] update security policy; add IRP
- [Dev Deps] update markdown-link-check, semver
v0.40.32025-04-23
Fixes
- nvminstalllatest_npm: fix node version detection (#3564)
v0.40.22025-03-11
New Stuff
- install.sh: add $ZDOTDIR to zsh search (#3458)
Fixes
- reinstall-packages: do not reinstall corepack (#3544)
- avoid bash-specific syntax (#3499)
- install-latest-npm: npm v11 is out
- nvminstalllatest_npm: avoid unbound variable (#3447)
- give a more helpful message when lts alias is mistakenly used (#3441)
- nvm ls, nvm alias, nvm install: error when an LTS name is invalid
- nvmnormalizelts: error when an LTS name is not lowercase (#3417)
Documentation
- [readme] update link
- [readme] fix --no-use example (#3479)
- [readme] update copyright notice (#3507)
- [readme] note zsh-nvm's AUTO_USE option (#2670)
- [readme] add note about reloading zshrc after editing (#3052)
- [readme] Update shell profile file install notes (#2241)
- [readme] add docker tips (#2318)
- [readme] remove avn from readme (#3469)
- [readme] fnm -> nvm.fish (#2541)
Refactors
- prefer case over if/else chains
- combine sed -e invocations/arguments
Tests
- nvm exec/nvm run: add --silent tests (#1259)
- [actions] release test needs git tags
- migrate installation_iojs test suite to GitHub Actions (#3476)
- Migrate slow test suite from Travis CI (#3470)
- temporarily skip this failing travis test to unblock progress
- [actions] TOC: use latest LTS node
- install.sh: clean up nvmdetectprofile tests
- nvmdetectprofile: refactor (#3467)
- run urchin tests on pull requests (#3466)
- update mocks
- ensure that unit tests use only mocked LTS names
- [actions] use node/install instead of node/run
Meta
- disable blank issues
- update issue template
- add DCO (#3456)
- Rename .github/ISSUETEMPLATE.md to .github/ISSUETEMPLATE/ISSUE_TEMPLATE.md (#3454)
v0.40.12024-08-27
Fixes
- nvm_download: ensure all args are quoted
- --save: avoid a conflict with set -e
- nvmhascolors: avoid an aliased tput
- declare an unbound variable
- nvm install -b: do not attempt to download source on a failed binary download with -b
- nvm install -b: when no binary is available, fail and output a clear message
Refactors
- --save: clean up some usage
- install.sh: fix node capitalization
Tests
- set proper permissions on test files
- move sourcing suite to GHA
- fix nvm ls-remote unit test
v0.40.02024-07-30
New Stuff
- nvm use/nvm install: add --save option (#2869)
- Add support for NVMAUTHHEADER env var (#3380)
- allow .nvmrc files to support comments
Fixes
- nvmgetdefault_packages: use awk for more reliable file processing
- Fix issue where zsh global aliases would break nvm help (#3394)
- install-latest-npm: npm ^8.7 breaks npm ls with file: deps
Refactors
- nvmhascolors: also check the env var
Docs
- [readme] add OpenJS Ecosystem Sustainability Program partner (#2232)
- [readme] update CII badge URLs
- [readme] Fix uninstall instructions (#3286)
- [readme] Fix typo in WSL section of README (#3295)
- [Docs] add nvm unload to uninstall nvm instructions (#3267)
- [security] fix typo in threat model
Tests
- ignore travis-ci env vars; improve debug output
- [debug] adding logging to makefile
- only install python 2.7 if not already installed
- use a better JSON parsing implementation
- ensure travis can access public repo submodules
- [actions] improve default action permissions
- [actions] update vampire/setup-wsl action
- [actions] finisher tweaks
- [actions] update action versions to use node 20 (#3299)
- [Dev Deps] update markdown-link-check, semver