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
fix(arborist): omit failed optional dependencies from installed deps, but keep them 'in the tree'
Fixes: npm#4828Fixes: npm#7961
Replaces: npm#8127
Replaces: npm#8077
When optional dependencies fail, we don't want to install them, for whatever reason. The way
this "uninstallation" is done right now is by simply removing the dependencies from the ideal tree
during reification.
Unfortunately, this means that what gets saved to the "hidden lockfile" is the edited ideal tree
as well, and when NPM runs next, it'll use that when regenerating the "real" package-lock.
This PR tags failed optional deps such that they're still added to the "trash list" (and thus have
their directories cleaned up by the reifier), but prevents Arborist from removing them altogether
from the ideal tree (which is usually done by setting their parent to `null`, making them unreachable,
and letting them get GC'd).
0 commit comments