question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PR In Progress - hapi@18

See original GitHub issue

I am working on making a PR to update to hapi version 18 (released this past Friday).

One of the major changes in hapi 18 is the use of the WHATWG url parsing in Node. Specifically what used to be Url.parse('url') is now deprecated and has been replaced by new Url.URL('url'), which is more strict about url format validation. Because of that, the ip used in these tests, 194.418.15.24:80 is now being validated and is throwing an error on the 418.

Is there a reason why this specific IP is being used in the tests, or can I change it to 194.148.15.24:80 for the sake of WHATWG url format validation?

const Url = require('url');

// hapi 17:
Url.parse('194.418.15.24:7645'); // Url { protocol: '194.418.15.24:', ...

// hapi 18:
new Url.URL('194.418.15.24:7645'); // TypeError [ERR_INVALID_URL]: Invalid URL: 194.418.15.24:7645

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:10

github_iconTop GitHub Comments

1reaction
robmcguinnesscommented, Mar 13, 2019

@WesTyler I think the tests that are breaking can be updated to support WHATWG url parsing. I don’t see anything about hapi-swagger that is specific to the breaking changes defined in the hapi@18 release notes. This lib should work with hapi@17 and hapi@18.

0reactions
WesTylercommented, Mar 13, 2019

Excellent, thanks @robmcguinness !

Read more comments on GitHub >

github_iconTop Results From Across the Web

PR In Progress - hapi@18 · Issue #557 - GitHub
I am working on making a PR to update to hapi version 18 (released this past Friday). One of the major changes in...
Read more >
hapi-query-builder - npm
Automatically identify where condition and option from query params. You can access mongoose query in request parameter with name "parsedQuery".
Read more >
good-map - npm Package Health Analysis - Snyk
Transform stream for Hapi Good process monitoring. Modify the incoming object stream with your own mapping functions. Build Status Coverage Status dependencies ...
Read more >
Build a Secure Node.js App with SQL Server - Okta Developer
SQL Server is an awesome relational database. Here's how to use it from Node.js.
Read more >
Axios node ssl - Caritas Castellaneta
However, accessing resources on the web is not an instantaneous process. ... Node Js Axios Proxy my proxy addr, premiere pro cc proxy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found