Skip to content

Conversation

@Alpha4615
Copy link
Contributor

This refactors the library to remove the url polyfill and replace it with the native WHATWG URL API. It mitigates potential security issues and removes an unnecessary dependency, which cascades into smaller bundle sizes and lower maintenance monitoring requirements.

This will remove the deprecation error seen in newer versions of nodejs. This will not cause any compatibility issues as the API is supported by the library's current minimum nodeJS version (Node 18).

All unit tests pass locally, but may not pass on GH due to bot detection.

Fixes #172.

@Alpha4615
Copy link
Contributor Author

Alpha4615 commented Nov 13, 2025

Also, just to note, the WHATWG URL API became standard in NodeJS 10, released in April 2018, so that's pretty long ago -- and well below the version requirement of 18 that's specified in the package.json, so there really shouldn't be back-compat issues with merging this PR.

@ospfranco
Copy link
Collaborator

The problem is not node compat but react native

@Alpha4615
Copy link
Contributor Author

Alpha4615 commented Nov 14, 2025 via email

@Alpha4615
Copy link
Contributor Author

I have modifed the PR to use WHATWG if it's available, and if not, it uses the legacy url library. This should prevent react-native compat issues.

@ospfranco
Copy link
Collaborator

No, react native includes a URL object in the global namespace but it does not behave like the standard, it might have other issues

https://github.com/charpeni/react-native-url-polyfill

Sorry dude... not worth the headache to fix what is not broken.

@ospfranco ospfranco closed this Nov 14, 2025
@ospfranco
Copy link
Collaborator

Also, already commented this on previous PR that attempted the same

#166

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

Successfully merging this pull request may close these issues.

NodeJS 24 DeprecationWarning: url.parse()

2 participants