Uh oh!
There was an error while loading. Please reload this page.
events: refactor to use validator - #45448
Conversation
Trott
commented
Nov 13, 2022
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
I agree with @Trott. There might be some packages that depend on this error message, and therefore I'm good with |
aduh95
left a comment
There was a problem hiding this comment.
Let's not validate the error messages.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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
There was a problem hiding this comment.
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 <jasnell@gmail.com>
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>
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>
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>
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
@Lxxyx this needs a rebase |
aduh95
commented
Feb 22, 2025
This PR has conflicts that must be resolved |
Lxxyx
commented
Mar 10, 2025
Close due to #45770 |
Use
validateNumber()forevents(setMaxListeners/defaultMaxListeners).If passed wrong parameter types,
validateNumber()will throwERR_INVALID_ARG_TYPEinstead of original error code:ERR_OUT_OF_RANGE. I thinkERR_INVALID_ARG_TYPEis more accurate.