chore: upgrade vitest, biome and lefthook to latest majors - #130
Merged
Conversation
Clears all 22 open Dependabot alerts (2 critical, 7 high). Every one was `development` scope and transitively under vitest 2 — vite, postcss, esbuild, rollup, minimatch, glob, brace-expansion — so none of them ever reached consumers of this package, which ships no runtime dependencies. `pnpm audit` is now clean. vitest 2.1.9 -> 4.1.10: - Two constructor signatures in the tests declared a required parameter after an optional one, suppressed with `@ts-expect-error`. Vitest 4 ships Vite 8, which transforms TypeScript with oxc rather than esbuild, and oxc rejects that at parse time where esbuild allowed it. A type suppression cannot help — the file no longer parses. Made `keyThree` optional instead: `?` is erased at runtime, so positional resolution, which is what both tests actually exercise, is unchanged. - Vitest 4 removed `coverage.all` and now reports only the files it loaded, so `coverage.include` is set explicitly to keep untested sources from silently dropping out of the report. - `configDefaults.coverage.exclude` is now an empty array, making the spread of it dead code, so the exclude list is inlined. Branch coverage reads 92.66% rather than 97.26% because v4's V8 provider remaps through the AST instead of v8-to-istanbul. No tests were lost and statement/line coverage went up to 100%; the denominator changed. biome 1.9.4 -> 2.5.8: config migrated via `biome migrate` (organizeImports moved under `assist`, `files.ignore` became negated `files.includes`). v2 also sorts named imports differently, hence the import churn. lefthook 1.8.1 -> 2.1.10: no config changes, `lefthook validate` passes. @types/node stays on ^24 deliberately — it should track the Node version CI actually runs, not drift ahead to 26. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Clears all 22 open Dependabot alerts (2 critical, 7 high).
pnpm auditnow reports no known vulnerabilities.Worth stating plainly: every one of those alerts was
developmentscope, and all of them sat transitively under vitest 2 — vite, postcss, esbuild, rollup, minimatch, glob, brace-expansion.pumpitships no runtime dependencies, so none of them ever reached anyone installing the package. This was housekeeping, not an incident.vitest 2.1.9 → 4.1.10
Three things needed attention:
Two tests stopped parsing. They declared a required constructor parameter after an optional one, suppressed with
@ts-expect-error:Vitest 4 ships Vite 8, which transforms TypeScript with oxc instead of esbuild, and oxc rejects this at parse time where esbuild allowed it. A type-level suppression can't help — the file simply doesn't parse. Made
keyThreeoptional instead.?is erased at runtime, so positional resolution — which is what both tests actually exercise — is unchanged, and the suppression is no longer needed.coverage.allwas removed, so v4 reports only files it loaded. Without an explicitcoverage.include, an untested source file would silently vanish from the report rather than show up as 0%. Now set tosrc/**.configDefaults.coverage.excludeis now[], which made the config's spread of it dead code — and its comment about tsdown stale. Inlined the exclude list.On the coverage numbers
Branch coverage reads 92.66% where it used to read 97.26%. No tests were lost (163 pass, up from 143 collected) and statements/lines went up to 100%. v4's V8 provider remaps through the AST instead of
v8-to-istanbul, so it detects branches the old provider missed — the denominator changed, not the testing.You'll also notice
pumpit-error.tsno longer appears in the terminal table. It's still fully measured — it's incoverage-final.jsonand the HTML report at 100% on every metric. v4's text reporter just omits fully-covered files.biome 1.9.4 → 2.5.8
Config migrated with
biome migrate:organizeImportsmoved underassist.actions.source, andfiles.ignorebecame negated patterns infiles.includes. v2 also sorts named imports differently, which is the import churn across three files —biome check --writeautofixed it.lefthook 1.8.1 → 2.1.10
No config changes needed;
lefthook validatepasses and the pre-commit hook ran clean on this commit.Not upgraded
@types/nodestays on^24on purpose — it should track the Node version CI actually runs rather than drift ahead to 26.Verification
pnpm check:ci,pnpm type:check,pnpm test(18 files, 163 tests) andpnpm buildall pass locally. Build output is unchanged in size, and no changeset is included since nothing here affects the published package.🤖 Generated with Claude Code