Skip to content
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 custom isEqual to utilise lodash.isequal #4915

Merged
merged 2 commits into from
Jun 4, 2019

Conversation

capaj
Copy link
Contributor

@capaj capaj commented Jun 4, 2019

as requested here: #4903 (review)

I don't care which one of the PRs get's merged, as long as the bug is fixed

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your indifference between these two approaches is surprising, since this version is much better. Not having to bump the major version of apollo-utilities is enough of a reason by itself. Don't be afraid to have an opinion!

@capaj
Copy link
Contributor Author

capaj commented Jun 4, 2019

@benjamn thanks- this is certainly a simpler fix to land, but a proper fix would be to deprecate and remove it all together.

@capaj
Copy link
Contributor Author

capaj commented Jun 4, 2019

I am not sure why netlify deploy failed, but I doubt it has to do with any of the changes I've done.

@benjamn benjamn merged commit 2593f8f into apollographql:master Jun 4, 2019
benjamn added a commit that referenced this pull request Jun 5, 2019
Follow-up to #4915. I have kept the tests from that PR, just not the
lodash-based implementation of isEqual.

The lodash.isequal package has a ton of extra features we don't need, and
weighs in at a whopping 10KB minified (3.8KB after gzip). Very little of
that machinery is really necessary to fix #4824.

I extracted this functionality into a separate npm package called
@wry/equality, so that we have the flexibility to depend on the same logic
in other packages without importing apollo-utilities.
benjamn added a commit that referenced this pull request Jun 6, 2019
Follow-up to #4915. I have kept the tests from that PR, just not the
lodash-based implementation of isEqual.

The lodash.isequal package has a ton of extra features we don't need, and
weighs in at a whopping 10KB minified (3.8KB after gzip). Very little of
that machinery is really necessary to fix #4824.

I extracted this functionality into a separate npm package called
@wry/equality, so that we have the flexibility to depend on the same logic
in other packages without importing apollo-utilities.
benjamn added a commit that referenced this pull request Jun 6, 2019
* Reimplement isEqual without pulling in massive lodash.isequal.

Follow-up to #4915. I have kept the tests from that PR, just not the
lodash-based implementation of isEqual.

The lodash.isequal package has a ton of extra features we don't need, and
weighs in at a whopping 10KB minified (3.8KB after gzip). Very little of
that machinery is really necessary to fix #4824.

I extracted this functionality into a separate npm package called
@wry/equality, so that we have the flexibility to depend on the same logic
in other packages without importing apollo-utilities.

* Treat @wry/equality as an external package when bundling apollo-utilities.

* Update @wry/equality to latest version (0.1.2).

* Mention PR #4924 in CHANGELOG.md.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants