From 7bd6cdbebc232585e09bea563c5ee0cdaa50f0f9 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:37:48 +0800 Subject: [PATCH 01/14] Add syntax mapping for kubernetes config files --- src/syntax_mapping/builtins/linux/50-kubernetes.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/syntax_mapping/builtins/linux/50-kubernetes.toml diff --git a/src/syntax_mapping/builtins/linux/50-kubernetes.toml b/src/syntax_mapping/builtins/linux/50-kubernetes.toml new file mode 100644 index 00000000..6a81a35a --- /dev/null +++ b/src/syntax_mapping/builtins/linux/50-kubernetes.toml @@ -0,0 +1,2 @@ +[mappings] +"YAML" = ["/etc/kubernetes/*.conf"] From 319b8868fc93c1fd026a67b58c4192fa535e015c Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Fri, 26 Jul 2024 23:39:27 +0800 Subject: [PATCH 02/14] Write changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a2d806..a4a6ed16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ - Added auto detect syntax for `.aws/{config,credentials}` #2795 (@mxaddict) - Add syntax mapping for Wireguard config #2874 (@cyqsimon) - Associate `.textproto` files with `ProtoBuf` syntax, see #3038 (@vorburger). +- Add syntax mapping for kubernetes config files #3049 (@cyqsimon) ## Themes From 0603f0b844707d3f9de7a9a7f110fd5a4f2743a9 Mon Sep 17 00:00:00 2001 From: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com> Date: Sun, 25 Aug 2024 10:54:46 +0200 Subject: [PATCH 03/14] Don't output default theme info to piped stdout --- src/bin/bat/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index 4528a60b..3b74ec75 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -202,7 +202,7 @@ pub fn list_themes(cfg: &Config, config_dir: &Path, cache_dir: &Path) -> Result< let default_theme = HighlightingAssets::default_theme(); for theme in assets.themes() { - let default_theme_info = if default_theme == theme { + let default_theme_info = if !config.loop_through && default_theme == theme { " (default)" } else { "" From 5be9d195003c00754885b2e3bb00cf13b6e707d2 Mon Sep 17 00:00:00 2001 From: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com> Date: Sun, 25 Aug 2024 11:07:29 +0200 Subject: [PATCH 04/14] Reinforce tests for `--list-themes` --- tests/integration_tests.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 8df4327c..c083a941 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -300,6 +300,7 @@ fn list_themes_without_colors() { bat() .arg("--color=never") + .arg("--decorations=always") // trick bat into setting `Config::loop_through` to false .arg("--list-themes") .assert() .success() @@ -307,6 +308,15 @@ fn list_themes_without_colors() { .stdout(predicate::str::contains(default_theme_chunk).normalize()); } +#[test] +fn list_themes_to_piped_output() { + bat() + .arg("--list-themes") + .assert() + .success() + .stdout(predicate::str::contains("(default)").not()); +} + #[test] #[cfg_attr(any(not(feature = "git"), target_os = "windows"), ignore)] fn short_help() { From c1772b7793f94c50fba2efc2b6b8091654cff010 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 02:45:53 +0000 Subject: [PATCH 05/14] Bump plist from 1.6.0 to 1.7.0 (#3076) Bumps [plist](https://github.com/ebarnard/rust-plist) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/ebarnard/rust-plist/releases) - [Commits](https://github.com/ebarnard/rust-plist/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: plist dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 28 ++++++---------------------- Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1168501a..f185750b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,9 +103,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bat" @@ -716,15 +716,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -892,13 +883,12 @@ checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plist" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64", "indexmap", - "line-wrap", "quick-xml", "serde", "time", @@ -957,9 +947,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" dependencies = [ "memchr", ] @@ -1087,12 +1077,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" diff --git a/Cargo.toml b/Cargo.toml index 720e629b..0740b291 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,7 +86,7 @@ features = ["wrap_help", "cargo"] [target.'cfg(target_os = "macos")'.dependencies] home = "0.5.9" -plist = "1.6.0" +plist = "1.7.0" [dev-dependencies] assert_cmd = "2.0.12" From ffa74a7f499bc1d3ceb62bff3f8e1453a87f4ca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 03:05:26 +0000 Subject: [PATCH 06/14] Bump serde from 1.0.199 to 1.0.209 (#3077) Bumps [serde](https://github.com/serde-rs/serde) from 1.0.199 to 1.0.209. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.209) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f185750b..4fcb870b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1100,18 +1100,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", From ed7789d9b75cf55a6b598b2157bf634cfccb8e1c Mon Sep 17 00:00:00 2001 From: Mikael Vaaltola Date: Wed, 18 Sep 2024 12:51:43 +0300 Subject: [PATCH 07/14] Associate GeoJSON `.geojson` files with `json` syntax (fixes #3083) --- CHANGELOG.md | 1 + src/syntax_mapping/builtins/common/50-json.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea47b58f..243f7449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ - Associate JSON with Comments `.jsonc` with `json` syntax, see #2795 (@mxaddict) - Associate JSON-LD `.jsonld` files with `json` syntax, see #3037 (@vorburger) - Associate `.textproto` files with `ProtoBuf` syntax, see #3038 (@vorburger) +- Associate GeoJSON `.geojson` files with `json` syntax, see #3084 (@mvaaltola) - Associate `.aws/{config,credentials}`, see #2795 (@mxaddict) - Associate Wireguard config `/etc/wireguard/*.conf`, see #2874 (@cyqsimon) - Add support for [CFML](https://www.adobe.com/products/coldfusion-family.html), see #3031 (@brenton-at-pieces) diff --git a/src/syntax_mapping/builtins/common/50-json.toml b/src/syntax_mapping/builtins/common/50-json.toml index 7d33b6fe..3198c4f3 100644 --- a/src/syntax_mapping/builtins/common/50-json.toml +++ b/src/syntax_mapping/builtins/common/50-json.toml @@ -1,3 +1,3 @@ # JSON Lines is a simple variation of JSON #2535 [mappings] -"JSON" = ["*.jsonl", "*.jsonc", "*.jsonld"] +"JSON" = ["*.jsonl", "*.jsonc", "*.jsonld", "*.geojson"] From a0226f5670506c8e691cf05f3a752d8a5b2eb0a5 Mon Sep 17 00:00:00 2001 From: flytam Date: Thu, 8 Aug 2024 20:34:48 +0800 Subject: [PATCH 08/14] Update Chinese version translation of README.md --- doc/README-zh.md | 50 ++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/doc/README-zh.md b/doc/README-zh.md index 007afb3e..9f2d202e 100644 --- a/doc/README-zh.md +++ b/doc/README-zh.md @@ -616,63 +616,59 @@ iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat 注意: 当`bat`无法识别语言时你可能会需要`-l`/`--language`参数。 -## Development +## 开发 ```bash -# Recursive clone to retrieve all submodules +# 递归 clone 以获取所有子模块 git clone --recursive https://github.com/sharkdp/bat -# Build (debug version) +# 构建(调试版本) cd bat cargo build --bins -# Run unit tests and integration tests +# 运行单元测试和集成测试 cargo test -# Install (release version) +# 安装(发布版本) cargo install --path . --locked -# Build a bat binary with modified syntaxes and themes +# 使用修改后的语法和主题构建一个 bat 二进制文件 bash assets/create.sh cargo install --path . --locked --force ``` -If you want to build an application that uses `bat`s pretty-printing -features as a library, check out the [the API documentation](https://docs.rs/bat/). -Note that you have to use either `regex-onig` or `regex-fancy` as a feature -when you depend on `bat` as a library. +如果你想构建一个使用 `bat` 美化打印功能的应用程序,请查看 [API 文档](https://docs.rs/bat/)。请注意,当你依赖 `bat` 作为库时,必须使用 `regex-onig` 或 `regex-fancy` 作为特性。 -## Contributing +## 贡献指南 -Take a look at the [`CONTRIBUTING.md`](CONTRIBUTING.md) guide. +请查看 [`CONTRIBUTING.md`](CONTRIBUTING.md) 指南。 -## Maintainers +## 维护者 - [sharkdp](https://github.com/sharkdp) - [eth-p](https://github.com/eth-p) - [keith-hall](https://github.com/keith-hall) - [Enselic](https://github.com/Enselic) -## Security vulnerabilities +## 安全漏洞 -Please contact [David Peter](https://david-peter.de/) via email if you want to report a vulnerability in `bat`. +如果你想报告 `bat` 中的漏洞,请通过邮件联系 [David Peter](https://david-peter.de/)。 -## Project goals and alternatives +## 项目目标和替代方案 -`bat` tries to achieve the following goals: +`bat` 试图实现以下目标: -- Provide beautiful, advanced syntax highlighting -- Integrate with Git to show file modifications -- Be a drop-in replacement for (POSIX) `cat` -- Offer a user-friendly command-line interface +- 提供美观的高级语法高亮 +- 与 Git 集成以显示文件修改 +- 成为 (POSIX) `cat` 的替代品 +- 提供用户友好的命令行界面 -There are a lot of alternatives, if you are looking for similar programs. See -[this document](doc/alternatives.md) for a comparison. +如果你在寻找类似的程序,有很多替代方案。请参阅[本文档](doc/alternatives.md)进行比较。 -## License +## 许可证 -Copyright (c) 2018-2021 [bat-developers](https://github.com/sharkdp/bat). +版权所有 (c) 2018-2021 [bat-developers](https://github.com/sharkdp/bat)。 -`bat` is made available under the terms of either the MIT License or the Apache License 2.0, at your option. +`bat` 可根据 MIT 许可证或 Apache 许可证 2.0 的条款使用,任选其一。 -See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details. +有关许可证的详细信息,请参阅 [LICENSE-APACHE](LICENSE-APACHE) 和 [LICENSE-MIT](LICENSE-MIT) 文件。 From bc69ffb0f0732c64af5d7751e074e6bc17342c69 Mon Sep 17 00:00:00 2001 From: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:06:07 +0200 Subject: [PATCH 09/14] Map `*.mkd` files to `Markdown` syntax (#3061) --- CHANGELOG.md | 1 + src/syntax_mapping/builtins/common/50-markdown.toml | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 src/syntax_mapping/builtins/common/50-markdown.toml diff --git a/CHANGELOG.md b/CHANGELOG.md index 243f7449..d2ec2da9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ - Associate `.aws/{config,credentials}`, see #2795 (@mxaddict) - Associate Wireguard config `/etc/wireguard/*.conf`, see #2874 (@cyqsimon) - Add support for [CFML](https://www.adobe.com/products/coldfusion-family.html), see #3031 (@brenton-at-pieces) +- Map `*.mkd` files to `Markdown` syntax, see issue #3060 and PR #3061 (@einfachIrgendwer0815) ## Themes diff --git a/src/syntax_mapping/builtins/common/50-markdown.toml b/src/syntax_mapping/builtins/common/50-markdown.toml new file mode 100644 index 00000000..aa0531d2 --- /dev/null +++ b/src/syntax_mapping/builtins/common/50-markdown.toml @@ -0,0 +1,2 @@ +[mappings] +"Markdown" = ["*.mkd"] From 9d635627dc27cddf3414b75b6e11abc3024a3950 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 02:40:45 +0000 Subject: [PATCH 10/14] Bump globset from 0.4.14 to 0.4.15 (#3090) Bumps [globset](https://github.com/BurntSushi/ripgrep) from 0.4.14 to 0.4.15. - [Release notes](https://github.com/BurntSushi/ripgrep/releases) - [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.14...ignore-0.4.15) --- updated-dependencies: - dependency-name: globset dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4fcb870b..7b992e72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -583,9 +583,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", From 16a79d38c2ca82e4412d453ddfc44cdfe6367ebe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 03:02:02 +0000 Subject: [PATCH 11/14] Bump once_cell from 1.19.0 to 1.20.1 (#3091) Bumps [once_cell](https://github.com/matklad/once_cell) from 1.19.0 to 1.20.1. - [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md) - [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.1) --- updated-dependencies: - dependency-name: once_cell dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 13 +++++++++++-- Cargo.toml | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b992e72..ff10f09c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -802,9 +802,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "onig" @@ -894,6 +897,12 @@ dependencies = [ "time", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 0740b291..cbb84a6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ ansi_colours = "^1.2" bincode = "1.0" console = "0.15.8" flate2 = "1.0" -once_cell = "1.19" +once_cell = "1.20" thiserror = "1.0" wild = { version = "2.2", optional = true } content_inspector = "0.2.4" @@ -104,7 +104,7 @@ nix = { version = "0.26.4", default-features = false, features = ["term"] } anyhow = "1.0.86" indexmap = { version = "2.3.0", features = ["serde"] } itertools = "0.13.0" -once_cell = "1.18" +once_cell = "1.20" regex = "1.10.2" serde = "1.0" serde_derive = "1.0" From c59dad0cae45d7aa84ad87583d6b6904b30839b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 03:19:34 +0000 Subject: [PATCH 12/14] Bump git2 from 0.18.3 to 0.19.0 (#3092) Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.18.3 to 0.19.0. - [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/git2-rs/compare/git2-0.18.3...git2-0.19.0) --- updated-dependencies: - dependency-name: git2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ff10f09c..e2f6ef7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -564,9 +564,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.4.0", "libc", @@ -694,9 +694,9 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index cbb84a6c..f5ef6af9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ os_str_bytes = { version = "~7.0", optional = true } run_script = { version = "^0.10.1", optional = true} [dependencies.git2] -version = "0.18" +version = "0.19" optional = true default-features = false From 61c9f312c9d10103b33b7d8069401304ca938f06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 03:36:57 +0000 Subject: [PATCH 13/14] Bump flate2 from 1.0.30 to 1.0.34 (#3093) Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.30 to 1.0.34. - [Release notes](https://github.com/rust-lang/flate2-rs/releases) - [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.30...1.0.34) --- updated-dependencies: - dependency-name: flate2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e2f6ef7c..42db6b5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,10 +3,10 @@ version = 3 [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" @@ -489,9 +489,9 @@ checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", "miniz_oxide", @@ -752,11 +752,11 @@ checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] From 649fb05c5859a2dca61bed165ba9965c0ac5a667 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 24 Oct 2024 01:17:17 +0200 Subject: [PATCH 14/14] Bump nix from 0.26.4 to 0.29 --- CHANGELOG.md | 1 + Cargo.lock | 17 ++++++++++++----- Cargo.toml | 2 +- tests/integration_tests.rs | 5 ++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c404042f..55879dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - Use bat's ANSI iterator during tab expansion, see #2998 (@eth-p) - Support 'statically linked binary' for aarch64 in 'Release' page, see #2992 (@tzq0301) - Update options in shell completions and the man page of `bat`, see #2995 (@akinomyoga) +- Update nix dev-dependency to v0.29.0, see #3112 (@decathorpe) ## Syntaxes diff --git a/Cargo.lock b/Cargo.lock index 42db6b5f..0e3b3418 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,6 +243,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "clap" version = "4.4.12" @@ -688,9 +694,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libgit2-sys" @@ -761,12 +767,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if", + "cfg_aliases", "libc", ] diff --git a/Cargo.toml b/Cargo.toml index f5ef6af9..b8fcbcbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ tempfile = "3.8.1" serde = { version = "1.0", features = ["derive"] } [target.'cfg(unix)'.dev-dependencies] -nix = { version = "0.26.4", default-features = false, features = ["term"] } +nix = { version = "0.29", default-features = false, features = ["term"] } [build-dependencies] anyhow = "1.0.86" diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index c083a941..13b35718 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -9,7 +9,6 @@ use tempfile::tempdir; mod unix { pub use std::fs::File; pub use std::io::{self, Write}; - pub use std::os::unix::io::FromRawFd; pub use std::path::PathBuf; pub use std::process::Stdio; pub use std::thread; @@ -416,8 +415,8 @@ fn no_args_doesnt_break() { // not exit, because in this case it is safe to read and write to the same fd, which is why // this test exists. let OpenptyResult { master, slave } = openpty(None, None).expect("Couldn't open pty."); - let mut master = unsafe { File::from_raw_fd(master) }; - let stdin_file = unsafe { File::from_raw_fd(slave) }; + let mut master = File::from(master); + let stdin_file = File::from(slave); let stdout_file = stdin_file.try_clone().unwrap(); let stdin = Stdio::from(stdin_file); let stdout = Stdio::from(stdout_file);