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

@jasnell jasnell 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

@nodejs-github-bot nodejs-github-bot added dont-land-on-v4.x url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Apr 28, 2017
@jasnell
Copy link
Member Author

jasnell commented Apr 28, 2017

lib/url.js Outdated

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

jasnell added a commit that referenced this pull request Apr 29, 2017
PR-URL: #12717
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]
jasnell added a commit that referenced this pull request Apr 29, 2017
PR-URL: #12717
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]
@jasnell
Copy link
Member Author

jasnell 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
Labels
url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants