Skip to content

Refresh toolchain: Biome 2, TypeScript 7, native Node test running - #1

Merged
tbeseda merged 2 commits into
mainfrom
chore/2026-refresh
Aug 14, 2026
Merged

Refresh toolchain: Biome 2, TypeScript 7, native Node test running#1
tbeseda merged 2 commits into
mainfrom
chore/2026-refresh

Conversation

@tbeseda

@tbeseda tbeseda commented Aug 14, 2026

Copy link
Copy Markdown
Owner

First maintenance pass since 0.1.5 (May 2025). No runtime changes: the emitted dist/index.js and dist/index.d.ts are byte-identical to what 0.1.5 shipped.

Dependencies

Package Was Now
@biomejs/biome 1.9.4 ^2.5.8
typescript ^5.8.3 ^7.0.2
@types/node ^22.15.15 ^22
tsx ^4.19.4 removed

Installed packages: 11 → 6. Test run: ~394ms → ~80ms.

tsx is gone because Node has had unflagged type stripping since 22.18, so node --test runs src/*.test.ts directly — no loader, no build step for tests.

Node.js support

Node 20 went EOL 2026-04-30. engines is now >=22, and CI covers 22, 24 and 26. Working on the library needs 22.18+ (type stripping); .node-version pins 24.

@types/node intentionally stays on the 22 line so a Node 24/26-only API can't slip into a test unnoticed.

TypeScript 7

The upgrade was going to be forced eventually — the old "moduleResolution": "node" is removed in TS 7 (TS5108). Three other TS 6/7 behavior changes show up here:

  • types now defaults to [] instead of everything in node_modules/@types, so "types": ["node"] is explicit.
  • rootDir must be set explicitly alongside outDir (TS5011).
  • strict, target and lib have modern defaults, so those lines are gone.

tsconfig.json went from 21 lines to 12. Each remaining flag was verified to be doing work by deleting it and observing the failure. verbatimModuleSyntax and erasableSyntaxOnly are what keep the tests runnable under Node's strip-only mode; module: nodenext catches extensionless relative imports that Node ESM rejects at runtime.

tsconfig.build.json is new and only overrides emit. The split means npm run typecheck now covers the test files, which the old "include": ["src/index.ts"] never did — and tsx never typechecked them either.

Also

  • Added LICENSE (MIT). The README has linked to it since the beginning, but the file didn't exist; it now ships in the npm tarball.
  • Added exports and sideEffects: false.
  • Biome now honors .gitignore and skips dist/, which it had been reformatting.
  • README gained a CI badge and a Development section.

Verified

  • 18/18 tests pass on Node 24 and Node 22 (22.23.2), plus npm ci under npm 10 and npm 12.
  • npm pack + install into a scratch consumer renders a tree correctly.
  • dist/ diffed byte-for-byte against the 0.1.5 output.

Version is untouched at 0.1.5; engines and exports make this a 0.2.0 when you're ready to release.

- Biome 1.9.4 -> 2.5.8. Config migrated to the 2.x schema; it now honors
  .gitignore and skips dist/, which it had been reformatting.
- TypeScript 5.8 -> 7.0. The old "moduleResolution": "node" is removed in
  TS 7 (TS5108), so the config had to move to nodenext regardless.
- Drop tsx. Node has unflagged type stripping since 22.18, so `node --test`
  runs the .ts tests directly. 11 installed packages -> 6.
- tsconfig.json now typechecks all of src/, including the tests, which the
  old "include": ["src/index.ts"] never did (and tsx doesn't typecheck).
  tsconfig.build.json handles emit.
- tsconfig trimmed to what TS 7 doesn't already default: strict, target and
  lib are now defaults. The flags that remain are load-bearing --
  verbatimModuleSyntax and erasableSyntaxOnly keep the tests runnable under
  Node's strip-only mode, and module: nodenext catches extensionless
  relative imports that Node ESM would reject at runtime.
- Add exports, sideEffects: false, and engines >=22 (Node 20 is EOL as of
  2026-04-30).

Emitted dist/index.js and dist/index.d.ts are byte-identical to 0.1.5.
- LICENSE: MIT, which README has always linked to but the repo never had.
  It now ships in the npm tarball too.
- CI: GitHub Actions. Tests + build on Node 22, 24 and 26; a separate job
  runs `npm run check` on the version in .node-version.
- .node-version pins 24 for contributors; mise and setup-node both read it.
- README: CI badge, runtime requirement, and a Development section covering
  the scripts and the 22.18 floor for working on the library.
@tbeseda
tbeseda merged commit 9049934 into main Aug 14, 2026
4 checks passed
@tbeseda
tbeseda deleted the chore/2026-refresh branch August 14, 2026 01: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