Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: Lint
run: bun run lint

- name: Verify native TypeScript compiler
run: bun run check:typescript-version

- name: Typecheck
run: bun run typecheck

Expand Down
43 changes: 43 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
"typecheck": "turbo run typecheck",
"test": "bun test",
"setup": "bash scripts/setup.sh",
"deploy": "bun run --filter '@statusbeam/worker' deploy && bun run --filter '@statusbeam/web' deploy"
"deploy": "bun run --filter '@statusbeam/worker' deploy && bun run --filter '@statusbeam/web' deploy",
"check:typescript-version": "tsc --version | grep -E '^Version 7\\.'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[MEDIUM] Non-portable grep command in package.json script

Problem: The check:typescript-version script uses grep, which is not natively available on Windows environments, leading to potential failures for Windows contributors.
Rationale: To ensure cross-platform compatibility and a consistent developer experience, scripts in package.json should avoid platform-specific shell utilities like grep.
Suggestion: Use a cross-platform Bun/Node.js one-liner to verify the TypeScript version.

Suggested change
"check:typescript-version": "tsc --version | grep -E '^Version 7\\.'"
"check:typescript-version": "bun -e \"if (!require('child_process').execSync('tsc --version').toString().startsWith('Version 7.')) process.exit(1)\""

},
"devDependencies": {
"@pleaseai/eslint-config": "^0.0.4",
"@types/bun": "^1.3.14",
"@typescript/native": "npm:typescript@^7.0.2",
"eslint": "^10.7.0",
"turbo": "^2.10.5",
"typescript": "^6.0"
Expand Down