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