Skip to content

chore(bindings): TypeScript 7, nodenext resolution, and the Biome canon - #43

Merged
andrescera merged 1 commit into
mainfrom
chore/bindings-ts7-biome
Aug 16, 2026
Merged

chore(bindings): TypeScript 7, nodenext resolution, and the Biome canon#43
andrescera merged 1 commit into
mainfrom
chore/bindings-ts7-biome

Conversation

@andrescera

Copy link
Copy Markdown
Member

Affected repo & language: srtla — TypeScript (bindings/typescript only)

What

Brings the TS bindings package onto TypeScript 7.0.2 with nodenext module resolution,
and adopts the shared Biome canon (@ceralive/biome-config@2026.8.0, Biome 2.5.8) —
which this package had no lint coverage from at all until now.

Adopting Biome meant renaming a script that already existed under a misleading name:
lint used to be tsc --noEmit. It is now biome check ., and the typecheck moved to
its own typecheck script. bindings.yml was updated so the type gate is not silently
dropped: the old single "Type-check" step is now two steps, Lint and Type-check.

The C/C++ receiver and everything outside bindings/typescript are untouched.

Why

@ceralive/biome-config@2026.8.0 is published and is the workspace-wide lint/format
canon. This package and the cerastream bindings were the last two TypeScript packages in
the workspace with zero Biome coverage — a lint break could land here and nothing
would say so.

TypeScript 7 is the workspace direction for packages that can take it (the compiler is
verified per package with tsc --version rather than assumed from the manifest), and
this package can: it has no Svelte, no compiler-API consumer, and no svelte-check.

How to verify

cd bindings/typescript
bun install --frozen-lockfile
bun run lint        # biome check .   — 25 files, clean
bun run typecheck   # tsc --noEmit
bun x tsc --version # 7.0.2
bun run test        # 136 tests
bun run build
git status --porcelain   # must be empty: the committed dist matches a fresh build

The published API is unchanged. To confirm rather than take my word for it, build dist/
from main in a worktree and compare the exported names:

git worktree add /tmp/srtla-main origin/main
# build in both, then compare sorted Object.keys(await import(...)) for
# index / sender / receiver / telemetry, and the `declare ...` lines in dist/*.d.ts

All four entrypoints (index 26 / sender 8 / receiver 9 / telemetry 7 exports) come back
identical.

Risks

The interesting one, and the reason this PR is worth reading rather than skimming:
Biome's organizeImports assist re-sorts re-exports but leaves JSDoc comments where
they were.
In src/sender/index.ts (a barrel of three export * from) the first
--write pass orphaned a /** @deprecated */ block and stripped the doc off
export * from './types.js'. Lint was perfectly green; the repo's own ADR-003
deprecation-coverage.test.ts went red. That is fixed here, and it is the reason the
verification steps above run the test suite and not just lint.

Second: dist/ is tracked in this package, so adopting the canon formatter produces a
real dist diff (tsc re-prints from the reformatted AST). It was reviewed and classified
— line re-wrapping at the 100-col canon, import/export member ordering, and two
tsconfig-driven syntax differences (numeric separators preserved under target: es2023;
.d.ts object-key ordering from the TS7 declaration emitter). Zero value, identifier,
control-flow or export-name changes.

Biome's unsafe autofix for noNonNullAssertion (x!x?.) was not taken — it
changes runtime semantics. All five hits were redundant assertions
(noUncheckedIndexedAccess is off, so lines[i] is already string), so the ! was
simply deleted, which is semantics-preserving and keeps the typecheck green.

Upgrade ledger

Package From To Note
typescript ^5.9.3 ^7.0.2 two majors; moduleResolution moved nodenodenext
@biomejs/biome ^2.5.8 new dependency; package had no linter before
@ceralive/biome-config ^2026.8.0 new dependency (published canon)
@types/bun ^1.3.14 ^1.3.14 already current
zod ^4.4.3 ^4.4.3 already current

Held back / not taken: nothing. bun outdated returns empty after the bumps.
TypeScript 7.1.0-dev.* prereleases remain forbidden.

New biome-ignore comments: none. The 37 first-run diagnostics were all formatting
and import ordering, fixed by a single biome check --write . with no rule disabled and
no override added.

Config note: biome.json excludes dist and test-results from files.includes
dist is tsc-formatted output, not Biome-formatted, and including it produces hundreds
of bogus format diagnostics.

…ption

TypeScript 5.9.3 -> 7.0.2 in bindings/typescript. TS7 hard-removes
moduleResolution: node (TS5108), so module/moduleResolution move to
nodenext -- not bundler, which permits extensionless specifiers that
would survive into the emitted dist/*.js and break Node resolution.
target moves to es2023. TS7 also defaults types to [], so tsconfig now
sets types: ["bun"] explicitly for bun:test and the Bun global.

Adopts the shared Biome canon (@ceralive/biome-config 2026.8.0 on Biome
2.5.8) and the workspace bindings script convention already used by
srtla-send-rs: lint = biome check, typecheck = tsc --noEmit. The old
tsc-meaning lint script is renamed to typecheck and bindings.yml runs
both as separate steps.

Published exports are unchanged -- all four entrypoints import to
identical key sets before and after. The dist recompilation diff is
formatting- and syntax-level only (canon reflow, import ordering,
es2023 numeric separators, TS7 declaration key order).
@andrescera
andrescera merged commit 4c4acb4 into main Aug 16, 2026
5 checks passed
@andrescera
andrescera deleted the chore/bindings-ts7-biome branch August 16, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant