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

Can url-parse library be dropped? #278

Open
DanEscudero opened this issue May 25, 2023 · 2 comments
Open

Can url-parse library be dropped? #278

DanEscudero opened this issue May 25, 2023 · 2 comments

Comments

@DanEscudero
Copy link

Hello!

According to url-parse README file (https://www.npmjs.com/package/url-parse):

url-parse was created in 2014 when the WHATWG URL API was not available in Node.js and the URL interface was supported only in some browsers. Today this is no longer true. The URL interface is available in all supported Node.js release lines and basically all browsers. Consider using it for better security and accuracy.

I wonder if url-parse is still necessary in this library, or it can be abandoned and URL be used instead. Is there any particular reason not to do this?
If this is ok, I'd be available to submit a Pull Request that does the work

@awaterma
Copy link
Member

Thank you @DanEscudero for pointing this out. We'd love a pull request if you'd like to submit a fix. We have all been really busy with our day jobs, so it may take a little while to review and merge. But we'd greatly appreciate the help! :)

@wjhsf
Copy link
Contributor

wjhsf commented Jun 19, 2023

I believe that the url-parse library was originally added to support React Native, which does not have node's url library or a global URL object. I don't have any experience with React Native, so perhaps the situation has changed, but I assume that removing url-parse would cause things to break. We don't explicitly support React Native, but to avoid any unnecessary negative impacts we'd want to save this for a major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants