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 'isPlainObject' usage with is-plain-obj library #11859
Replace lodash 'isPlainObject' usage with is-plain-obj library #11859
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/32348/ |
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 460aacc:
|
(switching to draft because I'm not sure what factors should determine the approach between this and #11855) |
is-plain-obj requires node 8 |
That's a good consideration. Honestly I don't feel well-experienced enough with the JS dependency ecosystem or |
After taking some time away from this and reconsidering, I think the approach I'd suggest to replace It might seem a tiny and arbitrary choice, but I don't love the fact that in #11855 the external dependency had to be updated to match the application's use case (but thanks @TrySound for discovering and applying that change upstream, which should benefit other users). That seems to indicate (to me at least) that there's less stability in the interface and behaviour of the The main downside to the |
(closing and cleaning up a few stale pull requests; see #11789 (comment) and subsequent comments in case it's useful to re-open from github pr refs at a later date) |
This is an alternative to #11855. What's the best selection between two libraries? There are often
n
different factors to weigh up.Some considerations here are:
is-plain-object
andis-plain-obj
is-plain-obj
appears to have aimed towards compatibility withlodash
in the past, and has had a stable release under that basis for a longer period of timeis-plain-obj
has a smaller unpacked sizeis-plain-obj
may test more scenarios whileis-plain-object
provides in-browser-environment test coverageRather than attempt to sway a decision by offering only a single pull request it might be safest to open two and allow discussion.
In retrospect it might've been worth more fully exploring and evaluating the options available during a previous thread.