19 Commits
Author SHA1 Message Date
Jordan Harband e5f1288b40 [New] record every node version's LTS status
Each download of node's `index.tab` now merges every version's LTS codename, or `-`, into `$NVM_DIR/.lts-status`,
keeping versions that download doesn't list,
so the status of an installed version is known, and refreshed on every remote connection.
Only an index that includes LTS versions can start the record, so a nightly or release candidate mirror can't,
and `nvm_ensure_lts_status` downloads it once for versions installed before it was recorded.
`update_test_mocks.sh` writes the record of its `index.tab` mock to `nodejs.org-dist-lts-status.txt`.
2026-10-21 12:52:04 -07:00
Ben YounesandJordan Harband a8bb497400 [New] nvm ls-remote: annotate versions with the node alias and local aliases
Fixes #2786.

Ben Younes added the alias annotations to bare `nvm ls-remote`, with their regression tests;
Jordan Harband moved `(Latest: node)` onto the newest node release, gave each kind of annotation a fixed column so the output can be sliced with `cut`, matched aliases to versions in one pass, and kept local aliases out of the mocks and tests.

Co-authored-by: Ben Younes <2910651+ousamabenyounes@users.noreply.github.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
2026-09-23 21:35:43 +00:00
Jordan Harband df01d81128 [Refactor] add nvm_wrap_with_color_code; allow no color code 2022-10-13 20:16:42 -07:00
Jordan Harband 0698ede92d [Tests] update test mocks 2022-10-13 12:08:31 -07:00
Jordan Harband 430860a8be [Fix] nvm alias/nvm_list_aliases: support lts/ aliases
See #2692
2021-12-16 15:54:38 -08:00
Jordan Harband 4626d1aae6 [New] add lts/-1 etc, to point to an LTS line relative to "latest" 2020-03-04 01:03:36 -08:00
Jordan Harband 30cd9c5dc8 [Tests] fix update mocks script 2020-03-04 00:57:58 -08:00
Jordan Harband c465a83518 [Tests] nvm ls-remote: add test for overly-large tab file 2018-05-23 23:48:04 -04:00
Jordan Harband 52f1b24895 [Tests] fix mirrors in mocks update script 2018-04-09 23:28:17 -07:00
Peter Dave Hello 7ed1e71944 [Refactor] Add missing backslash for dots
Related: #1279, 2a2b8bd, cadbbce
2016-11-24 13:47:20 +08:00
Jordan Harband a29d0e49dc [Tests] improve + update test mocks 2016-09-28 22:42:48 -07:00
Jordan Harband f60edbb6b4 [Tests] update test mocks 2016-09-18 11:58:18 -07:00
Jordan Harband 4c010f442e [Tests] add tests for auto-creation of LTS aliases on nvm_ls_remote 2016-07-02 21:21:16 -07:00
Jordan Harband d2744014df [Tests] add some basic nvm ls-remote unit tests. 2016-06-25 17:00:19 -07:00
Jordan Harband ae07c3c345 Add support for nvm ls-remote --lts 2016-04-23 23:47:25 -07:00
Jordan Harband 0b40139caa [Tests] set x option in update mock to better locate failures 2016-07-02 18:42:57 -07:00
Jordan Harband ce60b6c44a [Tests] update test mocks 2016-06-25 17:03:46 -07:00
Jordan Harband ec54c925c1 [Tests] use mocks for nvm_ls_remote/nvm_ls_remote_iojs tests. 2016-04-27 01:25:56 -07:00
Jordan Harband 96afff7af2 [Tests] Set up “mocks” directory, and updater script. 2016-04-19 22:49:49 -07:00