-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: ensure search property is consistently null vs empty #13606
Conversation
We'll probably want to do a CITGM run to get an idea if this breaks stuff in the ecosystem. If so, we should mark it Seems good to me, but I'll defer to people more familiar with 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 guess my opinion is obvious after creating #13404 :)
CI failure on arm is unrelated, see #13603. |
short summary of previous discussion:
> url.parse('http://example.com/', false).search
null
> url.parse('http://example.com/', true).search
''
|
CITGM looks clean: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/868/ |
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
Pinging @nodejs/ctc since it's labeled |
@Trott how many releases had "bad" behavior? |
Looks like up to v4, at least. I'd go with semver major then. |
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 as semver-major
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 as semver-major
New CI after #13603 was fixed: https://ci.nodejs.org/job/node-test-pull-request/8625/ |
arm-fanned had an infra hiccup, rerunning: https://ci.nodejs.org/job/node-test-commit-arm-fanned/9386/ |
Had to kill macOS because of known bug nodejs/citgm#426 |
PR-URL: #13606 Fixes: #13404 Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Landed in c88ba03 |
@JustinBeckwith @jasnell This probably broke userland code like espadrine/sc#65 however I don't see a mention of History in the docs for url.parse. Should this be added? |
@styfle PR/issue welcome. |
Yep, a mention in the doc changelogs would be excellent |
@TimothyGu @jasnell I made a PR. But after thinking through this, I believe it's better to change @JustinBeckwith Why did you decide to use |
I generally don't like returning empty string when we're trying to convey that the value is 'unset'. Those to me mean very different things. That having been said - I was handed this as part of the code & learn at node.js interactive :) I don't think either solution is necessarily wrong, but there would be a cost to flip-flopping. |
Fixes: #13404
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
url