Skip to content

v7.50.0: typecheck with tsrs, lint with oxlint

Latest

Choose a tag to compare

@arberx arberx released this 20 Oct 23:16
3ca6ab5

Toolchain release. Type checking moves to tsrs, a Rust port of the TypeScript 7 checker, and lint moves from ESLint to oxlint. Nothing changes in what canonry does: the CLI, API and dashboard behave exactly as in 7.48.0.

npm @canonry/canonry@latest is 7.50.0.

Faster checks (from #1358)

Measured on an Apple M4 Pro:

Check 7.48.0 7.50.0
pnpm typecheck, cold 28.6s 2.7s
pnpm typecheck, warm 8.5s 1.5s
pnpm lint 26.5s 8.6s
Peak memory, largest package 2.6 GB 1.2 GB

Type checking

  • tsrs by default. Every typecheck script runs scripts/typecheck.mjs, which calls tsrs. On canonry its diagnostics matched the official TypeScript 7 compiler, built from the same commit, byte for byte across 14,947 planted errors and 213 source mutations.
  • TypeScript 5.9 stays checked. CANONRY_TYPECHECKER=tsc switches to the typescript package's own tsc, and pnpm typecheck:tsc runs it for the whole workspace. pnpm verify and CI run both, because tsup's .d.ts build and the SDK codegen still use TypeScript 5.9.
  • Intel Macs run tsrs's WebAssembly build automatically, with the same output.
  • tsconfig.base.json drops esModuleInterop: false, which TypeScript 7 removed, and sets noUncheckedSideEffectImports so both compilers agree.

Lint

  • oxlint replaces ESLint and typescript-eslint. .oxlintrc.json carries over every rule, guard scope and exemption, and the type-aware rules run on TypeScript 7.
  • The custom guards run as oxlint plugins from eslint-rules/. test/lint-guards.test.ts lints a file that breaks every guard in each guarded tree, so a guard that stops running fails the suite.
  • The pre-commit hook still lints exactly what is staged, now without a result cache.
  • oxlint found six issues ESLint missed (an untyped Map and five test patterns); they are fixed.

For contributors

  1. Run pnpm install.
  2. Editor integrations that ran ESLint no longer find a config. Use the oxlint editor extension instead.
  3. To check with TypeScript's own compiler, run CANONRY_TYPECHECKER=tsc pnpm typecheck.

Install

npm install -g @canonry/canonry@7.50.0
canonry --version

No configuration changes. Restart any running canonry serve after upgrading.