chore(deps): land the Dependabot backlog and migrate to Vitest 5 - #446
Conversation
Supersedes the five open Dependabot PRs, which could not go green on their own. #438 and #436 were split across two PRs, so each broke the other's peer requirement (coverage-v8@3.2.7 requires vitest@3.2.7); moving them together resolves it. #445 and #435 bumped packages pinned by the security-override contract tests, which Dependabot cannot update. #437 needed real source work. Vitest 3.2.7 -> 5.0.0 with @vitest/coverage-v8, adding vite as an explicit devDependency: Vitest 5 declares vite as a non-optional peer. This also clears the last two known advisories, so both the production-only and full npm audits now report zero. Two override blocks became dead and were removed: Vitest 5 dropped the test-exclude/glob chain, and vite is now direct rather than nested under vitest. `test.poolOptions` was removed in Vitest 4 and its contents promoted to top-level options; `isolate: true` expresses what the former `singleFork: false` did. @types/node 22 -> 26 added a throwIfNoEntry overload to stat(), so `Awaited<ReturnType<typeof stat>>` now resolves to `Stats | BigIntStats | undefined` and `keyof` of that union is `never`, breaking every `Pick<...>` over it. Replaced that idiom with the concrete `Stats` type in the three files that used it; no call site passes `bigint: true`, so the narrowing is exact. Held back deliberately: - zod 4.2.0 -> 4.6.2 (from #445). The evidence-pinned bundled test fixture embeds zod, so bumping it makes `check:test-fixture` demand a rebuild, which changes the sha256 that the named-host evidence ledger pins as reviewed compatibility evidence. zod carries no advisory, so holding it costs nothing. The declared `^4.2.0` range is unchanged; only the lock is held, so library consumers are unaffected. Unblocking this requires re-collecting the named-host evidence. Refs #435, #436, #437, #438, #445 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
On-demand reviews are free for the next 29 days. After that, they cost $0.25 per reviewed file. Or wait 37 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 108 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe pull request updates dependency versions and package contract tests, migrates Vitest isolation settings, and replaces inferred filesystem metadata types with explicit ChangesDependency and Type Updates
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Merge Risk: ⚪ Minimal · up to The dependency and configuration updates are consistent with their updated contracts, and the filesystem changes are type-only. Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 7 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the package tree Comment |
Vitest 5 applies AST-aware remapping unconditionally, attributing functions and branches differently from Vitest 3. With identical tests and unchanged source, the measured figures moved in both directions — upstream-process-manager functions 100 -> 89.84 and redact branches 94.69 -> 87.17, but secret-provider-availability branches 81.57 -> 84.21 and secret-resolver functions 86.66 -> 89.47 — so this is a measurement change, not a coverage regression. Confirmed by running coverage on development (Vitest 3), where the same tests meet every threshold. Vitest 5 removed the experimental opt-out, so the previous measurement cannot be restored. Recalibrated the seven breached function and branch thresholds to measured actuals with a small margin, preserving the ratchet going forward. Line thresholds were unaffected and are unchanged. Refs #435, #436, #437, #438, #445 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Coverage thresholds recalibrated (f0ad00e)
I ran
Vitest 5 applies AST-aware remapping unconditionally, attributing functions and branches differently. Numbers rising in some files confirms re-attribution rather than lost coverage. On Vitest 5 removed the experimental opt-out, so the previous measurement cannot be restored. I recalibrated the seven breached function/branch thresholds to measured actuals with ~1 point of margin, preserving the ratchet. Line thresholds were unaffected and are unchanged. Worth a reviewer's eye: this does lower some enforced figures ( |
Finalize the compatible v1.1.5 patch release. The only change that reaches installers is the @hono/node-server runtime dependency, refreshed from 2.0.10 to 2.1.1. Neither version carries a security advisory, so this is a dependency refresh rather than a security release; no runtime behavior or public API changed. Also records the [Unreleased] changelog entry for #446, which merged without one. That work is development tooling and is not published, though it does clear the two development-only advisories v1.1.4 explicitly did not claim. Refs #447 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Supersedes #445, #438, #437, #436, #435. None of them could go green on their own.
Why each was stuck
peer vitest@"3.2.7" from @vitest/coverage-v8@3.2.7vsFound: vitest@5.0.0. Neither can ever pass alone.@hono/node-server2.0.10,esbuild0.28.1). Dependabot changes the dependency but cannot update the assertions, so any pinned package yields a permanently-red PR.@types/node26, not a version nudge.What landed
@vitest/coverage-v8, plusviteas an explicit devDependency — Vitest 5 declares vite as a non-optional peer (^6.4.0 || ^7.0.0 || ^8.0.0) and fails at startup without it (Cannot find package 'vite').@types/node22 → 26,@hono/node-server2.0.10 → 2.1.1,esbuild0.28.1 → 0.28.2,eslint10.8.0 → 10.10.0,typescript-eslint8.65.0 → 8.70.0.0.27.0,1.19.9) left intact.Both the production-only and full npm audits now report zero. The Vitest 5 upgrade clears the last two known advisories (
vitest,@vitest/mocker), which were fixed in ≥ 4.1.11 — the gap called out in the v1.1.4 release.The @types/node fix
@types/node26 added athrowIfNoEntryoverload tostat(), making the last overloadPromise<Stats | BigIntStats | undefined>.ReturnTyperesolves to the last overload, andkeyof (X | undefined)isnever, so everyPick<Awaited<ReturnType<typeof stat>>, …>failed withdoes not satisfy the constraint 'never'.Replaced that idiom with the concrete
Statstype in the three files using it (26 occurrences). No call site passesbigint: true— the files that do already importBigIntStatsexplicitly — so the narrowing is exact, and the result no longer depends on upstream overload ordering.Dead overrides removed
Vitest 5 dropped the
test-exclude/globchain entirely (0 lock entries), andviteis now direct rather than nested under vitest, so both nested override paths matched nothing. Removing them keeps the audit at zero;postcssresolves to 8.5.28, above the 8.5.23 the dead override targeted.test.poolOptionswas removed in Vitest 4 and its contents promoted to top-level options.isolate: trueexpresses exactly what the formersingleFork: false, isolate: truedid — a fresh worker per test file.Held back deliberately: zod
#445 also bumps
zod4.2.0 → 4.6.2. Not taken, because the evidence-pinned bundled test fixture embeds zod: bumping it makescheck:test-fixturedemand a rebuild, which changes thesha256thattests/named-host-evidence.test.tspins as reviewed compatibility evidence for the published package. Updating that hash would assert the new fixture was used in a recorded run that never happened.zod carries no advisory, so holding it costs nothing. The declared
^4.2.0range is unchanged — only the lockfile is held — so library consumers are unaffected. Unblocking it requires re-collecting the named-host evidence against real hosts.esbuildwas initially suspected of the same conflict and reverted; isolating the variable showed 0.28.2 produces byte-identical fixture output, so it is included.Verification
npm run typecheck,npm run lint,npm run build,npm run check:test-fixture, andnpm run check:pack("Package contract verified (58 files)") are all clean. Full suite: 1998+/2033 passing, 162/162 files.Residual single-test failures across runs are pre-existing local flakes, not regressions: a different test fails each run, two isolated runs of identical code disagreed, and each failure is a timeout at the local 5s
testTimeout(CI allows 10s). The only source files touched outside tests take type-only edits, which are erased at compile time.🤖 Generated with Claude Code
Summary by CodeRabbit
Maintenance
Testing
Code Quality