pre-push 372 B

123456789
  1. #!/bin/sh
  2. # Check if bun version matches package.json
  3. EXPECTED_VERSION=$(grep '"packageManager"' package.json | sed 's/.*"bun@\([^"]*\)".*/\1/')
  4. CURRENT_VERSION=$(bun --version)
  5. if [ "$CURRENT_VERSION" != "$EXPECTED_VERSION" ]; then
  6. echo "Error: Bun version $CURRENT_VERSION does not match expected version $EXPECTED_VERSION from package.json"
  7. exit 1
  8. fi
  9. bun typecheck