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

Fix URL import for Node.js < 10 #239

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Fix URL import for Node.js < 10 #239

merged 2 commits into from
Nov 16, 2021

Conversation

Pimm
Copy link
Collaborator

@Pimm Pimm commented Nov 16, 2021

Fixes a bug I introduced in #196.

That PR started using the WHATWG URL. That API has been available since Node.js 7 and 6.13. However, it has only been available on the global object (in other words: without importing it explicitly) since Node.js 10.

So why haven't our tests caught this?!

Well, it looks like Jest "fixed" this for us. Jest polyfilled URL, which meant the test passed on Node 6 even though the actual library did not work.

@Pimm Pimm merged commit 8bdc1b4 into master Nov 16, 2021
@Pimm Pimm deleted the pimm/fix-url-import branch November 16, 2021 10:50
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