Skip to content

The open source coding agent.

TypeScript

ci: add bun version check to pre-push hook to ensure version consistency

Dax Raad776091cc232a
diff --git a/.husky/pre-push b/.husky/pre-push
index b26017ee96a..2fd039d56dd 100755
--- a/.husky/pre-push
+++ b/.husky/pre-push
@@ -1,2 +1,9 @@
#!/bin/sh
+# Check if bun version matches package.json
+EXPECTED_VERSION=$(grep '"packageManager"' package.json | sed 's/.*"bun@\([^"]*\)".*/\1/')
+CURRENT_VERSION=$(bun --version)
+if [ "$CURRENT_VERSION" != "$EXPECTED_VERSION" ]; then
+ echo "Error: Bun version $CURRENT_VERSION does not match expected version $EXPECTED_VERSION from package.json"
+ exit 1
+fi
bun typecheck