Skip to content
Merged
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,3 +533,14 @@ nix develop
```

The flake provides all necessary development dependencies including Node.js, pnpm, and other build tools.

### TypeScript compilers

`pnpm test` runs Vitest type checks with stable native TypeScript 7 through the
explicit `@typescript/native` executable path. The pinned TypeScript 5.9.3 package
remains available for compiler API consumers and the published-package consumer
compatibility test. `pnpm build` retains its existing native-preview declaration
compiler.

Use these scripts or an explicit compiler path when adding checks: both compiler
packages expose a `tsc` command, so bare `tsc` and `pnpm exec tsc` are ambiguous.
3 changes: 2 additions & 1 deletion knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default {
},
ignore: ['**/*.test.ts', '**/*.spec.ts', '**/*.test-d.ts'],
ignoreBinaries: ['only-allow', 'oxfmt', 'oxlint', 'tsx'],
ignoreDependencies: ['@typescript/native-preview'],
// Vitest spawns the native checker through an explicit file path.
ignoreDependencies: ['@typescript/native-preview', '@typescript/native'],
rules: {
optionalPeerDependencies: 'off',
devDependencies: 'warn',
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@fast-check/vitest": "catalog:dev",
"@hono/mcp": "catalog:dev",
"@types/node": "catalog:dev",
"@typescript/native": "catalog:dev",
"@vitest/coverage-v8": "catalog:dev",
"ai": "catalog:dev",
"hono": "catalog:dev",
Expand All @@ -77,6 +78,7 @@
"publint": "catalog:dev",
"tsdown": "catalog:dev",
"type-fest": "catalog:dev",
"typescript": "catalog:dev",
"unplugin-unused": "catalog:dev",
"vitest": "catalog:dev",
"zod": "catalog:dev"
Expand Down
220 changes: 220 additions & 0 deletions pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ catalogs:
'@fast-check/vitest': ^0.2.0
'@hono/mcp': ^0.1.4
'@types/node': ^22.13.5
'@typescript/native': npm:typescript@7.0.2
'@vitest/coverage-v8': ^4.0.15
hono: ^4.9.10
knip: ^5.72.0
msw: ^2.10.4
publint: ^0.3.12
tsdown: ^0.17.2
type-fest: ^4.41.0
typescript: 5.9.3
unplugin-unused: ^0.5.4
vitest: ^4.0.15
zod: ^4.3.0
Expand Down
9 changes: 6 additions & 3 deletions scripts/package-exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ describe('published package output', () => {
try {
const consumerDir = await createConsumerFixture(tempDir);
try {
// The consumer fixture has no TypeScript install of its own, so tsc
// runs from the repository's pnpm context.
await execFileAsync('pnpm', ['exec', 'tsc', '-p', consumerDir], { cwd: rootDir });
// Keep consumer compatibility covered by the pinned JavaScript compiler.
await execFileAsync(
process.execPath,
[path.join(rootDir, 'node_modules/typescript/bin/tsc'), '-p', consumerDir],
{ cwd: rootDir },
);
} catch (error) {
const execError = (error ?? {}) as { stdout?: string; stderr?: string };
const output = `${execError.stdout ?? ''}${execError.stderr ?? ''}`.trim();
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default defineConfig({
exclude: ['node_modules', 'dist', 'examples'],
typecheck: {
enabled: true,
checker: './node_modules/@typescript/native/bin/tsc',
include: ['src/**/*.test.ts', 'src/**/*.test-d.ts'],
},
},
Expand Down
Loading