Fix Transitive npm Vulnerabilities with overrides & --omit=dev
· 4 minutes de lecture

📌 Executive Summary (TL;DR)
- The Problem: Running
npm audit fix --forceon deep transitive dependencies (packages nested inside direct dependencies) frequently forces destructive major framework downgrades, breaking modern React 19 and bundler toolchains.- The Solution: Declare targeted replacement rules using npm v8.3+
overridesinpackage.jsonto pin safe patch versions without waiting for upstream maintainer PR releases.- CI/CD Hardening: Eliminate non-production build-tool noise in GitHub Actions workflows using
npm audit --omit=dev --audit-level=high.
