Add Node 20+ version check and engines field

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Advait Paliwal
2026-03-23 21:55:07 -07:00
parent 58a515c168
commit 8a409bcfc8
3 changed files with 13 additions and 7 deletions

View File

@@ -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");

4
package-lock.json generated
View File

@@ -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",

View File

@@ -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"