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 'defaults' usage with ES6 Spread initializer #11797
Replace lodash 'defaults' usage with ES6 Spread initializer #11797
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/29790/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 201e82f:
|
|
(...and perhaps even the logic around |
Do we want to do this? The documentation for
So if any of the objects we’re merging in contain the same key twice, this would change the behavior. |
@kaicataldo check out the now collapsed/outdated discussion |
I do think this is still a little risky and would agree with @kaicataldo's concern, even if technically the code should be safe from a readthrough and with tests passing. |
I'm fine with closing and sticking with |
Would changes like this tend to be caught by manual testing of release candidates / betas before a full release? If the CLI & library paths here get a decent amount of pre-release exercise I think that'd tend to de-risk the changes a lot. |
packages/babel-helper-transform-fixture-test-runner/src/index.js
Outdated
Show resolved
Hide resolved
…-transform-fixture-test-runner
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 took another look, made a suggestion for babel-traverse. From what I can tell babel-cli changes are fine (I think existing behavior is maintained).
Co-authored-by: Corey Farrell <git@cfware.com>
Co-authored-by: Corey Farrell <git@cfware.com>
Thanks! |
This change is a follow-up to #11790 and proposes removal of usages of
lodash/defaults
from the codebase, to be replaced by the ES6 spread operator.