New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dep): migrate from lodash.set to lodash. #2306
Conversation
Listing `lodash` as a prod dependency has a few advantages over the single func dep we were using. Primarily, when a security vulnerability is patched in LoDash, those changes don't get published to individual function libs anymore. The most recent example being the prototype pollution that was patched in 4.17.16. That particular vulnerability didn't effect Nock because of our usage, however, Nock does show up as having a vulnerability because of it which is a pain for consumers. It also creates a future problem where the next patch could affect Nock more directly. #2279 It should be noted that LoDash itself discourages the use of these single function libs: https://lodash.com/per-method-packages This changes also removes the vendor-izing of two LoDash functions in favor of using the lib directly (`isPlainObject` and `mapValues`).
Normally, dependency updates would be a |
@paulmelnikow I know you were in favor of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe there is an alternative single-purpose modules that we can use instead of lodash.set
, instead of adding all of lodash
?
When in doubt, I'm okay with just adding lodash
, we can look into this later
Hey @mastermatt I was wondering if this fix can be reviewed & merged, lodash won't be supporting individual packages anymore. It will be great if nock will be updated to remove this snyk vulnerability. |
I'm in favor of the current state of this PR, however, I need another maintainer to approve before it can be merged. With this change, the full LoDash dep is used by Node apps, which tend to have LoDash anyway and where package size isn't much of a consideration, and can use proper tree-shaking by anyone what cares abound bundle size. |
bump I'd love to see this MR merged - can this please be progressed? Thank you all in advance! |
bump can this please be progressed? Thank you all in advance! |
@nock/maintainers anyone else want to 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good with me, but all tests seem to be failing? Errors seem unrelated to current PR though, so feel free to merge & release. I'd appreciate if someone could help find out what's up with the tests though, I'm very limited due to family and work right now
@gr2m check my comment on this pr about the tests #2364 (comment) |
The release is available on: Your semantic-release bot |
Listing
lodash
as a prod dependency has a few advantages over the single func dep we were using.Primarily, when a security vulnerability is patched in LoDash, those changes don't get published to individual function libs anymore.
The most recent example being the prototype pollution that was patched in 4.17.16.
That particular vulnerability didn't effect Nock because of our usage, however, Nock does show up as having a vulnerability because of it which is a pain for consumers. It also creates a future problem where the next patch could affect Nock more directly.
#2279
It should be noted that LoDash itself discourages the use of these single function libs: https://lodash.com/per-method-packages
This changes also removes the vendor-izing of two LoDash functions in favor of using the lib directly (
isPlainObject
andmapValues
).