Skip to content
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

Replace "lodash.pick" with "lodash/pick" #17

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Replace "lodash.pick" with "lodash/pick" #17

merged 3 commits into from
Apr 3, 2024

Conversation

dangowans
Copy link
Contributor

The two packages function the same.
Clears up GHSA-p6mc-m468-83gw

@CLAassistant
Copy link

CLAassistant commented Apr 3, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

socket-security bot commented Apr 3, 2024

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: npm/lodash.assign@4.2.0, npm/lodash.omit@4.5.0, npm/lodash.pick@4.4.0

View full report↗︎

@pimterry
Copy link
Member

pimterry commented Apr 3, 2024

Hmm, interesting, yes... It's not an impactful vulnerability, but yes it would be nice to drop that warning.

What about if we just drop the per-method dependencies entirely, depend on lodash directly and import from subpaths there instead? Like require('lodash/pick'). That's the recommended approach and those per-method packages are actually deprecated because the space savings are apparently rarely worthwhile & could be counterproductive in reality (see https://lodash.com/per-method-packages - presumably this is why they're not being updated).

@dangowans dangowans changed the title Replace "lodash.pick" with "object.pick" Replace "lodash.pick" with "lodash/pick" Apr 3, 2024
@dangowans
Copy link
Contributor Author

That works for me. I updated the pull request with lodash instead.

@pimterry pimterry merged commit 0a7d1cc into httptoolkit:main Apr 3, 2024
7 checks passed
@pimterry
Copy link
Member

pimterry commented Apr 3, 2024

Nice stuff, thanks @dangowans! I'll release as v2.2.1 in just a sec.

@dangowans
Copy link
Contributor Author

Thanks. I see there was more lodash packages than just the one I was looking at. Good update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants