diff --git a/.github/workflows/server-typecheck.yml b/.github/workflows/server-typecheck.yml new file mode 100644 index 000000000..1ea3e7c4f --- /dev/null +++ b/.github/workflows/server-typecheck.yml @@ -0,0 +1,24 @@ +name: Server Type Check + +on: + pull_request: + +jobs: + typecheck: + name: Type Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.3.2 + + - name: Install dependencies + run: bun install + + - name: Run TypeScript type check + run: cd server && bun ts diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..d71478d5d --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +cd server && bun ts diff --git a/bun.lock b/bun.lock index d3ab49889..4936fc9f0 100644 --- a/bun.lock +++ b/bun.lock @@ -24,6 +24,7 @@ "@types/node": "^24.9.1", "concurrently": "^9.2.1", "dotenv": "^16.6.1", + "husky": "^9.1.7", "inquirer": "^12.10.0", }, }, @@ -2589,6 +2590,8 @@ "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], + "husky": ["husky@9.1.7", "", { "bin": { "husky": "bin.js" } }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="], + "iceberg-js": ["iceberg-js@0.8.1", "", {}, "sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA=="], "iconv-lite": ["iconv-lite@0.4.24", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3" } }, "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="], diff --git a/package.json b/package.json index 5c3a7c499..e0135da54 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "q": "lsof -ti:8080 -ti:3000 | xargs kill -9", "knip": "knip", "knip:fix": "knip --fix", - "knip:fix-all": "knip --fix --allow-remove-files" + "knip:fix-all": "knip --fix --allow-remove-files", + "prepare": "husky" }, "dependencies": { "@aws-sdk/client-firehose": "^3.975.0", @@ -74,6 +75,7 @@ "@types/node": "^24.9.1", "concurrently": "^9.2.1", "dotenv": "^16.6.1", + "husky": "^9.1.7", "inquirer": "^12.10.0" } }