-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
getRequested: look also at optDeps when determining package spec
If the shrinkwrap code calls `getRequested` on an optional dependency, the `spec` passed to `npa.resolve` is null. `npa.resolve` then thinks it's a request `fromRegistry`, with spec defaulting to `latest`. And in case the real spec is a tarball, returns nonsensical result where `isRegistry` is true, `fetchSpec` is `1.0.0` instead of `file:...` and the record written to the shrinkwrap is wrong. It contains a `resolved` field, which should be used only for packages downloaded from the registry.
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters