diff --git a/CHANGELOG.md b/CHANGELOG.md index 73016c32..c0760b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,1647 @@ All notable changes to this project will be documented in this file. +## ratatui - [0.30.0-alpha.3](https://github.com/ratatui/ratatui/compare/ratatui-v0.30.0-alpha.2...ratatui-v0.30.0-alpha.3) - 2025-05-13 + +### Features + +- [3e1c72f](https://github.com/ratatui/ratatui/commit/3e1c72fb27cae132bc8b5f24a4ae875921dfb00d) *(no_std)* Make ratatui compatible with `#![no_std]` by @j-g00da in [#1794](https://github.com/ratatui/ratatui/pull/1794) [**breaking**] + > + > Resolves #1781 + > + > This PR makes it possible to compile ratatui with `#![no_std]`. + > Also makes me answer "We Are So Embedded" to "Are We Embedded Yet?" + +- [ab48c06](https://github.com/ratatui/ratatui/commit/ab48c06171724ae58d98687d90e999b76890c2e7) *(no_std)* Option to disable layout cache for `no_std` compatibility by @j-g00da in [#1795](https://github.com/ratatui/ratatui/pull/1795) [**breaking**] + > + > Resolves #1780 + > + > BREAKING CHANGE:Disabling `default-features` will now disable layout + > cache, which can have a negative impact on performance. + > + > `Layout::init_cache` and `Layout::DEFAULT_CACHE_SIZE` are now only + > available if `layout-cache` feature is enabled. + +- [09173d1](https://github.com/ratatui/ratatui/commit/09173d182912ab92e67b8aa7a4cb51862b05cb25) *(no_std)* Make `TestBackend::Error` `Infallible` by @j-g00da in [#1823](https://github.com/ratatui/ratatui/pull/1823) [**breaking**] + > + > BREAKING CHANGE:`TestBackend` now uses `core::convert::Infallible` for + > error handling instead of `std::io::Error` + +- [53cdbbc](https://github.com/ratatui/ratatui/commit/53cdbbccd5d3522c004e483433a02ef6d64fab01) *(uncategorized)* Enable serde propagation to backend crates (crossterm, termion) by @ArjunKrish7356 in [#1812](https://github.com/ratatui/ratatui/pull/1812) + + > This PR propagates the serde feature from the main ratatui crate to the + > ratatui-crossterm and ratatui-termion backend crates. Solves #1805 + +- [fcb47d6](https://github.com/ratatui/ratatui/commit/fcb47d60f3df205c18f5fa9459e9ba2c8d0c9649) *(uncategorized)* Rename Alignment to HorizontalAlignment and add VerticalAlignment by @joshka in [#1735](https://github.com/ratatui/ratatui/pull/1735) [**breaking**] + + > We don't anticipate removing or deprecating the type alias in the near + > future, but it is recommended to update your imports to use the new + > name. + > + > Added a VerticalAlignment enum to make the API more consistent. We don't + > have a specific use case for it yet, but it's better to add it now and + > be able to use it in the future. + > + > BREAKING-CHANGE:The `Alignment` enum has been renamed to + > `HorizontalAlignment` to better reflect its purpose. A type alias has + > been added to maintain backwards compatibility, however there are some + > cases where type aliases are not enough to maintain backwards + > compatibility. E.g. when using glob imports to import all the enum + > variants. This should not affect most users, but it is recommended to + > update your imports to use the new name. + > + > ```diff + > - use ratatui::layout::Alignment; + > + use ratatui::layout::HorizontalAlignment; + > + > - use Alignment::*; + > + use HorizontalAlignment::*; + > ``` + +### Bug Fixes + +- [00da8c6](https://github.com/ratatui/ratatui/commit/00da8c620345397c6815267e6d8e19c1eacfe1c2) *(no_std)* Provide `f64` polyfills for `no_std` compatibility by @j-g00da in [#1840](https://github.com/ratatui/ratatui/pull/1840) + > + > Related:https://github.com/rust-lang/rust/issues/137578 + +### Styling + +- [2739391](https://github.com/ratatui/ratatui/commit/2739391950eddd129c25cd4ffddb28b99eed8cf5) *(uncategorized)* Use Module imports_granularity by @joshka in [#1728](https://github.com/ratatui/ratatui/pull/1728) + + > I was swayed by the arguments about this made by the compiler team In + > and decided to + > look at how this organization affects ratatui. I found this reduces the + > number of lines across the codebase by about 350 and makes the imports + > more readable and definitely more greppable as you usually only have + > to read a single line. I've found in the past that maintaining imports + > regularly leads to merge conflicts which have to be resolved by hand + > and this change should reduce the likelihood of that happening. + > + > Main change is in rustfmt.toml, and the rest is just the result of + > running `cargo xtask format`. + > + > While implementing this, cargo machete brings up that the various + > backend crates are unused by the example crates. + > + > The re-export of each backend crate under ratatui is to make it possible + > for libs that rely on a specific version of ratatui to use the same + > version of the backend crate. Apps in general should use the backend + > crate directly rather than through ratatui as this is less confusing. + > + > - Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the + > examples. + > - Adds the backend crate to the dependencies of the examples that use + > the backend crate directly. + +### Miscellaneous Tasks + +- [1874b9d](https://github.com/ratatui/ratatui/commit/1874b9dd55284952931d58646904f0437e48ce76) *(uncategorized)* Move time to dev-dependencies by @j-g00da in [#1835](https://github.com/ratatui/ratatui/pull/1835) + +- [d88cd29](https://github.com/ratatui/ratatui/commit/d88cd2907906e38d73ac4359ece36527436d686a) *(uncategorized)* Add 'const' to functions where possible. by @MatrixFrog in [#1802](https://github.com/ratatui/ratatui/pull/1802) + + > The Clippy check for this (missing_const_for_fn) is already enabled, but + > catches more cases in upcoming toolchain versions. + > + > This is part of the work to unblock #1727 + +- [0f80c5e](https://github.com/ratatui/ratatui/commit/0f80c5e87eb4e47c818a6bd8b0002971920c65a0) *(uncategorized)* Use expect() instead of allow() for lint overrides by @cgzones in [#1786](https://github.com/ratatui/ratatui/pull/1786) [**breaking**] + > + > BREAKING CHANGE:MSRV is now 1.81 + +### Security + +- [3745a67](https://github.com/ratatui/ratatui/commit/3745a67ba071d5a52e378af34f8409cd90912eb0) *(deps)* Bump rand from 0.9.0 to 0.9.1 by @dependabot[bot] in [#1804](https://github.com/ratatui/ratatui/pull/1804) + + > Bumps [rand](https://github.com/rust-random/rand) from 0.9.0 to 0.9.1. + >
+ > Changelog + >

Sourced from href="https://github.com/rust-random/rand/blob/master/CHANGELOG.md">rand's + > changelog.

+ >
+ >

[0.9.1] - 2025-04-17

+ >

Security and unsafe

+ > + >

Fixes

+ > + >

Changes

+ > + >

Additions

+ > + >
+ >
+ >
+ > Commits + > + >
+ >
+ > + > + > [![Dependabot compatibility + > score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rand&package-manager=cargo&previous-version=0.9.0&new-version=0.9.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) + > + > Dependabot will resolve any conflicts with this PR as long as you don't + > alter it yourself. You can also trigger a rebase manually by commenting + > `@dependabot rebase`. + > + > [//]:# (dependabot-automerge-start) + > + > [//]:# (dependabot-automerge-end) + > + > --- + > + >
+ > Dependabot commands and options + >
+ > + > You can trigger Dependabot actions by commenting on this PR: + > - `@dependabot rebase` will rebase this PR + > - `@dependabot recreate` will recreate this PR, overwriting any edits + > that have been made to it + > - `@dependabot merge` will merge this PR after your CI passes on it + > - `@dependabot squash and merge` will squash and merge this PR after + > your CI passes on it + > - `@dependabot cancel merge` will cancel a previously requested merge + > and block automerging + > - `@dependabot reopen` will reopen this PR if it is closed + > - `@dependabot close` will close this PR and stop Dependabot recreating + > it. You can achieve the same result by closing it manually + > - `@dependabot show ignore conditions` will show all + > of the ignore conditions of the specified dependency + > - `@dependabot ignore this major version` will close this PR and stop + > Dependabot creating any more for this major version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this minor version` will close this PR and stop + > Dependabot creating any more for this minor version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this dependency` will close this PR and stop + > Dependabot creating any more for this dependency (unless you reopen the + > PR or upgrade to it yourself) + > + > + >
+ +- [a03ba0d](https://github.com/ratatui/ratatui/commit/a03ba0de5c02a51726285b359a512e6de8b84622) *(deps)* Bump crossterm from 0.28.1 to 0.29.0 by @dependabot[bot] in [#1771](https://github.com/ratatui/ratatui/pull/1771) + + > Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.28.1 + > to 0.29.0. + >
+ > Release notes + >

Sourced from href="https://github.com/crossterm-rs/crossterm/releases">crossterm's + > releases.

+ >
+ >

0.29

+ >

Version 0.29

+ >

Added ⭐

+ > + >

Breaking ⚠️

+ > + >

@​joshka href="https://github.com/linrongbin16">@​linrongbin16 + > @​kmicklas href="https://github.com/maciek50322">@​maciek50322 href="https://github.com/rosew0od">@​rosew0od href="https://github.com/sxyazi">@​sxyazi href="https://github.com/the-mikedavis">@​the-mikedavis + > @​hthuz href="https://github.com/aschey">@​aschey href="https://github.com/naseschwarz">@​naseschwarz href="https://github.com/Flokkq">@​Flokkq href="https://github.com/gaesa">@​gaesa href="https://github.com/WindSoilder">@​WindSoilder

+ >
+ >
+ >
+ > Changelog + >

Sourced from href="https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md">crossterm's + > changelog.

+ >
+ >

Unreleased

+ >

Version 0.29

+ >

Added ⭐

+ > + >

Breaking ⚠️

+ > + >
+ >
+ >
+ > Commits + > + >
+ >
+ > + > + > [![Dependabot compatibility + > score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crossterm&package-manager=cargo&previous-version=0.28.1&new-version=0.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) + > + > Dependabot will resolve any conflicts with this PR as long as you don't + > alter it yourself. You can also trigger a rebase manually by commenting + > `@dependabot rebase`. + > + > [//]:# (dependabot-automerge-start) + > + > [//]:# (dependabot-automerge-end) + > + > --- + > + >
+ > Dependabot commands and options + >
+ > + > You can trigger Dependabot actions by commenting on this PR: + > - `@dependabot rebase` will rebase this PR + > - `@dependabot recreate` will recreate this PR, overwriting any edits + > that have been made to it + > - `@dependabot merge` will merge this PR after your CI passes on it + > - `@dependabot squash and merge` will squash and merge this PR after + > your CI passes on it + > - `@dependabot cancel merge` will cancel a previously requested merge + > and block automerging + > - `@dependabot reopen` will reopen this PR if it is closed + > - `@dependabot close` will close this PR and stop Dependabot recreating + > it. You can achieve the same result by closing it manually + > - `@dependabot show ignore conditions` will show all + > of the ignore conditions of the specified dependency + > - `@dependabot ignore this major version` will close this PR and stop + > Dependabot creating any more for this major version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this minor version` will close this PR and stop + > Dependabot creating any more for this minor version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this dependency` will close this PR and stop + > Dependabot creating any more for this dependency (unless you reopen the + > PR or upgrade to it yourself) + > + > + >
+ +- [fdc1746](https://github.com/ratatui/ratatui/commit/fdc1746effadf28392f055345be10074f4117e3e) *(deps)* Bump tokio from 1.44.1 to 1.44.2 by @dependabot[bot] in [#1769](https://github.com/ratatui/ratatui/pull/1769) + + > Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.44.1 to 1.44.2. + >
+ > Release notes + >

Sourced from href="https://github.com/tokio-rs/tokio/releases">tokio's + > releases.

+ >
+ >

Tokio v1.44.2

+ >

This release fixes a soundness issue in the broadcast channel. The + > channel + > accepts values that are Send but !Sync. + > Previously, the channel called + > clone() on these values without synchronizing. This release + > fixes the channel + > by synchronizing calls to .clone() (Thanks Austin Bonander + > for finding and + > reporting the issue).

+ >

Fixed

+ > + >

href="https://redirect.github.com/tokio-rs/tokio/issues/7232">#7232: + > href="https://redirect.github.com/tokio-rs/tokio/pull/7232">tokio-rs/tokio#7232

+ >
+ >
+ >
+ > Commits + > + >
+ >
+ > + > + > [![Dependabot compatibility + > score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.44.1&new-version=1.44.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) + > + > Dependabot will resolve any conflicts with this PR as long as you don't + > alter it yourself. You can also trigger a rebase manually by commenting + > `@dependabot rebase`. + > + > [//]:# (dependabot-automerge-start) + > + > [//]:# (dependabot-automerge-end) + > + > --- + > + >
+ > Dependabot commands and options + >
+ > + > You can trigger Dependabot actions by commenting on this PR: + > - `@dependabot rebase` will rebase this PR + > - `@dependabot recreate` will recreate this PR, overwriting any edits + > that have been made to it + > - `@dependabot merge` will merge this PR after your CI passes on it + > - `@dependabot squash and merge` will squash and merge this PR after + > your CI passes on it + > - `@dependabot cancel merge` will cancel a previously requested merge + > and block automerging + > - `@dependabot reopen` will reopen this PR if it is closed + > - `@dependabot close` will close this PR and stop Dependabot recreating + > it. You can achieve the same result by closing it manually + > - `@dependabot show ignore conditions` will show all + > of the ignore conditions of the specified dependency + > - `@dependabot ignore this major version` will close this PR and stop + > Dependabot creating any more for this major version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this minor version` will close this PR and stop + > Dependabot creating any more for this minor version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this dependency` will close this PR and stop + > Dependabot creating any more for this dependency (unless you reopen the + > PR or upgrade to it yourself) + > + > + >
+ +- [352021b](https://github.com/ratatui/ratatui/commit/352021bc6f802762a7b82fcfbdfd9d248b412e1b) *(deps)* Bump tokio from 1.43.0 to 1.44.1 by @dependabot[bot] in [#1723](https://github.com/ratatui/ratatui/pull/1723) + + > Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.43.0 to 1.44.1. + >
+ > Release notes + >

Sourced from href="https://github.com/tokio-rs/tokio/releases">tokio's + > releases.

+ >
+ >

Tokio v1.44.1

+ >

1.44.1 (March 13th, 2025)

+ >

Fixed

+ > + >

href="https://redirect.github.com/tokio-rs/tokio/issues/7216">#7216: + > href="https://redirect.github.com/tokio-rs/tokio/pull/7216">tokio-rs/tokio#7216

+ >

Tokio v1.44.0

+ >

1.44.0 (March 7th, 2025)

+ >

This release changes the from_std method on sockets to + > panic if a blocking socket is provided. We determined this change is not + > a breaking change as Tokio is not intended to operate using blocking + > sockets. Doing so results in runtime hangs and should be considered a + > bug. Accidentally passing a blocking socket to Tokio is one of the most + > common user mistakes. If this change causes an issue for you, please + > comment on href="https://redirect.github.com/tokio-rs/tokio/issues/7172">#7172.

+ >

Added

+ > + >

Fixed

+ > + >

Changes

+ > + >

Changes to unstable APIs

+ > + >

Documented

+ > + > + >
+ >

... (truncated)

+ >
+ >
+ > Commits + > + >
+ >
+ > + > + > [![Dependabot compatibility + > score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.43.0&new-version=1.44.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) + > + > Dependabot will resolve any conflicts with this PR as long as you don't + > alter it yourself. You can also trigger a rebase manually by commenting + > `@dependabot rebase`. + > + > [//]:# (dependabot-automerge-start) + > + > [//]:# (dependabot-automerge-end) + > + > --- + > + >
+ > Dependabot commands and options + >
+ > + > You can trigger Dependabot actions by commenting on this PR: + > - `@dependabot rebase` will rebase this PR + > - `@dependabot recreate` will recreate this PR, overwriting any edits + > that have been made to it + > - `@dependabot merge` will merge this PR after your CI passes on it + > - `@dependabot squash and merge` will squash and merge this PR after + > your CI passes on it + > - `@dependabot cancel merge` will cancel a previously requested merge + > and block automerging + > - `@dependabot reopen` will reopen this PR if it is closed + > - `@dependabot close` will close this PR and stop Dependabot recreating + > it. You can achieve the same result by closing it manually + > - `@dependabot show ignore conditions` will show all + > of the ignore conditions of the specified dependency + > - `@dependabot ignore this major version` will close this PR and stop + > Dependabot creating any more for this major version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this minor version` will close this PR and stop + > Dependabot creating any more for this minor version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this dependency` will close this PR and stop + > Dependabot creating any more for this dependency (unless you reopen the + > PR or upgrade to it yourself) + > + > + >
+ +- [83774ee](https://github.com/ratatui/ratatui/commit/83774eecf008e95d8e1c86c92ef6c46090bd6c6e) *(deps)* Bump time from 0.3.37 to 0.3.39 by @dependabot[bot] in [#1708](https://github.com/ratatui/ratatui/pull/1708) + + > Bumps [time](https://github.com/time-rs/time) from 0.3.37 to 0.3.39. + >
+ > Release notes + >

Sourced from href="https://github.com/time-rs/time/releases">time's + > releases.

+ >
+ >

v0.3.39

+ >

See the href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog + > for details.

+ >

v0.3.38

+ >

See the href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog + > for details.

+ >
+ >
+ >
+ > Changelog + >

Sourced from href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">time's + > changelog.

+ >
+ >

0.3.39 [2025-03-06]

+ >

Fixed

+ >
    + >
  • Doc tests run successfully with the default feature set.
  • + >
  • wasm builds work again.
  • + >
+ >

Both of these were regressions in v0.3.38 and are now checked in + > CI.

+ >

0.3.38 [2025-03-05]

+ >

Added

+ >
    + >
  • + >

    The [year] component (in format descriptions) now + > supports a range modifier, which can be + > either standard or extended. The default is + > extended for backwards compatibility. This is + > intended as a manner to opt out of the extended range when the + > large-dates feature is enabled. + > When the large-dates feature is not enabled, the modifier + > has no effect.

    + >
  • + >
  • + >

    UtcDateTime, which is semantically equivalent to an + > OffsetDateTime with UTC as its offset. The + > advantage is that it is the same size as a + > PrimitiveDateTime and has improved operability with + > well-known formats.

    + >

    As part of this, there were some other additions:

    + >
      + >
    • utc_datetime! macro, which is similar to the + > datetime! macro but constructs a + > UtcDateTime.
    • + >
    • PrimitiveDateTime::as_utc
    • + >
    • OffsetDateTime::to_utc
    • + >
    • OffsetDateTime::checked_to_utc
    • + >
    + >
  • + >
  • + >

    time::serde::timestamp::milliseconds_i64, which is a + > module to serialize/deserialize timestamps + > as the Unix timestamp. The pre-existing module does this as an + > i128 where an i64 would + > suffice. This new module should be preferred.

    + >
  • + >
+ >

Changed

+ >
    + >
  • error::Format has had its source() + > implementation changed to no longer return a boxed value + > from the ComponentRange variant. If you were explicitly + > expecting this, you will need to update + > your code. The method API remains unchanged.
  • + >
  • [year repr:century] supports single-digit values.
  • + >
  • All format_into methods accept ?Sized + > references.
  • + >
+ >

Miscellaneous

+ >
    + >
  • Some non-exhaustive enum variants that are no longer used have been + > modified to be statically + > proven as uninhabited. The relevant fields are doc-hidden and not + > semver-guaranteed to remain as + > such, though it is unlikely to change.
  • + >
  • An unnecessary check when parsing RFC 2822 has been removed.
  • + >
  • Various methods have had their implementations changed, resulting in + > significant performance + > gains. Among the methods changed are + >
      + >
    • util::is_leap_year
    • + >
    • util::weeks_in_year
    • + >
    • Month::length
    • + >
    • Date::to_calendar_date
    • + >
    + >
  • + >
+ > + >
+ >

... (truncated)

+ >
+ >
+ > Commits + > + >
+ >
+ > + > + > [![Dependabot compatibility + > score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=time&package-manager=cargo&previous-version=0.3.37&new-version=0.3.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) + > + > Dependabot will resolve any conflicts with this PR as long as you don't + > alter it yourself. You can also trigger a rebase manually by commenting + > `@dependabot rebase`. + > + > [//]:# (dependabot-automerge-start) + > + > [//]:# (dependabot-automerge-end) + > + > --- + > + >
+ > Dependabot commands and options + >
+ > + > You can trigger Dependabot actions by commenting on this PR: + > - `@dependabot rebase` will rebase this PR + > - `@dependabot recreate` will recreate this PR, overwriting any edits + > that have been made to it + > - `@dependabot merge` will merge this PR after your CI passes on it + > - `@dependabot squash and merge` will squash and merge this PR after + > your CI passes on it + > - `@dependabot cancel merge` will cancel a previously requested merge + > and block automerging + > - `@dependabot reopen` will reopen this PR if it is closed + > - `@dependabot close` will close this PR and stop Dependabot recreating + > it. You can achieve the same result by closing it manually + > - `@dependabot show ignore conditions` will show all + > of the ignore conditions of the specified dependency + > - `@dependabot ignore this major version` will close this PR and stop + > Dependabot creating any more for this major version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this minor version` will close this PR and stop + > Dependabot creating any more for this minor version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this dependency` will close this PR and stop + > Dependabot creating any more for this dependency (unless you reopen the + > PR or upgrade to it yourself) + > + > + >
+ +- [5710b7a](https://github.com/ratatui/ratatui/commit/5710b7a8d9630eb36fe3d87b748bf5cf2c7b1ec3) *(deps)* Bump rstest from 0.24.0 to 0.25.0 by @dependabot[bot] in [#1695](https://github.com/ratatui/ratatui/pull/1695) + + > Bumps [rstest](https://github.com/la10736/rstest) from 0.24.0 to 0.25.0. + >
+ > Release notes + >

Sourced from href="https://github.com/la10736/rstest/releases">rstest's + > releases.

+ >
+ >

0.25.0

+ >

What's Changed

+ > + >

New Contributors

+ > + >

Full Changelog: href="https://github.com/la10736/rstest/compare/v0.24.0...v0.25.0">https://github.com/la10736/rstest/compare/v0.24.0...v0.25.0

+ >
+ >
+ >
+ > Changelog + >

Sourced from href="https://github.com/la10736/rstest/blob/master/CHANGELOG.md">rstest's + > changelog.

+ >
+ >

[0.25.0] 2025/3/2

+ >

Changed

+ > + >

Add

+ > + >
+ >
+ >
+ > Commits + > + >
+ >
+ > + > + > [![Dependabot compatibility + > score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rstest&package-manager=cargo&previous-version=0.24.0&new-version=0.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) + > + > Dependabot will resolve any conflicts with this PR as long as you don't + > alter it yourself. You can also trigger a rebase manually by commenting + > `@dependabot rebase`. + > + > [//]:# (dependabot-automerge-start) + > + > [//]:# (dependabot-automerge-end) + > + > --- + > + >
+ > Dependabot commands and options + >
+ > + > You can trigger Dependabot actions by commenting on this PR: + > - `@dependabot rebase` will rebase this PR + > - `@dependabot recreate` will recreate this PR, overwriting any edits + > that have been made to it + > - `@dependabot merge` will merge this PR after your CI passes on it + > - `@dependabot squash and merge` will squash and merge this PR after + > your CI passes on it + > - `@dependabot cancel merge` will cancel a previously requested merge + > and block automerging + > - `@dependabot reopen` will reopen this PR if it is closed + > - `@dependabot close` will close this PR and stop Dependabot recreating + > it. You can achieve the same result by closing it manually + > - `@dependabot show ignore conditions` will show all + > of the ignore conditions of the specified dependency + > - `@dependabot ignore this major version` will close this PR and stop + > Dependabot creating any more for this major version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this minor version` will close this PR and stop + > Dependabot creating any more for this minor version (unless you reopen + > the PR or upgrade to it yourself) + > - `@dependabot ignore this dependency` will close this PR and stop + > Dependabot creating any more for this dependency (unless you reopen the + > PR or upgrade to it yourself) + > + > + >
+ + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-v0.30.0-alpha.2...ratatui-v0.30.0-alpha.3 + + + +## ratatui-termion - [0.1.0-alpha.3](https://github.com/ratatui/ratatui/compare/ratatui-termion-v0.1.0-alpha.2...ratatui-termion-v0.1.0-alpha.3) - 2025-05-13 + +### Features + +- [007713e](https://github.com/ratatui/ratatui/commit/007713e50a083d5e7a4963ca829b4622d56828b1) *(no_std)* Replace `Backend`'s `io::Error` usages with associated `Error` type by @j-g00da in [#1778](https://github.com/ratatui/ratatui/pull/1778) [**breaking**] + > + > Resolves #1775 + > + > BREAKING CHANGE:Custom backends now have to implement `Backend::Error` + > and `Backend::clear_region`. Additionally some generic `Backend` usage + > will have to explicitly set trait bounds for `Backend::Error`. + +- [53cdbbc](https://github.com/ratatui/ratatui/commit/53cdbbccd5d3522c004e483433a02ef6d64fab01) *(uncategorized)* Enable serde propagation to backend crates (crossterm, termion) by @ArjunKrish7356 in [#1812](https://github.com/ratatui/ratatui/pull/1812) + + > This PR propagates the serde feature from the main ratatui crate to the + > ratatui-crossterm and ratatui-termion backend crates. Solves #1805 + +### Bug Fixes + +- [416ebdf](https://github.com/ratatui/ratatui/commit/416ebdf8c86d1a7a98385908f7c8c560e86770ac) *(uncategorized)* Correct clippy errors introduced by rust 1.86.0 update by @j-g00da in [#1755](https://github.com/ratatui/ratatui/pull/1755) + + > New version of rust (1.86.0) caused CI to fail. + +### Styling + +- [2739391](https://github.com/ratatui/ratatui/commit/2739391950eddd129c25cd4ffddb28b99eed8cf5) *(uncategorized)* Use Module imports_granularity by @joshka in [#1728](https://github.com/ratatui/ratatui/pull/1728) + + > I was swayed by the arguments about this made by the compiler team In + > and decided to + > look at how this organization affects ratatui. I found this reduces the + > number of lines across the codebase by about 350 and makes the imports + > more readable and definitely more greppable as you usually only have + > to read a single line. I've found in the past that maintaining imports + > regularly leads to merge conflicts which have to be resolved by hand + > and this change should reduce the likelihood of that happening. + > + > Main change is in rustfmt.toml, and the rest is just the result of + > running `cargo xtask format`. + > + > While implementing this, cargo machete brings up that the various + > backend crates are unused by the example crates. + > + > The re-export of each backend crate under ratatui is to make it possible + > for libs that rely on a specific version of ratatui to use the same + > version of the backend crate. Apps in general should use the backend + > crate directly rather than through ratatui as this is less confusing. + > + > - Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the + > examples. + > - Adds the backend crate to the dependencies of the examples that use + > the backend crate directly. + +### Miscellaneous Tasks + +- [d88cd29](https://github.com/ratatui/ratatui/commit/d88cd2907906e38d73ac4359ece36527436d686a) *(uncategorized)* Add 'const' to functions where possible. by @MatrixFrog in [#1802](https://github.com/ratatui/ratatui/pull/1802) + + > The Clippy check for this (missing_const_for_fn) is already enabled, but + > catches more cases in upcoming toolchain versions. + > + > This is part of the work to unblock #1727 + + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-termion-v0.1.0-alpha.2...ratatui-termion-v0.1.0-alpha.3 + + + +## ratatui-termwiz - [0.1.0-alpha.3](https://github.com/ratatui/ratatui/compare/ratatui-termwiz-v0.1.0-alpha.2...ratatui-termwiz-v0.1.0-alpha.3) - 2025-05-13 + +### Features + +- [007713e](https://github.com/ratatui/ratatui/commit/007713e50a083d5e7a4963ca829b4622d56828b1) *(no_std)* Replace `Backend`'s `io::Error` usages with associated `Error` type by @j-g00da in [#1778](https://github.com/ratatui/ratatui/pull/1778) [**breaking**] + > + > Resolves #1775 + > + > BREAKING CHANGE:Custom backends now have to implement `Backend::Error` + > and `Backend::clear_region`. Additionally some generic `Backend` usage + > will have to explicitly set trait bounds for `Backend::Error`. + +- [53cdbbc](https://github.com/ratatui/ratatui/commit/53cdbbccd5d3522c004e483433a02ef6d64fab01) *(uncategorized)* Enable serde propagation to backend crates (crossterm, termion) by @ArjunKrish7356 in [#1812](https://github.com/ratatui/ratatui/pull/1812) + + > This PR propagates the serde feature from the main ratatui crate to the + > ratatui-crossterm and ratatui-termion backend crates. Solves #1805 + +### Styling + +- [2739391](https://github.com/ratatui/ratatui/commit/2739391950eddd129c25cd4ffddb28b99eed8cf5) *(uncategorized)* Use Module imports_granularity by @joshka in [#1728](https://github.com/ratatui/ratatui/pull/1728) + + > I was swayed by the arguments about this made by the compiler team In + > and decided to + > look at how this organization affects ratatui. I found this reduces the + > number of lines across the codebase by about 350 and makes the imports + > more readable and definitely more greppable as you usually only have + > to read a single line. I've found in the past that maintaining imports + > regularly leads to merge conflicts which have to be resolved by hand + > and this change should reduce the likelihood of that happening. + > + > Main change is in rustfmt.toml, and the rest is just the result of + > running `cargo xtask format`. + > + > While implementing this, cargo machete brings up that the various + > backend crates are unused by the example crates. + > + > The re-export of each backend crate under ratatui is to make it possible + > for libs that rely on a specific version of ratatui to use the same + > version of the backend crate. Apps in general should use the backend + > crate directly rather than through ratatui as this is less confusing. + > + > - Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the + > examples. + > - Adds the backend crate to the dependencies of the examples that use + > the backend crate directly. + +### Miscellaneous Tasks + +- [d88cd29](https://github.com/ratatui/ratatui/commit/d88cd2907906e38d73ac4359ece36527436d686a) *(uncategorized)* Add 'const' to functions where possible. by @MatrixFrog in [#1802](https://github.com/ratatui/ratatui/pull/1802) + + > The Clippy check for this (missing_const_for_fn) is already enabled, but + > catches more cases in upcoming toolchain versions. + > + > This is part of the work to unblock #1727 + +- [bb06889](https://github.com/ratatui/ratatui/commit/bb068892c93713befbc8dab04577cbc2a59cedec) *(uncategorized)* Fix io_other_error clippy lints by @joshka in [#1756](https://github.com/ratatui/ratatui/pull/1756) + + > Pre-emptive fix for new lint to be added in 1.87 (currently in beta). + > + > https://rust-lang.github.io/rust-clippy/master/index.html\#io_other_error + + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-termwiz-v0.1.0-alpha.2...ratatui-termwiz-v0.1.0-alpha.3 + + + +## ratatui-macros - [0.7.0-alpha.2](https://github.com/ratatui/ratatui/compare/ratatui-macros-v0.7.0-alpha.1...ratatui-macros-v0.7.0-alpha.2) - 2025-05-13 + +### Bug Fixes + +- [2e54d5e](https://github.com/ratatui/ratatui/commit/2e54d5e22c80b7ecbe7227b1d2df232374820e38) *(macros)* Use $crate re-export in text macro by @airblast-dev in [#1832](https://github.com/ratatui/ratatui/pull/1832) + + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-macros-v0.7.0-alpha.1...ratatui-macros-v0.7.0-alpha.2 + + + +## ratatui-widgets - [0.3.0-alpha.3](https://github.com/ratatui/ratatui/compare/ratatui-widgets-v0.3.0-alpha.2...ratatui-widgets-v0.3.0-alpha.3) - 2025-05-13 + +### Features + +- [92a19cb](https://github.com/ratatui/ratatui/commit/92a19cb6040dfced50ba384891ab0063a22b445d) *(list)* Highlight symbol styling by @airblast-dev in [#1595](https://github.com/ratatui/ratatui/pull/1595) [**breaking**] + + > Allow styling for `List`'s highlight symbol + > + > This change makes it so anything that implements `Into` can be + > used as a highlight symbol. + > + > BREAKING CHANGE:`List::highlight_symbol` can no longer be used in const + > context + > + > BREAKING CHANGE:`List::highlight_symbol` accepted `&str`. Conversion + > methods that rely on type inference will need to be rewritten as the + > compiler cannot infer the type. + > + > closes:https://github.com/ratatui/ratatui/issues/1443 + > + > --------- + +- [3e1c72f](https://github.com/ratatui/ratatui/commit/3e1c72fb27cae132bc8b5f24a4ae875921dfb00d) *(no_std)* Make ratatui compatible with `#![no_std]` by @j-g00da in [#1794](https://github.com/ratatui/ratatui/pull/1794) [**breaking**] + > + > Resolves #1781 + > + > This PR makes it possible to compile ratatui with `#![no_std]`. + > Also makes me answer "We Are So Embedded" to "Are We Embedded Yet?" + +- [a42a17e](https://github.com/ratatui/ratatui/commit/a42a17e1847c350c4909295d98f3c37af97e1e31) *(no_std)* Make `ratatui-widgets` `no_std` by @j-g00da in [#1779](https://github.com/ratatui/ratatui/pull/1779) + > + > Resolves #1776 + +- [5a232a3](https://github.com/ratatui/ratatui/commit/5a232a31153b147dbde85ba13a11c11b62994a86) *(no_std)* Remove redundant `std` usages in `ratatui-widgets` by @j-g00da in [#1762](https://github.com/ratatui/ratatui/pull/1762) + +- [4fcd238](https://github.com/ratatui/ratatui/commit/4fcd238e1e981fb48a7c4cb9845a72c8960f19d5) *(uncategorized)* Support no-std for calendar widget by @joshka in [#1852](https://github.com/ratatui/ratatui/pull/1852) + + > Removes the CalendarEventStore::today() function in no-std environments + +- [fcb47d6](https://github.com/ratatui/ratatui/commit/fcb47d60f3df205c18f5fa9459e9ba2c8d0c9649) *(uncategorized)* Rename Alignment to HorizontalAlignment and add VerticalAlignment by @joshka in [#1735](https://github.com/ratatui/ratatui/pull/1735) [**breaking**] + + > We don't anticipate removing or deprecating the type alias in the near + > future, but it is recommended to update your imports to use the new + > name. + > + > Added a VerticalAlignment enum to make the API more consistent. We don't + > have a specific use case for it yet, but it's better to add it now and + > be able to use it in the future. + > + > BREAKING-CHANGE:The `Alignment` enum has been renamed to + > `HorizontalAlignment` to better reflect its purpose. A type alias has + > been added to maintain backwards compatibility, however there are some + > cases where type aliases are not enough to maintain backwards + > compatibility. E.g. when using glob imports to import all the enum + > variants. This should not affect most users, but it is recommended to + > update your imports to use the new name. + > + > ```diff + > - use ratatui::layout::Alignment; + > + use ratatui::layout::HorizontalAlignment; + > + > - use Alignment::*; + > + use HorizontalAlignment::*; + > ``` + +### Bug Fixes + +- [00da8c6](https://github.com/ratatui/ratatui/commit/00da8c620345397c6815267e6d8e19c1eacfe1c2) *(no_std)* Provide `f64` polyfills for `no_std` compatibility by @j-g00da in [#1840](https://github.com/ratatui/ratatui/pull/1840) + > + > Related:https://github.com/rust-lang/rust/issues/137578 + +- [c238aca](https://github.com/ratatui/ratatui/commit/c238aca83a1b171d2ba7b38942fd5352f5a7e554) *(uncategorized)* `padding_right()` should set right padding instead of left by @sxyazi in [#1837](https://github.com/ratatui/ratatui/pull/1837) + + > Fixes https://github.com/ratatui/ratatui/issues/1836 + +- [416ebdf](https://github.com/ratatui/ratatui/commit/416ebdf8c86d1a7a98385908f7c8c560e86770ac) *(uncategorized)* Correct clippy errors introduced by rust 1.86.0 update by @j-g00da in [#1755](https://github.com/ratatui/ratatui/pull/1755) + + > New version of rust (1.86.0) caused CI to fail. + +- [4eac5b2](https://github.com/ratatui/ratatui/commit/4eac5b2849f7807c59e8164786e467137e17df86) *(uncategorized)* Make deprecation notes more helpful by @joshka in [#1702](https://github.com/ratatui/ratatui/pull/1702) + + > AI coding assistants use the deprecation notes to automatically suggest + > fixes. This commit updates the deprecation notes to push those tools to + > suggest the correct replacement methods and types. + > + > Specifically, AI tools often suggest using `Buffer::get(x, y)`, because + > of their training data where this was prevalent. When fixing these + > deprecations, they often incorrectly suggest using `Buffer::get(x, y)` + > instead of `Buffer[(x, y)]`. + +### Refactor + +- [8d60e96](https://github.com/ratatui/ratatui/commit/8d60e96b2bfcdc0a7f9b6d17d79dbf36f61182b6) *(examples)* Use crossterm event methods by @joshka in [#1792](https://github.com/ratatui/ratatui/pull/1792) + + > Crossterm 0.29 introduced methods to easily check / extract the event + > type. E.g. as_key_press_event() and is_key_press(). This commit + > updates the examples to use these methods instead of matching on + > the event type. This makes the code cleaner and easier to read. + > + > Also does a general cleanup of the event handling code in the examples. + +- [02e53de](https://github.com/ratatui/ratatui/commit/02e53de0f82bc2364f2ba4345cc5a635347e3eb4) *(uncategorized)* Make use of iter::repeat_n() by @cgzones in [#1788](https://github.com/ratatui/ratatui/pull/1788) + + > Applied via clippy --fix. + > Available since 1.82.0. + +### Performance + +- [ba9eed7](https://github.com/ratatui/ratatui/commit/ba9eed774230d160016605048762cd73944c36e6) *(table)* Replace while loop with simple min operation by @EdJoPaTo in [#1747](https://github.com/ratatui/ratatui/pull/1747) + +### Styling + +- [2739391](https://github.com/ratatui/ratatui/commit/2739391950eddd129c25cd4ffddb28b99eed8cf5) *(uncategorized)* Use Module imports_granularity by @joshka in [#1728](https://github.com/ratatui/ratatui/pull/1728) + + > I was swayed by the arguments about this made by the compiler team In + > and decided to + > look at how this organization affects ratatui. I found this reduces the + > number of lines across the codebase by about 350 and makes the imports + > more readable and definitely more greppable as you usually only have + > to read a single line. I've found in the past that maintaining imports + > regularly leads to merge conflicts which have to be resolved by hand + > and this change should reduce the likelihood of that happening. + > + > Main change is in rustfmt.toml, and the rest is just the result of + > running `cargo xtask format`. + > + > While implementing this, cargo machete brings up that the various + > backend crates are unused by the example crates. + > + > The re-export of each backend crate under ratatui is to make it possible + > for libs that rely on a specific version of ratatui to use the same + > version of the backend crate. Apps in general should use the backend + > crate directly rather than through ratatui as this is less confusing. + > + > - Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the + > examples. + > - Adds the backend crate to the dependencies of the examples that use + > the backend crate directly. + +### Miscellaneous Tasks + +- [b4a71e5](https://github.com/ratatui/ratatui/commit/b4a71e5fd5c5a77efff4a48920e29171face1e79) *(lint)* Add `std` instead of `core`/`alloc` lints to `ratatui-widgets` by @j-g00da in [#1763](https://github.com/ratatui/ratatui/pull/1763) + > + > Resolves #1761 + +- [60a8191](https://github.com/ratatui/ratatui/commit/60a81913ede6ebc23b53b3e4e3a54ee0171d9447) *(widgets)* Move crossterm to dev-dependencies by @j-g00da in [#1834](https://github.com/ratatui/ratatui/pull/1834) + + > Crossterm in widgets is used only in tests. + +- [d88cd29](https://github.com/ratatui/ratatui/commit/d88cd2907906e38d73ac4359ece36527436d686a) *(uncategorized)* Add 'const' to functions where possible. by @MatrixFrog in [#1802](https://github.com/ratatui/ratatui/pull/1802) + + > The Clippy check for this (missing_const_for_fn) is already enabled, but + > catches more cases in upcoming toolchain versions. + > + > This is part of the work to unblock #1727 + +- [0f80c5e](https://github.com/ratatui/ratatui/commit/0f80c5e87eb4e47c818a6bd8b0002971920c65a0) *(uncategorized)* Use expect() instead of allow() for lint overrides by @cgzones in [#1786](https://github.com/ratatui/ratatui/pull/1786) [**breaking**] + > + > BREAKING CHANGE:MSRV is now 1.81 + +### Build + +- [daeba85](https://github.com/ratatui/ratatui/commit/daeba85f144ead00803c7540fa39ff6d623321c7) *(deps)* Bump `kasuari` and `line-clipping` by @j-g00da in [#1844](https://github.com/ratatui/ratatui/pull/1844) + + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-widgets-v0.3.0-alpha.2...ratatui-widgets-v0.3.0-alpha.3 + + + +## ratatui-crossterm - [0.1.0-alpha.3](https://github.com/ratatui/ratatui/compare/ratatui-crossterm-v0.1.0-alpha.2...ratatui-crossterm-v0.1.0-alpha.3) - 2025-05-13 + +### Features + +- [007713e](https://github.com/ratatui/ratatui/commit/007713e50a083d5e7a4963ca829b4622d56828b1) *(no_std)* Replace `Backend`'s `io::Error` usages with associated `Error` type by @j-g00da in [#1778](https://github.com/ratatui/ratatui/pull/1778) [**breaking**] + > + > Resolves #1775 + > + > BREAKING CHANGE:Custom backends now have to implement `Backend::Error` + > and `Backend::clear_region`. Additionally some generic `Backend` usage + > will have to explicitly set trait bounds for `Backend::Error`. + +- [53cdbbc](https://github.com/ratatui/ratatui/commit/53cdbbccd5d3522c004e483433a02ef6d64fab01) *(uncategorized)* Enable serde propagation to backend crates (crossterm, termion) by @ArjunKrish7356 in [#1812](https://github.com/ratatui/ratatui/pull/1812) + + > This PR propagates the serde feature from the main ratatui crate to the + > ratatui-crossterm and ratatui-termion backend crates. Solves #1805 + +### Styling + +- [2739391](https://github.com/ratatui/ratatui/commit/2739391950eddd129c25cd4ffddb28b99eed8cf5) *(uncategorized)* Use Module imports_granularity by @joshka in [#1728](https://github.com/ratatui/ratatui/pull/1728) + + > I was swayed by the arguments about this made by the compiler team In + > and decided to + > look at how this organization affects ratatui. I found this reduces the + > number of lines across the codebase by about 350 and makes the imports + > more readable and definitely more greppable as you usually only have + > to read a single line. I've found in the past that maintaining imports + > regularly leads to merge conflicts which have to be resolved by hand + > and this change should reduce the likelihood of that happening. + > + > Main change is in rustfmt.toml, and the rest is just the result of + > running `cargo xtask format`. + > + > While implementing this, cargo machete brings up that the various + > backend crates are unused by the example crates. + > + > The re-export of each backend crate under ratatui is to make it possible + > for libs that rely on a specific version of ratatui to use the same + > version of the backend crate. Apps in general should use the backend + > crate directly rather than through ratatui as this is less confusing. + > + > - Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the + > examples. + > - Adds the backend crate to the dependencies of the examples that use + > the backend crate directly. + +### Miscellaneous Tasks + +- [d88cd29](https://github.com/ratatui/ratatui/commit/d88cd2907906e38d73ac4359ece36527436d686a) *(uncategorized)* Add 'const' to functions where possible. by @MatrixFrog in [#1802](https://github.com/ratatui/ratatui/pull/1802) + + > The Clippy check for this (missing_const_for_fn) is already enabled, but + > catches more cases in upcoming toolchain versions. + > + > This is part of the work to unblock #1727 + +- [bb06889](https://github.com/ratatui/ratatui/commit/bb068892c93713befbc8dab04577cbc2a59cedec) *(uncategorized)* Fix io_other_error clippy lints by @joshka in [#1756](https://github.com/ratatui/ratatui/pull/1756) + + > Pre-emptive fix for new lint to be added in 1.87 (currently in beta). + > + > https://rust-lang.github.io/rust-clippy/master/index.html\#io_other_error + + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-crossterm-v0.1.0-alpha.2...ratatui-crossterm-v0.1.0-alpha.3 + + + +## ratatui-core - [0.1.0-alpha.4](https://github.com/ratatui/ratatui/compare/ratatui-core-v0.1.0-alpha.3...ratatui-core-v0.1.0-alpha.4) - 2025-05-13 + +### Features + +- [3e1c72f](https://github.com/ratatui/ratatui/commit/3e1c72fb27cae132bc8b5f24a4ae875921dfb00d) *(no_std)* Make ratatui compatible with `#![no_std]` by @j-g00da in [#1794](https://github.com/ratatui/ratatui/pull/1794) [**breaking**] + > + > Resolves #1781 + > + > This PR makes it possible to compile ratatui with `#![no_std]`. + > Also makes me answer "We Are So Embedded" to "Are We Embedded Yet?" + +- [ab48c06](https://github.com/ratatui/ratatui/commit/ab48c06171724ae58d98687d90e999b76890c2e7) *(no_std)* Option to disable layout cache for `no_std` compatibility by @j-g00da in [#1795](https://github.com/ratatui/ratatui/pull/1795) [**breaking**] + > + > Resolves #1780 + > + > BREAKING CHANGE:Disabling `default-features` will now disable layout + > cache, which can have a negative impact on performance. + > + > `Layout::init_cache` and `Layout::DEFAULT_CACHE_SIZE` are now only + > available if `layout-cache` feature is enabled. + +- [09173d1](https://github.com/ratatui/ratatui/commit/09173d182912ab92e67b8aa7a4cb51862b05cb25) *(no_std)* Make `TestBackend::Error` `Infallible` by @j-g00da in [#1823](https://github.com/ratatui/ratatui/pull/1823) [**breaking**] + > + > BREAKING CHANGE:`TestBackend` now uses `core::convert::Infallible` for + > error handling instead of `std::io::Error` + +- [007713e](https://github.com/ratatui/ratatui/commit/007713e50a083d5e7a4963ca829b4622d56828b1) *(no_std)* Replace `Backend`'s `io::Error` usages with associated `Error` type by @j-g00da in [#1778](https://github.com/ratatui/ratatui/pull/1778) [**breaking**] + > + > Resolves #1775 + > + > BREAKING CHANGE:Custom backends now have to implement `Backend::Error` + > and `Backend::clear_region`. Additionally some generic `Backend` usage + > will have to explicitly set trait bounds for `Backend::Error`. + +- [ebe10cd](https://github.com/ratatui/ratatui/commit/ebe10cd81fc7392d26e6b93ae8d512175404f7a7) *(no_std)* Remove redundant `std` usages in `ratatui-core` by @j-g00da in [#1753](https://github.com/ratatui/ratatui/pull/1753) + + > Resolves https://github.com/ratatui/ratatui/issues/1751 + +- [08b08cc](https://github.com/ratatui/ratatui/commit/08b08cc45b60274a48824d488127a014e083d95a) *(rect)* Centering by @TadoTheMiner in [#1814](https://github.com/ratatui/ratatui/pull/1814) + > + > Resolves #617 + +- [6836a69](https://github.com/ratatui/ratatui/commit/6836a6903e7832d0c9f39d57fc9c30a80fa7f4e9) *(uncategorized)* Implement styled for other primitives by @aschey in [#1684](https://github.com/ratatui/ratatui/pull/1684) + +- [fcb47d6](https://github.com/ratatui/ratatui/commit/fcb47d60f3df205c18f5fa9459e9ba2c8d0c9649) *(uncategorized)* Rename Alignment to HorizontalAlignment and add VerticalAlignment by @joshka in [#1735](https://github.com/ratatui/ratatui/pull/1735) [**breaking**] + + > We don't anticipate removing or deprecating the type alias in the near + > future, but it is recommended to update your imports to use the new + > name. + > + > Added a VerticalAlignment enum to make the API more consistent. We don't + > have a specific use case for it yet, but it's better to add it now and + > be able to use it in the future. + > + > BREAKING-CHANGE:The `Alignment` enum has been renamed to + > `HorizontalAlignment` to better reflect its purpose. A type alias has + > been added to maintain backwards compatibility, however there are some + > cases where type aliases are not enough to maintain backwards + > compatibility. E.g. when using glob imports to import all the enum + > variants. This should not affect most users, but it is recommended to + > update your imports to use the new name. + > + > ```diff + > - use ratatui::layout::Alignment; + > + use ratatui::layout::HorizontalAlignment; + > + > - use Alignment::*; + > + use HorizontalAlignment::*; + > ``` + +- [2714d6b](https://github.com/ratatui/ratatui/commit/2714d6b9c3d2dab1537c9ced6cdb4571429bd1a5) *(uncategorized)* Add array and tuple RGB color conversion methods by @joshka in [#1703](https://github.com/ratatui/ratatui/pull/1703) + + > Other crates (e.g. colorgrad) that deal with colors can convert colors + > to a tuple of 3 or 4 u8 values. This commit adds conversion methods from + > these types to a `Color::Rgb` instance. Any alpha value is ignored. + > + > ```rust + > Color::from([255, 0, 0]); + > Color::from((255, 0, 0)); + > Color::from([255, 0, 0, 255]); + > Color::from((255, 0, 0, 255)); + > ``` + +### Bug Fixes + +- [9314312](https://github.com/ratatui/ratatui/commit/93143126b3dc70f437a6f05f17bba5d71e13083e) *(layout)* Feature flag cache related types by @joshka in [#1842](https://github.com/ratatui/ratatui/pull/1842) + +- [2dd1977](https://github.com/ratatui/ratatui/commit/2dd1977c594a5f276493ca63ecb82e5a4a5f0dc2) *(layout-cache)* Import `NonZeroUsize` only when `layout-cache` is enabled by @j-g00da in [#1839](https://github.com/ratatui/ratatui/pull/1839) + + > This silences unused import warning, when `layout-cache` is disabled. + +- [79d5165](https://github.com/ratatui/ratatui/commit/79d5165caed81db292073c18337fa69e83a20cf1) *(no_std)* Propagate `std` feature flag to dependencies by @j-g00da in [#1838](https://github.com/ratatui/ratatui/pull/1838) + + > Disables `std` feature flags in dependencies and only enables them with + > `ratatui` and `ratatui-core`'s `std` feature flag. This partially fixes the + > issue of still depending on `std`, when `std` feature flag is disabled. + +- [00da8c6](https://github.com/ratatui/ratatui/commit/00da8c620345397c6815267e6d8e19c1eacfe1c2) *(no_std)* Provide `f64` polyfills for `no_std` compatibility by @j-g00da in [#1840](https://github.com/ratatui/ratatui/pull/1840) + > + > Related:https://github.com/rust-lang/rust/issues/137578 + +- [c90ba97](https://github.com/ratatui/ratatui/commit/c90ba9781e5f4b6d061cafcb44ee7b4138f0b991) *(uncategorized)* Avoid unnecessary imports in minimal build by @cgzones in [#1787](https://github.com/ratatui/ratatui/pull/1787) + > + > core::ops::Range is only used with the feature `scrolling-regions`. + > Ensure a minimal `cargo check` reports no warnings. + +- [416ebdf](https://github.com/ratatui/ratatui/commit/416ebdf8c86d1a7a98385908f7c8c560e86770ac) *(uncategorized)* Correct clippy errors introduced by rust 1.86.0 update by @j-g00da in [#1755](https://github.com/ratatui/ratatui/pull/1755) + + > New version of rust (1.86.0) caused CI to fail. + +- [4eac5b2](https://github.com/ratatui/ratatui/commit/4eac5b2849f7807c59e8164786e467137e17df86) *(uncategorized)* Make deprecation notes more helpful by @joshka in [#1702](https://github.com/ratatui/ratatui/pull/1702) + + > AI coding assistants use the deprecation notes to automatically suggest + > fixes. This commit updates the deprecation notes to push those tools to + > suggest the correct replacement methods and types. + > + > Specifically, AI tools often suggest using `Buffer::get(x, y)`, because + > of their training data where this was prevalent. When fixing these + > deprecations, they often incorrectly suggest using `Buffer::get(x, y)` + > instead of `Buffer[(x, y)]`. + +### Refactor + +- [07bec55](https://github.com/ratatui/ratatui/commit/07bec55b7d55fab338f9ab8571a80277d4890753) *(no_std)* Make usages of std explicit in ratatui-core. by @ed-2100 in [#1782](https://github.com/ratatui/ratatui/pull/1782) + + > ### This commit does the following: + > + > - Adds `#[no_std]` to `lib.rs`. + > - Adds `extern crate std;` to `lib.rs`. + > - Updates `ratatui-core` to explicitly `use` items from std and alloc. + > - Prefers `use`-ing alloc over std when possible. + > + > ### Explanation: + > + > This allows usages of `std` in `ratatui-core` to be clearly pointed out + > and dealt with individually. + > + > Eventually, when `std` is to be feature gated, the associated commit + > will be much cleaner. + +- [02e53de](https://github.com/ratatui/ratatui/commit/02e53de0f82bc2364f2ba4345cc5a635347e3eb4) *(uncategorized)* Make use of iter::repeat_n() by @cgzones in [#1788](https://github.com/ratatui/ratatui/pull/1788) + + > Applied via clippy --fix. + > Available since 1.82.0. + +### Documentation + +- [2be9ccb](https://github.com/ratatui/ratatui/commit/2be9ccb120d80cf2f98e434bb7b9da5613dfe180) *(layout)* Remove unnecessary path prefix by @j-g00da in [#1766](https://github.com/ratatui/ratatui/pull/1766) + +- [b669ceb](https://github.com/ratatui/ratatui/commit/b669cebcaf51cdf8585c48aec0f7282bf492df6c) *(layout)* Change `cassowary` to `kasuari` crate reference by @j-g00da in [#1765](https://github.com/ratatui/ratatui/pull/1765) + +### Styling + +- [2739391](https://github.com/ratatui/ratatui/commit/2739391950eddd129c25cd4ffddb28b99eed8cf5) *(uncategorized)* Use Module imports_granularity by @joshka in [#1728](https://github.com/ratatui/ratatui/pull/1728) + + > I was swayed by the arguments about this made by the compiler team In + > and decided to + > look at how this organization affects ratatui. I found this reduces the + > number of lines across the codebase by about 350 and makes the imports + > more readable and definitely more greppable as you usually only have + > to read a single line. I've found in the past that maintaining imports + > regularly leads to merge conflicts which have to be resolved by hand + > and this change should reduce the likelihood of that happening. + > + > Main change is in rustfmt.toml, and the rest is just the result of + > running `cargo xtask format`. + > + > While implementing this, cargo machete brings up that the various + > backend crates are unused by the example crates. + > + > The re-export of each backend crate under ratatui is to make it possible + > for libs that rely on a specific version of ratatui to use the same + > version of the backend crate. Apps in general should use the backend + > crate directly rather than through ratatui as this is less confusing. + > + > - Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the + > examples. + > - Adds the backend crate to the dependencies of the examples that use + > the backend crate directly. + +### Testing + +- [deb1b8e](https://github.com/ratatui/ratatui/commit/deb1b8ec43d8c9e5b1a5469dc4fa4c7e86d86d9b) *(uncategorized)* Ensure Style::new() and Style::default() are equivalent by @cgzones in [#1789](https://github.com/ratatui/ratatui/pull/1789) + +### Miscellaneous Tasks + +- [cef617c](https://github.com/ratatui/ratatui/commit/cef617cc35b9ddba97bb435a8f70f6b8d71ab810) *(lint)* Add `std` instead of `core`/`alloc` lints to `ratatui-core` by @j-g00da in [#1759](https://github.com/ratatui/ratatui/pull/1759) + > + > Resolves #1752 + +- [d88cd29](https://github.com/ratatui/ratatui/commit/d88cd2907906e38d73ac4359ece36527436d686a) *(uncategorized)* Add 'const' to functions where possible. by @MatrixFrog in [#1802](https://github.com/ratatui/ratatui/pull/1802) + + > The Clippy check for this (missing_const_for_fn) is already enabled, but + > catches more cases in upcoming toolchain versions. + > + > This is part of the work to unblock #1727 + +- [bb06889](https://github.com/ratatui/ratatui/commit/bb068892c93713befbc8dab04577cbc2a59cedec) *(uncategorized)* Fix io_other_error clippy lints by @joshka in [#1756](https://github.com/ratatui/ratatui/pull/1756) + + > Pre-emptive fix for new lint to be added in 1.87 (currently in beta). + > + > https://rust-lang.github.io/rust-clippy/master/index.html\#io_other_error + +- [0f80c5e](https://github.com/ratatui/ratatui/commit/0f80c5e87eb4e47c818a6bd8b0002971920c65a0) *(uncategorized)* Use expect() instead of allow() for lint overrides by @cgzones in [#1786](https://github.com/ratatui/ratatui/pull/1786) [**breaking**] + > + > BREAKING CHANGE:MSRV is now 1.81 + +- [fe8577c](https://github.com/ratatui/ratatui/commit/fe8577c0704495c0a98705bc1b036b1a60123f02) *(uncategorized)* Remove paste dependency by @joshka in [#1713](https://github.com/ratatui/ratatui/pull/1713) + + > The paste crate is no longer maintained. Replaces the usages of this in + > the Stylize declarative macros with hard coded values. These macros are + > internal implementation deatil to ratatui and so the changes should have + > no impact on users. + > + > Fixes:https://github.com/ratatui/ratatui/issues/1712 + +### Build + +- [daeba85](https://github.com/ratatui/ratatui/commit/daeba85f144ead00803c7540fa39ff6d623321c7) *(deps)* Bump `kasuari` and `line-clipping` by @j-g00da in [#1844](https://github.com/ratatui/ratatui/pull/1844) + +- [fc4b996](https://github.com/ratatui/ratatui/commit/fc4b996c596aec8316427bc71677fbfcce68caed) *(deps)* Update compact_str requirement from 0.8.1 to 0.9.0 by @musicinmybrain in [#1783](https://github.com/ratatui/ratatui/pull/1783) + + > Looking at + > https://github.com/ParkMyCar/compact_str/blob/v0.9.0/CHANGELOG.md#090, + > there are a few API changes, but it doesn’t seem like anything there + > should be a problem given that `cargo test` still passes in + > `ratatui-core/`. + +- [3d5b250](https://github.com/ratatui/ratatui/commit/3d5b250e74fc83fb580f50b617472be7cfb4fd4b) *(deps)* Use kasuari instead of cassowary by @joshka in [#1758](https://github.com/ratatui/ratatui/pull/1758) + + > [Kasuari](https://github.com/ratatui/kasuari) is a maintained fork of Cassowary. + + + + +**Full Changelog**: https://github.com/ratatui/ratatui/compare/ratatui-core-v0.1.0-alpha.3...ratatui-core-v0.1.0-alpha.4 + + + ## ratatui - [0.30.0-alpha.2](https://github.com/ratatui/ratatui/compare/ratatui-v0.30.0-alpha.1...ratatui-v0.30.0-alpha.2) - 2025-03-01 ### Features diff --git a/Cargo.lock b/Cargo.lock index 80cc08d5..580ae5e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2542,7 +2542,7 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.30.0-alpha.2" +version = "0.30.0-alpha.3" dependencies = [ "argh", "color-eyre", @@ -2575,7 +2575,7 @@ dependencies = [ [[package]] name = "ratatui-core" -version = "0.1.0-alpha.3" +version = "0.1.0-alpha.4" dependencies = [ "anstyle", "bitflags 2.9.0", @@ -2600,7 +2600,7 @@ dependencies = [ [[package]] name = "ratatui-crossterm" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" dependencies = [ "crossterm", "document-features", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "ratatui-macros" -version = "0.7.0-alpha.1" +version = "0.7.0-alpha.2" dependencies = [ "ratatui-core", "ratatui-widgets", @@ -2621,7 +2621,7 @@ dependencies = [ [[package]] name = "ratatui-termion" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" dependencies = [ "document-features", "instability", @@ -2632,7 +2632,7 @@ dependencies = [ [[package]] name = "ratatui-termwiz" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" dependencies = [ "document-features", "ratatui", @@ -2643,7 +2643,7 @@ dependencies = [ [[package]] name = "ratatui-widgets" -version = "0.3.0-alpha.2" +version = "0.3.0-alpha.3" dependencies = [ "bitflags 2.9.0", "color-eyre", diff --git a/Cargo.toml b/Cargo.toml index 735b5514..ffc2e072 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,13 +36,13 @@ indoc = "2.0.6" instability = "0.3.7" itertools = { version = "0.13.0", default-features = false, features = ["use_alloc"] } pretty_assertions = "1.4.1" -ratatui = { path = "ratatui", version = "0.30.0-alpha.2" } -ratatui-core = { path = "ratatui-core", version = "0.1.0-alpha.3" } -ratatui-crossterm = { path = "ratatui-crossterm", version = "0.1.0-alpha.2" } -ratatui-macros = { path = "ratatui-macros", version = "0.7.0-alpha.1" } -ratatui-termion = { path = "ratatui-termion", version = "0.1.0-alpha.2" } -ratatui-termwiz = { path = "ratatui-termwiz", version = "0.1.0-alpha.2" } -ratatui-widgets = { path = "ratatui-widgets", version = "0.3.0-alpha.2" } +ratatui = { path = "ratatui", version = "0.30.0-alpha.3" } +ratatui-core = { path = "ratatui-core", version = "0.1.0-alpha.4" } +ratatui-crossterm = { path = "ratatui-crossterm", version = "0.1.0-alpha.3" } +ratatui-macros = { path = "ratatui-macros", version = "0.7.0-alpha.2" } +ratatui-termion = { path = "ratatui-termion", version = "0.1.0-alpha.3" } +ratatui-termwiz = { path = "ratatui-termwiz", version = "0.1.0-alpha.3" } +ratatui-widgets = { path = "ratatui-widgets", version = "0.3.0-alpha.3" } rstest = "0.25.0" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" diff --git a/ratatui-core/Cargo.toml b/ratatui-core/Cargo.toml index 716a245c..fc7d720d 100644 --- a/ratatui-core/Cargo.toml +++ b/ratatui-core/Cargo.toml @@ -4,7 +4,7 @@ description = """ Core types and traits for the Ratatui Terminal UI library. Widget libraries should use this crate. Applications should use the main Ratatui crate. """ -version = "0.1.0-alpha.3" +version = "0.1.0-alpha.4" readme = "README.md" authors.workspace = true documentation.workspace = true diff --git a/ratatui-crossterm/Cargo.toml b/ratatui-crossterm/Cargo.toml index 472a994a..fae3ae21 100644 --- a/ratatui-crossterm/Cargo.toml +++ b/ratatui-crossterm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ratatui-crossterm" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" description = "Crossterm backend for the Ratatui Terminal UI library." documentation = "https://docs.rs/ratatui-crossterm/" readme = "README.md" diff --git a/ratatui-macros/Cargo.toml b/ratatui-macros/Cargo.toml index 8f3b1c8b..f6d8b536 100644 --- a/ratatui-macros/Cargo.toml +++ b/ratatui-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ratatui-macros" -version = "0.7.0-alpha.1" +version = "0.7.0-alpha.2" edition = "2021" authors = ["The Ratatui Developers"] description = "Macros for Ratatui" diff --git a/ratatui-termion/Cargo.toml b/ratatui-termion/Cargo.toml index edbc4a6b..65000125 100644 --- a/ratatui-termion/Cargo.toml +++ b/ratatui-termion/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ratatui-termion" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" description = "Termion backend for the Ratatui Terminal UI library." documentation = "https://docs.rs/ratatui-termion/" readme = "README.md" diff --git a/ratatui-termwiz/Cargo.toml b/ratatui-termwiz/Cargo.toml index 53d7ba0f..c699e9dc 100644 --- a/ratatui-termwiz/Cargo.toml +++ b/ratatui-termwiz/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ratatui-termwiz" -version = "0.1.0-alpha.2" +version = "0.1.0-alpha.3" description = "Termwiz backend for the Ratatui Terminal UI library." documentation = "https://docs.rs/ratatui-termwiz/" readme = "README.md" diff --git a/ratatui-widgets/Cargo.toml b/ratatui-widgets/Cargo.toml index e6b19359..833a17b2 100644 --- a/ratatui-widgets/Cargo.toml +++ b/ratatui-widgets/Cargo.toml @@ -3,7 +3,7 @@ name = "ratatui-widgets" description = "A collection of Ratatui widgets for building terminal user interfaces using Ratatui." # Note that this started at 0.3.0 as there was a previous crate using the name `ratatui-widgets`. # -version = "0.3.0-alpha.2" +version = "0.3.0-alpha.3" readme = "README.md" authors.workspace = true documentation.workspace = true diff --git a/ratatui/Cargo.toml b/ratatui/Cargo.toml index 52d5b1f3..2b7c35b0 100644 --- a/ratatui/Cargo.toml +++ b/ratatui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ratatui" description = "A library that's all about cooking up terminal user interfaces" -version = "0.30.0-alpha.2" +version = "0.30.0-alpha.3" authors.workspace = true documentation.workspace = true repository.workspace = true