From 8a409bcfc8265e027cf642a517344ec06989e8aa Mon Sep 17 00:00:00 2001 From: Advait Paliwal Date: Mon, 23 Mar 2026 21:55:07 -0700 Subject: [PATCH] Add Node 20+ version check and engines field Co-Authored-By: Claude Opus 4.6 (1M context) --- bin/feynman.js | 8 +++++++- package-lock.json | 4 ++-- package.json | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/bin/feynman.js b/bin/feynman.js index 6cf1a59..7013b72 100755 --- a/bin/feynman.js +++ b/bin/feynman.js @@ -1,2 +1,8 @@ #!/usr/bin/env node -import "../dist/index.js"; +const v = process.versions.node.split(".").map(Number); +if (v[0] < 20) { + console.error(`feynman requires Node.js 20 or later (you have ${process.versions.node})`); + console.error("upgrade: https://nodejs.org or nvm install 20"); + process.exit(1); +} +import("../dist/index.js"); diff --git a/package-lock.json b/package-lock.json index 3281d5b..558b94c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@companion-ai/feynman", - "version": "0.2.4", + "version": "0.2.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@companion-ai/feynman", - "version": "0.2.4", + "version": "0.2.5", "hasInstallScript": true, "dependencies": { "@companion-ai/alpha-hub": "^0.1.2", diff --git a/package.json b/package.json index 4418dc2..bbbe420 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,11 @@ { "name": "@companion-ai/feynman", - "version": "0.2.4", + "version": "0.2.5", "description": "Research-first CLI agent built on Pi and alphaXiv", "type": "module", + "engines": { + "node": ">=20.18.1" + }, "bin": { "feynman": "bin/feynman.js" }, @@ -57,9 +60,6 @@ "tsx": "^4.21.0", "typescript": "^5.9.3" }, - "engines": { - "node": ">=20.18.1" - }, "repository": { "type": "git", "url": "git+https://github.com/getcompanion-ai/feynman.git"