All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.2.4 - 2026-11-02
-
The "Detected an interrupted upgrade" warning could fire forever, pointing at a file that no longer existed. The upgrade marker (
<DataDir>/upgrade-in-progress.json) is deliberately left behind when a migration fails, so the user can replay it — but the snapshot it points at does not necessarily survive: v1.2.2's auto-reclaim (#130) deletes it once the migration has replayed the packages, andnodeup packages cleanuplets the user delete any snapshot by hand.When that happened the marker outlived its payload, and every
nodeupinvocation printed a warning whose own recovery command was guaranteed to fail:⚠ Detected an interrupted upgrade (snapshot: .../fnm-26.10.0.json, started: 2026-10-22T10:28:49+06:00). ⚠ To resume: `nodeup packages restore --from .../snapshots/fnm-26.10.0.json` • No snapshot files found.The marker lives outside the snapshots directory, so
nodeup packages cleanupnever touched it and the user had no way to dismiss it.The warning now validates its own advice: if the snapshot is still on disk, this is a genuine interrupted upgrade and the warning and resume hint are unchanged (the #46 contract — a failed restore MUST leave the marker armed so the migration can be replayed). If the snapshot is gone, the marker is stale; nodeup says so and clears it instead of printing a hint that cannot work.
Clearing is race-safe. The marker is claimed with an atomic rename before it is inspected, so a concurrent
nodeup upgradethat arms a fresh marker in the meantime can never have it deleted out from under it — the fresh marker is put back untouched.
nodeup packages cleanup --stale-sentinelclears a stale upgrade marker on demand. It refuses to clear a marker whose snapshot still exists: that one represents a genuine interrupted migration, and throwing it away would lose the only breadcrumb telling the user how to replay their global npm packages.docs/release-checklist.mdnow documents the full verification procedure for the npm wrapper's install path: the published-metadata check,npm auditagainst the published package, the npm 12allowScriptsgate and its remedy, and thexattr -p com.apple.quarantinecheck on the downloaded binary. Also warns that the npm registry takes a few minutes to propagate, so thepublish-npmjob going green does not mean the version is visible on npmjs.com yet.
- A CLI test that built a root command ran against the developer's
real
$HOME, so it probed — and, after the marker fix above, could delete — the real upgrade marker. The test now redirects the data dir, and a new AST-based guard test fails any future test that constructs a root command without doing so.
1.2.3 - 2026-11-02
A wrapper-only release. The Go binary is unchanged from v1.2.2 — this version republishes the npm wrapper with the dependency fix and the documentation below.
-
The npm wrapper's
tardependency was pinned to6.2.1, which npm itself flags as deprecated ("Old versions of tar are not supported, and contain widely publicized security vulnerabilities").npm auditagainst the published wrapper reports 1 critical and 1 high vulnerability, all of them intar— the hardlink-path-traversal, symlink-poisoning, and file-smuggling advisories that apply to the archive-extraction path the wrapper uses to unpack the release tarball.Bumped to
tar@7.5.22, which is past the advisory range (<=7.5.20).npm auditis now clean: 0 vulnerabilities.The bump raises the wrapper's Node floor from 14 to 18, because
tar@7declaresengines: { node: ">=18" }. The wrapper's own code is unchanged and still runs on Node 14 — the floor comes from the dependency.Verified end-to-end: the wrapper's
extractTarGzpath (with its zip-slipfilterguard) extracts the real v1.2.2 release archive correctly undertar@7, producing the binary at the expected size.
- The npm wrapper README (and the main README / installation docs) now
explain npm 12's
allowScriptsgate. npm 12 blocks install scripts for packages that aren't on an allowlist, andnodeupxneeds itspostinstallto download the binary — so on npm 12+ a freshnpm install -g nodeupxfinishes with the wrapper in place but no binary andnodeupmissing from$PATH. The fix isnpm install-scripts approve nodeupx, which the docs now spell out.
1.2.2 - 2026-11-01
A patch release that stops the snapshot leak, gives the user explicit control over whatever is left on disk, and unblocks macOS Gatekeeper so the CLI actually runs after installation.
Nothing in nodeup ever deleted a snapshot file. nodeup upgrade
writes one snapshot of the global npm packages per installed Node
version so the migration can be rolled back or replayed — and then
never removed it. The set only ever grew: one file per (manager, Node version) pair the user had ever installed, plus the orphan
left behind by an upgrade that failed partway. The migration reports
in <DataDir>/reports/ leaked the same way, with unbounded
random-suffixed filenames.
-
The upgrade flow now reclaims the snapshots it wrote, once they have served their purpose. The snapshots are deleted only when the migration actually replayed them onto the new Node version — or when there was nothing to migrate at all, in which case they are redundant copies of the current state. A snapshot whose contents were not replayed survives, because on the failure path it is the only record of the user's globals and the "interrupted upgrade" warning points straight at it. Closes #128.
-
The upgrade sentinel (
<DataDir>/upgrade-in-progress.json) was armed even when there was nothing to install.restoreSucceededthen never became true, so the sentinel was never cleared — and every subsequentnodeupinvocation warned about an interrupted upgrade that never happened. The sentinel is now armed only when there is actually something to install. -
nodeup packages snapshotcaptured the wrong version. It returnedversions[0]— the lowest installed version, becauseListInstalledsorts ascending. On a machine with Node 18 and Node 20 it captured the (usually empty) 18 install and filed it under the 20.x filename, producing a snapshot useless as a restore source. It now prefers the manager's active version (Manager.Current) and falls back to the highest installed version for managers that cannot report one (nvm-windowsreturns "not implemented"). -
Snapshot writes are now atomic. A crash mid-write left a truncated file that the snapshot lister silently skipped — an invisible orphan that could never be cleaned up. Writes go through a
.tmpfile plus a rename. -
macOS Gatekeeper could block
nodeupfrom running at all. macOS stamps files downloaded from the internet with thecom.apple.quarantineextended attribute, and Gatekeeper refuses to execute an unsigned binary that still carries it — the kernel kills the process beforemain()ever runs:ASP: Security policy would not allow process: 82275, /opt/homebrew/Cellar/nodeup/1.2.1/bin/nodeupnodeupships as an unsigned Go binary (no Apple Developer ID certificate), so this was fatal for it: the command produced no output and no error, it just died. Homebrew quarantines every artifact it downloads and propagates the attribute to the files it extracts, sobrew install dipto0321/tap/nodeupproduced anodeupthat could not be executed.The fix is at install time, in both download channels:
- The Homebrew cask now carries a
postflight_stepshook that runsxattr -dr com.apple.quarantineon the staged path, so the attribute is gone before the binary is linked into the prefix. - The npm wrapper's
install.jsstrips the attribute from the extracted binary before it is moved into place.
Both paths are best-effort — an install never fails because the attribute could not be removed — and both are no-ops on platforms without the attribute. The recovery command for an already-broken install is
xattr -dr com.apple.quarantine "$(command -v nodeup)"; seedocs/installation.mdfor the details, including thechmod u+wvariant needed when the binary is not writable.Note that the fix cannot live inside the Go binary: a quarantined executable is killed before its first instruction, so
main()never runs and no amount of self-repair code can strip the attribute. Closes #132. - The Homebrew cask now carries a
nodeup packages cleanup— delete the snapshot and migration-report files nodeup keeps on disk. It lists what's there (name, size, mtime) and lets you pick files one by one (multi-select) or delete them all at once.--listshows what would go without deleting anything,--reportstargets the report files instead of the snapshots, and--yesskips the confirmation prompt (it implies--all).--keep-snapshotsonnodeup upgrade, plus thepackages.keep_snapshotsconfig key and theNODEUP_PACKAGES_KEEP_SNAPSHOTSenvironment variable, to opt out of the automatic snapshot deletion.
- The GoReleaser configuration no longer relies on deprecated keys
(
archives[].format→formats,brews:→homebrew_casks:), and the build metadata ldflags moved out ofbuilds[].flagsinto the dedicatedbuilds[].ldflagskey. Passing ldflags throughflagsproduced two-ldflagsarguments on thego buildcommand line, and Go takes the last one — so our-X main.commit=…was silently dropped and the shipped binary reported GoReleaser's defaults instead. Closes #129.
1.2.1 - 2026-11-01
A patch release that repairs the npm install path, which has been broken for every user since v1.1.0.
nodeup-npm/scripts/install.js validates the redirect GitHub serves
for release-asset downloads against a host allowlist. GitHub now
serves release assets from release-assets.githubusercontent.com, but
the allowlist only listed objects.githubusercontent.com — so the
wrapper refused the redirect and npm install -g nodeupx aborted
before it could fetch the binary:
nodeup: refusing to follow redirect from
https://github.com/dipto0321/nodeup/releases/download/v1.2.0/checksums.txt
to https://release-assets.githubusercontent.com/...: host
release-assets.githubusercontent.com is not in the allowlist
The allowlist was introduced in #91 (cb425a9, 2026-07-04), when
GitHub was still redirecting to objects.githubusercontent.com. The CDN
host changed out from under the wrapper, and nothing failed loudly
until the next install — so the breakage was silent for four months.
Both hosts are GitHub-controlled, so allowing both preserves the security property #91 was after: an attacker still cannot redirect the download to a host they control.
The Homebrew tap, the Scoop bucket, and direct binary downloads were never affected — they don't go through this redirect-validation path.
nodeup-npm/scripts/install.js: acceptrelease-assets.githubusercontent.comas a release-asset redirect target, alongsideobjects.githubusercontent.com. Restoresnpm install -g nodeupxon every platform. Closes #126.
1.2.0 - 2026-11-01
The headline of this release is Vite+ support — nodeup now
recognizes Vite+, VoidZero's unified
toolchain, as a Node.js version manager. Vite+ users previously got
"no Node.js version manager detected" from nodeup upgrade; PR #124
adds a VitePlus manager that drives vp env directly, bringing the
supported-manager count from 8 to 9.
Vite+'s vp env subcommand exposes exactly the operations nodeup
needs from a version manager, so the integration is complete rather
than detection-only: vp env list node --json for the installed
set, vp env current node --json for the active version, and
vp env {install,uninstall,use,default} node@<v> for the mutations.
The global npm prefix resolves to
<data>/js_runtime/node/<v>/lib/node_modules.
The data-directory resolution mirrors upstream's own chain
(VP_HOME → <home>/.vite-plus → VP_DATA_DIR → the XDG/platform
default). All candidates are returned rather than just the first hit,
so nodeup can still find Node installs when the shell it runs in
doesn't carry the same Vite+ environment variables that vp itself
would resolve.
One subtlety is worth calling out for reviewers: Vite+ can run in
system_first mode, where the shims prefer the system Node over a
managed runtime. In that mode vp env current reports the system
version, so Current() returns an error instead of that version.
nodeup treats a failed Current() as "active version unknown" and
fails closed on cleanup (issue #58) rather than attributing a system
install to the Vite+-managed set.
Also included: the system-node classifier now treats
<data>/js_runtime/node as manager-managed, so a Vite+-managed node
on PATH no longer trips the "nodeup does not recognize this layout"
warning.
- Vite+ (
vp) support as a ninth version manager (internal/detector/viteplus.go): detection (vpon PATH or<data>/bin/vpon disk, no subprocess), version parsing, installed- version listing, active-version query, install / uninstall / use / set-default, and global npm prefix resolution. Registered in the detector registry for both unix and Windows, with the per-manager detection order unchanged (fnm still wins). Closes #123.
- The Vite+ data-dir detection branch now checks for
vp.exeas well asvp, so a Vite+ install whose binary isn't on PATH is detected on Windows.exec.LookPathappliesPATHEXTfor PATH lookups, but a direct filesystem stat has to apply the suffix itself.
1.1.0 - 2026-07-05
The headline of this release is the internal/ui rollout — the
SPEC.md V2 invariant that every user-facing string in internal/
and cmd/ flows through the ui package is now enforced (not just
aspirational). Three PRs shipped this: #117 adds bubbletea-backed
spinners for long-running steps, #118 adds huh-backed interactive
prompts (Confirm / Select), and #119 migrates every remaining
cmd.Printf / fmt.Fprintf call site in internal/cli/* to
ui.Writer.{Info,Success,Warn,Error,Println}. FancyMode (lipgloss
glyphs + colors) and the animated braille-pattern spinner now
appear uniformly across every command when stdout and stdin are
both TTYs; PlainMode (no decoration) stays the default for pipes,
CI, and --no-color.
Also included: a chore(ci) relaxation of the commitlint
footer-max-line-length rule from 100 to 200 chars. Admin
squash-merge footers (the "Closes #N. ..." / "Part of #N. ..."
trailers) routinely exceed 100 chars when they summarize a PR body,
and the strict 100-char cap was breaking CI on every push-to-main
after such a merge. The relaxation unblocks the release pipeline
without weakening the body-length guard for hand-authored commits.
internal/uipackage: the single source of truth for user-facing output. Two implementations of aWriterinterface —PlainWriter(no ANSI, no decoration, used when stdout/stdin aren't TTYs or when--no-color/NO_COLORis set) andFancyWriter(lipgloss-styled, used in real terminals). The mode decision lives inui.DecideModeand is computed once per invocation in root.go'sPersistentPreRunE, then stashed oncmd.Context()so subcommands read it via a tinywriterFromCmdhelper rather than constructing their own.nodeup versionis migrated as the proof-of-concept for the larger migration; the remaining commands (upgrade, check, list, packages, config) are migrated in follow-up PRs per #74's phasing. Spinners and interactive prompts (bubbletea + huh) ship in later PRs in the same series. Closes #74 (PR1 of 4).- Post-upgrade cleanup prompt (
nodeup upgrade): after a successful upgrade, nodeup asks whether to delete the old Node.js versions left behind. The prompt offers three options —ydeletes every candidate, typing a specific version (e.g.20.18.0) deletes only that one, andN(or empty enter) skips. Candidates are computed asinstalled \ {new LTS, new Current, currently active}, where the active version is detected via<manager> current(or per- manager equivalent). The newManager.Current()interface method backs the exclusion — nvm-windows returns theErrNVMWindowsNotImplementedsentinel and the exclusion is skipped. New flags:--cleanup(auto-confirm),--cleanup-version <v>(repeatable, picks specific versions), plus the existing--no-cleanupto skip the prompt entirely. Config equivalents (cleanup.auto,cleanup.prompt) ship under the same names; seedocs/managers.md#post-upgrade-cleanupfor the full precedence table. Closes #41. - Native mutation commands for all 7 working managers (fnm, nvm,
Volta, asdf, mise, n, nodenv):
Install,Uninstall,Use,SetDefault, andGlobalNpmPrefixare now real shell-outs rather than stubs returningErrXxxNotImplemented. Volta'sSetDefaultand n'sSetDefaultare intentional no-ops (those managers pin per-project, not per-machine).GlobalNpmPrefixreturns the per-version npm global modules directory for each manager's on- disk layout, which the migration step needs to enumerate packages. nvm-windows remains unsupported (no install/uninstall CLI on that platform); its stubs still returnErrNVMWindowsNotImplementedso callers can detect and skip. Per-manager cleanup behavior is documented indocs/managers.md#post-upgrade-cleanup.
- YAML config file support (
internal/config): the documented schema fromdocs/configuration.mdis now first-class. Settings live in~/.nodeup/config.yaml(override with$NODEUP_CONFIGor redirect$NODEUP_HOME) and are merged with env vars and built-in defaults using a four-layer precedence chain (defaults < file < env < CLI flags). Every field — includingtrack.lts: falseand other explicit-zero values — is preserved across round-trips via a per- field set-flag overlay so partial files don't clobber defaults. Saves are atomic (temp + rename, mode 0600) and refuse to persist invalid configs. nodeup configsubcommands:show— print the merged effective config as YAML (the output round-trips with the file format).get <key>— read a single dotted key (e.g.packages.skip).set <key> <value>— edit a key in the file layer and save it. Validates before writing; rejects unknown keys and bad values.init [--force]— scaffold a fresh config at the default path; refuses to overwrite without--force.
- Environment variable overlay (
NODEUP_MANAGER,NODEUP_TRACK_LTS,NODEUP_TRACK_CURRENT,NODEUP_PACKAGES_MIGRATE,NODEUP_PACKAGES_STRATEGY,NODEUP_CACHE_TTL). Parse errors include the variable name so env typos surface immediately. nodeup upgradenow reads its effective config fromloadConfigOrDefault():--managerflag still wins over the file value, andcfg.Packages.Migratereplaces the hard-codedtrueso users can opt out globally.- System-node classifier (
internal/detector/system_node.go): classifies thenodebinary on PATH into one ofos-package,snap,flatpak,homebrew-core,manager, orunknown, and surfaces a one-paragraph warning when the binary is one nodeup cannot (or should not) manage. Wired intonodeup upgrade(warning to stderr, after manager resolution) andnodeup check(rendered into the table output and the--jsonenvelope). Manager-data-dir overrides (e.g.NVM_DIR=/usr/local/nvm) take precedence so a manager install inside an OS-shaped directory is still classified asmanager. Closes #27. - Interrupted-upgrade detection and replay: when
nodeup upgradesnapshots packages at the start of a run, it writes a sentinel file recording the manager, the pre-upgrade version, and the snapshot path. If a subsequent run finds a leftover sentinel, it prints a hint to stderr naming the snapshot path and the exactnodeup packages restore --from <path>invocation the user can copy to replay the migration (PR #29).nodeup packages restoreaccepts a--from <snapshot-path>flag for restoring from a non-default location, mirroring the sentinel's stored path. internal/node: manifest fetch from nodejs.org gained an HTTP timeout, context threading, retry-with-backoff for transient failures, and atomic cache writes. PreviouslyFetchManifestcalledhttp.Get(url)againsthttp.DefaultClient, which has no timeout — a hung nodejs.org (or a corporate proxy that drops the connection silently) could blocknodeup upgrade/nodeup checkforever, with no way out except Ctrl-C (and even Ctrl-C had no effect since no context was threaded through). The newFetchManifestCtx(ctx)(the existingFetchManifest()is kept as acontext.Background()-using wrapper) builds the request viahttp.NewRequestWithContext, uses a package-levelhttp.Client{Timeout: 30s}, and retries up to 3 times with exponential backoff (200ms, 400ms, 800ms, capped at 2s) for network errors and 5xx / 408 / 429 responses. Permanent 4xx errors are not retried.saveToCachenow writes the data and meta files via temp-file + rename so two concurrentnodeupinvocations refreshing the cache cannot leave a mismatched state. The cache helpers (loadFromCacheAt,saveToCacheAt) take explicitcachePathsso the new tests can drive them hermetically. Both CLI callers (upgrade.go,check.go) now passcmd.Context()through. Closes #48.- Cross-platform path handling:
internal/platform.QuotePathnow enforces consistent shell-quoting across allRunShellcallsites, so paths containing spaces (e.g.C:\Users\Dipto Karmakar\...) are passed through unmodified on Windows and double-quoted on POSIX shells. The previous behavior leaked the un-quoted path through nvm'sRunShellcall on Windows, breaking installs into space-containing paths. Closes #25.
- Consolidated the internal
nodeup.mddesign doc intoREADME.md(new "Compatibility notes" subsection, expanded Contributing conventions) and stripped the now-danglingnodeup.mdreferences from source, config, docs, and issue templates. The file is removed. - Dropped the stale "Placeholder doc" banners from
docs/managers.md,docs/configuration.md,docs/installation.md, anddocs/release-checklist.mdand replaced them with concrete pointers to the source files or workflows that govern each doc's subject. No content removed; only stale phase references (Phase 5 / 7 / 8) were rewritten to reflect actual state — Phase 1 (8/8 managers detected) is now flagged as ✅ in the README'sProject statustable. internal/node: replaced the(LTS bool, TS string)pair onManifestVersionwith a singleLTSCodename *stringso the nodejs.orgltsJSON union (falsefor Current, codename string for LTS) decodes cleanly via a customUnmarshalJSON. The previous shape silently dropped theTScodename wheneverltswas the JSON literalfalse, soLatestLTS/LatestCurrentcould return the wrong row. Now both paths share one field and one decoder.
scripts/issue-workflow.sh(the bash issue→branch→PR→squash-merge orchestrator) has been replaced by the project-local.claude/skills/issue-workflow/SKILL.mdskill. The skill encodes the same workflow as AI-orchestratedTaskCreatesteps so the editor doesn't have to shell out to a 265-line bash script. The previous entry in this changelog referencing the bash script is intentionally not duplicated here — see the squash-merged commitchore(ci): replace issue-workflow.sh shell script with an AI skillfor the full rationale.
nodeup-npm/package.json: declaretaras an explicit runtime dependency. Pre-fix,nodeup-npm/scripts/install.jsdidconst tar = require('tar')at module load time with a comment claiming "npm bundles tar; no extra dep" — that comment was incorrect. npm uses tar internally, but it is not guaranteed to be reachable from an installed package's script context: yarn/pnpm do not hoist npm's internals, and npm's modern flat-install behavior is incidental. Without the explicit dep,require('tar')failed immediately on every yarn / pnpm install withError: Cannot find module 'tar'mid-postinstall, on every non-Windows platform. yarn/pnpm users were completely locked out of the npm install path (docs/installation.mdlists yarn / pnpm alongside npm as supported install methods). Pinned to^6.2.1to match the package'sengines.node: ">=14"floor (v7 requires Node 16+). The misleading comment in install.js is replaced with an explicit pointer to this issue + a note that the dependency is now declared. Also dropped the unusedzlibimport the pre-fix file carried (lint unused statics had not caught it because it's not a Go file). The transitivenpm auditwarning that surfaces against any unpinnedtar@^6.x(re: #65 / node-tar GHSA advisories) is deferred to issue #65 — the v6→v7 bump also forces ourengines.nodefloor up to 16, which is a separate decision. Closes #63..golangci.yml/Makefile/.github/workflows/ci.yml: migrated to the golangci-lint v2 schema. The pre-fix file targeted the v1 schema (noversion:field, flatlinters.enable,output.formatsas a slice), but the Makefile told contributors tobrew install golangci-lint— which installs the current major version, v2.x, today. Any contributor with a current Homebrew gotError: can't load config: ... 'output.formats' expected a map, got 'slice'instead of a lint failure, blockingmake lintandmake ciend-to-end. CI was unaffected becausegolangci-lint-action@v6pinned toversion: v1.64.8, but the local dev workflow documented in the Makefile was effectively broken. We migrated withgolangci-lint migrate(preserving the original exclusions/presets/rationale in hand-written comments), bumped CI togolangci/lint-action@v8pinned tov2.12.2(matching what Homebrew ships today), and updated the Makefilelinttarget to refuse to run when golangci-lint isn't installed and point contributors at the exactgo installcommand matching the CI pin. The same lint set + exclusion rules + presets that v1 ran with still apply (bodyclose,contextcheck,errcheck,gocritic,govet,ineffassign,misspell,staticcheck,unused;gosimpleis folded intostaticcheckin v2; formattersgofmt+goimportswithlocal-prefixes: github.com/dipto0321/nodeup). Confirmed locally:make ciis now green on a Homebrew v2.12.2 install. Closes #62.internal/detector/n.go:N.Current()no longer shells out ton current— an undocumented subcommand that upstreamtj/nresolves as a label equivalent to "latest" and side-effects a download of the newest available Node.js version. Pre-fix, everyCurrent()invocation would have silently mutated the user's machine by running the catch-all arminstall "$1"for "current", which fetches the latest semver from nodejs.org, downloads the tarball, extracts it, and activates it. Since callers treatCurrent()errors as "active version unknown, don't exclude it" (the safe-by-convention default per theManagerinterface doc), every n-using machine ran the cleanup step without active-version exclusion on every invocation — and would now also have the latest version installed behind the user's back. The replacement reads the active version off$N_PREFIX/bin/node --versioninstead: n'sactivatefunction copies the active node binary into that path, so its--versionis the authoritative source for "what's active". Side-effect-free, matches every supported n install, and the parser (parseNNodeVersion) handles bothvX.Y.Zand bareX.Y.Zshapes. Doc comments at the top ofn.goand the mutation-methods block both spell out the "do not usen current" reasoning. New tests inn_test.gopin the new path (TestN_Current_InvokesNodeVersionNotNCurrentexplicitly fails if the literaln currentrequest re- appears), parser cases (TestParseNNodeVersion_*), and error propagation (TestN_Current_PropagatesRunShellError,TestN_Current_PropagatesParseError). The pre-fix tests (TestParseNCurrent_*,TestNCurrent_InvokesShell) are deleted — they codified the buggy behavior. Closes #59.internal/cli(upgrade.go):Manager.Current()failure no longer leaves the active Node.js version unprotected from cleanup deletion. Pre-fix, the post-upgrade cleanup step silently swallowedCurrent()errors and proceeded with the zerosemver.Versionfor "active" — whichcleanupCandidatestreats as "no active version to exclude" (by design, to avoid the zero value matching a real version). The practical effect was: aCurrent()failure (e.g.nvmafternvm deactivate, or any transientnode -pparse hiccup) turned the version powering the user's shell into an ordinary cleanup candidate, and a--cleanup/--yes/cfg.Cleanup.Autoinvocation would auto-delete it. We now fail closed:currentErr != nilsets a newcleanupConfig.ForcePerVersionflag (downgradingAutoDeleteAlltofalseand forcingPerVersion=trueso nothing gets auto-deleted), and surfaces a stderr warning explaining why the per-version prompt is firing. TheNonInteractiveshort-circuit still wins overForcePerVersion(skipping cleanup is a stronger fail-closed stance than per-version prompting), and the active-version exclusion logic incleanupCandidatesis intentionally unchanged. New tests incleanup_test.gopin the downgrade behavior end-to-end (AutoDeleteAll=true → ForcePerVersion=truerequires per- version y/N,PerVersion=false → ForcePerVersion=truestill requires per-version y/N, andNonInteractive=true + ForcePerVersion=truestill skips entirely). Closes #58.internal/cli(upgrade.go):--yes --no-cleanupno longer silently auto-deletes every eligible old Node.js version. Theif yes { ... }block at upgrade.go:107-111 ran unconditionally AFTER theswitchthat was supposed to make--no-cleanupwin, so it flippedNonInteractiveback tofalseand setAutoDeleteAll=true, regardless ofnoCleanup. A CI script that habitually passes-y/--yes(the documented--no-cleanupcontract is "never prompt, never delete") would therefore lose Node installs it never asked to remove. The cleanup-toggle resolution is now factored into a pure helperresolveCleanupConfig(noCleanup, autoCleanup, yes, versions, cfg)incleanup.goso it's testable in isolation; the--yesblock is guarded by&& !noCleanup, restoring--no-cleanup's precedence. New tests incleanup_config_test.gopin the precedence table (including the negative-path matrix where--no-cleanupbeats every other knob). Closes #57.internal/cli/packages.go(runRestoreandrunDiff): the<manager>positional argument is now validated against a canonical allowlist (detector.IsAllowedManagerName) before any filesystem path is constructed. Pre-fix, the manager name was interpolated verbatim into a snapshot filename (fmt.Sprintf("%s-%s.json", managerName, version)) and the result wasfilepath.Join'd into the snapshots dir — andfilepath.Joincollapses..segments, so a manager name like../../tmp/evilresolved outside the snapshots directory. An attacker with a local file-placement primitive (a shared temp directory, a cloned repo containing a payload filename like<prefix>../../tmp/evil-1.0.0.json) could have the resulting snapshot'sPackageslist piped straight intonpm install -g <name>@<version>with no validation. The allowlist is built fromdetector.AllowedManagerNames()(a new helper that derives the list fromdetector.All()), so the set stays in sync with the per-platform build files; the match is byte-for-byte case-sensitive (matching the--managerflag), and the error message surfaces the offender and the allowlist so typos remain user-fixable.internal/detector/manager_names.go(new file) holds the helpers;manager_names_test.gopins AllowedManagerNames ↔ All() parity and IsAllowedManagerName behaviour (incl. traversal payloads, case-fold negativity, and near-miss strings). Closes #51.internal/cli: upgrade loop's restore step was looking up its snapshot by the new installed Node version (packages.Restore(ctx, mgr, *v)wherevcame fromtoInstall), but the upgrade flow only writes snapshots for the previously installed versions. The restore then read a non-existent<DataDir>/snapshots/<mgr>-<newVersion>.json, hitread snapshot: open …: no such file or directory, and the loop's blanketcmd.Printf("Warning: restore failed: …")swallowed the error — silently no-op'ing the package migration for every newly installed Node. The restore step now resolves the snapshot path the same way the sentinel does (latest-installed-version key) and replays viapackages.RestoreFromSnapshot(ctx, snapshotPath), carrying the user's globals forward to the new default exactly once. Added a regression test pinning theRestoreFromSnapshot-reads-source-path contract. Closes #42.internal/platform/shell.go(QuotePath): on POSIX the quoting rule for paths embedded inbash -cscripts now uses single quotes with'\''to escape embedded'bytes. The previous rule used double quotes and only escaped"and\\, so a path containing$USER,$(...), or backticks was still subject to shell expansion.NVM.Version()builds asource <path> && nvm --versionscript using whateverNVM_DIR(or~/.nvm) provides, so settingNVM_DIR='/tmp/$(touch /tmp/PWNED)'would expand inside bash's double quotes before reaching nvm. Single-quote wrapping disables bash variable expansion, command substitution, and backtick substitution entirely. The Windows branch (cmd.exe-unaware double-quote wrapping for paths-with-spaces) is unchanged. The test table forQuotePathnow expects single quotes on POSIX, plus a dedicatedTestQuotePathNeutralizesShellInjectionregression test, plus aTestNVM_Version_NVMDirShellInjectionIsNeutralizeddetector-level test that pointsNVM_DIRat a payload string and asserts no unquoted$(touchoccurrence in the emitted script. Closes #43.internal/cli: theplatform.AcquireLock/Releaseinfrastructure (flock on POSIX,LockFileExon Windows, stale-PID detection) existed but had zero call sites anywhere in the CLI, despite the README andpackagedoc comments claiming concurrent runs are blocked. Two parallelnodeup upgradeinvocations could snapshot, install, and migrate against the same data dir with no guard between them; two parallelnodeup config setinvocations raced on read-modify-write of the YAML file (each Save is atomic on its own, but the second writer's atomic rename silently clobbers the first writer's in-memory changes — a lost update).runUpgrade,config set, andconfig initnowdefer platform.AcquireLock()around their critical sections and surfaceErrAlreadyLockedwith a "another nodeup process holds the lock" hint instead of silently racing. Dry-run is read-only and intentionally does NOT acquire the lock (it returns before any mutation). The README's stale lock-path documentation (~/.nodeup/nodeup.lock) is fixed to point at the actualplatform.LockPath()resolution (<DataDir>/nodeup.lockper OS — Linux XDG, macOS~/Library/Application Support/nodeup/nodeup.lock, Windows%APPDATA%\nodeup\nodeup.lock). Closes #44.internal/cli: the upgrade-in-progress sentinel had a broken lifecycle in both directions. On thenodeup upgradeside, the deferredRemoveSentinel()fired unconditionally as long as the sentinel had been armed — even when the post-install package restore had failed and only logged a warning. That left the user with installed Node versions, unmigrated global packages, AND the "resume breadcrumb" silently deleted: there was no way to recover through the documented--from <sentinel path>path. We now trackrestoreSucceededalongside the existingsentinelArmedand only remove the sentinel when both are true. On the manualnodeup packages restoreside — the exact commandPersistentPreRunEtells the user to run after an interrupted upgrade — a successful restore now callspackages.RemoveSentinel()so subsequentnodeupinvocations stop printing the "interrupted upgrade" warning forever. Removal failures there are logged, not returned: the user's primary goal (restored packages) has been achieved and a stale sentinel is cosmetic. Also corrects the CHANGELOG claim that "next run prompts the user to replay" — the implementation only prints a two-line stderr hint (To resume: nodeup packages restore --from <path>); no interactive prompt is shown. Closes #46.nodeup listwas a stub that printed "not yet implemented (Phase 1)". It now does the obvious thing — resolve every detected manager, call each one'sListInstalled(), and render the union either as a JSON envelope (--json) or a one-line-per-manager table. Versions are sorted ascending per manager (semver, so pre-release tags order correctly); the currently active version (first manager that answersCurrent()) is surfaced alongside the listing in the JSON envelope and as a trailing line in the table. The new--managerflag narrows the listing to a single manager (case-insensitive), matching the--managerflag onnodeup upgradeandnodeup check. Errors from a single manager'sListInstalledare captured in the JSON envelope's per-entryerrorfield rather than aborting the whole listing, mirroring the soft-fail policy ofnodeup check. Adds a dedicatedinternal/cli/list_test.gocovering the JSON envelope (omits-on-nil current/error), the table renderer (empty state, mixed empty/error/success), and the--managerresolution helper. Closes #45.internal/cli/packages.go:runSnapshotandrunRestorenow passcmd.Context()topackages.Snapshot/packages.Restore(and to the--frombranch via the samectxlocal) instead ofcontext.Background(). Both are cobraRunEfunctions with a live context available — usingcontext.Background()meant Ctrl-C duringnodeup packages snapshotornodeup packages restorecould not cancel the in-flightnpm ls -g/npm install -gsubprocess, so the child process kept running after the user aborted. The fix is the same contextcheck violationinternal/cli/upgrade.goandcheck.goalready addressed as part of #48 —packages.gowas the lastRunEfile in the tree still usingcontext.Background(). The unused"context"import is dropped. Closes #49.internal/detector/system_node.go: the asdf branch ofmanagerManagedRootswas reading$ASDF_DIRto discover the manager's data dir, whileasdfDataDir()(the function the detector's actualInstall/ListInstalledpaths shell out against) reads$ASDF_DATA_DIR— anddocs/managers.mddocumented$ASDF_DIRin the supported-manager table. The three were inconsistent: a user withASDF_DIR=/path/to/asdf-source(the source checkout from git-clone) would havenodeupclassify thenodebinary under that source dir asmanager-managed even though the manager's actual install location was elsewhere (typically~/.asdf), and a user with the canonicalASDF_DATA_DIRoverride would have it silently ignored by the path classifier. Unified all three on$ASDF_DATA_DIR, matching the variableasdfDataDir()already used and the official asdf docs. Updatedsystem_node_test.go's "asdf env wins" case to drive the new variable. Closes #50.internal/cli/packages.go(runRestoreandrunDiff): the<manager>positional argument is now validated against a canonical allowlist (detector.IsAllowedManagerName) before any filesystem path is constructed. Pre-fix, the manager name was interpolated verbatim into a snapshot filename (fmt.Sprintf("%s-%s.json", managerName, version)) and the result wasfilepath.Join'd into the snapshots dir — andfilepath.Joincollapses..segments, so a manager name like../../tmp/evilresolved outside the snapshots directory. An attacker with a local file-placement primitive (a shared temp directory, a cloned repo containing a payload filename like<prefix>../../tmp/evil-1.0.0.json) could have the resulting snapshot'sPackageslist piped straight intonpm install -g <name>@<version>with no validation. The allowlist is built fromdetector.AllowedManagerNames()(a new helper that derives the list fromdetector.All()), so the set stays in sync with the per-platform build files; the match is byte-for-byte case-sensitive (matching the--managerflag), and the error message surfaces the offender and the allowlist so typos remain user-fixable.internal/detector/manager_names.go(new file) holds the helpers;manager_names_test.gopins AllowedManagerNames ↔ All() parity and IsAllowedManagerName behaviour (incl. traversal payloads, case-fold negativity, and near-miss strings). Closes #51.nodeup-npm/scripts/install.js: verify the downloaded binary archive against the SHA256 published in the release'schecksums.txtbefore extracting. Pre-fix, the install script trusted whatever bytes came back fromgithub.com/objects.githubusercontent.comand wrote them straight to./bin/nodeup— a TLS-stripping proxy, compromised CDN, or manipulated DNS could swap in an attacker-controlled binary and the user would have no way to know. Two independent fixes in this change:- Redirect allowlist (
followHops): the one-hop redirect fromgithub.comtoobjects.githubusercontent.comis now validated againstALLOWED_REDIRECT_HOSTS(Set(['objects. githubusercontent.com'])). Any redirect to a non-allowlisted host aborts the install with the offending hostname named.MAX_REDIRECT_HOPS = 2(the known GitHub chain length) bounds the walker; longer chains throw before any byte is written to disk. - SHA256 verification:
fetchExpectedHash(repo, tag, archiveName)downloadschecksums.txtfirst (fail fast — no point pulling a multi-MB archive we can't verify).downloadTo(url, destPath)then streams the archive to disk while piping it throughcrypto.createHash('sha256'), so the hash is computed as the bytes arrive (no second pass over the file). On mismatch, the half-saved archive is unlinked before the script dies — a forensic investigation of the failing install doesn't leave the (potentially attacker-controlled) bytes sitting in tmp. parseChecksumsTxtaccepts both GoReleaser's<hash> <filename>(two-space) shape and thesha256sum -b/--tag<hash> *<filename>(binary-mode*) shape, with or without space between the*and the filename. Comment lines and blank lines are skipped; malformed lines are silently dropped.nodeup-npm/scripts/install_test.js(new file): 12 pure- helper smoke tests coveringparseChecksumsTxt(two-space, binary-mode-*, malformed-line skipping, basename keying),followHops(allow-listed redirect, off-CDN redirect rejection, hop-count ceiling, missing-Location-header rejection, unexpected-status rejection), and the end-to-end integrity path (missing-archive-in-checksums error names both the offender and the available set, hash mismatch is detected, streaming hash equals direct hash). Tests run vianode nodeup-npm/scripts/install_test.jsand exit 0 on green; on failure they print the offending case and exit- No JS test framework is introduced (the project already
has a 1-line
require('tar')check that didn't justify pulling in jest/mocha/vitest either; see #63). Closes #64.
- No JS test framework is introduced (the project already
has a 1-line
- Redirect allowlist (
nodeup-npm/scripts/check.js: replace the per-axis platform / arch lookup with a single combined-keySetof (Node.jsprocess.platform/process.arch) pairs that mirrors the GoReleaser build matrix. Pre-fix, the script checkedPLATFORM_TO_OS[platform]andARCH_TO_GOARCH[arch]independently — soprocess.platform === 'win32'plusprocess.arch === 'arm64'mapped to(windows, arm64)and both lookup tables returned non-null, the preinstall check passed, andinstall.jsthen 404'd trying to download a release archive that was never built (.goreleaser.yamlline 45-47 explicitly excludesgoos: windows, goarch: arm64from the build matrix). The new lookup is one map keyed on the actual (platform, arch) pair:linux/{amd64,arm64},darwin/{amd64,arm64},win32/amd64.win32/arm64is intentionally absent so the preinstall check matches the release artifact set 1:1. Tests incheck_test.jspin the SUPPORTED set contents and pin the rejection of the previously-buggywin32/arm64(and the partial-match / sibling-prefix / trailing-slash variants that an env-tampering user might try). Closes #65 (point 2).nodeup-npm/scripts/install.js: belt-and-suspenders zip-slip / tar-slip guards on archive extraction, plus a partial-state cleanup at the start of the install. Pre-fix, the install path trusted whatever entries the tar / zip extractor wrote — thetar.x()call has nofilterargument, and the Windows-zip path shells out toExpand-Archive/unzip -o, neither of which validates that extracted entry paths stay inside the temp dir. The actual attack surface is bounded by the SHA256 verification added in #64 (a hostile archive would have to defeat that first), but a defensive check costs nothing and removes the dependency entirely:isPathInside(parent, child)resolves both paths viapath.resolve(sibling-prefix-safe —/tmp/abis NOT inside/tmp/a) and usespath.relativeto detect..traversal and absolute-path escapes.extractTarGznow passes afiltercallback that runsisPathInside(outDir, entryPath)for every entry and throws with the offending entry + resolved path if it escapes. tar 6.x already refuses..-containing entries by default (node_modules/tar/lib/unpack.js:277-286), so this is defense in depth — if a future regression flips the tar option, the install still refuses.extractZipnow goes throughsafeExtractZip, which lists the archive's entries first (unzip -Z1on POSIX,[System.IO.Compression.ZipFile]::OpenRead(...).Entrieson Windows), validates each entry's resolved path againstoutDir, and only then runs the actual extraction. This is the real fix:unzip -oandExpand-Archivewill both happily extract a../escape.txtif the archive contains one. tar doesn't have this problem; only the zip path does.main()nowfs.rmSync(binaryDest, { force: true })at the start of the install, before any download. Pre-fix, a late-stage failure (chmod throwing after renameSync succeeded, an OOM mid-extraction) left a non-executablebin/nodeupon disk; a retry'srenameSyncthen either errored with EEXIST or silently overwrote a half-broken file. Cleaning up at the start makes the install path effectively transactional.- Tests in
install_test.jscoverisPathInside(inside / equals / parent / sibling-prefix /..traversal / absolute-outside / trailing-slash-normalisation) and the end-to-end filter callback (the good entry passes, the slip entry throws, the absolute-outside entry throws). No JS test framework introduced; same reasoning as #63. Closes #65 (points 1 and 3).
.github/workflows/release.yml: bump the GoReleaser job'sgo-versionpin from'1.22'to'1.24'to matchgo.mod'sgo 1.24.0directive and.github/workflows/ci.yml's lint job (the test jobs in ci.yml usego-version-file: 'go.mod'which auto-derives, so we have to keep the explicit pin here in sync by hand). Pre-fix, the comment at release.yml:6 claiming "same version pin as CI" was misleading — the divergence was masked by Go's defaultGOTOOLCHAIN=auto(which auto-downloads the missing toolchain), but that meant the release build silently depended on network access to proxy.golang.org during the release job — a step CI never exercises, since CI already has 1.24. IfGOTOOLCHAIN=localis ever set (org policy, air-gapped runner), the release build would break outright at tag-push time, the one moment there's no opportunity to catch it in a normal PR-gated CI run. A multi-line inline comment next to the pin explains the parity-with-go.mod invariant so future bumps in either direction are caught in code review. Closes #66.Makefile: inject-X main.version=... -X main.commit=... -X main.date=...ldflags into thebuildandinstalltargets so a locally-built binary'snodeup versionoutput reports the actual git commit and build timestamp instead of the package-level defaults (dev/none/unknownpercmd/nodeup/main.go:20,23,26). Pre-fix, everymake buildand everygo install .../cmd/nodeup(or@latest) shipped with the defaults — defeating the install-verification flow documented indocs/installation.md#verifying("Should print a version, git commit, build date, and Go runtime info") and undermining the bug-report triage instructions inCONTRIBUTING.mdthat ask reporters to pastenodeup versionoutput (a locally-built binary was indistinguishable from any other local build, so triage couldn't tell if the bug reproed on the latest commit or on a stale checkout). Three new Makefile vars capture the values at parse time:VERSIONfromgit describe --tags --always --dirty— closest semver tag (when the repo has tags) or short SHA +-dirtyif the working tree is dirty; falls back todevwhen git is unavailable (snapshot tarball build).COMMITfromgit rev-parse --short HEAD— falls back tononeif git is unavailable.DATEfromdate -u +%Y-%m-%dT%H:%M:%SZ— RFC3339 UTC, matches.goreleaser.yaml:37's{{.CommitDate}}shape. Each shell call is wrapped with|| echo <fallback>so a build inside a snapshot tarball or vendored copy without.git/falls back to safe defaults rather than crashing the build. Combined into a singleLDFLAGSvariable so both targets share one source of truth, and the build target now echoes(version=…, commit=…, date=…)after a successful build so the operator can confirm the injected values without running the binary.internal/cli/version_test.go(new, 5 tests) pins the exact output shape ofnodeup version(line-by-line format, multi-line output,go1.X.Yruntime pattern,<goos>/<goarch>platform pattern, and--checkflag is a no-op not an error) so a future refactor can't silently drop a field. Closes #68.
internal/cli/cleanup.go: confirmation at the post-upgrade cleanup's all-or-nothing prompt is now sticky — answeringy(delete all) or a specific version at the "What would you like to do?" prompt no longer triggers a second, separate per-versionDelete vX? [y/N]loop on top of the explicit confirmation. Pre-fix, the per-version loop fired unconditionally for every candidate intoOffer, becausecfg.PerVersiondefaults totruefromcfg.Cleanup.Prompt's config default — so a user who answeredyonce at the all-or-nothing prompt saw nothing deleted if their terminal session's input stream ended before they re-answered for every candidate (thedefault:branch ofpromptPerVersionreturnsfalse, and empty / non-yinput landed each version inresult.Skippedwith no visible error). User reported live: answeredyat the cleanup prompt during a realnodeup upgrade, thenfnm listafterward still showed the old versions — no deletion occurred, with no surface indication of why. Fix: setcfg.PerVersion = falsefor the per-version loop once a higher-level confirmation has been recorded. Three classes of higher-level confirmation trigger this:decision.deleteAll—y/yesat the all-or-nothing prompt.decision.deleteOne— a specific version typed at the all-or-nothing prompt (the user's choice IS the per-version confirmation).AutoDeleteAll(withoutForcePerVersion) — set by--cleanup,--yes, orcfg.Cleanup.Auto. The user's pre-flight opt-in counts; the per-version prompt is redundant. TheForcePerVersiondowngrade from #58 is the only path that keepscfg.PerVersion = trueafter Step 1b, because it represents an inability to safely exclude the active version — seeTestCleanupPrompt_ForcePerVersionDowngradesAutoDeleteAll,TestCleanupPrompt_ForcePerVersionIgnoresPerVersionFalse, andTestCleanupPrompt_ForcePerVersionWithNonInteractivefor the preservation.TestCleanupPrompt_PerVersionConfirmandTestCleanupPrompt_SpecificVersion(the tests that pinned the buggy double-prompt behavior) are updated to assert the new correct behavior;TestCleanupPrompt_DeleteAllSkipsPerVersionPromptis the explicit regression test for #76. Closes #76.
CLAUDE.md: refresh the stale sections that have drifted out of sync with the actual code and withREADME.md/CHANGELOG.md. The "Known bugs (do not re-introduce)" entry used to describe aManifestVersion.LTS bool+ uselessTS string \json:"ts"`fallback — but the actual code atinternal/node/dist.go:25-62already usesLTSCodename *stringwith a customUnmarshalJSONthat handles the nodejs.orgltsJSON union correctly. The pre-fix shape is gone; the doc would have misled a future contributor or AI assistant into "fixing" something that isn't broken. The phase-status table listed Phase 5 (Config subsystem) and Phase 6 (Cross-platform polish) as "Not started" — both are fully implemented per the CHANGELOG's Unreleased section and perREADME.md's own Project-status table, which marks Phases 1-6 done. Updated Phases 4-6 to "Done" and Phase 7 to "In progress" (the GoReleaser / brew / scoop / npm distribution work tracked by #17 / #18 is genuinely outstanding). The architecture diagram listedinternal/packages/restore.goforRestore— that file doesn't exist;Restoreand the additionalRestoreFromSnapshotboth live insnapshot.go. The dependencies line listedgjsonandyaml.v3as "planned but not yet in go.mod" —yaml.v3is in go.mod (used by the config subsystem),gjson` was never added. Closes #54.- Post-upgrade cleanup docs inaccuracies introduced alongside PR
#56 / issue #41:
CHANGELOG.md's "Native mutation commands" bullet cited#40(an unrelatedchore(ci): gitignoreissue) — the citation is dropped (the preceding bullet already closes #41).docs/managers.mddescribed a fabricated nvm-windows-specific cleanup-suppression note that doesn't exist in the code — replaced with the real behavior: the cleanup prompt still runs against nvm-windows, eachUninstall()surfacesErrNVMWindowsNotImplementedvia the generic per-candidate failure line, and theForcePerVersiondowngrade (from #58) kicks in so even--cleanup/--yes/cleanup.auto: truefall back to y/N per candidate. The "Manager not on PATH" failure mode was described as "cleanup is skipped; upgrade still completes" — corrected to matchdetector.ResolveManager'sErrNoManagerabort, which fails the entire upgrade command before install/migrate/cleanup. README's "Phase 7 ✅" line was reconciled withdocs/managers.md's "Phase 7 in progress" banner: README now uses "Phase 7 🔧 (in progress)" and notes that cleanup + mutation have shipped while distribution packaging (#17 / #18) is the remaining Phase 7 work. Closes #60. - Bundled cleanup-feature debris from PR #56 / issue #41:
internal/detector/fnm.go'sGlobalNpmPrefixfinal error path now wraps the underlyingos.Staterror with%w(matching every sibling manager's behavior — asdf, mise, n, nodenv, nvm, volta); previously theerr2was discarded. Adds threeinternal/detector/nvm_test.gotests pinningNVM.Current():TestNVMCurrent_InvokesShell(sources nvm.sh + runsnvm current+ parses the output),TestNVMCurrent_PropagatesShellError(runScriptfailure surfaces with%w), andTestNVMCurrent_SystemIsError(nvm currentprinting "system" surfaces an error end-to-end, not just at the parse layer).Current()was the safety-critical gate protecting the active version from cleanup deletion, and was the onlyCurrent()method in the package without a test at the method layer. The deadconfirm := true/_ = confirmlines incleanup.goand the_ = yesline inupgrade.goflagged in #61 had already been removed by #76 / PR #95. Closes #61. - Bundled CI/release tooling doc-accuracy fixes from issue #69:
CONTRIBUTING.mdclaimed a 10-check matrix including a nonexistent "CoGitto status check" (contradicting its own later "Sign-off (future)" section, which correctly notes CoGitto-style enforcement is "not required today"). Dropped the bogus check and corrected the matrix count to 9 (5 builds + 1 lint + 3 OS tests). The same paragraph's description ofmake ciwas wrong (omittedfmt, misstated order); now correctly statestidy fmt vet lint testand warns thatfmtrewrites the working tree in place. Themake cidescription inCLAUDE.mdwas already correct and is unchanged..goreleaser.yaml,.github/workflows/release.yml, anddocs/release-checklist.mdall claimed "6 binaries" attached — the actual matrix (linux/windows/darwin × amd64/arm64, minus the documentedwindows/arm64exclusion) produces 5 archives + checksums.txt; all three are corrected to say "5 binaries + checksums.txt.".github/workflows/ci.ymlwas uploadingcoverage.txtto Codecov while the documentedmake testproducescoverage.out; renamed tocoverage.outso a contributor running the documentedmake testsees the same filename CI consumes. Closes #69. - CI/CD supply-chain hardening from issue #67:
.github/workflows/release.ymlnow passes--provenancetonpm publishso the publishednodeup-clipackage carries a SLSA-style attestation generated from the OIDC token (npm's "Built and signed on GitHub Actions" badge, which the release-checklist docs already called for — Option A). All 14uses:lines in.github/workflows/ci.ymlandrelease.ymlare now pinned to commit SHAs with a# v<N>comment for readability, instead of mutable major-version tags. Action SHAs were resolved at pin time viagit/refs/tags/<v>for each release. This closes the supply-chain class where a compromised or force-pushed action tag would silently pull unreviewed code intorelease.yml(which runs withcontents: writeand handles publish secrets). Closes #67. internal/detectorManagerinterface now takes acontext.Contextas the first parameter onListInstalledandCurrent. Both methods were defined withoutctxwhen the interface was first laid out, and the omission became user-visible when the post-upgrade cleanup feature (PR #56 / issue #41) addedCurrent()and shipped across all 8 manager implementations: a Ctrl-C mid-nodeup upgradewould still wait for the underlyingmanager list/fnm list/nvm currentsubprocess to finish before returning, because cancellation had no path into the read paths. The 8 concrete implementations (fnm,nvm,volta,asdf,mise,n,nodenv,nvm-windows) plumb the newctxinto their existingrunShell/runScriptcalls (both already ctx-aware viainternal/platform/shell.go). The 6 production call-sites ininternal/cli/{check,list,upgrade,packages}.gonow passcmd.Context()(or, for the newgetCurrentVersion(ctx, m)helper, the caller's ctx) so thecontextchecklinter is satisfied. The 3 mock/stub Manager types (fakeManager,listTestStubManager,stubManager) take a discarded_ context.Contextparameter; their bodies are unchanged since they don't do real I/O. The 39 test call-sites across the per-manager*_test.gofiles now passt.Context()(Go 1.24 added this; the project'sgo.modis ongo 1.24). Out of scope (per the issue title): the remainingManagermethods (Install,Uninstall,Use,SetDefault,GlobalNpmPrefix,Version) keep their no-ctx signatures for now — most have a pre-existing cancellation story (the platform lock + interrupted-upgrade sentinel from #46) and a follow-up can plumbctxthrough them when the call-sites warrant it. Closes #53.
0.0.0 - 2024-07-01
- Project blueprint — internal design doc covering language choice, scope, detection engine, version resolution, package migration, architecture, CLI design, edge cases, git workflow, conventional commits, versioning, CI/CD, and distribution. (Superseded by
README.md; the standalone doc was removed in the Unreleased section.)