npm / tldts
tldts
What changed in tldts 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.
6 breaking1 security2 new APIs and options2 performance1 behavior and defaults2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittldts 714 changes
Breaking changes 6
The Public Suffix List was updated, which may change domain parsing results for affected suffixes.
Hostname labels that begin with a hyphen are now rejected.
Hostname extraction now matches WHATWG URL host boundaries.
Updates the upstream public suffix list in tldts-experimental, tldts-icann, and tldts, which may change suffix-related results.
The upstream Public Suffix List was updated, which may change domain parsing results for affected suffixes.
When validateHostname is enabled, hostname validation is consistent between getHostname and parse(url).hostname.
Security 1
Adds IPv6 hextet validation as security-review hardening.
New APIs and options 2
Adds getFullDomain to return the full hostname including its subdomain.
Adds opt-in detection of IANA special-use domains.
Performance 2
Hostname validation is performed inline during extraction, dropping a redundant scan.
Performance improved and memory allocations were reduced.
Behavior and default changes 1
Updated the upstream public suffix list, which may affect domain parsing results.
Fixes and other changes 2
Extraction now handles unbracketed IPv6 hostnames instead of mangling them.
Labels ending with an underscore are now accepted.