Repository navigation
chore: bump dependencies to clear npm audit - #14
Merged
Merged
Conversation
Brings `npm audit` to 0 vulnerabilities (was 4 high, all dev-only and never shipped — the published package's sole runtime dep is `ws`): - vite 8.1.3 -> 8.2.2 clears postcss + nanoid - brace-expansion refreshed in the lockfile. No version bump was needed: its parents already accepted the fixed 5.0.9/2.1.4, the lockfile was just pinned to the vulnerable 5.0.7/2.1.1 - overrides.fast-uri ^4.1.4 clears the last one. ajv pins fast-uri ^3.0.1, so the fixed 4.x only lands via an override Also bumps vitest + @vitest/coverage-v8 to 5.0.0 (no code or config changes needed), plus ws, esbuild and happy-dom. typescript stays ^5.9.3 and vite-plugin-dts stays ^4.5.4. TypeScript 7 removed the JavaScript Compiler API: with dts 4.5.4 the build fails outright, and with vite-plugin-dts@5 plus the @typescript/typescript6 bridge the build exits 0 while silently degrading rollupTypes to multi-file stubs. Both constraints are now documented in CLAUDE.md. Verified: npm audit 0 vulnerabilities, npm ci --dry-run clean, build OK, 3 rolled-up .d.ts with 0 stub files, 85/85 tests, attw node16-ESM green on all 3 entry points. Co-Authored-By: Claude Opus 5 (1M context) <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.
Brings
npm auditfrom 4 high → 0 vulnerabilities, and validates how far the remaining major bumps can safely go.All four advisories were dev-only and never shipped — the published package's sole runtime dependency is
ws. So this is CI-noise and hygiene, not a fix for anyone installingtwd-relay.How each vulnerability was cleared
postcss,nanoidvitevite8.1.3 → 8.2.2brace-expansionvite-plugin-dts→ api-extractor /@vue/language-core→minimatchfast-urivite-plugin-dts→ api-extractor → tsdoc-config →ajvoverrides(only option)brace-expansionis worth a note: it was never actually stuck. Its parents already accepted the fixed 5.0.9 / 2.1.4, but the lockfile was pinned to the vulnerable 5.0.7 / 2.1.1. A plainnpm update brace-expansioncleared it — no--force, no override.fast-uriis the one real compromise.ajvpinsfast-uri: ^3.0.1and the fix is 4.x, so anoverridesentry is the only route. It's documented inCLAUDE.mdso it doesn't get "cleaned up" later.Other bumps
vitest+@vitest/coverage-v84.1.9 → 5.0.0 — a major, but a non-event here: 85/85 tests, byte-identical coverage numbers, no config changes, no deprecation warnings. Plus routinews8.21.3,esbuild0.28.2,happy-dom20.14.0.What was deliberately NOT bumped
typescriptstays^5.9.3,vite-plugin-dtsstays^4.5.4. TypeScript 7 removed the JavaScript Compiler API, and it fails two distinct ways:vite-plugin-dts4.5.4 → build fails outright (Cannot read properties of undefined (reading 'ESNext')).vite-plugin-dts@5+ the@typescript/typescript6bridge → build exits 0 but silently ships broken types.rollupTypesdegrades to 14 multi-file stubs,dist/index.d.tsbecomes a re-export stub, and attw reportsInternal resolution erroron all three entry points.The second case is the dangerous one — a green build producing broken output. This confirms and sharpens the earlier July finding: the root cause is the TS 7 compiler-API removal, and the
@typescript/typescript6bridge does not rescue it.vite-plugin-dts@5would also not have helped the audit anyway — it moves@microsoft/api-extractorto a peer, and api-extractor 7.59.0 still pulls the sameminimatchandtsdoc-configchains.Verification
Each of these run on the final state:
npm audit→ 0 vulnerabilitiesnpm ci --dry-run→ clean (no@emnapilockfile inconsistency this time)npm run build→ OKls dist/*.d.ts→ exactly 3 files;find dist -name '*.d.ts' -mindepth 2→ 0 stubsnpm run test:ci→ 85/85 passing, 9 filesattw --pack .→node16 (from ESM)green on all 3 entries — identical to the pre-change baselinenode10: Resolution failedon/browserand/viteis pre-existing baseline, not a regression from this PR.Note on scope
CLAUDE.md's Test Patterns section said "26 tests across 3 files" — it's actually 85 across 9. Corrected here since the same file was already being edited for the dependency-constraint docs. Happy to split it out if you'd rather keep this PR purely dependencies.🤖 Generated with Claude Code