Skip to content

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Sep 12, 2024

PR Checklist

Overview

Only calling breakCircularDeps on result.error means any circular references in other properties of result still go through. SerializableEvent._serialize can generally visit them fine, but they still end up being infinitely added to pairs. This PR adds a seenPairs Set to make sure they only get serialized once each. This fixes #5209.

Also only writes to properties with .writable object descriptors. This fixes #5188.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft September 12, 2024 11:25
@JoshuaKGoldberg
Copy link
Member Author

The test failures on Node 22 happen for me locally on main too. Filed #5213.

Copy link
Member Author

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Since the other maintainers haven't had time to review this & aren't consistently active this month, I'm just going to go ahead and merge it myself.

@JoshuaKGoldberg JoshuaKGoldberg merged commit ba0fefe into mochajs:main Oct 29, 2024
105 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the fix-circular-object-deps branch October 29, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant