From b89dc15be1d86869bf73e5b9f96af7b930753a55 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 25 Dec 2023 16:20:12 +0100 Subject: [PATCH 01/12] Use proper Architecture for Debian packages built for musl New values taken from dpkg-architecture -L --- .github/workflows/CICD.yml | 33 ++++++++++++--------------------- CHANGELOG.md | 1 + 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 5365f88d..1ab0f2e3 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -163,17 +163,17 @@ jobs: fail-fast: false matrix: job: - - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } - - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true } - - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true } - - { target: i686-pc-windows-msvc , os: windows-2019 } - - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } - - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } - - { target: x86_64-apple-darwin , os: macos-12 } - - { target: x86_64-pc-windows-gnu , os: windows-2019 } - - { target: x86_64-pc-windows-msvc , os: windows-2019 } - - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } - - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } + - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, dpkg_arch: arm64, use-cross: true } + - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, dpkg_arch: armhf, use-cross: true } + - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, dpkg_arch: musl-linux-armhf, use-cross: true } + - { target: i686-pc-windows-msvc , os: windows-2019, } + - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, dpkg_arch: i686, use-cross: true } + - { target: i686-unknown-linux-musl , os: ubuntu-20.04, dpkg_arch: musl-linux-i686, use-cross: true } + - { target: x86_64-apple-darwin , os: macos-12, } + - { target: x86_64-pc-windows-gnu , os: windows-2019, } + - { target: x86_64-pc-windows-msvc , os: windows-2019, } + - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, dpkg_arch: amd64, use-cross: true } + - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, dpkg_arch: musl-linux-amd64, use-cross: true } env: BUILD_CMD: cargo steps: @@ -337,16 +337,7 @@ jobs: DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }}-musl case ${{ matrix.job.target }} in *-musl) DPKG_BASENAME=${{ needs.crate_metadata.outputs.name }}-musl ; DPKG_CONFLICTS=${{ needs.crate_metadata.outputs.name }} ;; esac; DPKG_VERSION=${{ needs.crate_metadata.outputs.version }} - - unset DPKG_ARCH - case ${{ matrix.job.target }} in - aarch64-*-linux-*) DPKG_ARCH=arm64 ;; - arm-*-linux-*hf) DPKG_ARCH=armhf ;; - i686-*-linux-*) DPKG_ARCH=i686 ;; - x86_64-*-linux-*) DPKG_ARCH=amd64 ;; - *) DPKG_ARCH=notset ;; - esac; - + DPKG_ARCH="${{ matrix.job.dpkg_arch }}" DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb" echo "DPKG_NAME=${DPKG_NAME}" >> $GITHUB_OUTPUT diff --git a/CHANGELOG.md b/CHANGELOG.md index 838bcf23..232136a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Minor benchmark script improvements #2768 (@cyqsimon) - Update Arch Linux package URL in README files #2779 (@brunobell) - Update and improve `zsh` completion, see #2772 (@okapia) +- Use proper Architecture for Debian packages built for musl, see #2811 (@Enselic) ## Syntaxes From 0acb979e9e21cf80fb8f5e1f62c2376c034b0c2b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 26 Dec 2023 14:02:43 -0800 Subject: [PATCH 02/12] Pull in fix for unsafe-libyaml security advisory --- CHANGELOG.md | 1 + Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 232136a1..3cce3e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Update Arch Linux package URL in README files #2779 (@brunobell) - Update and improve `zsh` completion, see #2772 (@okapia) - Use proper Architecture for Debian packages built for musl, see #2811 (@Enselic) +- Pull in fix for unsafe-libyaml security advisory, see #2812 (@dtolnay) ## Syntaxes diff --git a/Cargo.lock b/Cargo.lock index 96dcd0e2..f4568056 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1111,9 +1111,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" dependencies = [ "indexmap 2.0.2", "itoa", @@ -1342,9 +1342,9 @@ checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "url" diff --git a/Cargo.toml b/Cargo.toml index 49ff0ea9..3547f604 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ shell-words = { version = "1.1.0", optional = true } unicode-width = "0.1.11" globset = "0.4" serde = { version = "1.0", features = ["derive"] } -serde_yaml = "0.9" +serde_yaml = "0.9.28" semver = "1.0" path_abs = { version = "0.5", default-features = false } clircle = "0.4" From bf56cd90f06e8450280265fd53e4fafb08bad536 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 28 Dec 2023 20:24:52 -0800 Subject: [PATCH 03/12] Eliminate dependency on syn v1 by updating git-version --- CHANGELOG.md | 1 + Cargo.lock | 35 ++++++++--------------------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cce3e99..186c4096 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Update and improve `zsh` completion, see #2772 (@okapia) - Use proper Architecture for Debian packages built for musl, see #2811 (@Enselic) - Pull in fix for unsafe-libyaml security advisory, see #2812 (@dtolnay) +- Update git-version dependency to use Syn v2, see #2816 (@dtolnay) ## Syntaxes diff --git a/Cargo.lock b/Cargo.lock index f4568056..179256f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -493,24 +493,22 @@ dependencies = [ [[package]] name = "git-version" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6b0decc02f4636b9ccad390dcbe77b722a77efedfa393caf8379a51d5c61899" +checksum = "1ad568aa3db0fcbc81f2f116137f263d7304f512a1209b35b85150d3ef88ad19" dependencies = [ "git-version-macro", - "proc-macro-hack", ] [[package]] name = "git-version-macro" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f" +checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ - "proc-macro-hack", "proc-macro2", "quote", - "syn 1.0.104", + "syn", ] [[package]] @@ -898,12 +896,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.66" @@ -1095,7 +1087,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn", ] [[package]] @@ -1142,7 +1134,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn", ] [[package]] @@ -1175,17 +1167,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "syn" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.32" @@ -1284,7 +1265,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn", ] [[package]] From 497342fabbd6d08f71909d65716395563ffbf45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Gonz=C3=A1lez=20Prieto?= Date: Fri, 29 Dec 2023 17:52:06 +0100 Subject: [PATCH 04/12] Bump cmd-help syntax to latest Manual update (as opposed to Dependabot's) because the highlighting for the test help message has changed. It's all good because it's as intended, an improvement. See victor-gp/cmd-help-sublime-syntax#23 --- CHANGELOG.md | 2 ++ assets/syntaxes/02_Extra/cmd-help | 2 +- tests/syntax-tests/highlighted/cmd-help/test.cmd-help | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 186c4096..cfc4c4dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ ## Syntaxes +- `cmd-help`: scope subcommands followed by other terms, and other misc improvements, see #2819 (@victor-gp) + ## Themes ## `bat` as a library diff --git a/assets/syntaxes/02_Extra/cmd-help b/assets/syntaxes/02_Extra/cmd-help index f41e5fc8..b150d845 160000 --- a/assets/syntaxes/02_Extra/cmd-help +++ b/assets/syntaxes/02_Extra/cmd-help @@ -1 +1 @@ -Subproject commit f41e5fc8381fe200a4e18c410bb41e911110a6e9 +Subproject commit b150d84534dd060afdcaf3f58977faeaf5917e56 diff --git a/tests/syntax-tests/highlighted/cmd-help/test.cmd-help b/tests/syntax-tests/highlighted/cmd-help/test.cmd-help index d71c2af0..d8f1236d 100644 --- a/tests/syntax-tests/highlighted/cmd-help/test.cmd-help +++ b/tests/syntax-tests/highlighted/cmd-help/test.cmd-help @@ -4,8 +4,8 @@ Use '--help' instead of '-h' to see a more detailed version of the help text. USAGE: - bat [OPTIONS] [FILE]... - bat  + bat [OPTIONS] [FILE]... + bat  ARGS:  ... File(s) to print / concatenate. Use '-' for standard input. From 5c4bcd6611780d437981ffeeb325e385e419ba4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 03:52:33 +0000 Subject: [PATCH 05/12] Bump anyhow from 1.0.75 to 1.0.78 (#2822) Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.75 to 1.0.78. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.75...1.0.78) --- updated-dependencies: - dependency-name: anyhow 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 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 179256f1..ba47ec3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,9 +76,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "ca87830a3e3fb156dc96cfbd31cb620265dd053be734723f22b760d6cc3c3051" [[package]] name = "assert_cmd" diff --git a/Cargo.toml b/Cargo.toml index 3547f604..344291f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ tempfile = "3.8.1" nix = { version = "0.26.4", default-features = false, features = ["term"] } [build-dependencies] -anyhow = "1.0.75" +anyhow = "1.0.78" [build-dependencies.clap] version = "4.4.10" From 15dc20109f3f3a5a1f67941af5ac341c11d3578b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:10:40 +0000 Subject: [PATCH 06/12] Bump clap from 4.4.10 to 4.4.12 (#2824) Bumps [clap](https://github.com/clap-rs/clap) from 4.4.10 to 4.4.12. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.4.10...v4.4.12) --- updated-dependencies: - dependency-name: clap 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 ++++---- Cargo.toml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba47ec3f..f21177ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,18 +239,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.10" +version = "4.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.9" +version = "4.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 344291f6..534e7984 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,7 +79,7 @@ default-features = false features = ["parsing"] [dependencies.clap] -version = "4.4.10" +version = "4.4.12" optional = true features = ["wrap_help", "cargo"] @@ -102,7 +102,7 @@ nix = { version = "0.26.4", default-features = false, features = ["term"] } anyhow = "1.0.78" [build-dependencies.clap] -version = "4.4.10" +version = "4.4.12" optional = true features = ["wrap_help", "cargo"] From 128b0d6dd31678df74e4fec2c938b2db51414f9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:24:27 +0000 Subject: [PATCH 07/12] Bump thiserror from 1.0.50 to 1.0.53 (#2825) Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.50 to 1.0.53. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.50...1.0.53) --- updated-dependencies: - dependency-name: thiserror 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 f21177ec..66be1136 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1250,18 +1250,18 @@ checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "b2cd5904763bad08ad5513ddbb12cf2ae273ca53fa9f68e843e236ec6dfccc09" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "3dcf4a824cce0aeacd6f38ae6f24234c8e80d68632338ebaa1443b5df9e29e19" dependencies = [ "proc-macro2", "quote", From 06aef22943214b1fb793568418d51f16cdec24be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:37:23 +0000 Subject: [PATCH 08/12] Bump home from 0.5.5 to 0.5.9 (#2823) Bumps [home](https://github.com/rust-lang/cargo) from 0.5.5 to 0.5.9. - [Changelog](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cargo/commits) --- updated-dependencies: - dependency-name: home 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 | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- 2 files changed, 70 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 66be1136..70385693 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -571,11 +571,11 @@ checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1433,6 +1433,15 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.1" @@ -1463,6 +1472,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.1" @@ -1475,6 +1499,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.1" @@ -1487,6 +1517,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.1" @@ -1499,6 +1535,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.1" @@ -1511,6 +1553,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.1" @@ -1523,6 +1571,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" @@ -1535,6 +1589,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.1" @@ -1547,6 +1607,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "yaml-rust" version = "0.4.5" diff --git a/Cargo.toml b/Cargo.toml index 534e7984..291fbdc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,7 +84,7 @@ optional = true features = ["wrap_help", "cargo"] [target.'cfg(target_os = "macos")'.dependencies] -home = "0.5.4" +home = "0.5.9" plist = "1.5.1" [dev-dependencies] From c76ed99db2dbedf111965cb53fc36bb14f1da788 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:50:36 +0000 Subject: [PATCH 09/12] Bump once_cell from 1.18.0 to 1.19.0 (#2826) Bumps [once_cell](https://github.com/matklad/once_cell) from 1.18.0 to 1.19.0. - [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md) - [Commits](https://github.com/matklad/once_cell/compare/v1.18.0...v1.19.0) --- 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 | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70385693..19ee5928 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -766,9 +766,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "onig" diff --git a/Cargo.toml b/Cargo.toml index 291fbdc4..53bc2da4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ ansi_colours = "^1.2" bincode = "1.0" console = "0.15.7" flate2 = "1.0" -once_cell = "1.18" +once_cell = "1.19" thiserror = "1.0" wild = { version = "2.2", optional = true } content_inspector = "0.2.4" From cd81c7fa6bf0d061f455f67aae72dc5537f7851d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:16:33 +0000 Subject: [PATCH 10/12] Bump assets/syntaxes/02_Extra/SublimeJQ from `6870582` to `b7e53e5` (#2820) * Bump assets/syntaxes/02_Extra/SublimeJQ from `6870582` to `b7e53e5` Bumps [assets/syntaxes/02_Extra/SublimeJQ](https://github.com/zogwarg/SublimeJQ) from `6870582` to `b7e53e5`. - [Commits](https://github.com/zogwarg/SublimeJQ/compare/687058289c1a888e0895378432d66b41609a84d8...b7e53e5d86814f04a48d2e441bcf5f9fdf07e9c1) --- updated-dependencies: - dependency-name: assets/syntaxes/02_Extra/SublimeJQ dependency-type: direct:production ... Signed-off-by: dependabot[bot] * update highlighted version of sample.jq * update changelog --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Keith Hall --- CHANGELOG.md | 1 + assets/syntaxes/02_Extra/SublimeJQ | 2 +- tests/syntax-tests/highlighted/JQ/sample.jq | 32 ++++++++++----------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfc4c4dd..39cac34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ## Syntaxes - `cmd-help`: scope subcommands followed by other terms, and other misc improvements, see #2819 (@victor-gp) +- Upgrade JQ syntax, see #2820 (@dependabot[bot]) ## Themes diff --git a/assets/syntaxes/02_Extra/SublimeJQ b/assets/syntaxes/02_Extra/SublimeJQ index 68705828..b7e53e5d 160000 --- a/assets/syntaxes/02_Extra/SublimeJQ +++ b/assets/syntaxes/02_Extra/SublimeJQ @@ -1 +1 @@ -Subproject commit 687058289c1a888e0895378432d66b41609a84d8 +Subproject commit b7e53e5d86814f04a48d2e441bcf5f9fdf07e9c1 diff --git a/tests/syntax-tests/highlighted/JQ/sample.jq b/tests/syntax-tests/highlighted/JQ/sample.jq index ba9c853f..057e9edd 100644 --- a/tests/syntax-tests/highlighted/JQ/sample.jq +++ b/tests/syntax-tests/highlighted/JQ/sample.jq @@ -1,31 +1,31 @@ import "../imported-file" ; # With Comments ! -def weird($a; $b; $c): - [ $a, $b, $c ] | transpose | reduce .[][] as $item ( - []; - . + $item.property - ) +def weird($a; $b; $c): + [ $a, $b, $c ] | transpose | reduce .[][] as $item ( + []; + . + $item.property + ) ; -. | weird (.a; .b; .c) | +. | weird (.a; .b; .c) | ( -if (. | contains("never") ) then +if (. | contains("never") ) then  "Why yes" else  12.23 end -) as $never | +) as $never | {  hello,  why: "because", - hello: ( weird | ascii_upcase ), - format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ), - never: $never, + hello: ( weird | ascii_upcase ), + format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ), + never: $never,  "literal_key": literal_value,  "this": 12.1e12,  "part": "almost" @@ -38,8 +38,8 @@  similar: "but not quite"  }  } - ], -} | ( + ], +} | (    # And with very basic brace matching   @@ -47,13 +47,13 @@  ]     # Other invalid ends - ( [ } ] ) + ( [ } ] )  # A "valid" sequence - ( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] ) + ( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] )  # A "invalid" sequence - ( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] ) + ( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] )  "A string\n whith escaped characters \" because we can" ) From 8e66bc8722593dfb95dc2175a0939448703c7c86 Mon Sep 17 00:00:00 2001 From: rhysd Date: Wed, 10 Jan 2024 21:46:13 +0900 Subject: [PATCH 11/12] Make the error handler `FnMut` --- src/controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller.rs b/src/controller.rs index f378cbc6..ffc5dd5b 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -47,7 +47,7 @@ impl<'b> Controller<'b> { &self, inputs: Vec, output_buffer: Option<&mut dyn std::fmt::Write>, - handle_error: impl Fn(&Error, &mut dyn Write), + mut handle_error: impl FnMut(&Error, &mut dyn Write), ) -> Result { let mut output_type; From 98a2b6bc177050c845f2e12133458826ad1fca72 Mon Sep 17 00:00:00 2001 From: rhysd Date: Wed, 10 Jan 2024 21:49:50 +0900 Subject: [PATCH 12/12] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39cac34d..492adaf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ## `bat` as a library +- Make `Controller::run_with_error_handler`'s error handler `FnMut`, see #2831 (@rhysd) # v0.24.0