Skip to content

chore: Replace nyc with c8 for coverage - #209

Open
TwitchBronBron wants to merge 1 commit into
masterfrom
chore/nyc-to-c8
Open

chore: Replace nyc with c8 for coverage#209
TwitchBronBron wants to merge 1 commit into
masterfrom
chore/nyc-to-c8

Conversation

@TwitchBronBron

Copy link
Copy Markdown
Member

nyc@15 is unmaintained. c8 uses V8's native coverage instead. Pinned to c8@10, the last line supporting Node 18 (c8@12 requires >=20.19).

  • 429 → 387 total packages
  • Sourcemap line numbers now match the no-coverage run (nyc mapped to its instrumented output)

Overrides: 7 → 3, plus one dependency range tightened. Stripped all overrides, re-audited from a clean install, and reapplied only what genuinely reproduces:

  • serialize-javascript: ^7 — still required (high: RCE + CPU-exhaustion DoS, via mocha)
  • vscode-languageserver-protocol / -types: 3.17.5not security pins. Floating to 3.18.3 exposes types through conditional exports that TypeScript can't read under moduleResolution: node, breaking the build with 108 errors.
  • thenby pinned to 1.3.4 (was ^1.3.4) — 1.4.1 changed the firstBy/thenBy generic signatures, breaking src/testHelpers.spec.ts. It's a direct devDependency, so an override is rejected with EOVERRIDE; the range itself had to be pinned.

Dropped as obsolete: brace-expansion@^1/@^2, js-yaml, fast-uri, istanbul-lib-processinfo, @babel/core. 0 vulnerabilities and the audit-ci gate passes.

Coverage note: this repo was not previously at 100% and check-coverage is false. Numbers stay comparable — statements 96.24% → 97.28%, branches 88.44% → 88.38%, functions 99.48% → 99.3%. Shifts are istanbul-vs-V8 instrumentation granularity, not a change in what's tested.

Verified after a clean rm -rf node_modules package-lock.json && npm install: npm test, npm run build, npm run lint, and npm run audit all clean. Coveralls still reads ./coverage/lcov.info.

🤖 Generated with Claude Code

nyc@15 is unmaintained. c8 uses V8's native coverage instead. Pinned to
c8@10, the last line supporting Node 18 (c8@12 requires >=20.19).

- 429 -> 387 total packages
- Overrides reduced from 7 to 3, plus one dependency range tightened.
  Stripped all overrides, re-audited from scratch, and reapplied only what
  still reproduces:
  - serialize-javascript ^7 (high: RCE + DoS, via mocha)
  - vscode-languageserver-protocol / -types 3.17.5 - NOT security pins.
    Floating to 3.18.3 exposes types via conditional `exports`, unreadable
    under moduleResolution:node, which broke the build with 108 errors.
  - thenby pinned 1.3.4 (was ^1.3.4). 1.4.1 changed firstBy/thenBy generic
    signatures, breaking src/testHelpers.spec.ts. It's a direct devDep so an
    override is rejected with EOVERRIDE; the range itself had to be pinned.
  brace-expansion@^1/@^2, js-yaml, fast-uri, istanbul-lib-processinfo, and
  @babel/core are resolved by current transitive versions.

Coverage was not previously at 100% here (check-coverage is false) and stays
comparable: statements 96.24% -> 97.28%, branches 88.44% -> 88.38%,
functions 99.48% -> 99.3%. Shifts are istanbul-vs-V8 granularity.

Verified after a clean install: build, lint, and the audit gate all clean,
0 vulnerabilities. Coveralls still reads ./coverage/lcov.info.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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