Releases: Komposten/public_suffix
Releases · Komposten/public_suffix
Release list
3.0.0
2.0.1
Additions
- Add example/example.md to make the new examples show up on pub.dev.
2.0.0
API changes
SuffixRulesis no longer static.- Multiple instances can be created with different rule lists.
DefaultSuffixRuleshas been added to provide a statically accessible rules list with a similar API to the oldSuffixRules.PublicSuffixnow takes an optional argument when created to specify theSuffixRulesto use. If unspecified,DefaultSuffixRulesis used (similar to previous version).
- Move
SuffixRules.processandSuffixRules.validateto a new class,SuffixRulesParser. - The default constructor in
PublicSuffixnow takes either a String or a URL. - Add factory methods
PublicSuffix.fromStringand fromUrl with adjustable leniency for invalid URLs (fixes #4).- These allow creation of
PublicSuffixinstances without getting exceptions thrown if the URL is null/empty/invalid. See the documentation for full details.
- These allow creation of
- Rename
PublicSuffix.sourceUritoPublicSuffix.sourceUrl. - Remove export of
public_suffix.dartfrom the helper files. - Rename
public_suffix_io.dartandpublic_suffix_browser.darttoio_helper.dartandbrowser_helper.dart.
Additions
END PRIVATEis now respected when loading a suffix list. This means that a list can contain the private section anywhere in the list or even have multiple private sections.SuffixRules.hasRules- checks if at least one rule exists.SuffixRules.fromRules- creates aSuffixRulesinstance from an existing list ofRuleobjects.
Fixes
- Fix rule matching not working for rules with wildcards not in the first position (e.g.
a.*.c). - Allow null lists when creating
SuffixRulesobjects (treated as empty lists).
1.2.1
Changes
- Improved the suffix list format documentation in
SuffixRulesand theSuffixRulesHelpers. - Improved documentation of
DomainUtils. - Fixed
DomainUtils.isKnownSuffixnot throwing ifSuffixRuleshasn't been initialised. - Removed the
test_coveragedev dependency (doesn't work for browser tests). - Updated README.md to better explain how to initialise
SuffixRules.
1.2.0
Additions
- Added a hash map-based
ruleMaptoSuffixRulesto speed up the performance when matching rules. - Added
subdomainandicannSubdomaintoPublicSuffix. - Added
isSubdomainOf,hasKnownSuffixandhasValidDomaintoPublicSuffix. - Added
DomainUtilswith the following static functions:isSubdomainOfisSubdomainisKnownSuffixhasValidDomain
- Added
PublicSuffix.fromStringas a convenience method forPublicSuffix(Uri.parse(string)).
Changes
- Updated docs and parameter names to say URL instead of URI, which is more correct (
PublicSuffix.sourceUriis unchanged to avoid breaking changes).
1.1.0
1.0.0
This is the first release.
Changelog
- Load suffix rule lists from strings or URIs.
- Parse URLs against suffix lists to obtain:
- public suffix (e.g.
co.uk) - root domain (e.g.
google) - registrable domain (e.g.
google.co.uk)
- public suffix (e.g.
- Obtain results with and without private (i.e. non-ICANN/IANA) suffix rules.
- Obtain punycode encoded and decoded results (if a punycoded URL is parsed).