-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
events: refactor to use validator #45448
base: main
Are you sure you want to change the base?
Conversation
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. |
I agree with @Trott. There might be some packages that depend on this error message, and therefore I'm good with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not validate the error messages.
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)
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)
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a semver major. This should have a benchmark run before it lands.
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 <[email protected]>
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) PR-URL: nodejs#45466 Reviewed-By: James M Snell <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@Lxxyx this needs a rebase |
Use
validateNumber()
forevents(setMaxListeners/defaultMaxListeners)
.If passed wrong parameter types,
validateNumber()
will throwERR_INVALID_ARG_TYPE
instead of original error code:ERR_OUT_OF_RANGE
. I thinkERR_INVALID_ARG_TYPE
is more accurate.