Skip to content

Clear npm audit findings and add knip for unused code/deps - #320

Merged
nicklemmon merged 5 commits into
mainfrom
chore/vulns
Sep 5, 2026
Merged

Clear npm audit findings and add knip for unused code/deps#320
nicklemmon merged 5 commits into
mainfrom
chore/vulns

Conversation

@nicklemmon

@nicklemmon nicklemmon commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes vite-plugin-imagemin, whose outdated imagemin binary-download stack accounted for nearly all npm audit findings (including critical Zip Slip issues at install time).
  • Keeps the existing image pipeline: Sharp via vite-imagetools, plus the WebP conversion Vite plugin/script.
  • Adds knip for unused files, exports, and dependencies — wired into npm run qa and CI with a clean full baseline.
  • Removes unused packages: array-shuffle, reset-css, @types/random, semver, @vitest/browser.
  • Declares sharp as a direct dependency (used by scripts/convert-to-webp.ts).
  • Deletes unused source files and un-exports module-local helpers so knip stays green without suppressions.

npm audit goes from 42 vulnerabilities → 0.

Test plan

  • npm audit reports 0 vulnerabilities
  • npm run knip passes with full (default) rules
  • npm run build succeeds
  • npm run qa passes (format, typecheck, lint, knip, 138 tests)

Drop the outdated imagemin binary pipeline that accounted for nearly
all reported vulnerabilities, and keep Sharp via vite-imagetools plus
the existing WebP conversion script for image optimization.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-deckbuilder Ready Ready Preview Sep 5, 2026 4:16pm UTC

Install knip for dependency hygiene, wire it into npm run qa and CI,
drop unused packages (array-shuffle, reset-css, @types/random, semver,
@vitest/browser), and declare sharp directly for the WebP script.
Un-export module-local helpers, remove dead components and types, and
drop knip's dependency-only include filter so QA enforces the full
unused files/exports/deps surface.
@nicklemmon nicklemmon changed the title Clear npm audit vulnerabilities by removing vite-plugin-imagemin Clear npm audit findings and add knip for unused code/deps Sep 5, 2026
Satisfy Vite's upcoming native config loader, which requires explicit
extensions on relative config imports.
Drop blank progress lines when nothing is converted, and print a single
compact summary instead of a padded multi-line report.
@nicklemmon
nicklemmon merged commit e72cdca into main Sep 5, 2026
10 checks passed
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