Conversation
7dd6405 to
563e149
Compare
Replace the `validateFunction()` validator with the `validateCallback()` validator to validate callbacks and keep consistency.
563e149 to
728965f
Compare
|
Changing an error code is usually semver-major but I could the case for treating this as a bug fix. @nodejs/tsc Thoughts? |
|
Personally, I'd like to see us reduce the specificity of error codes in general. I think |
benjamingr
left a comment
There was a problem hiding this comment.
This has the potential to break a lot of users' tests when they use queueMicrotask because of the error code change doesn't it?
Intuitively, this sort of breakage isn't worth it in a stable API - it's not a lot of breakage but it's not like we feel strongly the error should change.
(I also agree with @Trott the fact we have a lot of error codes does not necessarily help our users)
|
+1 to label this as semver-major, changing an error code is a potential breaking change. +1 to get rid of validateCallback(class{}); // doesn't throw |
Bug fixes can be server-major too, so I'm adding the label back. |
|
I would be more than happy to remove the
validateCallback(class{}); // doesn't throwThat's the exact same case with the We could entirely remove the |
Yes, that would be a semver-major change (but one that is worth making in my opinion, especially if we can remove a few other codes in the same semver-major bump). |
Refs: #41660 PR-URL: #41678 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace the
validateFunction()validator with thevalidateCallback()validator to validate callbacks and keepconsistency.