Skip to content

Conversation

@kdzwinel
Copy link
Contributor

@kdzwinel kdzwinel commented Mar 20, 2018

Hi! 👋

Thank you so much for a wonderful project! We are using it in GoogleChrome/lighthouse in one of the SEO audits.

This PR

Short story: robots-parser uses some 'url' module APIs that are deprecated since Node v6, lets update them!

Long story: Lighthouse runs in both node and browser environments. In the browser we use the native URL object to polyfill require('url'). Unfortunately, robots-parser was using APIs that are not compatible with the browser's URL object (namely parse and path). Thankfully, these APIs are also deprecated in Node, so it does make sense to update them.

⚠️ that's a breaking change because by using new URL() we are dropping support for Node v4 here (which is in the maintenance mode till April 2018).

@samclarke
Copy link
Owner

Thanks for the pull request! Looks great 👍Merged.

@samclarke
Copy link
Owner

Just so you know I've released version 2 with this update. Thanks again for the PR!

@kdzwinel kdzwinel deleted the url-module-update branch March 21, 2018 19:25
@kdzwinel
Copy link
Contributor Author

Oh wow, didn't expect you to merge it so fast. Thank you Sam! 🤘

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.

2 participants