Skip to content

Releases: tjenkinson/url-toolkit

v2.1.2

29 Dec 11:59
Compare
Choose a tag to compare

Scheme regex is now a bit stricter.

It now must match [a-zA-Z0-9+\-.] as described in the RFC.

This means relative urls that happen to contain ‘:’ are more likely to be recognised as relative providing they contain a character that does not satisfy the above.

Also updated the README mentioning that if you know a URL is relative, you should prefix it with ./.

v2.1.1

28 Mar 11:47
Compare
Choose a tag to compare

Fix typescript types export

v2.1.0

26 Mar 12:37
Compare
Choose a tag to compare

Adds typescript type definitions.

v2.0.1

05 Mar 16:20
Compare
Choose a tag to compare

Fix bug in regex.

Rewrite based off spec (RFC 1808)

05 Mar 15:43
Compare
Choose a tag to compare

This should be backwards compatibile with version 1 if the alwaysNormalize option is set to true. This option is required as normalization should only be performed if necessary, according to the spec.

The one exception is a combination like "http://a.com/b/cd?test=1#something" + ";x", which previously incorrectly being resolved as "http://a.com/b/;x", instead of "http://a.com/b/cd;x". To loose the last segment of the path the relative URL should be "./;x".

v1.0.11

23 Feb 08:37
Compare
Choose a tag to compare

Handle base url protocol being '//'.

This was not working properly when the relative url started with '/' or '//'.

v1.0.10

04 Feb 14:50
Compare
Choose a tag to compare
  • Handle no protocol properly.
    • a.com + z.ts => a.com/ + z.ts => a.com/z.ts not a.com + z.ts => z.ts
  • Improve performance slightly by reusing expressions.

v1.0.9

04 Feb 10:43
Compare
Choose a tag to compare

Handle any unicode string as domain name and allow baseURL to omit protocol and slash(es).

See https://en.wikipedia.org/wiki/Domain_name#Internationalized_domain_names

The character set allowed in the Domain Name System is based on ASCII and does not allow the representation of names and words of many languages in their native scripts or alphabets. ICANN approved the Internationalized domain name (IDNA) system, which maps Unicode strings used in application user interfaces into the valid DNS character set by an encoding called Punycode. For example, københavn.eu is mapped to xn--kbenhavn-54a.eu. Many registries have adopted IDNA.

v1.0.8

03 Feb 22:16
Compare
Choose a tag to compare

Handle missing '/' after domain

v1.0.7

16 Nov 18:48
Compare
Choose a tag to compare

Fix JSLint error.