-
Notifications
You must be signed in to change notification settings - Fork 30k
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
lib: fix urlObject parameter name in url.format #14031
Conversation
62534bd
to
a06d03d
Compare
Maybe the error message was referring to the |
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.
I think the error message is correct as is. It's referring to the urlObj
parameter of url.format()
. If anything, it should be changed to say that it needs to be a string or an object, rather than just an object. And maybe a comment could be added to the code explaining why it says urlObj
rather than obj
. https://nodejs.org/api/url.html#url_url_format_urlobject
Another possibility is to update the code itself so that the function signature is |
The existing comments in that function are confusing (to me, at least0, so there's an opportunity there too... |
PR updated with Guys, looks like there is another inconsistence here: The function that we are changing:
According with latest and LTS docs, the signature of this method is PS: To make things more confusing: from the v6.2.1 docs onwards, the signature was changed to the actual
|
8fd69e2
to
456ca89
Compare
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 if CI is green.
CI: https://ci.nodejs.org/job/node-test-pull-request/8936/ Thanks for the contribution! 🎉 |
There's currently discussion as to whether or not message text changes to these newer types of errors are considered breaking changes or not. I have no strong opinion about that, but am marking this |
@leggiero CI is reporting one or more lint errors. Can you run |
456ca89
to
ce70a1f
Compare
@Trott lint error solved. PS: would be nice to add the |
@leggiero |
If you run |
Landed in 8520e6f. |
Documentation, error message, and code now use the same argument name. PR-URL: #14031 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Fixed typo in error message to output the right parameter name
url
instead ofobjUrl
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
lib