FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

events: fix undefined passes to arrayClone by origranot · Pull Request #56264 · nodejs/node · GitHub

/ node Public

events: fix undefined passes to arrayClone - #56264

Closed
origranot wants to merge 3 commits into
nodejs:mainfrom
origranot:patch-1
Closed

events: fix undefined passes to arrayClone#56264
origranot wants to merge 3 commits into
nodejs:mainfrom
origranot:patch-1

Conversation

origranot commented Dec 15, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes #56263

Another suggestion is to force developers to pass a string, else throw an ERR_INVALID_ARG_TYPE but this should consider a breaking change.

Looking forward for your feedback!

nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. labels Dec 15, 2024

anonrig commented Dec 15, 2024

Copy link
Copy Markdown
Member

Please add a test case

Copy link
Copy Markdown
Contributor Author

Please add a test case

Done 💯

codecov Bot commented Dec 16, 2024
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.54%. Comparing base (a50f3d5) to head (6b93137).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56264      +/-   ##
==========================================
- Coverage   88.55%   88.54%   -0.01%     
==========================================
  Files         657      657              
  Lines      190243   190245       +2     
  Branches    36536    36542       +6     
==========================================
- Hits       168461   168457       -4     
- Misses      14963    14968       +5     
- Partials     6819     6820       +1     
Files with missing lines Coverage Δ
lib/events.js 99.83% <100.00%> (+<0.01%) ⬆️

... and 25 files with indirect coverage changes

lpinca commented Dec 16, 2024

Copy link
Copy Markdown
Member

This patch makes me wonder if 7a461ed was a good idea. I find it harder to read it now. I would revert 7a461ed and add the test included here.

jakecastelli left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am actually open to (prefer to) revert and add a test as well

jazelly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Had a private chat with @jakecastelli. I think it's better to revert this and add a test.

@origranot Would you like to raise a new PR to revert the commit and introduce a new commit to add the test?

Copy link
Copy Markdown
Contributor Author

Had a private chat with @jakecastelli. I think it's better to revert this and add a test.

@origranot Would you like to raise a new PR to revert the commit and introduce a new commit to add the test?

Yea, I am on it.

Thanks!

origranot commented Dec 17, 2024
edited
Loading

Copy link
Copy Markdown
Contributor Author

@jazelly
I opened a new PR here: #56282

origranot requested a review from jazelly December 17, 2024 08:30

lpinca commented Dec 19, 2024

Copy link
Copy Markdown
Member

Closed in favor of #56282.

lpinca closed this Dec 19, 2024
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

Labels

events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EventEmitter] TypeError when calling .listeners() without arguments

7 participants


Back | FazBrowse Home | New Git URL