You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] arborist fetches packuments for optional peer deps that are never installed #9876
This is not just a request to bump a dependency for a CVE
This is not solely a request to bump a dependency for a CVE
Current Behavior
with an empty cache, npm install vite into an empty project installs 10 packages but fetches full packuments for playwright (16.6MB), @types/node (11MB), webdriverio, jsdom, sass, less, terser, and (via vite's optional peer on vitest) all of vitest's optional peers too...
Expected Behavior
nothing should be fetched at all unless something else in the tree actually installs the package. (pnpm and yarn don't fetch these, if that's relevant.)
Steps To Reproduce
mkdir repro && cd repro && npm init -y
npm install vite --cache ./.cache
grep -rl playwright .cache/_cacache/index-v5
the cache contains a 16.6MB playwright packument (and many others) for packages that were never installed
Activity
[-][BUG] <title>[/-][+][BUG] arborist fetches packuments for optional peer deps that are never installed[/+]