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

Migrate to new WHATWG URL standard #871

Closed
molant opened this issue Mar 10, 2018 · 0 comments
Closed

Migrate to new WHATWG URL standard #871

molant opened this issue Mar 10, 2018 · 0 comments

Comments

@molant
Copy link
Member

molant commented Mar 10, 2018

We are using url.parse in quite a few places. While that method hasn't been deprecated, the recommendation is now to move to the new WHATWG URL API:

Note: While the Legacy API has not been deprecated, it is maintained solely for backwards compatibility with existing applications. New application code should use the WHATWG API.

Basically we need to replace:

import * as url from 'url';
cont parsedUrl = url.parse('http://domain'); 

with:

import { URL } from 'url';
const parsedUrl = new URL('http://domain');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants