From 50dda0e7803580768108452ab1c8dc46a96da9d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 04:34:20 +0000 Subject: [PATCH 01/33] chore(deps): bump clap from 4.4.1 to 4.4.2 Bumps [clap](https://github.com/clap-rs/clap) from 4.4.1 to 4.4.2. - [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.1...v4.4.2) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 13 ++++++------- Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6cc7020..3cb49a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -109,20 +109,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.1" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" +checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.4.1" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" +checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" dependencies = [ "anstream", "anstyle", @@ -132,9 +131,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 849b24c..7921f31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ license = "MIT" inquire = "0.6.2" serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.105" -clap = { version = "4.4.1", features = ["derive"] } +clap = { version = "4.4.2", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From 4c9b3b76c68f8fd5102af8ef4a9dacd5a0fbf091 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sat, 9 Sep 2023 14:10:22 -0300 Subject: [PATCH 02/33] fix: Run clippy workflow only in pull request --- .github/workflows/ci.yml | 7 +------ .github/workflows/clippy.yml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/clippy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 174d772..b600d3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: CI -on: - [push, pull_request] +on: push env: CARGO_TERM_COLOR: always @@ -20,10 +19,6 @@ jobs: - uses: actions/checkout@v3 - run: rustup component add clippy - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features - name: Run cargo fmt run: cargo fmt --all -- --check - name: Run tests diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..9b3a154 --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,18 @@ +name: Clippy + +on: pull_request + +env: + CARGO_TERM_COLOR: always + +jobs: + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup component add clippy + - uses: Swatinem/rust-cache@v2 + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features \ No newline at end of file From 9264ee0ab1af45e08f376f42f0ea6959b1a702b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 17:16:35 +0000 Subject: [PATCH 03/33] chore(deps): bump crossbeam-utils from 0.8.5 to 0.8.16 Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.5 to 0.8.16. - [Release notes](https://github.com/crossbeam-rs/crossbeam/releases) - [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md) - [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.5...crossbeam-utils-0.8.16) --- updated-dependencies: - dependency-name: crossbeam-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cb49a8..1f01657 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,12 +168,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", - "lazy_static", ] [[package]] From d999c1679f38c31dbeb7397a312e4478a03f2dd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 17:17:36 +0000 Subject: [PATCH 04/33] chore(deps): bump regex from 1.5.4 to 1.7.3 Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.7.3. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.7.3) --- updated-dependencies: - dependency-name: regex dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cb49a8..ff1a081 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -545,9 +545,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.4" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -556,9 +556,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "remove_dir_all" From 129ab3e27d71412b94b23ff09e3f2537d23fa43d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 17:17:52 +0000 Subject: [PATCH 05/33] chore(deps): bump thread_local from 1.1.3 to 1.1.7 Bumps [thread_local](https://github.com/Amanieu/thread_local-rs) from 1.1.3 to 1.1.7. - [Commits](https://github.com/Amanieu/thread_local-rs/compare/v1.1.3...1.1.7) --- updated-dependencies: - dependency-name: thread_local dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cb49a8..1adb15a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,10 +727,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if", "once_cell", ] From e89f2e6b731ce6ea68ce8c6aff48ec2a4649a374 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sat, 9 Sep 2023 14:19:48 -0300 Subject: [PATCH 06/33] refactor: Remove unused clippy component --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b600d3f..7f3db15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: rustup component add clippy - uses: Swatinem/rust-cache@v2 - name: Run cargo fmt run: cargo fmt --all -- --check From c0226e939b3f5754a9f663e995c68bcce2b59e67 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sat, 9 Sep 2023 14:33:12 -0300 Subject: [PATCH 07/33] fix: Update `Cargo.lock` to remove crate with vunerability --- Cargo.lock | 453 +++++++++++++++++++++++------------------------------ 1 file changed, 198 insertions(+), 255 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e57166..398e221 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -27,9 +27,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -46,7 +46,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -56,7 +56,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -92,13 +92,29 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "bstr" -version = "0.2.17" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", + "serde", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", ] [[package]] @@ -138,14 +154,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" @@ -166,22 +182,13 @@ dependencies = [ "serde_json", ] -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - [[package]] name = "crossterm" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossterm_winapi", "libc", "mio", @@ -193,9 +200,9 @@ dependencies = [ [[package]] name = "crossterm_winapi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ "winapi", ] @@ -224,7 +231,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -235,15 +242,42 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "errno" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "fastrand" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fnv" @@ -253,20 +287,20 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "globset" -version = "0.4.8" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ "aho-corasick", "bstr", @@ -281,24 +315,23 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "ignore", "walkdir", ] [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "ignore" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" dependencies = [ - "crossbeam-utils", "globset", "lazy_static", "log", @@ -316,7 +349,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c33e7c1ddeb15c9abcbfef6029d8e29f69b52b6d6c891031b88ed91b5065803b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossterm", "dyn-clone", "lazy_static", @@ -328,18 +361,18 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "lazy_static" @@ -353,11 +386,17 @@ version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -365,42 +404,42 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.4.1" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "mio" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "wasi", + "windows-sys", ] [[package]] name = "newline-converter" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f81c2b19eebbc4249b3ca6aff70ae05bf18d6a99b7cc63cf0248774e640565" +checksum = "1f71d09d5c87634207f894c6b31b6a2b2c64ea3bdcf71bd5599fdbbe1600c00f" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "once_cell" -version = "1.16.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "option-ext" @@ -420,23 +459,17 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.4" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.42.0", + "windows-targets", ] -[[package]] -name = "ppv-lite86" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" - [[package]] name = "predicates" version = "3.0.3" @@ -457,9 +490,9 @@ checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.4" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -476,77 +509,59 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] [[package]] -name = "rand" -version = "0.8.4" +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "bitflags 1.3.2", ] [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "redox_syscall" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "ppv-lite86", - "rand_core", + "bitflags 1.3.2", ] [[package]] -name = "rand_core" -version = "0.6.3" +name = "redox_users" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", + "redox_syscall 0.2.16", + "thiserror", ] [[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.0" +name = "regex" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ - "getrandom", - "redox_syscall", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.7.3" +name = "regex-automata" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", @@ -555,24 +570,28 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rustix" +version = "0.38.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "bdf14a7a466ce88b5eac3da815b53aefc208ce7e74d1c263aabb04d88c4abeb1" dependencies = [ - "winapi", + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -585,9 +604,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" @@ -606,7 +625,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn", ] [[package]] @@ -622,9 +641,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -643,18 +662,18 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "smallvec" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "strsim" @@ -664,20 +683,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.107" +version = "2.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" dependencies = [ "proc-macro2", "quote", @@ -686,42 +694,41 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.2.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "libc", - "rand", - "redox_syscall", - "remove_dir_all", - "winapi", + "fastrand", + "redox_syscall 0.3.5", + "rustix", + "windows-sys", ] [[package]] name = "termtree" -version = "0.2.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn", ] [[package]] @@ -736,21 +743,21 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "utf8parse" @@ -760,21 +767,14 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", - "winapi", "winapi-util", ] -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -812,21 +812,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -838,99 +823,57 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" From ee8f5f636365516b4a9414f18f26d1c428377af3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 05:01:48 +0000 Subject: [PATCH 08/33] chore(deps): bump serde_json from 1.0.105 to 1.0.106 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.105 to 1.0.106. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.105...v1.0.106) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 398e221..0b4c774 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -630,9 +630,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 7921f31..c42f5f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ license = "MIT" [dependencies] inquire = "0.6.2" serde = { version = "1.0.188", features = ["derive"] } -serde_json = "1.0.105" +serde_json = "1.0.106" clap = { version = "4.4.2", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From 3b160c478cbfa420d94d0e2b240edffa8208c4bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 04:35:50 +0000 Subject: [PATCH 09/33] chore(deps): bump clap from 4.4.2 to 4.4.3 Bumps [clap](https://github.com/clap-rs/clap) from 4.4.2 to 4.4.3. - [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.2...v4.4.3) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b4c774..9aa284a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,9 +125,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.2" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a13b88d2c62ff462f88e4a121f17a82c1af05693a2f192b5c38d14de73c19f6" +checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" dependencies = [ "clap_builder", "clap_derive", diff --git a/Cargo.toml b/Cargo.toml index c42f5f1..18ecd00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ license = "MIT" inquire = "0.6.2" serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.106" -clap = { version = "4.4.2", features = ["derive"] } +clap = { version = "4.4.3", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From 8ccd53c55812fa76d85f7b6c4434a149d82e1ec5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 21:55:12 +0000 Subject: [PATCH 10/33] chore(deps): bump serde_json from 1.0.106 to 1.0.107 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.106 to 1.0.107. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.106...v1.0.107) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9aa284a..4d6fb92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -630,9 +630,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 18ecd00..8036b45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ license = "MIT" [dependencies] inquire = "0.6.2" serde = { version = "1.0.188", features = ["derive"] } -serde_json = "1.0.106" +serde_json = "1.0.107" clap = { version = "4.4.3", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From d337005d27453b5cb1a39459fb5c79cff93be74e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 04:57:34 +0000 Subject: [PATCH 11/33] chore(deps): bump clap from 4.4.3 to 4.4.4 Bumps [clap](https://github.com/clap-rs/clap) from 4.4.3 to 4.4.4. - [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.3...v4.4.4) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d6fb92..2715555 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,9 +125,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.3" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", "clap_derive", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 8036b45..e87db91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ license = "MIT" inquire = "0.6.2" serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" -clap = { version = "4.4.3", features = ["derive"] } +clap = { version = "4.4.4", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From c83e3a2b939b85cb3d18c825fe8954e8bdc86c73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 04:18:53 +0000 Subject: [PATCH 12/33] chore(deps): bump clap from 4.4.4 to 4.4.6 Bumps [clap](https://github.com/clap-rs/clap) from 4.4.4 to 4.4.6. - [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.4...v4.4.6) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2715555..23efed3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys", @@ -125,9 +125,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.4" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", "clap_derive", @@ -135,9 +135,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.4" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index e87db91..b4eb872 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ license = "MIT" inquire = "0.6.2" serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" -clap = { version = "4.4.4", features = ["derive"] } +clap = { version = "4.4.6", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From 5ac06a869c21881e36fb58dfd596a0febb5ee5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Aguiar?= Date: Mon, 2 Oct 2023 21:13:08 -0300 Subject: [PATCH 13/33] docs: fix install from source git clone url --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 2a19d1d..49b47bc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -39,7 +39,7 @@ dnf install ./commit_0.6.0_x86_64.rpm Requires rust and cargo ```bash -git clone https://github/alt-art/commit +git https://github.com/alt-art/commit.git cd commit cargo build --release ``` From 315f0c5327a9b2b9fdfa7e1417a6c8120320591b Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Mon, 2 Oct 2023 21:39:40 -0300 Subject: [PATCH 14/33] fix: Come back with clone --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 49b47bc..059ddf9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -39,7 +39,7 @@ dnf install ./commit_0.6.0_x86_64.rpm Requires rust and cargo ```bash -git https://github.com/alt-art/commit.git +git clone https://github.com/alt-art/commit.git cd commit cargo build --release ``` From f283e130573280f39d3ab4f11219d7f283189cad Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Mon, 2 Oct 2023 21:50:29 -0300 Subject: [PATCH 15/33] fix: Remove unnecessary pluralization --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 059ddf9..c0997f3 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -56,11 +56,11 @@ cp target/release/commit /usr/local/bin ```shell mkdir "C:\Program Files\commits" -copy commit.exe "C:\Program Files\commits" +copy commit.exe "C:\Program Files\commit" ``` #### Add program to PATH on windows ```shell -setx /M PATH "%PATH%;C:\Program Files\commits" +setx /M PATH "%PATH%;C:\Program Files\commit" ``` From 31a0e4c4ba9d01e0bf40ce563cc1d616f15fc260 Mon Sep 17 00:00:00 2001 From: terade <134976752+terade@users.noreply.github.com.> Date: Tue, 10 Oct 2023 19:17:00 +0200 Subject: [PATCH 16/33] feat(main.rs, commit.rs): Add -a flag to add all modified files into staging. Add -a (--all) flag to add all modified files into staging. Same result as executing git add -u beforehand. closes issue #44 --- src/commit.rs | 7 +++++++ src/main.rs | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/commit.rs b/src/commit.rs index d7decb4..fe2f636 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -87,3 +87,10 @@ pub fn pre_commit_check(pre_commit_command: Option, message: &str) -> Re } Ok(()) } + +pub fn git_add_all_modified() -> Result<()> { + let output = git_exec(&["add", "-u"])?; + std::io::stdout().write_all(&output.stdout)?; + std::io::stderr().write_all(&output.stderr)?; + Ok(()) +} diff --git a/src/main.rs b/src/main.rs index fe33743..83d9cd9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,12 +17,14 @@ use std::io::Write; use std::path::PathBuf; use commit::{ - check_staged_files, commit, pre_commit_check, read_cached_commit, write_cached_commit, + check_staged_files, commit, git_add_all_modified, pre_commit_check, read_cached_commit, + write_cached_commit, }; use commit_message::make_message_commit; const DEFAULT_CONFIG_FILE: &str = include_str!("../commit-default.json"); +#[allow(clippy::pedantic)] #[derive(Parser, Debug)] #[command(about, author, version)] struct Args { @@ -38,11 +40,18 @@ struct Args { /// Retry commit with the same message as the last one #[arg(short, long)] retry: bool, + /// Add all modified files into staging + #[arg(short, long)] + all: bool, } fn main() -> Result<()> { let args = Args::parse(); + if args.all { + git_add_all_modified()?; + } + check_staged_files()?; if args.init { From 7e780cab7b7de29563de436ca355da0ea847f6d5 Mon Sep 17 00:00:00 2001 From: terade <134976752+terade@users.noreply.github.com.> Date: Tue, 10 Oct 2023 20:32:01 +0200 Subject: [PATCH 17/33] fix(main.rs): Modify clippy lints Modify clippy lints to be more specific. #44 --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 83d9cd9..9134db8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,11 @@ clippy::cargo, clippy::str_to_string )] -#![allow(clippy::module_name_repetitions, clippy::multiple_crate_versions)] +#![allow( + clippy::module_name_repetitions, + clippy::multiple_crate_versions, + clippy::struct_excessive_bools +)] mod commit; mod commit_message; @@ -24,7 +28,6 @@ use commit_message::make_message_commit; const DEFAULT_CONFIG_FILE: &str = include_str!("../commit-default.json"); -#[allow(clippy::pedantic)] #[derive(Parser, Debug)] #[command(about, author, version)] struct Args { From cb81ba380a2e0713fc05b5f31ba8cdb867d942e6 Mon Sep 17 00:00:00 2001 From: terade <134976752+terade@users.noreply.github.com.> Date: Tue, 10 Oct 2023 20:56:39 +0200 Subject: [PATCH 18/33] fix(commit.rs): Fix missing error handling in git_add_all_modified() addressing issue #44 --- src/commit.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/commit.rs b/src/commit.rs index fe2f636..782900f 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -92,5 +92,12 @@ pub fn git_add_all_modified() -> Result<()> { let output = git_exec(&["add", "-u"])?; std::io::stdout().write_all(&output.stdout)?; std::io::stderr().write_all(&output.stderr)?; + + if !output.status.success() { + return Err(anyhow!( + "Failed to get git path. Make sure you are in a git repository" + )); + } + Ok(()) } From 4e6e83bd371ed3e8bd717b108ee730c9dbb32b2a Mon Sep 17 00:00:00 2001 From: terade <134976752+terade@users.noreply.github.com.> Date: Tue, 10 Oct 2023 21:03:46 +0200 Subject: [PATCH 19/33] fix(commit.rs): Change error message for git_add_all_modified #44 --- src/commit.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/commit.rs b/src/commit.rs index 782900f..b7e0824 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -94,9 +94,7 @@ pub fn git_add_all_modified() -> Result<()> { std::io::stderr().write_all(&output.stderr)?; if !output.status.success() { - return Err(anyhow!( - "Failed to get git path. Make sure you are in a git repository" - )); + return Err(anyhow!("Could not add files to staged area")); } Ok(()) From 13b92f50ab13041b7191a4e6ca88656c34ce41ea Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Wed, 11 Oct 2023 12:46:51 -0300 Subject: [PATCH 20/33] fix: Run ci on pull request to resolve small error --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f3db15..4f47ac0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: push +on: [pull_request, push] env: CARGO_TERM_COLOR: always @@ -21,4 +21,4 @@ jobs: - name: Run cargo fmt run: cargo fmt --all -- --check - name: Run tests - run: cargo test --verbose \ No newline at end of file + run: cargo test --verbose From b1dbb0f739f805c80e9e14a244510b9bd07454c8 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Wed, 11 Oct 2023 13:00:41 -0300 Subject: [PATCH 21/33] docs: Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d08e04..27f9c16 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ See [Installation guide](INSTALL.md) for installation. This command-line interface makes it possible to make patterned (conventional) commit messages to organize your repository. -This project is a clone of [cz-cli](https://github.com/commitizen/cz-cli) with some minor changes. +This project is based on [cz-cli](https://github.com/commitizen/cz-cli) but do everything best than the original. I made this project for my own use, because I don't want to mess with the original cz-cli. From dd1a65d2d0bd024a8bcb55b667294c0bfab5d9d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 04:17:02 +0000 Subject: [PATCH 22/33] chore(deps): bump serde from 1.0.188 to 1.0.189 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.188 to 1.0.189. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.189) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23efed3..b8f89a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -610,18 +610,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index b4eb872..5e62442 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] inquire = "0.6.2" -serde = { version = "1.0.188", features = ["derive"] } +serde = { version = "1.0.189", features = ["derive"] } serde_json = "1.0.107" clap = { version = "4.4.6", features = ["derive"] } dirs = "5.0.1" From 86ed8bcc8889673de19983d3d4ef52e80d54c231 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Wed, 18 Oct 2023 23:28:50 -0300 Subject: [PATCH 23/33] fix(test): Use `serial_test` to run synchronous tests Now file tests will be done synchronously so as not to mess up with the file system --- Cargo.lock | 143 ++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + src/config/tests.rs | 9 +++ 3 files changed, 153 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index b8f89a0..9f93df9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -180,6 +180,7 @@ dependencies = [ "inquire", "serde", "serde_json", + "serial_test", ] [[package]] @@ -207,6 +208,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "difflib" version = "0.4.0" @@ -285,6 +299,83 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-executor" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "getrandom" version = "0.2.10" @@ -320,6 +411,12 @@ dependencies = [ "walkdir", ] +[[package]] +name = "hashbrown" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" + [[package]] name = "heck" version = "0.4.1" @@ -470,6 +567,18 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "predicates" version = "3.0.3" @@ -639,6 +748,31 @@ dependencies = [ "serde", ] +[[package]] +name = "serial_test" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" +dependencies = [ + "dashmap", + "futures", + "lazy_static", + "log", + "parking_lot", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "signal-hook" version = "0.3.17" @@ -669,6 +803,15 @@ dependencies = [ "libc", ] +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + [[package]] name = "smallvec" version = "1.11.0" diff --git a/Cargo.toml b/Cargo.toml index 5e62442..e65bd73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ anyhow = "1.0.75" [dev-dependencies] assert_fs = "1.0.13" +serial_test = "2.0.0" [package.metadata.deb] name = "commit" diff --git a/src/config/tests.rs b/src/config/tests.rs index 1787a10..98440bd 100644 --- a/src/config/tests.rs +++ b/src/config/tests.rs @@ -2,8 +2,10 @@ use std::env::set_current_dir; use super::*; use assert_fs::prelude::*; +use serial_test::serial; #[test] +#[serial] fn select_custom_config_path_test() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; let config_file = temp_dir.child("config.json"); @@ -23,10 +25,12 @@ fn select_custom_config_path_test() -> Result<()> { Err(err) => assert_eq!(err.to_string(), "Config file does not exist: "), _ => unreachable!(), } + temp_dir.close()?; Ok(()) } #[test] +#[serial] fn get_config_path_test() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; set_current_dir(temp_dir.path())?; @@ -35,10 +39,12 @@ fn get_config_path_test() -> Result<()> { .join("commit/commit.json"); let config_path = get_config_path(); assert_eq!(config_file.to_str(), config_path?.to_str()); + temp_dir.close()?; Ok(()) } #[test] +#[serial] fn get_config_path_content_test() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; let config_file = temp_dir.child("config.json"); @@ -51,10 +57,12 @@ fn get_config_path_content_test() -> Result<()> { config_file.write_str(expected)?; let content = get_config_path_content(config_path)?; assert_eq!(content, expected); + temp_dir.close()?; Ok(()) } #[test] +#[serial] fn get_pattern_test() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; set_current_dir(temp_dir.path())?; @@ -64,5 +72,6 @@ fn get_pattern_test() -> Result<()> { assert_eq!(pattern.config.subject_separator, ": "); assert_eq!(pattern.config.scope_prefix, "("); assert_eq!(pattern.config.scope_suffix, ")"); + temp_dir.close()?; Ok(()) } From fcf3291de0cdc35dc36e7e4b42238220435cf676 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Wed, 18 Oct 2023 23:38:01 -0300 Subject: [PATCH 24/33] feat(config): Make every field the default You dont have to pass every field on the configurations file anymore. Now commit as a default for every field and will use them instead of throwing a error about a required field and that's why the init command will be discontinued. --- commit-default.json | 43 ------------ commit.json | 39 ----------- src/commit_message/message_build/mod.rs | 2 +- src/commit_message/message_build/tests.rs | 2 +- src/commit_message/mod.rs | 4 +- src/commit_message/prompt.rs | 2 +- src/commit_pattern/config.rs | 39 +++++++++++ src/commit_pattern/messages.rs | 46 ++++++++++++ src/commit_pattern/mod.rs | 85 +++++++++++++++++++++++ src/config/mod.rs | 50 +------------ src/config/tests.rs | 2 +- src/main.rs | 13 +--- 12 files changed, 180 insertions(+), 147 deletions(-) delete mode 100644 commit-default.json create mode 100644 src/commit_pattern/config.rs create mode 100644 src/commit_pattern/messages.rs create mode 100644 src/commit_pattern/mod.rs diff --git a/commit-default.json b/commit-default.json deleted file mode 100644 index c1fcb1e..0000000 --- a/commit-default.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "config": { - "subject_separator": ": ", - "scope_prefix": "(", - "scope_suffix": ")" - }, - "commit_types": [ - { "name": "feat", "description": "A new feature" }, - { "name": "fix", "description": "A bug fix" }, - { "name": "docs", "description": "Documentation only changes" }, - { - "name": "style", - "description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)" - }, - { - "name": "refactor", - "description": "A code change that neither fixes a bug nor adds a feature" - }, - { - "name": "perf", - "description": "A code change that improves performance" - }, - { - "name": "test", - "description": "Adding missing tests or correcting existing tests" - }, - { - "name": "chore", - "description": "Other changes that don't modify src or test files" - } - ], - "commit_scopes": [ - { "name": "custom", "description": "Custom scope" }, - { "name": "none", "description": "No scope" } - ], - "msg": { - "commit_type": "What type of commit you will made?", - "commit_scope": "What scope of commit you will made? (Optional)", - "commit_description": "Write a SHORT, IMPERATIVE tense description of the change:", - "commit_body": "Provide a LONGER description of the change (Optional):", - "commit_footer": "List any ISSUES CLOSED by this change E.g.: #31, #34 (Optional):" - } -} diff --git a/commit.json b/commit.json index ddb59ca..d2ad227 100644 --- a/commit.json +++ b/commit.json @@ -1,44 +1,5 @@ { "config": { - "subject_separator": ": ", - "scope_prefix": "(", - "scope_suffix": ")", "pre_commit": "./pre-commit.sh" - }, - "commit_types": [ - { "name": "feat", "description": "A new feature" }, - { "name": "fix", "description": "A bug fix" }, - { "name": "docs", "description": "Documentation only changes" }, - { - "name": "style", - "description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)" - }, - { - "name": "refactor", - "description": "A code change that neither fixes a bug nor adds a feature" - }, - { - "name": "perf", - "description": "A code change that improves performance" - }, - { - "name": "test", - "description": "Adding missing tests or correcting existing tests" - }, - { - "name": "chore", - "description": "Other changes that don't modify src or test files" - } - ], - "commit_scopes": [ - { "name": "custom", "description": "Custom scope" }, - { "name": "none", "description": "No scope" } - ], - "msg": { - "commit_type": "What type of commit you will made?", - "commit_scope": "What scope of commit you will made? (Optional)", - "commit_description": "Write a SHORT, IMPERATIVE tense description of the change:", - "commit_body": "Provide a LONGER description of the change (Optional):", - "commit_footer": "List any ISSUES CLOSED by this change E.g.: #31, #34 (Optional):" } } diff --git a/src/commit_message/message_build/mod.rs b/src/commit_message/message_build/mod.rs index ef4b8e4..e544e7d 100644 --- a/src/commit_message/message_build/mod.rs +++ b/src/commit_message/message_build/mod.rs @@ -1,7 +1,7 @@ #[cfg(test)] mod tests; -use crate::config::Config; +use crate::commit_pattern::Config; pub struct MessageBuilder { config: Config, diff --git a/src/commit_message/message_build/tests.rs b/src/commit_message/message_build/tests.rs index df731b9..18fdd97 100644 --- a/src/commit_message/message_build/tests.rs +++ b/src/commit_message/message_build/tests.rs @@ -1,5 +1,5 @@ use crate::commit_message::message_build::MessageBuilder; -use crate::config::Config; +use crate::commit_pattern::Config; fn message_with_config(config: Config) -> String { let mut builder = MessageBuilder::new(config); diff --git a/src/commit_message/mod.rs b/src/commit_message/mod.rs index 535ad84..fc082b5 100644 --- a/src/commit_message/mod.rs +++ b/src/commit_message/mod.rs @@ -2,11 +2,11 @@ mod message_build; mod prompt; use anyhow::{anyhow, Result}; - -use crate::config::CommitPattern; use message_build::MessageBuilder; use prompt::Prompt; +use crate::commit_pattern::CommitPattern; + pub fn make_message_commit(pattern: CommitPattern) -> Result { let mut message_inquirer = MessageInquirer::new(pattern.clone()); let skip_commit = pattern.skip_commit; diff --git a/src/commit_message/prompt.rs b/src/commit_message/prompt.rs index 72a2b60..3607ee9 100644 --- a/src/commit_message/prompt.rs +++ b/src/commit_message/prompt.rs @@ -1,4 +1,4 @@ -use crate::config::Type; +use crate::commit_pattern::Type; use inquire::{ required, diff --git a/src/commit_pattern/config.rs b/src/commit_pattern/config.rs new file mode 100644 index 0000000..6ec2fa0 --- /dev/null +++ b/src/commit_pattern/config.rs @@ -0,0 +1,39 @@ +use serde::Deserialize; + +#[derive(Deserialize, Clone)] +pub struct Config { + pub type_prefix: Option, + pub type_suffix: Option, + #[serde(default = "Config::subject_separator")] + pub subject_separator: String, + #[serde(default = "Config::scope_prefix")] + pub scope_prefix: String, + #[serde(default = "Config::scope_suffix")] + pub scope_suffix: String, + pub pre_commit: Option, +} + +impl Config { + fn subject_separator() -> String { + ": ".to_owned() + } + fn scope_prefix() -> String { + "(".to_owned() + } + fn scope_suffix() -> String { + ")".to_owned() + } +} + +impl Default for Config { + fn default() -> Self { + Self { + type_prefix: None, + type_suffix: None, + subject_separator: Self::subject_separator(), + scope_prefix: Self::scope_prefix(), + scope_suffix: Self::scope_suffix(), + pre_commit: None, + } + } +} diff --git a/src/commit_pattern/messages.rs b/src/commit_pattern/messages.rs new file mode 100644 index 0000000..970572d --- /dev/null +++ b/src/commit_pattern/messages.rs @@ -0,0 +1,46 @@ +use serde::Deserialize; + +#[derive(Deserialize, Clone)] +pub struct Messages { + #[serde(default = "Messages::commit_type")] + pub commit_type: String, + #[serde(default = "Messages::commit_scope")] + pub commit_scope: String, + #[serde(default = "Messages::commit_description")] + pub commit_description: String, + #[serde(default = "Messages::commit_body")] + pub commit_body: String, + #[serde(default = "Messages::commit_footer")] + pub commit_footer: String, +} + +impl Messages { + fn commit_type() -> String { + "What type of commit you will made?".to_owned() + } + fn commit_scope() -> String { + "What scope of commit you will made? (Optional)".to_owned() + } + fn commit_description() -> String { + "Write a SHORT, IMPERATIVE tense description of the change:".to_owned() + } + fn commit_body() -> String { + "Provide a LONGER description of the change (Optional):".to_owned() + } + + fn commit_footer() -> String { + "List any ISSUES CLOSED by this change E.g.: #31, #34 (Optional):".to_owned() + } +} + +impl Default for Messages { + fn default() -> Self { + Self { + commit_type: Self::commit_type(), + commit_scope: Self::commit_scope(), + commit_description: Self::commit_description(), + commit_body: Self::commit_body(), + commit_footer: Self::commit_footer(), + } + } +} diff --git a/src/commit_pattern/mod.rs b/src/commit_pattern/mod.rs new file mode 100644 index 0000000..230dd78 --- /dev/null +++ b/src/commit_pattern/mod.rs @@ -0,0 +1,85 @@ +mod config; +mod messages; + +use serde::Deserialize; +use std::fmt::{Display, Formatter, Result as FmtResult}; + +pub use config::Config; +use messages::Messages; + +impl Display for Type { + fn fmt(&self, formatter: &mut Formatter) -> FmtResult { + write!(formatter, "{} - {}", self.name, self.description) + } +} + +#[derive(Clone, Deserialize)] +pub struct Type { + pub name: String, + pub description: String, +} + +#[derive(Deserialize, Clone)] +pub struct CommitPattern { + #[serde(default)] + pub config: Config, + #[serde(default = "CommitPattern::commit_types")] + pub commit_types: Vec, + #[serde(default = "CommitPattern::commit_scopes")] + pub commit_scopes: Vec, + #[serde(default)] + pub skip_commit: Vec, + #[serde(default)] + pub msg: Messages, +} + +impl CommitPattern { + fn commit_types() -> Vec { + vec![ + Type { + name: "feat".to_owned(), + description: "A new feature".to_owned(), + }, + Type { + name: "fix".to_owned(), + description: "A bug fix".to_owned(), + }, + Type { + name: "docs".to_owned(), + description: "Documentation only changes".to_owned(), + }, + Type { + name: "style".to_owned(), + description: "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)".to_owned(), + }, + Type { + name: "refactor".to_owned(), + description: "A code change that neither fixes a bug nor adds a feature".to_owned(), + }, + Type { + name: "perf".to_owned(), + description: "A code change that improves performance".to_owned(), + }, + Type { + name: "test".to_owned(), + description: "Adding missing tests or correcting existing tests".to_owned(), + }, + Type { + name: "chore".to_owned(), + description: "Other changes that don't modify src or test files".to_owned(), + }, + ] + } + fn commit_scopes() -> Vec { + vec![ + Type { + name: "custom".to_owned(), + description: "Custom scope".to_owned(), + }, + Type { + name: "none".to_owned(), + description: "No scope".to_owned(), + }, + ] + } +} diff --git a/src/config/mod.rs b/src/config/mod.rs index 07ae18d..552f462 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -2,54 +2,11 @@ mod tests; use anyhow::{anyhow, Context, Result}; -use serde::Deserialize; -use std::fmt::{Display, Formatter, Result as FmtResult}; use std::fs; use std::path::Path; use std::path::PathBuf; -use crate::DEFAULT_CONFIG_FILE; - -#[derive(Deserialize, Clone)] -pub struct Config { - pub type_prefix: Option, - pub type_suffix: Option, - pub subject_separator: String, - pub scope_prefix: String, - pub scope_suffix: String, - pub pre_commit: Option, -} - -impl Display for Type { - fn fmt(&self, formatter: &mut Formatter) -> FmtResult { - write!(formatter, "{} - {}", self.name, self.description) - } -} - -#[derive(Clone, Deserialize)] -pub struct Type { - pub name: String, - pub description: String, -} - -#[derive(Deserialize, Clone)] -pub struct Messages { - pub commit_type: String, - pub commit_scope: String, - pub commit_description: String, - pub commit_body: String, - pub commit_footer: String, -} - -#[derive(Deserialize, Clone)] -pub struct CommitPattern { - pub config: Config, - pub commit_types: Vec, - pub commit_scopes: Vec, - #[serde(default)] - pub skip_commit: Vec, - pub msg: Messages, -} +use crate::commit_pattern::CommitPattern; fn get_config_path_content(config_path: impl AsRef) -> Result { let content = fs::read_to_string(config_path)?; @@ -92,9 +49,8 @@ fn get_config_path() -> Result { } pub fn get_pattern(config_path: Option) -> Result { - let default_pattern_str = DEFAULT_CONFIG_FILE; let selected_config_path = select_custom_config_path(config_path)?; - let pattern_str = get_config_path_content(selected_config_path) - .unwrap_or_else(|_| default_pattern_str.to_owned()); + let pattern_str = + get_config_path_content(selected_config_path).unwrap_or_else(|_| "{}".to_owned()); serde_json::from_str(&pattern_str).context("Failed to parse commit pattern from file") } diff --git a/src/config/tests.rs b/src/config/tests.rs index 98440bd..fa45f26 100644 --- a/src/config/tests.rs +++ b/src/config/tests.rs @@ -53,7 +53,7 @@ fn get_config_path_content_test() -> Result<()> { let content = get_config_path_content(config_path)?; assert_eq!(content, ""); - let expected = include_str!("../../commit-default.json"); + let expected = include_str!("../../commit.json"); config_file.write_str(expected)?; let content = get_config_path_content(config_path)?; assert_eq!(content, expected); diff --git a/src/main.rs b/src/main.rs index 9134db8..73501ef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,11 +13,11 @@ mod commit; mod commit_message; +mod commit_pattern; mod config; use anyhow::Result; use clap::Parser; -use std::io::Write; use std::path::PathBuf; use commit::{ @@ -26,17 +26,12 @@ use commit::{ }; use commit_message::make_message_commit; -const DEFAULT_CONFIG_FILE: &str = include_str!("../commit-default.json"); - #[derive(Parser, Debug)] #[command(about, author, version)] struct Args { /// Custom configuration file path #[arg(short, long)] config: Option, - /// Init custom configuration file - #[arg(long)] - init: bool, /// Use as hook #[arg(long)] hook: bool, @@ -57,12 +52,6 @@ fn main() -> Result<()> { check_staged_files()?; - if args.init { - let mut file = std::fs::File::create("commit.json")?; - file.write_all(DEFAULT_CONFIG_FILE.as_bytes())?; - return Ok(()); - } - let pattern = config::get_pattern(args.config)?; if args.retry { From 675955543aa7c1863b6d7f6c4d948ddb30e2cbe0 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Wed, 18 Oct 2023 23:45:35 -0300 Subject: [PATCH 25/33] fix(test): Windows can't make `assert_ft` `close` work because was made by Microsoft WINDOWS IS SHIT --- src/config/tests.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/config/tests.rs b/src/config/tests.rs index fa45f26..fef8fb4 100644 --- a/src/config/tests.rs +++ b/src/config/tests.rs @@ -25,7 +25,6 @@ fn select_custom_config_path_test() -> Result<()> { Err(err) => assert_eq!(err.to_string(), "Config file does not exist: "), _ => unreachable!(), } - temp_dir.close()?; Ok(()) } @@ -39,7 +38,6 @@ fn get_config_path_test() -> Result<()> { .join("commit/commit.json"); let config_path = get_config_path(); assert_eq!(config_file.to_str(), config_path?.to_str()); - temp_dir.close()?; Ok(()) } @@ -57,7 +55,6 @@ fn get_config_path_content_test() -> Result<()> { config_file.write_str(expected)?; let content = get_config_path_content(config_path)?; assert_eq!(content, expected); - temp_dir.close()?; Ok(()) } @@ -72,6 +69,5 @@ fn get_pattern_test() -> Result<()> { assert_eq!(pattern.config.subject_separator, ": "); assert_eq!(pattern.config.scope_prefix, "("); assert_eq!(pattern.config.scope_suffix, ")"); - temp_dir.close()?; Ok(()) } From 21bae9c4dab31053c5d3db6093dffa483062f632 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Tue, 24 Oct 2023 23:11:34 -0300 Subject: [PATCH 26/33] chore(deps): Update all Cargo.lock dependencies --- Cargo.lock | 165 +++++++++++++++++++++++++---------------------------- 1 file changed, 77 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9f93df9..b59824b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -27,15 +27,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -94,29 +94,20 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bstr" -version = "1.6.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "serde", ] -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -125,9 +116,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.6" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", @@ -135,9 +126,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.6" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -147,9 +138,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", @@ -159,9 +150,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "colorchoice" @@ -256,9 +247,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "either" @@ -268,30 +259,19 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "errno" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fnv" @@ -413,9 +393,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" [[package]] name = "heck" @@ -458,9 +438,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] @@ -479,21 +459,21 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -507,15 +487,15 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "log", @@ -556,13 +536,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets", ] @@ -581,9 +561,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "predicates" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" +checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" dependencies = [ "anstyle", "difflib", @@ -609,9 +589,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -643,6 +623,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -656,9 +645,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -668,9 +657,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -679,17 +668,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustix" -version = "0.38.12" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf14a7a466ce88b5eac3da815b53aefc208ce7e74d1c263aabb04d88c4abeb1" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", @@ -814,9 +803,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "strsim" @@ -826,9 +815,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "2.0.31" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -856,18 +845,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -886,9 +875,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-segmentation" @@ -898,9 +887,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "utf8parse" @@ -942,9 +931,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] From 5c16fda90cb79f784b3844190de2483b8b92d8cc Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sun, 29 Oct 2023 15:07:57 -0300 Subject: [PATCH 27/33] feat(config): Search in parent folders for commit.json configuration file Closes #42 --- src/config/mod.rs | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index 552f462..6526f12 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -35,17 +35,29 @@ fn select_custom_config_path(config: Option) -> Result { } } -fn get_config_path() -> Result { +fn search_config_file_on_parents() -> Result> { let current_dir = std::env::current_dir()?; - let current_file = current_dir.join("commit.json"); - if current_file.is_file() { - Ok(current_file) - } else { - let config_file = dirs::config_dir() - .ok_or_else(|| anyhow!("Could not find config directory"))? - .join("commit/commit.json"); - Ok(config_file) + let mut current_dir = current_dir.as_path(); + loop { + let config_file = current_dir.join("commit.json"); + if config_file.is_file() { + return Ok(Some(config_file)); + } + if let Some(parent) = current_dir.parent() { + current_dir = parent; + } else { + break; + } } + Ok(None) +} + +fn get_config_path() -> Result { + Ok(search_config_file_on_parents()?.unwrap_or_else(|| { + dirs::config_dir() + .expect("Could not find config directory") + .join("commit/commit.json") + })) } pub fn get_pattern(config_path: Option) -> Result { From 593f952c2046c5807f645739c05d26d01357d309 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sun, 29 Oct 2023 15:22:22 -0300 Subject: [PATCH 28/33] test(config): Add tests for searching config file in parents folders --- src/config/tests.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/config/tests.rs b/src/config/tests.rs index fef8fb4..697bc32 100644 --- a/src/config/tests.rs +++ b/src/config/tests.rs @@ -1,4 +1,4 @@ -use std::env::set_current_dir; +use std::{env::set_current_dir, fs::remove_file}; use super::*; use assert_fs::prelude::*; @@ -32,7 +32,15 @@ fn select_custom_config_path_test() -> Result<()> { #[serial] fn get_config_path_test() -> Result<()> { let temp_dir = assert_fs::TempDir::new()?; - set_current_dir(temp_dir.path())?; + temp_dir.child("commit.json").touch()?; + temp_dir.child("some/sub/dir").create_dir_all()?; + set_current_dir(temp_dir.path().join("some/sub/dir"))?; + let config_path = get_config_path()?; + assert_eq!( + config_path.to_str(), + temp_dir.path().join("commit.json").to_str() + ); + remove_file(temp_dir.path().join("commit.json"))?; let config_file = dirs::config_dir() .ok_or_else(|| anyhow!("Could not find config directory"))? .join("commit/commit.json"); From 695a1a22fbfb8ebe9fa417b21ef8c50124806033 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sun, 29 Oct 2023 15:28:11 -0300 Subject: [PATCH 29/33] refactor(config): Use `BufReader` to read and parse contents of the config file --- src/commit_pattern/mod.rs | 12 ++++++++++++ src/config/mod.rs | 24 ++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/commit_pattern/mod.rs b/src/commit_pattern/mod.rs index 230dd78..8541a6e 100644 --- a/src/commit_pattern/mod.rs +++ b/src/commit_pattern/mod.rs @@ -83,3 +83,15 @@ impl CommitPattern { ] } } + +impl Default for CommitPattern { + fn default() -> Self { + Self { + config: Config::default(), + commit_types: Self::commit_types(), + commit_scopes: Self::commit_scopes(), + skip_commit: vec![], + msg: Messages::default(), + } + } +} diff --git a/src/config/mod.rs b/src/config/mod.rs index 6526f12..24be087 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -2,17 +2,11 @@ mod tests; use anyhow::{anyhow, Context, Result}; -use std::fs; -use std::path::Path; +use std::fs::File; use std::path::PathBuf; use crate::commit_pattern::CommitPattern; -fn get_config_path_content(config_path: impl AsRef) -> Result { - let content = fs::read_to_string(config_path)?; - Ok(content) -} - fn select_custom_config_path(config: Option) -> Result { match config { Some(config_path) => { @@ -62,7 +56,17 @@ fn get_config_path() -> Result { pub fn get_pattern(config_path: Option) -> Result { let selected_config_path = select_custom_config_path(config_path)?; - let pattern_str = - get_config_path_content(selected_config_path).unwrap_or_else(|_| "{}".to_owned()); - serde_json::from_str(&pattern_str).context("Failed to parse commit pattern from file") + if selected_config_path.exists() { + let file = File::open(&selected_config_path).context(format!( + "Could not open config file: {}", + selected_config_path.display() + ))?; + let reader = std::io::BufReader::new(file); + Ok(serde_json::from_reader(reader).context(format!( + "Could not parse config file: {}", + selected_config_path.display() + ))?) + } else { + Ok(CommitPattern::default()) + } } From 2e209f22e8cc0e92737d89f8cc820af4ad803bcf Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Sun, 29 Oct 2023 15:29:57 -0300 Subject: [PATCH 30/33] test(config): Remove `get_config_path_content` test --- src/config/tests.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/config/tests.rs b/src/config/tests.rs index 697bc32..f953ba9 100644 --- a/src/config/tests.rs +++ b/src/config/tests.rs @@ -49,23 +49,6 @@ fn get_config_path_test() -> Result<()> { Ok(()) } -#[test] -#[serial] -fn get_config_path_content_test() -> Result<()> { - let temp_dir = assert_fs::TempDir::new()?; - let config_file = temp_dir.child("config.json"); - config_file.touch()?; - let config_path = config_file.path(); - let content = get_config_path_content(config_path)?; - assert_eq!(content, ""); - - let expected = include_str!("../../commit.json"); - config_file.write_str(expected)?; - let content = get_config_path_content(config_path)?; - assert_eq!(content, expected); - Ok(()) -} - #[test] #[serial] fn get_pattern_test() -> Result<()> { From 11280e9148e377559bcadc3d416c58ee4f8d6aa2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 04:45:48 +0000 Subject: [PATCH 31/33] chore(deps): bump serde from 1.0.189 to 1.0.190 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.189 to 1.0.190. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.189...v1.0.190) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b59824b..945691f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -708,18 +708,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index e65bd73..797505b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] inquire = "0.6.2" -serde = { version = "1.0.189", features = ["derive"] } +serde = { version = "1.0.190", features = ["derive"] } serde_json = "1.0.107" clap = { version = "4.4.6", features = ["derive"] } dirs = "5.0.1" From 915816a67e85608ad3ef77d0b693acf44cbaeb2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 04:40:47 +0000 Subject: [PATCH 32/33] chore(deps): bump serde_json from 1.0.107 to 1.0.108 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.107 to 1.0.108. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.107...v1.0.108) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 945691f..79559a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -728,9 +728,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 797505b..d4e630a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ license = "MIT" [dependencies] inquire = "0.6.2" serde = { version = "1.0.190", features = ["derive"] } -serde_json = "1.0.107" +serde_json = "1.0.108" clap = { version = "4.4.6", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" From af569845206a91f51eba183d60394975b7f0a1b2 Mon Sep 17 00:00:00 2001 From: Pedro Mendes Date: Wed, 15 Nov 2023 13:50:07 -0300 Subject: [PATCH 33/33] chore(version): Bump to 0.7.0 --- Cargo.lock | 18 +++++++++--------- Cargo.toml | 6 +++--- INSTALL.md | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79559a6..0d987cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,9 +116,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.7" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" dependencies = [ "clap_builder", "clap_derive", @@ -126,9 +126,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" dependencies = [ "anstream", "anstyle", @@ -162,7 +162,7 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "commit" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anyhow", "assert_fs", @@ -708,18 +708,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index d4e630a..b3ebd96 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "commit" -version = "0.6.0" +version = "0.7.0" edition = "2021" homepage = "https://github.com/alt-art/commit" repository = "https://github.com/alt-art/commit" @@ -15,9 +15,9 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] inquire = "0.6.2" -serde = { version = "1.0.190", features = ["derive"] } +serde = { version = "1.0.192", features = ["derive"] } serde_json = "1.0.108" -clap = { version = "4.4.6", features = ["derive"] } +clap = { version = "4.4.8", features = ["derive"] } dirs = "5.0.1" anyhow = "1.0.75" diff --git a/INSTALL.md b/INSTALL.md index c0997f3..c2d7986 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,8 +21,8 @@ yay -S commits > Verify what is the latest release [here](https://github.com/alt-art/commit/releases) ```bash -wget https://github.com/alt-art/commit/releases/download/0.6.0/commit_0.6.0_amd64.deb -apt install ./commit_0.6.0_amd64.deb +wget https://github.com/alt-art/commit/releases/download/0.7.0/commit_0.7.0_amd64.deb +apt install ./commit_0.7.0_amd64.deb ``` ### Fedora @@ -30,8 +30,8 @@ apt install ./commit_0.6.0_amd64.deb > Verify what is the latest release [here](https://github.com/alt-art/commit/releases) ```bash -wget https://github.com/alt-art/commit/releases/download/0.6.0/commit_0.6.0_x86_64.rpm -dnf install ./commit_0.6.0_x86_64.rpm +wget https://github.com/alt-art/commit/releases/download/0.7.0/commit_0.7.0_x86_64.rpm +dnf install ./commit_0.7.0_x86_64.rpm ``` ### Install from source