Uh oh!
There was an error while loading. Please reload this page.
lib: fix urlObject parameter name in url.format - #14031
Conversation
62534bd to
a06d03dCompareMaybe 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
Trott
commented
Jul 1, 2017
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
456ca89CompareTrott
commented
Jul 3, 2017
CI: https://ci.nodejs.org/job/node-test-pull-request/8936/ Thanks for the contribution! 🎉 |
Trott
commented
Jul 3, 2017
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
ce70a1fCompare@Trott lint error solved. PS: would be nice to add the |
TimothyGu
commented
Jul 3, 2017
@leggiero |
Trott
commented
Jul 3, 2017
If you run |
Trott
commented
Jul 3, 2017
Trott
commented
Jul 5, 2017
Landed in 8520e6f. |
Documentation, error message, and code now use the same argument name. PR-URL: #14031 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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