Tests fail in docker compose environment #17

Closed
opened 2022-12-21 19:52:23 +00:00 by dboreham · 3 comments
Contributor

This turns out to be due to the use of this npm package : https://github.com/segmentio/is-url
It is supposed to validate a string as a valid http url.
But it's horribly broken. In our case it fails to validate a url like : http://laconicd:1317
There are numerous issues filed against the project detailing other false positive/negative bugs.

I'm going to remove our use of the package for now. Later we can decide whether to fork is-url and fix it, or find some non-broken alternative.

This turns out to be due to the use of this npm package : https://github.com/segmentio/is-url It is supposed to validate a string as a valid http url. But it's horribly broken. In our case it fails to validate a url like : `http://laconicd:1317` There are numerous issues filed against the project detailing other false positive/negative bugs. I'm going to remove our use of the package for now. Later we can decide whether to fork is-url and fix it, or find some non-broken alternative.
Author
Contributor

I spent 20min looking around npmjs and the googlesphere for a non-broken url validator. So far haven't found one. They seem obsessed with nonsense like looking for www. . Since this has already wasted a bunch of my time I'm going to simply remove the url validation code for now.

I spent 20min looking around npmjs and the googlesphere for a non-broken url validator. So far haven't found one. They seem obsessed with nonsense like looking for `www.` . Since this has already wasted a bunch of my time I'm going to simply remove the url validation code for now.
Author
Contributor
See: https://github.com/cerc-io/laconic-sdk/pull/18
Author
Contributor

Fixed.

Fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cerc-io/laconic-sdk#17