Skip to content

Latest commit

 

History

History
60 lines (53 loc) · 3.16 KB

File metadata and controls

60 lines (53 loc) · 3.16 KB

Changelog

All notable changes to this project are documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.2.0 - 2026-06-24

Added

  • Optional serde support: Serialize/Deserialize for CountryCode, iso3166_2::Subdivision and iso3166_3::CountryCode3, behind the new serde feature. Values serialize to their canonical code string (alpha-2 / subdivision code / alpha-4) and deserialize case-insensitively via the existing from_* lookups. Enable with cargo add rust_iso3166 -F serde. Numeric-code (de)serialization is not supported. (#13)
  • cli feature gating the command-line tool; the binary is now named iso3166. (#14)
  • scripts/build-wasm.sh and scripts/publish.sh for building the WebAssembly/npm package and releasing to crates.io + npm.
  • LICENSE file (Apache-2.0).

Changed

  • Breaking: CountryCode.numeric is now u16 instead of i32 (also the numeric() getter, the from_numeric parameter, and the ALL_NUMERIC slice). ISO 3166-1 numeric codes are non-negative and at most 999, so u16 models the domain precisely. (#9)
  • Data refreshed against iso-codes v4.20.1 (2026-01-01):
    • ISO 3166-1: alpha-2/alpha-3/numeric codes match iso-codes exactly; country names updated (TurkeyTürkiye, NetherlandsNetherlands (Kingdom of the)) and the governmental-qualifier names unified to the ISO OBP parenthesised form (e.g. Korea, Republic ofKorea (Republic of)).
    • ISO 3166-2: subdivisions fully refreshed from iso_3166-2.json. Removed 50 non-standard self-referential entries (e.g. HK-HK, PR-PR, XC-*); 55 countries' subdivision sets changed (e.g. Latvia 119 → 43, Greece 65 → 14, Estonia 15 → 94, Iceland 9 → 72).
    • ISO 3166-3: former-country names aligned to iso_3166-3.json (e.g. Gilbert IslandsGilbert and Ellice Islands).
    • Removed stray Wikipedia artifacts (footnote markers, language-variant and code-transition brackets) from all names.
  • Breaking: upgraded phf from 0.11 to 0.14. As phf::Map appears in the public API (the *_MAP constants), this is a public-dependency major bump.
  • Breaking: the CLI is no longer built by default — build/install it with --features cli. prettytable-rs is now an optional dependency pulled in only by that feature, so default library builds no longer depend on it. (#14)
  • Breaking: minimum supported Rust version is now 1.85 (required by phf 0.14 / edition 2024 in the dependency tree).
  • Refreshed dependency floors: serde_json 1.0.150 (dev), wasm-bindgen 0.2.100, js-sys 0.3.77, wasm-bindgen-test 0.3.50 (dev).
  • The serde impls live in the code generator templates (scripts/*.py) and the src/*.rs files are regenerated from them, so the feature survives future regeneration.

Fixed

  • Silenced unexpected_cfgs warnings for the custom direct_wasm cfg via a [lints.rust] check-cfg entry.