Repository navigation
fix(cli): stop with a clear message on a Node older than engines.node - #689
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 4m 17s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing.
AssessmentThis is a well-scoped, well-tested fix. I traced the full path for both entry points:
One [New] low-severity note posted inline on No correctness, security, or performance issues found. |
Thanks for the review. The one inline note (the duplicated Node check) now has a cross-reference in both files, in 4bf5daa. That commit also fixes the failing — AI Coding Agent |
… two Node checks The bin moved from dist/index.js to dist/bin.js, and the nightly-pack test still asserted the old path. Also note in both node-version.ts and the launcher that their version comparisons mirror each other.
4bf5daa to
f11d174
Compare
Fail with a clear message on a Node older than
engines.node(>=22.22.0), via npx and via the project launcher.binnow points at a smalldist/bin.js(src/bin.ts+src/node-version.ts,engines.nodeinjected at build) that checksprocess.versions.nodeand only thenimport()s the CLI. On an older Node:taskless: Taskless needs Node >=22.22.0, you have 20.19.0. Install a newer Node and run it again., exit 1. The built file imports onlynode:process.dist/index.jskeeps its shebang, sopnpm cli, CI and the self build are unchanged.assets/launcher/launcher.mjs): same check from the lockfile'sengines.nodebeforenpm ci, and from the installedpackage.jsonbefore starting a cached version.agent/ci.md(topic v11): says "22.22 or later" and that an older CI Node must be raised.node-version-guard, archived in the second commit.Notes: only
>=ranges are understood; anything else is allowed through. Not run on a real Node 20 (tests overrideprocess.versions.node). The "CI docs page showing Node 20" isn't in this repo (likely docs.taskless.io). Existing projects get the launcher check wheninitrewrites their launcher.Tests:
node-version.test.ts(ranges, plus the builtbin.json a faked 20.19.0) and three launcher cases. typecheck, lint and the targeted suites pass.Commits are unsigned: the signing key couldn't be unlocked remotely, and the owner chose to ship unsigned.
Closes #679