-
Notifications
You must be signed in to change notification settings - Fork 25k
Replace underscore by lodash #6030
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 underscore by lodash #6030
Conversation
|
By analyzing the blame information on this pull request, we identified @vjeux, @ide and @martinbigio to be potential reviewers. |
|
Thanks, looks good to me. I am pretty sure you will have to squash commits, but you can probably wait till someone confirms nothing to be changed here. |
|
@grabbou Yeah, I'll keep them separated for now (easier to revert if needed), but later on I can squash them into one. |
The bot will squash commits when this gets merged :) |
|
@satya164, when it is ready, instead of |
|
@bestander Okies. I will :) |
|
Can we require individual modules instead of the whole package? For example Doesn't make any difference since it's just the packager though. |
Agree that this would be nicer. Less code to process is better 👍 |
| return createServer(options); | ||
| } | ||
|
|
||
| function omit(obj, blacklistedKeys) { |
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.
Why not use lodash/omit ?
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.
Ideally, I'd like to replace lodash by a self-written functions (to eliminate one of the ext. dependencies). But I think we shouldn't include it in this PR.
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.
I think i'd be nice to just add a small test suite for that then.
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.
@grabbou that would mean that we need to extract this function somewhere. I'd like to do it, but I have no clue where to put it. Any suggestions?
|
Looks good overall. This is awesome, because lots of other packages are using |
|
I agree about individual modules, but I remember in the facebook thread @davidaurelio had some objections about it. |
Let's wait for @davidaurelio 's feedback then.
IMO it's not worth it, |
|
@satya164 maybe you're right. But as you said, let's wait for the @davidaurelio's feedback first 👍 |
|
Thank you for doing this! |
|
ping @davidaurelio |
|
David is very busy trying to merge the PRs that will unbreak Travis. Let's please hold on with this until Travis is green. Thanks for the patience! |
|
ping @davidaurelio |
…by native map implementation
a165520 to
d9695ff
Compare
|
@Kureev updated the pull request. |
|
I rebased this branch by the latest master. Now tests should be all green 🍏 |
|
@facebook-github-bot shipit |
|
I will hold this until Monday. It will get in the next version. |
|
Thanks for importing. If you are an FB employee go to Phabricator to review. |
|
👍 |
|
Hey guys, I'm merging #6346 and then this one right after. |
|
thanks @mkonicek |
|
OK #6346 is landing internally now, once it lands want to rebase this one on top of it because both require updating the |
|
ping me when I can rebase |
|
Turns out #6346 doesn't work with our internal build based on Buck so we can probably merge this one first. |
|
(oops wrong button 😃 ) |
|
OK I did some investigation and this PR is in fact blocked on #6346. When I try merging this PR on its own and regenerate The root of the problem is we can't regenerate |
|
Can we get away with lodash 3? babel depends on that. In that case, |
|
no need to update the PR. I have it updated internally |
|
@davidaurelio sure, thanks! I think it should work even without any code changes (except the lodash version in package.json). @grabbou we probably need to follow up on this in the link and install plugins (just to be sure that it works with |
|
Yeah, let's apply updates to our internal packages once this is merged. |
Summary:As far as we agreed to merge `rnpm` into react-native core, we need to align our dependencies to exclude duplications. One of the steps forward would be to use the same utilities library. According to the thread on fb, everybody is fine with replacing underscore by lodash (which we use internally for rnpm). So, here we go! cc mkonicek davidaurelio grabbou **Test plan** ``` $ npm test ```  **Code formatting** Changes are aligned with the current [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide). Closes facebook#6030 Differential Revision: D3016271 Pulled By: davidaurelio fb-gh-sync-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45 shipit-source-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45
Summary:As far as we agreed to merge `rnpm` into react-native core, we need to align our dependencies to exclude duplications. One of the steps forward would be to use the same utilities library. According to the thread on fb, everybody is fine with replacing underscore by lodash (which we use internally for rnpm). So, here we go! cc mkonicek davidaurelio grabbou **Test plan** ``` $ npm test ```  **Code formatting** Changes are aligned with the current [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide). Closes facebook/react-native#6030 Differential Revision: D3016271 Pulled By: davidaurelio fb-gh-sync-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45 shipit-source-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45
Summary:As far as we agreed to merge `rnpm` into react-native core, we need to align our dependencies to exclude duplications. One of the steps forward would be to use the same utilities library. According to the thread on fb, everybody is fine with replacing underscore by lodash (which we use internally for rnpm). So, here we go! cc mkonicek davidaurelio grabbou **Test plan** ``` $ npm test ```  **Code formatting** Changes are aligned with the current [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide). Closes facebook/react-native#6030 Differential Revision: D3016271 Pulled By: davidaurelio fb-gh-sync-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45 shipit-source-id: c4f6776a7de7470283d3ca5a8b56e423247f5e45

As far as we agreed to merge
rnpminto react-native core, we need to align our dependencies to exclude duplications. One of the steps forward would be to use the same utilities library. According to the thread on fb, everybody is fine with replacing underscore by lodash (which we use internally for rnpm).So, here we go!
cc @mkonicek @davidaurelio @grabbou
Test plan
Code formatting
Changes are aligned with the current style guide.