CHANGELOG.md

  1Version NEXT:
  2
  3Version 0.12.1, release 2025-11-02:
  4  * Changes:
  5    - Make serde deserialization actually validate the `NodePart`, `DomainPart`
  6      and `ResourcePart`, it was previously completely unsound, creating these
  7      types without validating their invariants.
  8    - The 'quote' feature now uses `jid::Jid` instead of `::jid::Jid` to
  9      stop requiring importing the module as a dependency of the project. The
 10      `jid` module just needs to be made available, for example: `use
 11      foo::jid;`
 12    - Bump minidom to 0.18
 13
 14Version 0.12.0, release 2025-01-25:
 15  * Breaking:
 16    - domainparts are now checked much more in-depth, using the idna crate for
 17      domains and `Ipv*Addr` checks for IP domainparts.  This removes some
 18      prior errors which are now covered by `Error::Idna`: `Error::DomainEmpty`
 19      and `Error::DomainTooLong`
 20  * Additions:
 21    - xso::FromXmlText and xso::AsXmlText are now implemented for NodePart,
 22      DomainPart, and ResourcePart (!485)
 23    - serde::Serialize and serde::Deserialize are now derived for NodePart,
 24      DomainPart, and ResourcePart when serde feature flag is enabled (!499)
 25    - This crate is now entirely `no_std`, with no remaining dependency on std!
 26    - When using the crate from a cloned git repository, the minidom dependency
 27      is now relative too, which simplifies working on a different project
 28      while making modifications to this workspace.
 29    - Make Debug more readable, just `Jid("foo@bar/baz")` instead of exposing
 30      the internally-cached position of the '@' and '/' signs.
 31
 32Version 0.11.1, release 2024-07-23:
 33  * Breaking:
 34    - Move InnerJid into Jid and reformulate BareJid and FullJid in terms of
 35      Jid.
 36    - With the addition of `str`-like types for `DomainPart`, `NodePart` and
 37      `ResourcePart`, the functions on `Jid`, `BareJid` and `FullJid` which
 38      return the respective types have been changed to return references
 39      instead. Use `ToOwned::to_owned` to obtain a copy or `.as_str()` to
 40      obtain a plain `str` reference.
 41    - The `node_str`, `domain_str` and `resource_str` functions returning str
 42      references have been removed from the JID types. Use `.as_str()` or
 43      `.map(|x| x.as_str())` on the corresponding `node`/`domain`/`resource`
 44      functions instead.
 45  * Additions:
 46    - Add optional quote support. Implement quote::ToTokens for Jid, FullJid
 47      and BareJid.
 48    - `str`-like reference types have been added for `DomainPart`, `NodePart`
 49      and `ResourcePart`, called `DomainRef`, `NodeRef` and `ResourceRef`
 50      respectively.
 51    - Convenience methods to combine `DomainPart` and `NodePart` to a
 52      `BareJid` have been added, including
 53      `impl From<DomainPart> for BareJid` and
 54      `impl From<DomainPart> for Jid`, both of which are (unlike
 55      `::from_parts`) copy-free.
 56    - `as_str` methods have been added on all Jid types.
 57    - Derive PartialOrd/Ord for Jid types.
 58    - Implement `Borrow<Jid>` on `FullJid` and `BareJid`.
 59    - Make the crate no_std
 60    - Update to edition 2021.
 61    - Use debug_tuple instead of string formatting to get standard-like
 62      output.
 63    - Improve perfs of comparison operators (#123)
 64    - Add more test cases
 65    - Fix clippy lints, cargo doc, and other warnings
 66
 67
 68Version 0.11.0, release 2024-07-23 [YANKED]
 69
 70Version 0.10.0, release 2023-08-17:
 71  * Breaking
 72    - serde: Jid is now using untagged enum representation (#66)
 73    - JidParseError has been renamed Error
 74    - Jid::new, FullJid::new, and BareJid::new now take a single stringy argument and return a Result ;
 75    to build JIDs from separate parts, use the from_parts() method instead (#204)
 76  * Additions
 77    - Parsing invalid JIDs with stringprep feature no longer results in panic,
 78    returning Error with NodePrep, NamePrep or ResourcePrep variant instead (#84)
 79    - Parsing already-normalized JIDs with stringprep is much faster, about 20 times.
 80    - JID parts are now typed as NodePart, DomainPart and ResourcePart ; once part into those types,
 81    JID operations cannot fail
 82    - BareJid::with_resource appends a ResourcePart to a BareJid to produce a FullJid (#204)
 83    - BareJid::with_resource_str appends a stringy resource to a BareJid to produce a FullJid, and can fail
 84    in case of resource stringprep or length check error (#204)
 85    - Jid::from_parts, BareJid::from_parts, and FullJid::from_parts enable to build JIDs from typed Parts
 86    and cannot fail (#204)
 87    - Jid::node(), BareJid::node(), and FullJid::node() now return an option of the typed NodePart ; the
 88    node_str() method returns the same information as a string slice (#204)
 89    - Jid::domain(), BareJid::domain(), and FullJid::domain() now return the typed DomainPart ; the
 90    domain_str() method returns the same information as a string slice (#204)
 91    - FullJid::resource() returns the typed ResourcePart ; the resource_str() method returns the same
 92    information as a string slice (#204)
 93    - Jid::resource() returns an optional typed ResourcePart ; the resource_str() method returns the same
 94    information as a string slice (#204)
 95    - Add serde_test in tests to ensure correctness of Serialize / Deserialize implementations.
 96
 97Version 0.9.3, release 2022-03-07:
 98  * Updates
 99    - Bumped minidom to 0.14
100
101Version 0.9.2, release 2021-01-13:
102  * Updates
103    - Bumped minidom to 0.13
104
105Version 0.9.1, release 2021-01-13:
106  * Updates
107    - Added serde support behind "serde" feature
108    - Added equality operators between Jid, BareJid and FullJid.
109
110Version 0.9.0, release 2020-02-15:
111  * Breaking
112    - Update minidom dependency to 0.12
113
114Version 0.8, released 2019-10-15:
115  * Updates
116    - CI: Split jobs, add tests, and caching
117  * Breaking
118    - 0.7.1 was actually a breaking release
119
120Version 0.7.2, released 2019-09-13:
121  * Updates
122    - Impl Error for JidParseError again, it got removed due to the failure removal but is still wanted.
123
124Version 0.7.1, released 2019-09-06:
125  * Updates
126    - Remove failure dependency, to keep compilation times in check
127    - Impl Display for Jid
128
129Version 0.7.0, released 2019-07-26:
130  * Breaking
131    - Update minidom dependency to 0.11
132
133Version 0.6.2, released 2019-07-20:
134  * Updates
135    - Implement From<BareJid> and From<FullJid> for Jid
136    - Add node and domain getters on Jid
137
138Version 0.6.1, released 2019-06-10:
139  * Updates
140    - Change the license from LGPLv3 to MPL-2.0.
141
142Version 0.6.0, released 2019-06-10:
143  * Updates
144    - Jid is now an enum, with two variants, Bare(BareJid) and Full(FullJid).
145    - BareJid and FullJid are two specialised variants of a JID.
146
147Version 0.5.3, released 2019-01-16:
148  * Updates
149    - Link Mauve bumped the minidom dependency version.
150    - Use Edition 2018, putting the baseline rustc version to 1.31.
151    - Run cargo-fmt on the code, to lower the barrier of entry.
152
153Version 0.5.2, released 2018-07-31:
154  * Updates
155    - Astro bumped the minidom dependency version.
156    - Updated the changelog to reflect that 0.5.1 was never actually released.
157
158Version 0.5.1, "released" 2018-03-01:
159  * Updates
160    - Link Mauve implemented failure::Fail on JidParseError.
161    - Link Mauve simplified the code a bit.
162
163Version 0.5.0, released 2018-02-18:
164  * Updates
165    - Link Mauve has updated the optional `minidom` dependency.
166    - Link Mauve has added tests for invalid JIDs, which adds more error cases.
167
168Version 0.4.0, released 2017-12-27:
169  * Updates
170    - Maxime Buquet has updated the optional `minidom` dependency.
171    - The repository has been transferred to xmpp-rs/jid-rs.
172
173Version 0.3.1, released 2017-10-31:
174  * Additions
175    - Link Mauve added a minidom::IntoElements implementation on Jid behind the "minidom" feature. ( https://gitlab.com/lumi/jid-rs/merge_requests/9 )