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

Replace URL.canParse() with better supported code #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 23, 2024

  1. fix: replace URL.canParse()

    [URL.canParse][1] was only pretty recently created, and is not
    available in many environments.
    
    We can instead wrap a `URL` creation in a `try..catch`, as listed in
    MDN. Unfortunately, this is a bit slower, but at least it works almost
    everywhere.
    
    [1]: https://developer.mozilla.org/en-US/docs/Web/API/URL/canParse_static
    
    Fixes: braintree#78
    aloisklink committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    64689dc View commit details
    Browse the repository at this point in the history
  2. ci: test using Node.JS v18.0

    This would have caught
    like braintree#78, as
    `URL.canParse()` was only added in Node.JS v18.17
    aloisklink committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    5fcba26 View commit details
    Browse the repository at this point in the history