-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
refactor(v2): remove duplicated lodash dependencies and import only what needed #4361
Conversation
Hi @armano2! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
[V1] Deploy preview success Built with commit 23138e6 |
Deploy preview for docusaurus-2 ready! Built with commit 23138e6 |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4361--docusaurus-2.netlify.app/classic/ |
Thanks, agree with you that we have an inconsistent and legacy lodash usage to refactor, and. would also like to move out of the per-method packages. However I'm not sure this refactor is something we want: It looks simpler to me to use named imports everywhere. Note we are not supposed to include Lodash in client-side bundles (ESLint is supposed to prevent that), so that does not seem bad. |
@slorber ok i updated it to named imports and aligned required version of lodash across all packages |
# Conflicts: # yarn.lock
thanks, LGTM 👍 |
Motivation
I don't like duplicated packages in my projects
Lodash library is isntalled multiple times and used in incositent way there are files when in one place we are importing
lodash
andlodash.*
instead of reusing itdocusaurus/packages/docusaurus-plugin-content-docs/src/sidebars.ts
Line 8 in 2a25124
docusaurus/packages/docusaurus-plugin-content-docs/src/sidebars.ts
Line 21 in 2a25124
This is also recommended action from lodash: https://lodash.com/per-method-packages and per method packages will no longer be available in v5
Does this PR introduce a breaking change?