-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Added lodash and merge option in mapAST #1120
Conversation
Added !== instead of !=
Is full lodash dependency really needed? Can't the same be achieved also with: |
Remove full lodash loading
change to lodash.merge
I tried that first and couldn't get it to work, the props are overwritten by |
sadly won't accept any lodash dependency...this adds over 3.7kb gzipped: https://bundlephobia.com/result?p=lodash.merge@4.6.2 also please add some test cases for future regression:
thank you 👍 |
Remove lodash
Slimline prop match. Only accept new values, if node values in translation weren't set.
Fix camelCase and remove lodash loading
Ok I have removed lodash and just focused on merging the props using a small function. So nice and light. The code is set in such a way that original values in Also not sure why coverage decreased? I didn't remove anything? I am a bit new to github/code reviews - how/where do I add some test cases?
|
test can be added here: https://github.com/i18next/react-i18next/blob/master/test/trans.render.spec.js coverage decreased as your newly added code is not covered. |
I added some tests which seem to work. Hope that is all you need! |
looks ok...will check this in detail tomorrow (merge & publish) |
Thanks, it's included in v11.5.0 |
Dear maintainers of react-i18next,
Below is my pull request for #1117 where I initially requested the option to have props within a
<0 ...props></0>
passed to its final component. It is a very simple fix.I have tried running
npm run test
but it seems the distribution lacksdtslint/dtslint.json
- I have tested the code extensively and don't see any issues that may occur.I also wasn't sure where to change the documentation. If you point me in the right direction I will adapt where necessary.
Checklist
npm run test