commit 23247351e8ba46c023373dfeef5a7fc1981d836f
parent 302d44c1d32f3eb3b6e4fe3d9aba6cecb2523dc6
Author: Henry Unite <henry@getpoint.io>
Date: Thu, 26 Feb 2026 11:17:27 -0800
chore: node version script
Diffstat:
5 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/scripts/format.sh b/scripts/format.sh
@@ -1,2 +1,4 @@
#!/usr/bin/env bash
+bash scripts/version.sh
+
npx prettier --write *.ts
diff --git a/scripts/install.sh b/scripts/install.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+bash scripts/version.sh
+
npm install typescript \
express \
twilio \
diff --git a/scripts/serve.sh b/scripts/serve.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+bash scripts/version.sh
+
node --no-warnings \
--experimental-transform-types \
app.ts
diff --git a/scripts/typecheck.sh b/scripts/typecheck.sh
@@ -1,2 +1,4 @@
#!/usr/bin/env bash
+bash scripts/version.sh
+
npx tsc --allowImportingTsExtensions --noEmit --target ES2022 --module NodeNext *.ts
diff --git a/scripts/version.sh b/scripts/version.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+if ! command -v node &> /dev/null; then
+ echo "node not installed"
+ exit 1
+fi
+
+NODE_VERSION=$(node --version)
+
+if [[ $NODE_VERSION == "v22."* ]]; then
+ exit 0
+else
+ echo "node 22 required"
+ exit 1
+fi