ref(node): Stop custom-handling normalization of Domain/DomainEmitter#21182
Merged
Conversation
Contributor
size-limit report 📦
|
timfish
approved these changes
May 27, 2026
Collaborator
timfish
left a comment
There was a problem hiding this comment.
Agreed, no point special casing any more!
JPeer264
approved these changes
May 27, 2026
Member
JPeer264
left a comment
There was a problem hiding this comment.
I'm okay with the change. Also nice to see from time to time that all bundle sizes go down in a PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have custom code normalizing Domain and DomainEmitter, which are node-only but deprecated and not widely used anymore. This would have affected this being serialized in a nested object, e.g. extra, where it would be something like:
or
(We don't really have tests for this, I added these to verify how this looks today, they are not in the PR since they would be removed again basically)
With this PR, they will be normalized "normally", meaning they'd look something like this:
{ - "domain": "[Domain]", + "domain": { + "_events": { + "newListener": "[Function: updateExceptionCapture]", + "removeListener": "[Function: updateExceptionCapture]", + }, + "_eventsCount": 2, + "_maxListeners": undefined, + "members": [], + }, }or
{ - "domainEmitter": "[DomainEmitter]", + "domainEmitter": { + "_events": { + "data": "[Function: <anonymous>]", + }, + "_eventsCount": 1, + "_maxListeners": undefined, + }, }which is of course "worse" but IMHO this deprecated, not widely used feature does not necessarily warranty special handling in core - this code is also shipped to browsers.