Skip to content
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: update url module to use module.exports = {} pattern #12717

Closed
wants to merge 2 commits into from

Conversation

@jasnell
Copy link
Member

commented Apr 28, 2017

Minor restructuring to lib/url.js to use the more efficient module.exports = {} pattern.
Also restructure binding imports in lib/internal/url.js to simplify code.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

url

@jasnell

This comment has been minimized.

Copy link
Member Author

commented Apr 28, 2017

lib/url.js Outdated

exports.Url = Url;
// Legacy url.parse() API

This comment has been minimized.

Copy link
@benjamingr

benjamingr Apr 29, 2017

Member

Given we don't have an alternative for relative URLs yet, I'm not sure we should call it legacy in the source since there are use cases whatwg-url doesn't cover.

This comment has been minimized.

Copy link
@jasnell

jasnell Apr 29, 2017

Author Member

Legacy definition is "denoting software or hardware that has been superseded but is difficult to replace because of its wide use." ... that would seem perfectly suitable for the url.parse() API. Legacy does not imply that the use cases have been completely handled.

This comment has been minimized.

Copy link
@jasnell

jasnell Apr 29, 2017

Author Member

Removed the word legacy from this PR to keep that from holding up landing this.

@jasnell jasnell force-pushed the jasnell:refactor-url branch Apr 29, 2017

@jasnell jasnell force-pushed the jasnell:refactor-url branch to 123e699 Apr 29, 2017

jasnell added a commit that referenced this pull request Apr 29, 2017
url: move to module.exports = {} pattern
PR-URL: #12717
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com
jasnell added a commit that referenced this pull request Apr 29, 2017
url: refactor binding imports in internal/url
PR-URL: #12717
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com
@jasnell

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2017

Landed in b331ba6 and 97ec72b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4 participants
You can’t perform that action at this time.