dalance / termbg

A Rust library for terminal background color detection
Apache License 2.0
87 stars 8 forks source link

Update crossterm requirement from 0.27 to 0.28 #24

Closed dependabot[bot] closed 2 months ago

dependabot[bot] commented 3 months ago

Updates the requirements on crossterm to permit the latest version.

Changelog

Sourced from crossterm's changelog.

Unreleased

Version 0.28

Added ⭐

  • Capture double click mouse events on windows (#826)
  • (De)serialize Reset color (#824)
  • Add functions to allow constructing Attributes in a const context (#817)
  • Implement Display for KeyCode and KeyModifiers (#862)

Changed ⚙️

  • Use Rustix by default instead of libc. Libc can be re-enabled if necessary with the libc feature flag (#892)
  • FileDesc now requires a lifetime annotation.
  • Improve available color detection (#885)
  • Speed up SetColors by ~15-25% (#879)
  • Remove unsafe and unnecessary size argument from FileDesc::read() (#821)

Breaking ⚠️

  • Fix duplicate bit masks for caps lock and num lock (#863). This breaks serialization of KeyEventState

Version 0.27.1

Added ⭐

  • Add support for (de)serializing Reset Color

Version 0.27

Added ⭐

  • Add NO_COLOR support (https://no-color.org/)
  • Add option to force overwrite NO_COLOR (#802)
  • Add support for scroll left/right events on windows and unix systems (#788).
  • Add window_size function to fetch pixel width/height of screen for more sophisticated rendering in terminals.
  • Add support for deserializing hex color strings to Color e.g #fffff.

Changed ⚙️

  • Make the events module an optional feature events (to make crossterm more lightweight) (#776)

Breaking ⚠️

  • Set minimum rustc version to 1.58 (#798)
  • Change all error types to std::io::Result (#765)

Version 0.26.1

... (truncated)

Commits


Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | crossterm | [>= 0.22.a, < 0.23] |

You can trigger a rebase of this PR by commenting @dependabot rebase.


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)

Note Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

orhun commented 2 months ago

Any chance to get this merged and create a new release? 😊

dalance commented 2 months ago

I'll update crossterm and release new version.

dalance commented 2 months ago

I released v0.5.1.

dependabot[bot] commented 2 months ago

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

orhun commented 2 months ago

Awesome, thank you!

Also, do you mind if I ask a question? Because something wasn't quite clear in the documentation.

Why does the rgb and theme methods take a timeout parameter? And most importantly, is it blocking the current thread? I will update my usage based on that 🐻

dalance commented 2 months ago

This crate decides theme based on the response to a special control sequence. If a terminal doesn't support the control sequence, there is no response. So rgb and theme will wait infinitly on these terminal if there is not timeout. rgb and theme block current thread until the timeout at the longest.

orhun commented 2 months ago

Got it, thanks for the explanation. Now I also wonder what terminal-light (which is another crate I discovered recently) is doing differently since there is not timeout 🤔

orhun commented 2 months ago

Okay, I see, it's written in the downsides:

waiting for stdin with a timeout isn't implemented on Windows in this crate (help welcome)
this isn't instant, a delay of 10 ms to get the answer isn't unusual
if a not compatible terminal doesn't answer at all, we're waiting for 20ms
it may fail on some terminal multiplexers