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

events: refactor to use validator by Lxxyx · Pull Request #45448 · nodejs/node · GitHub

/ node Public

events: refactor to use validator - #45448

Closed
Lxxyx wants to merge 3 commits into
nodejs:mainfrom
Lxxyx:refactor/events-use-validator
Closed

events: refactor to use validator#45448
Lxxyx wants to merge 3 commits into
nodejs:mainfrom
Lxxyx:refactor/events-use-validator

Conversation

Lxxyx commented Nov 13, 2022
edited
Loading

Copy link
Copy Markdown
Member

Use validateNumber() for events(setMaxListeners/defaultMaxListeners).

If passed wrong parameter types, validateNumber() will throw ERR_INVALID_ARG_TYPE instead of original error code: ERR_OUT_OF_RANGE. I think ERR_INVALID_ARG_TYPE is more accurate.

nodejs-github-bot added events Issues and PRs related to the events subsystem / EventEmitter. needs-ci PRs that need a full CI run. labels Nov 13, 2022
Trott added the semver-major PRs that contain breaking changes and should be released in the next major version. label Nov 13, 2022

Trott commented Nov 13, 2022

Copy link
Copy Markdown
Member

At least in theory, something that changes an error code is semver major so I added that label. But if others feel strongly that it isn't, I'm ok with it being removed and treating this as a bug fix.

anonrig commented Nov 13, 2022

Copy link
Copy Markdown
Member

I agree with @Trott. There might be some packages that depend on this error message, and therefore I'm good with semver-major label.

aduh95 left a comment

Copy link
Copy Markdown
Contributor

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

Let's not validate the error messages.

Trott added a commit to Trott/io.js that referenced this pull request Nov 15, 2022
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: nodejs#45448 (review)

jasnell 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

LGTM as a semver major. This should have a benchmark run before it lands.

nodejs-github-bot pushed a commit that referenced this pull request Nov 22, 2022
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <jasnell@gmail.com>
ruyadorno pushed a commit that referenced this pull request Nov 24, 2022
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <jasnell@gmail.com>

aduh95 commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

@Lxxyx this needs a rebase

aduh95 commented Feb 22, 2025

Copy link
Copy Markdown
Contributor

This PR has conflicts that must be resolved

Lxxyx commented Mar 10, 2025

Copy link
Copy Markdown
Member Author

Close due to #45770

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. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL