lib: fix urlObject parameter name in url.format#14031
lib: fix urlObject parameter name in url.format#14031leggiero wants to merge 1 commit intonodejs:masterfrom
Conversation
62534bd to
a06d03d
Compare
|
Maybe the error message was referring to the |
There was a problem hiding this comment.
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
|
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
urlinstead ofobjUrl.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
lib