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

domain: improve DEP0097 warning #37550

Merged
merged 2 commits into from
Mar 3, 2021
Merged

domain: improve DEP0097 warning #37550

merged 2 commits into from
Mar 3, 2021

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Feb 28, 2021

There are two issues here:

  1. Anonymous functions, whose name is the empty string were not being displayed properly. This is addressed by the first commit.
  2. The domain module monkey patches EventEmitter.prototype.emit(), but that function's name was not being inferred. This is addressed by the second commit.

@nodejs-github-bot nodejs-github-bot added domain Issues and PRs related to the domain subsystem. needs-ci PRs that need a full CI run. labels Feb 28, 2021
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@cjihrig cjihrig added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 1, 2021
Many anonymous functions use the empty string as their name.
Since the DEP0097 logic was using nullish coalescing, these
functions were not being displayed as anonymous. This commit
updates the logic to use || instead of ??.

PR-URL: nodejs#37550
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
The domain module monkey patches EventEmitter.prototype.emit(),
however the function's name was becoming the empty string. This
commit forces the new emit function to have the proper name.

PR-URL: nodejs#37550
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@cjihrig cjihrig merged commit 152de34 into nodejs:master Mar 3, 2021
@cjihrig cjihrig deleted the anonymous branch March 3, 2021 17:53
danielleadams pushed a commit that referenced this pull request Mar 16, 2021
Many anonymous functions use the empty string as their name.
Since the DEP0097 logic was using nullish coalescing, these
functions were not being displayed as anonymous. This commit
updates the logic to use || instead of ??.

PR-URL: #37550
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
danielleadams pushed a commit that referenced this pull request Mar 16, 2021
The domain module monkey patches EventEmitter.prototype.emit(),
however the function's name was becoming the empty string. This
commit forces the new emit function to have the proper name.

PR-URL: #37550
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 1, 2021
Many anonymous functions use the empty string as their name.
Since the DEP0097 logic was using nullish coalescing, these
functions were not being displayed as anonymous. This commit
updates the logic to use || instead of ??.

PR-URL: #37550
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 1, 2021
The domain module monkey patches EventEmitter.prototype.emit(),
however the function's name was becoming the empty string. This
commit forces the new emit function to have the proper name.

PR-URL: #37550
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@danielleadams danielleadams mentioned this pull request May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. domain Issues and PRs related to the domain subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants