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
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
build:
runs-on: ubuntu-latest

permissions:
# Required to checkout the code
contents: read
# Required to put a comment into the pull-request
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -23,7 +29,8 @@ jobs:

- run: npm ci
- run: npm run build
- run: npm test
- run: npm run test:coverage
- uses: davelosert/vitest-coverage-report-action@v2
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about using a 3rd party GitHub Action, and whether this will create comment spam on PRs. Up to TypeScript SDK maintainers though.

We also might want to pin the version

Copy link
Contributor

Choose a reason for hiding this comment

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

Was also thinking about this.

We can get coverage sorted without it.

- run: npm run lint

publish:
Expand Down
9 changes: 6 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
npm run build # Build ESM and CJS versions
npm run lint # Run ESLint
npm test # Run all tests
npx jest path/to/file.test.ts # Run specific test file
npx jest -t "test name" # Run tests matching pattern
npm test:coverage # Run coverage of all tests
npm test:bench # Run all benchmark tests
npx vitest path/to/file.test.ts # Run specific test file
npx vitest -t "test name" # Run tests matching pattern
```

## Code Style Guidelines

- **TypeScript**: Strict type checking, ES modules, explicit return types
- **Naming**: PascalCase for classes/types, camelCase for functions/variables
- **Files**: Lowercase with hyphens, test files with `.test.ts` suffix
- **Files**: Lowercase with hyphens, test files with `.test.ts` suffix, benchmark files with `.bench.ts` suffix
- **Imports**: ES module style, include `.js` extension, group imports logically
- **Error Handling**: Use TypeScript's strict mode, explicit error checking in tests
- **Formatting**: 2-space indentation, semicolons required, single quotes preferred
Expand All @@ -25,4 +27,5 @@ npx jest -t "test name" # Run tests matching pattern

- `/src`: Source code with client, server, and shared modules
- Tests alongside source files with `.test.ts` suffix
- Benchmark tests alongside source files with `.bench.ts` suffix
- Node.js >= 18 required
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default tseslint.config(
},
{
files: ['src/client/**/*.ts', 'src/server/**/*.ts'],
ignores: ['**/*.test.ts'],
ignores: ['**/*.bench.ts', '**/*.test.ts'],
rules: {
'no-console': 'error'
}
Expand Down
14 changes: 0 additions & 14 deletions jest.config.js

This file was deleted.

Loading
Loading