-
Notifications
You must be signed in to change notification settings - Fork 781
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
Extract deepEqual implementation with tests to share it with other libraries? #865
Comments
Looking around a bit, I found three distinct implementations, all with their own tests. There's definitely potential to share at least tests, better yet implementation.
Not sure how to go about this, and don't yet know the history behind any of these. |
For anyone interested in this: Should try to port QUnit's tests to one or all of the other modules and see what fails. We can use those failures to start a discussion with the module owner, along with talking about browser support and whatever else. |
After talking to @jdalton about this: We should try to replace our |
@jdalton I've read https://lodash.com/custom-builds and some other resources, but don't see an option for a (custom) compat build with just isEqual (with dependencies, |
via lodash-cli: lodash include=isEqual of via browserify after you browserify -r lodash.isequal -s isEqual -o lodash.isequal.js |
I just tried to replace the Still need to figure out how to properly integrate lodash into our build, since this is the first external dependency. |
You could go the webpack route and include I can prep a PR tonight to flesh a possible approach out. |
That would be great, @jdalton! It looks like replacing internal deepEqual is the easiest part, but it needs some good strategy using webpack/browserify. |
Yeah, switching to internal modules internally is currently the bigger issue. Though if we make that work with webpack, it'll be super easy to add external modules. |
@jdalton any idea if you'll be able to work on this? |
Yes, I'll try to get something working this weekend. Last weekend I was unblocking rollup (es6 module bundler). This weekend can be QUnit bundling time. The switch may want to be put on hold though until after the 4.0 bump as lodash's 3.10.1 doesn't support map/set comparisons. |
Sounds goood. Making progress on bundling will be valuable either way. |
I should revisit this now that v4 is out. |
That would be great! I think our deepEqual implementation has seen some improvements, but that shouldn't stop us from replacing it. |
yes, I'm looking forward to it. |
Closing for now as I don't expect us to do this any time soon. However if there are one or more persons interested in working on this and have a use case lined up for another library that would consume it, I'd be happy to see this re-open. |
At least node has its own implementation of deepEqual, as part of the assert module. I have no idea how close their implementation is to ours, might be worth investigating.
The text was updated successfully, but these errors were encountered: