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

refactor(v2): replace Lodash with single methods packages in core #2535

Merged
merged 1 commit into from
Apr 5, 2020

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Apr 5, 2020

Motivation

Thi is the second part of core V2 Lodash refactor (#2529). In this PR lodash package is replaced by single method counterparts.

Only few usages of Lodash in docusaurus-utils is preventing me from removing @types/lodash from the workspace package.json. I'm going to work on that part next.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Same test results before and after code refactor.

Related PRs

@Simek Simek requested a review from yangshun as a code owner April 5, 2020 09:40
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 5, 2020
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit 6e8acb1

https://deploy-preview-2535--docusaurus-2.netlify.com

@yangshun yangshun added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Apr 5, 2020
@yangshun yangshun merged commit 3dfc41b into facebook:master Apr 5, 2020
@yangshun
Copy link
Contributor

yangshun commented Apr 5, 2020

We need to add the TypeScript types to package.json also:

+  "@types/lodash.has": "^4.5.6",
+  "@types/lodash.isplainobject": "^4.0.6",
+  "@types/lodash.isstring": "^4.0.6",

This is quite troublesome and IMO one downside to this approach.

@Simek
Copy link
Contributor Author

Simek commented Apr 5, 2020

@yangshun Lodash + TS, what can you do 😞 I hope this requirement force devs NOT to use new Lodash methods and there be someone (in the future) who will tackle absolute Lodash removal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants