-
Notifications
You must be signed in to change notification settings - Fork 220
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(karma-webpack): Remove lodash from dependencies #364
Conversation
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.
Thanks for your PR, removing lodash is great. I only see one issue - can you change your clone
function to work on nested objects/arrays? The webpack config is nested so if we're doing a clone it should be deep.
Alternatively, we might not even need to clone it - I'm not sure why it is. If this is so, we can just remove both the clone part and lodash.
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.
_.clone
is a shallow clone, so no need to make theclone
function recursive (if we need it at all).- Given that
Object.assign({}, undefined);
andObject.assign({}, null);
both return{}
, there's no need for those|| {}
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.
Should the updated package-lock.json
be committed as well?
@matthieu-foucault thanks - I don't personally use lodash. I agree with your second point then I'm happy with it - also the |
Anything else? |
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.
Look good to me
This PR contains a:
Motivation / Use-Case
In an attempt to remove dependencies that are barely used in popular npm packages, I have replaced lodash's
clone
method with an inlineclone
function with the same functionality. Based on that and provided thatlodash
is not used anywhere else in this package from what I can tell, the dependency onlodash
has also been removed frompackage.json
.Breaking Changes
Additional Info