Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pastel for openSUSE:Factory checked in at 2026-02-23 16:12:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pastel (Old) and /work/SRC/openSUSE:Factory/.pastel.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pastel" Mon Feb 23 16:12:07 2026 rev:4 rq:1334306 version:0.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/pastel/pastel.changes 2025-10-21 11:18:20.179624613 +0200 +++ /work/SRC/openSUSE:Factory/.pastel.new.1977/pastel.changes 2026-02-23 16:12:24.500992461 +0100 @@ -1,0 +2,7 @@ +Sat Feb 21 22:12:53 UTC 2026 - Muhammad Akbar Yanuar Mantari <[email protected]> + +- Update to version 0.12.0: + * Replace atty dependency with std::io::IsTerminal (breaking) + * Add ANSI 8-bit parsing + +------------------------------------------------------------------- Old: ---- pastel-0.11.0.tar.gz New: ---- pastel-0.12.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pastel.spec ++++++ --- /var/tmp/diff_new_pack.y5mUA0/_old 2026-02-23 16:12:26.633080286 +0100 +++ /var/tmp/diff_new_pack.y5mUA0/_new 2026-02-23 16:12:26.697082921 +0100 @@ -1,7 +1,7 @@ # # spec file for package pastel # -# Copyright (c) 2025 mantarimay +# Copyright (c) 2026 mantarimay # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: pastel -Version: 0.11.0 +Version: 0.12.0 Release: 0 Summary: CLI to generate, analyze, convert and manipulate colors License: Apache-2.0 AND MIT ++++++ pastel-0.11.0.tar.gz -> pastel-0.12.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/.github/workflows/CICD.yml new/pastel-0.12.0/.github/workflows/CICD.yml --- old/pastel-0.11.0/.github/workflows/CICD.yml 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/.github/workflows/CICD.yml 2026-02-14 14:00:29.000000000 +0100 @@ -18,7 +18,7 @@ name: Extract crate metadata runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Extract crate information id: crate_metadata run: | @@ -41,7 +41,7 @@ - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - run: cargo fmt -- --check min_version: @@ -50,7 +50,7 @@ needs: crate_metadata steps: - name: Checkout source code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install rust toolchain (v${{ needs.crate_metadata.outputs.msrv }}) uses: dtolnay/rust-toolchain@master @@ -86,7 +86,7 @@ BUILD_CMD: cargo steps: - name: Checkout source code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install prerequisites shell: bash @@ -310,13 +310,13 @@ fakeroot dpkg-deb --build "${DPKG_DIR}" "${DPKG_PATH}" - name: "Artifact upload: tarball" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: ${{ steps.package.outputs.PKG_NAME }} path: ${{ steps.package.outputs.PKG_PATH }} - name: "Artifact upload: Debian package" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 if: steps.debian-package.outputs.DPKG_NAME with: name: ${{ steps.debian-package.outputs.DPKG_NAME }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/CHANGELOG.md new/pastel-0.12.0/CHANGELOG.md --- old/pastel-0.11.0/CHANGELOG.md 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/CHANGELOG.md 2026-02-14 14:00:29.000000000 +0100 @@ -1,17 +1,12 @@ -# unreleased +# v0.12.0 ## Features -## Bugfixes - -## Changes - -## Other +- Added support for parsing ANSI 8-bit color codes -- Minor optimizations and cleanup - -## Packaging +## Bugfixes +- Fixed `ansi-8bit-value` not returning SGR code 255, see #289 # v0.10.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/Cargo.lock new/pastel-0.12.0/Cargo.lock --- old/pastel-0.11.0/Cargo.lock 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/Cargo.lock 2026-02-14 14:00:29.000000000 +0100 @@ -78,13 +78,12 @@ [[package]] name = "assert_cmd" -version = "2.0.17" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd389a4b2970a01282ee455294913c0a43724daedcd1a24c3eb0ec1c1320b66" +checksum = "9c5bcfa8749ac45dd12cb11055aeeb6b27a3895560d60d71e3c23bf979e60514" dependencies = [ "anstyle", "bstr", - "doc-comment", "libc", "predicates", "predicates-core", @@ -93,17 +92,6 @@ ] [[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -179,18 +167,18 @@ [[package]] name = "clap" -version = "4.5.31" +version = "4.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" +checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.31" +version = "4.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" +checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" dependencies = [ "anstream", "anstyle", @@ -201,9 +189,9 @@ [[package]] name = "clap_complete" -version = "4.5.58" +version = "4.5.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75bf0b32ad2e152de789bb635ea4d3078f6b838ad7974143e99b99f45a04af4a" +checksum = "430b4dc2b5e3861848de79627b2bedc9f3342c7da5173a14eaa5d0f8dc18ae5d" dependencies = [ "clap", ] @@ -216,9 +204,9 @@ [[package]] name = "clap_mangen" -version = "0.2.29" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b4c3c54b30f0d9adcb47f25f61fcce35c4dd8916638c6b82fbd5f4fb4179e2" +checksum = "439ea63a92086df93893164221ad4f24142086d535b3a0957b9b9bea2dc86301" dependencies = [ "clap", "roff", @@ -301,12 +289,6 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] name = "either" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -345,15 +327,6 @@ ] [[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] name = "is_terminal_polyfill" version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -462,11 +435,10 @@ [[package]] name = "pastel" -version = "0.11.0" +version = "0.12.0" dependencies = [ "approx", "assert_cmd", - "atty", "clap", "clap_complete", "clap_mangen", @@ -621,9 +593,9 @@ [[package]] name = "regex" -version = "1.11.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -633,9 +605,9 @@ [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/Cargo.toml new/pastel-0.12.0/Cargo.toml --- old/pastel-0.11.0/Cargo.toml 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/Cargo.toml 2026-02-14 14:00:29.000000000 +0100 @@ -7,7 +7,7 @@ name = "pastel" readme = "README.md" repository = "https://github.com/sharkdp/pastel" -version = "0.11.0" +version = "0.12.0" edition = "2021" build = "build.rs" exclude = ["doc/pastel.gif"] @@ -15,14 +15,13 @@ [dependencies] # library dependencies -atty = "0.2" nom = "7.1.3" once_cell = "1.21.3" output_vt100 = "0.1" rand = "0.9" # binary-only dependencies (see https://github.com/rust-lang/cargo/issues/1982) -regex = "1.11" +regex = "1.12" [dependencies.clap] version = "4" @@ -42,7 +41,7 @@ [dev-dependencies] approx = "0.5.0" -assert_cmd = "2.0.17" +assert_cmd = "2.1.2" rand_xoshiro = "0.7.0" criterion = "0.7" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/README.md new/pastel-0.12.0/README.md --- old/pastel-0.11.0/README.md 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/README.md 2026-02-14 14:00:29.000000000 +0100 @@ -123,8 +123,8 @@ You can download the latest Debian package from the [release page](https://github.com/sharkdp/pastel/releases) and install it via `dpkg`: ``` bash -wget "https://github.com/sharkdp/pastel/releases/download/v0.11.0/pastel_0.11.0_amd64.deb" -sudo dpkg -i pastel_0.11.0_amd64.deb +wget "https://github.com/sharkdp/pastel/releases/download/v0.12.0/pastel_0.12.0_amd64.deb" +sudo dpkg -i pastel_0.12.0_amd64.deb ``` Alternatively, `pastel` is available in the official Debian repositories (currently in testing and unstable): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/src/ansi.rs new/pastel-0.12.0/src/ansi.rs --- old/pastel-0.11.0/src/ansi.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/src/ansi.rs 2026-02-14 14:00:29.000000000 +0100 @@ -1,13 +1,13 @@ use std::borrow::Borrow; +use std::io::IsTerminal; -pub use atty::Stream; use once_cell::sync::Lazy; use crate::delta_e::ciede2000; use crate::{Color, Lab}; static ANSI_LAB_REPRESENTATIONS: Lazy<Vec<(u8, Lab)>> = Lazy::new(|| { - (16..255) + (16..=255) .map(|code| (code, Color::from_ansi_8bit(code).to_lab())) .collect() }); @@ -280,8 +280,8 @@ Brush { mode } } - pub fn from_environment(stream: Stream) -> Result<Self, UnknownColorModeError> { - let mode = if atty::is(stream) { + pub fn from_environment<T: IsTerminal>(stream: &T) -> Result<Self, UnknownColorModeError> { + let mode = if stream.is_terminal() { let env_color_mode = std::env::var("PASTEL_COLOR_MODE").ok(); match env_color_mode.as_deref() { Some(mode_str) => Mode::from_mode_str(mode_str)?, @@ -365,6 +365,7 @@ fn to_ansi_8bit_grays() { assert_eq!(232, Color::from_rgb(8, 8, 8).to_ansi_8bit()); assert_eq!(242, Color::from_rgb(108, 108, 108).to_ansi_8bit()); + assert_eq!(255, Color::from_rgb(238, 238, 238).to_ansi_8bit()); } #[test] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/src/cli/colorpicker.rs new/pastel-0.12.0/src/cli/colorpicker.rs --- old/pastel-0.11.0/src/cli/colorpicker.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/src/cli/colorpicker.rs 2026-02-14 14:00:29.000000000 +0100 @@ -6,7 +6,7 @@ use crate::error::{PastelError, Result}; use crate::hdcanvas::Canvas; -use pastel::ansi::{Brush, Stream}; +use pastel::ansi::Brush; use pastel::Color; /// Print a color spectrum to STDERR. @@ -16,7 +16,7 @@ let mut canvas = Canvas::new( width + 2 * config.padding, width + 2 * config.padding, - Brush::from_environment(Stream::Stderr)?, + Brush::from_environment(&io::stderr())?, ); canvas.draw_rect( config.padding, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/src/cli/commands/distinct.rs new/pastel-0.12.0/src/cli/commands/distinct.rs --- old/pastel-0.11.0/src/cli/commands/distinct.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/src/cli/commands/distinct.rs 2026-02-14 14:00:29.000000000 +0100 @@ -2,7 +2,6 @@ use crate::commands::prelude::*; -use pastel::ansi::Stream; use pastel::distinct::{self, DistanceMetric, IterationStatistics}; use pastel::{Fraction, HSLA}; @@ -129,7 +128,7 @@ fn run(&self, out: &mut Output, matches: &ArgMatches, config: &Config) -> Result<()> { let stderr = io::stderr(); let mut stderr_lock = stderr.lock(); - let brush_stderr = Brush::from_environment(Stream::Stderr)?; + let brush_stderr = Brush::from_environment(&io::stderr())?; let verbose_output = matches.get_flag("verbose"); let count = matches diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/src/cli/commands/io.rs new/pastel-0.12.0/src/cli/commands/io.rs --- old/pastel-0.11.0/src/cli/commands/io.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/src/cli/commands/io.rs 2026-02-14 14:00:29.000000000 +0100 @@ -1,4 +1,4 @@ -use std::io::{self, BufRead}; +use std::io::{self, BufRead, IsTerminal}; use clap::parser::ValuesRef; use clap::ArgMatches; @@ -37,8 +37,7 @@ PrintSpectrum::Yes, )), None => { - use atty::Stream; - if atty::is(Stream::Stdin) { + if io::stdin().is_terminal() { return Err(PastelError::ColorArgRequired); } Ok(ColorArgIterator::FromStdin) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/src/cli/main.rs new/pastel-0.12.0/src/cli/main.rs --- old/pastel-0.11.0/src/cli/main.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/src/cli/main.rs 2026-02-14 14:00:29.000000000 +0100 @@ -1,6 +1,4 @@ -use std::io::{self, Write}; - -use atty::Stream; +use std::io::{self, IsTerminal, Write}; mod cli; mod colorpicker; @@ -26,7 +24,7 @@ writeln!( io::stderr(), "{}: {}", - Brush::from_environment(Stream::Stdout) + Brush::from_environment(&io::stdout()) .unwrap_or_default() .paint(format!("[{}]", title), c), message @@ -62,7 +60,7 @@ let app = cli::build_cli(); let global_matches = app.get_matches(); - let interactive_mode = atty::is(Stream::Stdout); + let interactive_mode = io::stdout().is_terminal(); let color_mode = if global_matches.get_flag("force-color") { Some(ansi::Mode::TrueColor) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/src/parser.rs new/pastel-0.12.0/src/parser.rs --- old/pastel-0.11.0/src/parser.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/src/parser.rs 2026-02-14 14:00:29.000000000 +0100 @@ -7,6 +7,7 @@ use nom::Err; use nom::IResult; +use crate::ansi::AnsiColor; use crate::named::NAMED_COLORS; use crate::Color; @@ -281,6 +282,24 @@ Ok((input, c)) } +fn parse_ansi_8bit(input: &str) -> IResult<&str, Color> { + let (input, _) = tag_no_case("ansi_8bit(")(input)?; + let (input, _) = space0(input)?; + let (input, code) = double(input)?; + let (input, _) = space0(input)?; + let (input, _) = char(')')(input)?; + + let code = code as i64; + if !(0..=255).contains(&code) { + return Err(Err::Error(nom::error::Error::new( + "ANSI 8-bit code must be between 0 and 255", + ErrorKind::Verify, + ))); + } + + Ok((input, Color::from_ansi_8bit(code as u8))) +} + fn parse_named(input: &str) -> IResult<&str, Color> { let (input, color) = all_consuming(alpha1)(input)?; let nc = NAMED_COLORS @@ -298,17 +317,22 @@ pub fn parse_color(input: &str) -> Option<Color> { alt(( - all_consuming(parse_hex), - all_consuming(parse_numeric_rgb), - all_consuming(parse_percentage_rgb), - all_consuming(parse_hsl), - all_consuming(parse_hsv), - all_consuming(parse_gray), - all_consuming(parse_lab), - all_consuming(parse_oklab), - all_consuming(parse_lch), - all_consuming(parse_oklch), - all_consuming(parse_named), + alt(( + all_consuming(parse_hex), + all_consuming(parse_numeric_rgb), + all_consuming(parse_percentage_rgb), + all_consuming(parse_hsl), + all_consuming(parse_hsv), + all_consuming(parse_gray), + )), + alt(( + all_consuming(parse_lab), + all_consuming(parse_oklab), + all_consuming(parse_lch), + all_consuming(parse_oklch), + all_consuming(parse_ansi_8bit), + all_consuming(parse_named), + )), ))(input.trim()) .ok() .map(|(_, c)| c) @@ -711,6 +735,43 @@ } #[test] +fn parse_ansi_8bit_syntax() { + assert_eq!(Some(Color::black()), parse_color("ansi_8bit(0)")); + assert_eq!(Some(Color::red()), parse_color("ansi_8bit(9)")); + assert_eq!(Some(Color::white()), parse_color("ansi_8bit(15)")); + assert_eq!( + Some(Color::from_rgb(255, 215, 95)), + parse_color("ansi_8bit(221)") + ); + assert_eq!(Some(Color::white()), parse_color("ansi_8bit(231)")); + assert_eq!( + Some(Color::from_rgb(8, 8, 8)), + parse_color("ansi_8bit(232)") + ); + assert_eq!( + Some(Color::from_rgb(238, 238, 238)), + parse_color("ansi_8bit(255)") + ); + + // whitespace + assert_eq!(Some(Color::black()), parse_color(" ansi_8bit( 0 ) ")); + assert_eq!(Some(Color::red()), parse_color("ansi_8bit( 9 )")); + + // case insensitive + assert_eq!(Some(Color::black()), parse_color("ANSI_8BIT(0)")); + assert_eq!(Some(Color::black()), parse_color("Ansi_8bit(0)")); + assert_eq!(Some(Color::black()), parse_color("Ansi_8Bit(0)")); + + // out of range + assert_eq!(None, parse_color("ansi_8bit(256)")); + assert_eq!(None, parse_color("ansi_8bit(-1)")); + + // invalid syntax + assert_eq!(None, parse_color("ansi_8bit()")); + assert_eq!(None, parse_color("ansi_8bit(0")); +} + +#[test] fn parse_named_syntax() { assert_eq!(Some(Color::black()), parse_color("black")); assert_eq!(Some(Color::blue()), parse_color("blue")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pastel-0.11.0/tests/integration_tests.rs new/pastel-0.12.0/tests/integration_tests.rs --- old/pastel-0.11.0/tests/integration_tests.rs 2025-10-19 21:50:02.000000000 +0200 +++ new/pastel-0.12.0/tests/integration_tests.rs 2026-02-14 14:00:29.000000000 +0100 @@ -1,7 +1,7 @@ use assert_cmd::Command; fn pastel() -> Command { - let mut cmd = Command::cargo_bin("pastel").unwrap(); + let mut cmd = assert_cmd::cargo_bin_cmd!("pastel"); cmd.env_remove("PASTEL_COLOR_MODE"); cmd } ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/pastel/vendor.tar.zst /work/SRC/openSUSE:Factory/.pastel.new.1977/vendor.tar.zst differ: char 7, line 1
