Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

chore: make Node 22 the baseline for every release

Salman Qureshi4ee2d8629470
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 00000000..2bd5a0a9
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+22
diff --git a/package-lock.json b/package-lock.json
index 1ecb4be0..9a2c2465 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -47,14 +47,14 @@
"@types/node-cron": "^3.0.11",
"@types/qrcode-terminal": "^0.12.2",
"@types/react": "^19.3.0",
- "ink": "^8.0.0",
+ "ink": "8.0.0",
"react-devtools-core": "^7.0.1",
"tsup": "^8.4.0",
"typescript": "^5.7.0",
"vitest": "^3.0.0"
},
"engines": {
- "node": ">=20.0.0"
+ "node": ">=22.0.0"
},
"optionalDependencies": {
"better-sqlite3": "^12.9.0"
diff --git a/scripts/check-native-deps.js b/scripts/check-native-deps.js
index c17c6fab..172691f3 100644
--- a/scripts/check-native-deps.js
+++ b/scripts/check-native-deps.js
@@ -36,9 +36,9 @@ if (!isWin) {
const nodeVersion = process.version;
const nodeMajor = parseInt(nodeVersion.replace(/^v/, '').split('.')[0], 10);
-if (nodeMajor < 20) {
- console.log(`\u26A0 Node.js ${nodeVersion} detected \u2014 better-sqlite3 v12 requires Node >= 20.`);
- console.log(' Upgrade with: nvm install 20');
+if (nodeMajor < 22) {
+ console.log(`\u26A0 Node.js ${nodeVersion} detected \u2014 Mercury requires Node >= 22.`);
+ console.log(' Upgrade with: nvm install 22');
missing = true;
}
diff --git a/scripts/check-native-deps.sh b/scripts/check-native-deps.sh
index b9a3448d..01066074 100755
--- a/scripts/check-native-deps.sh
+++ b/scripts/check-native-deps.sh
@@ -30,9 +30,9 @@ fi
node_version=$(node -v 2>/dev/null || echo "unknown")
node_major=$(echo "$node_version" | sed 's/^v\([0-9]*\).*/\1/' 2>/dev/null || echo "0")
-if [ "$node_major" -lt 20 ] 2>/dev/null; then
- echo "⚠ Node.js $node_version detected — better-sqlite3 v12 requires Node >= 20."
- echo " Upgrade with: nvm install 20"
+if [ "$node_major" -lt 22 ] 2>/dev/null; then
+ echo "⚠ Node.js $node_version detected — Mercury requires Node >= 22."
+ echo " Upgrade with: nvm install 22"
missing=1
fi
diff --git a/scripts/publish-dev.sh b/scripts/publish-dev.sh
index a267be74..c765fb06 100755
--- a/scripts/publish-dev.sh
+++ b/scripts/publish-dev.sh
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
+# Node 22 is the baseline for every Mercury release (ADR-019: the bundled
+# ink 8 renderer needs it). Build and publish on it, never on an older Node.
+NODE_MAJOR=$(node -p "process.versions.node.split('.')[0]")
+if [ "$NODE_MAJOR" -lt 22 ]; then
+ echo "✗ Node $(node -v) — Mercury releases are built on Node 22 or newer (see .nvmrc). Run: nvm use" >&2
+ exit 1
+fi
+
# ─────────────────────────────────────────────────────────────────────────────
# Mercury DEV-channel publisher
#
diff --git a/scripts/publish.sh b/scripts/publish.sh
index 6db804e0..172f5af8 100755
--- a/scripts/publish.sh
+++ b/scripts/publish.sh
@@ -1,6 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
+# Node 22 is the baseline for every Mercury release (ADR-019: the bundled
+# ink 8 renderer needs it). Build and publish on it, never on an older Node.
+NODE_MAJOR=$(node -p "process.versions.node.split('.')[0]")
+if [ "$NODE_MAJOR" -lt 22 ]; then
+ echo "✗ Node $(node -v) — Mercury releases are built on Node 22 or newer (see .nvmrc). Run: nvm use" >&2
+ exit 1
+fi
+
echo "☿ Mercury Agent — Publish"
echo "────────────────────────────"