Uh oh!
There was an error while loading. Please reload this page.
shrinkwrap: no need to read package.json when read shrinkwrap - #504
shrinkwrap: no need to read package.json when read shrinkwrap#504lou1swu wants to merge 3 commits into
Conversation
isaacs
left a comment
There was a problem hiding this comment.
Two minor changes. Otherwise, yes, I can see that value isn't being used in this function, so it should be safe to remove the unnecessary file read.
| } | ||
| child.package._shrinkwrap = parsed | ||
| } | ||
| ).then(() => next(), next) |
There was a problem hiding this comment.
This is a functional change outside the scope of the intent of this PR. It means that a return value will be passed to the next function as the first argument, which would be interpreted as an error. Currently, no return value is being provided, but it makes the code more brittle.
There was a problem hiding this comment.
Yep, I would undo this change.
Uh oh!
There was an error while loading. Please reload this page.
no need to read package.json when read shrinkwrap.
avoid to read package.json when read shrinkwrap.
isaacs
commented
Nov 21, 2019
This looks good to me now. We'll review it for the next 6.x release. Thanks! |
The PR includes a simple change that removes the unnecessary operation when readShrinkwrap.
This change will optimize performance when
npm install.