Refresh toolchain: Biome 2, TypeScript 7, native Node test running - #1
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First maintenance pass since 0.1.5 (May 2025). No runtime changes: the emitted
dist/index.jsanddist/index.d.tsare byte-identical to what 0.1.5 shipped.Dependencies
@biomejs/biometypescript@types/nodetsxInstalled packages: 11 → 6. Test run: ~394ms → ~80ms.
tsxis gone because Node has had unflagged type stripping since 22.18, sonode --testrunssrc/*.test.tsdirectly — no loader, no build step for tests.Node.js support
Node 20 went EOL 2026-04-30.
enginesis now>=22, and CI covers 22, 24 and 26. Working on the library needs 22.18+ (type stripping);.node-versionpins 24.@types/nodeintentionally 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:typesnow defaults to[]instead of everything innode_modules/@types, so"types": ["node"]is explicit.rootDirmust be set explicitly alongsideoutDir(TS5011).strict,targetandlibhave modern defaults, so those lines are gone.tsconfig.jsonwent from 21 lines to 12. Each remaining flag was verified to be doing work by deleting it and observing the failure.verbatimModuleSyntaxanderasableSyntaxOnlyare what keep the tests runnable under Node's strip-only mode;module: nodenextcatches extensionless relative imports that Node ESM rejects at runtime.tsconfig.build.jsonis new and only overrides emit. The split meansnpm run typechecknow covers the test files, which the old"include": ["src/index.ts"]never did — andtsxnever typechecked them either.Also
LICENSE(MIT). The README has linked to it since the beginning, but the file didn't exist; it now ships in the npm tarball.exportsandsideEffects: false..gitignoreand skipsdist/, which it had been reformatting.Verified
npm ciunder 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;
enginesandexportsmake this a 0.2.0 when you're ready to release.