-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
dgram: change parameter name in set(Multicast)TTL #13747
Conversation
Changed the parameter name in set(Multicast)TTL from "arg" to "ttl" both within code and error messages.
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
lib/dgram.js
Outdated
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', | ||
'arg', | ||
'ttl', | ||
'number'); |
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.
What do you think about adding the actual argument?
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
@jasnell do changes to the error message in the new error system still count as semver major? The whole point was to make that not be the case anymore, right?
No, once the error has been migrated to using the error code, changes to the message should no longer be considered semver-major. Only changes to the code or error type would be. |
Changed the parameter name in set(Multicast)TTL from "arg" to "ttl" both within code and error messages and added the actual type of the argument to the error message. PR-URL: #13747 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Landed in 279fcc4. CI on master: https://ci.nodejs.org/job/node-test-commit/10690/ |
Changed the parameter name in set(Multicast)TTL from "arg" to "ttl" both within code and error messages and added the actual type of the argument to the error message. PR-URL: #13747 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Should this be backported to v6.x? |
ping @tniessen |
@MylesBorins Sorry, must have missed the notification. No, this should not be backported to v6.x as it uses the new errors API and an adaption to the old error system would make it semver-major. |
Changed the parameter name in set(Multicast)TTL from "arg" to "ttl" both within code and error messages. The documentation already contains the correct parameter name.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
dgram
For consideration of the @nodejs/ctc due to being semver-major.