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

[WIP] Handle cyclic objects #1764

Closed
wants to merge 2 commits into from

Conversation

scripter-co
Copy link
Contributor

Purpose (TL;DR) - mandatory

Resolves issue #1709 by adding @sinonjs/samsam. Removed old dependency and updated references.

@scripter-co scripter-co changed the title Handle cyclic objects [WIP] Handle cyclic objects Apr 6, 2018
@mroderick
Copy link
Member

Nice work!

I've added a PR to your PR with a refactoring of deepEqual.


However, the matcher still doesn't handle cyclic input.

The way I see it, the matcher part of deepEqual really doesn't belong in deepEqual. It should be in match.js. Further, deepEqual.use should be move to match.js.

That still won't fix the problem.

I think what we need to do is:

  • let deepEqual worry about strict comparisons, not loose comparisons
    • move the matcher specific code from deepEqual into match.js
    • move deepEqual.use into match.js
  • update match.js to be able to handle circular objects

Perhaps the update to match.js can do what samsam does, or maybe we can extract a function for traversal of potentially circular structures and re-use it

What do you think?

@stale
Copy link

stale bot commented Jun 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@mroderick
Copy link
Member

This has been replaced with #1853

@mroderick mroderick closed this Jul 7, 2018
@scripter-co scripter-co deleted the fix-cyclic-deep-equal branch March 11, 2021 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants