Skip to content

Replace is-url-superb by valid-url #124

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

Closed
wants to merge 2 commits into from
Closed

Replace is-url-superb by valid-url #124

wants to merge 2 commits into from

Conversation

davilima6
Copy link

@davilima6 davilima6 commented Aug 17, 2020

Unfortunately tests do not pass here. I wanted to share already and can look more into later.

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

If yes, please describe the breakage.

Please Describe Your Changes

@davilima6
Copy link
Author

davilima6 commented Aug 17, 2020

I fixed the slightly different interface. Here I adopt a 3rd-party library which also does not consider protocol-relative urls (//123.example.com) as valid so we have to patch it (and test) similarly to #123. What do you think?

@shellscape
Copy link
Owner

First and foremost, I'm deeply appreciative of the enthusiasm and effort you're putting into my little lib here. I want you to know that I'm sincere.

Unfortunately I'm pretty adamant that I don't want to adopt any new code that can come from an existing package instead. I would be shocked if there wasn't one that could validate urls properly by now. I'm happy to help search for a suitable replacement when I do have time this week, and would be happy to commit to your fork so you get the credit for the work.

@davilima6
Copy link
Author

I tried the following:

  • "everything-validator": "^1.0.2"
  • "is-http-url": "^2.0.0"
  • "is-relative-uri": "^1.0.16"
  • "is-valid-http-url": "^1.0.3"
  • "valid-url": "^1.0.9"
  • "url-regexp": "^1.0.2"
  • "url-validate": "^1.0.1"
  • "url-validation": "^2.1.0"
  • "url-validator": "^2.0.3"
  • "url_validator": "^1.0.4",
  • "urlint": "^1.9.17",
  • "valid-url": "^1.0.9"
  • "valid-url-utf8": "^1.0.7"
  • "validate-utility": "0.0.2"

From these only url-validator, an "opinionated URL validator", accepts protocol-relative URLs as valid. Its last release is from 6 years ago and its Github repo and organization were deleted so personally I'd drop support as well (in #123). Please let me know if you change your mind, or if you find a more active project for replacement.

@davilima6 davilima6 changed the title feat: replace is-url-superb by valid-url Replace is-url-superb by valid-url Aug 17, 2020
@shellscape
Copy link
Owner

Closing in favor of #125. Thank you very much for your time and attention to this effort. It is sincerely appreciated.

@shellscape shellscape closed this Sep 16, 2020
@davilima6 davilima6 deleted the replace-is-url-superb-by-valid-url branch September 16, 2020 13:59
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