Skip to content

🔒 Remove vulnerable development dependencies - #906

Closed
Robdel12 wants to merge 1 commit into
mainfrom
rd/fix-development-security-audit
Closed

Robdel12 wants to merge 1 commit into
mainfrom
rd/fix-development-security-audit

Conversation

@Robdel12

Copy link
Copy Markdown
Collaborator

Why

The dependency refresh left 13 npm audit findings and four open Dependabot alerts. The remaining extract-zip and deepmerge vulnerabilities have no patched releases, so upgrading the existing toolchain alone cannot clear them.

Approach

Move the existing browser suite from Moonshiner/NYC to Vitest browser mode with Playwright and Istanbul coverage. That removes the vulnerable browser downloader and old glob/coverage dependency chains. The 24 test files retain their existing assertions and fixtures; only their runner imports change.

Remove unnecessary Rollup resolver/CommonJS plugins and obsolete test bundling configuration. The library has no external runtime imports, so its bundle does not need those plugins, and dropping the resolver removes deepmerge. Keep one ESLint-scoped override to patched minimatch 11.0.7 because ESLint and its config matcher still declare vulnerable 10.x ranges. Remove that override when upstream adopts a patched range.

CI installs Chromium and its system dependencies explicitly. The existing test script names, 100% coverage thresholds, and LCOV output remain available, and the Babel configuration uses ES modules.

Evidence

A clean install reports zero vulnerabilities in both full and production npm audits. All 128 tests pass in real Chromium, with exactly the same coverage totals: 488 statements, 394 branches, 152 functions, and 408 lines, all at 100%.

Lint, declaration builds, type checks, and workflow validation pass. The simplified build produces a byte-for-byte identical bundle, and a separate consumer type-checks chained interactions against the packed npm artifact. Library source is unchanged.

The existing GitHub alerts remain attached to main until this change is merged and rescanned.

Replace Moonshiner and NYC with Vitest browser mode, Playwright, and Istanbul coverage to remove the unpatched extract-zip and vulnerable glob dependency chains. Drop unnecessary Rollup resolver and test bundling plugins to remove deepmerge.

Use patched minimatch 11 only under ESLint until upstream adopts it. Preserve all 128 browser tests, 100% coverage thresholds, published declarations, and byte-identical bundle output while bringing the full npm audit to zero findings.
@Robdel12 Robdel12 closed this Nov 11, 2026
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