Skip to content

Url version 2.0.3

Latest

Choose a tag to compare

@kipcole9 kipcole9 released this 21 Sep 06:36

Breaking Change

  • Requires Elixir 1.17 or later; that is the oldest version exercised in CI.

  • The optional ex_cldr dependency is replaced by localize. The territory for tel numbers without a country code now comes from Localize.get_locale/0; ex_cldr is no longer consulted. On OTP 26, localize also needs json_polyfill in the consumer's dependencies.

Enhancements

  • Function and module documentation follows the standard template, with arguments, returns and examples for every public function, and the scheme modules grouped in the generated docs.

Bug Fixes

  • URL.new/1 no longer raises on a scheme with an empty path (mailto:, geo:, tel:, uuid:, urn:, urn:uuid:) or on non-binary input. mailto: with no address parses to an empty to list; the others return {:error, {URL.Parser.ParseError, _}}.

  • URL.parse_query_string/1 returns %{} for a nil query (and any URL without one) instead of raising, and an ArgumentError tuple for non-binary input.

  • URL.Tel keeps the unformatted number when ex_phone_number cannot parse it, instead of storing an error tuple in the tel field, and no longer raises when the locale library has no default locale configured.

  • Fix URL.to_string/1 so it builds a t:URI.t/0 before delegating to URI.to_string/1, resolving the type warning emitted by Elixir 1.20.

  • Remove the unused optional jason dependency; nothing in the library referenced it.

  • Correct the URL.UUID moduledoc and the URL.Mailto.parse/1 doc, which named the wrong scheme.