Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
fix(install): make sure to reload explicitRequests
Browse files Browse the repository at this point in the history
when we are placing our deps, if our edge dep was explicitly requested,
we want to re-place it instead of leaving whatever was there before.

This will mean doing something like `npm install foo` will install the
latest version of `foo` that your tree currently allows, instead of
doing nothing if any version already existed
  • Loading branch information
wraithgar committed Jan 27, 2021
1 parent f777762 commit 2e5afcf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/arborist/build-ideal-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ This is a one-time fix-up, please be patient...
[_placeDep] (dep, node, edge, peerEntryEdge = null, peerPath = []) {
if (edge.to &&
!edge.error &&
!this[_explicitRequests].has(edge.name) &&
!this[_updateNames].includes(edge.name) &&
!this[_isVulnerable](edge.to))
return []
Expand Down

0 comments on commit 2e5afcf

Please sign in to comment.