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

url: fix error message of url.format #11162

Closed
wants to merge 1 commit into
base: master
from

Conversation

@DavidCai1993
Member

DavidCai1993 commented Feb 4, 2017

The previous code: 'Parameter "urlObj" must be an object, not ' + obj === null ? 'null' : typeof obj actually equals ('Parameter "urlObj" must be an object, not ' + obj) === null ? 'null' : typeof obj and its former test did not check the error message.

So the eventual error message we got is very weird, like: TypeError: undefined.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

url

Show outdated Hide outdated test/parallel/test-url-format-invalid-input.js Outdated
@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Feb 4, 2017

Contributor

This is probably more a bug fix (semver-patch) than a semver-major change since the error was not there to begin with. I can't imagine many people would be checking the error message for 'undefined'. That's my 2 cents anyway.

Contributor

mscdex commented Feb 4, 2017

This is probably more a bug fix (semver-patch) than a semver-major change since the error was not there to begin with. I can't imagine many people would be checking the error message for 'undefined'. That's my 2 cents anyway.

@joyeecheung

This comment has been minimized.

Show comment
Hide comment
@joyeecheung

joyeecheung Feb 4, 2017

Member

@mscdex I'm open to both. Added the label just to be safe.

Member

joyeecheung commented Feb 4, 2017

@mscdex I'm open to both. Added the label just to be safe.

@addaleax

+1 to considering this semver-patch

Show outdated Hide outdated test/parallel/test-url-format-invalid-input.js Outdated
Show outdated Hide outdated test/parallel/test-url-format-invalid-input.js Outdated
@lpinca

lpinca approved these changes Feb 4, 2017

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Feb 4, 2017

Member

I'm not as certain. I think it's better to treat all of these in a consistent way. I'd argue semver-major but let's see what the rest of @nodejs/ctc has to say

Member

jasnell commented Feb 4, 2017

I'm not as certain. I think it's better to treat all of these in a consistent way. I'd argue semver-major but let's see what the rest of @nodejs/ctc has to say

@jasnell

jasnell approved these changes Feb 4, 2017

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig approved these changes Feb 4, 2017

@thefourtheye thefourtheye referenced this pull request Feb 6, 2017

Closed

doc: improve testing guide #11150

3 of 3 tasks complete
@mhdawson

LGTM, I'd be tempted to be conservative and treat as semver major unless we know it is causing pain to users in current versions.

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Feb 11, 2017

Member

I'm going to land this as a semver-major. We can back that back down after the fact if necessary.

Member

jasnell commented Feb 11, 2017

I'm going to land this as a semver-major. We can back that back down after the fact if necessary.

jasnell added a commit that referenced this pull request Feb 11, 2017

url: fix error message of url.format
PR-URL: #11162
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Feb 11, 2017

Member

Landed in 7818245

Member

jasnell commented Feb 11, 2017

Landed in 7818245

@jasnell jasnell closed this Feb 11, 2017

KryDos added a commit to KryDos/node that referenced this pull request Feb 25, 2017

url: fix error message of url.format
PR-URL: nodejs#11162
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

@jasnell jasnell referenced this pull request Apr 4, 2017

Closed

8.0.0 Release Proposal #12220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment