Merge branch 'master' into conditional-style

This commit is contained in:
Filip Bachul 2023-05-02 11:19:36 +02:00
commit 65f9ff675c
16 changed files with 343 additions and 324 deletions

View File

@ -92,11 +92,9 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@master
with: with:
toolchain: stable toolchain: stable
override: true
profile: minimal
target: ${{ matrix.target }} target: ${{ matrix.target }}
- name: Setup | Install cargo-wix [Windows] - name: Setup | Install cargo-wix [Windows]
@ -108,20 +106,25 @@ jobs:
# cargo-wix does not require static crt # cargo-wix does not require static crt
RUSTFLAGS: "" RUSTFLAGS: ""
- name: Build | Build - name: Setup | Install cross [Linux]
uses: actions-rs/cargo@v1.0.3 if: matrix.os == 'ubuntu-latest'
with: uses: taiki-e/install-action@cross
command: build
args: --release --locked --target ${{ matrix.target }} - name: Build | Build [Cargo]
use-cross: ${{ matrix.os == 'ubuntu-latest' }} if: matrix.os != 'ubuntu-latest'
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Build | Build [Cross]
if: matrix.os == 'ubuntu-latest'
run: cross build --release --locked --target ${{ matrix.target }}
- name: Build | Installer [Windows] - name: Build | Installer [Windows]
continue-on-error: true continue-on-error: true
if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc' if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc'
uses: actions-rs/cargo@v1.0.3 run: >
with: cargo wix -v --no-build --nocapture -I install/windows/main.wxs
command: wix --target ${{ matrix.target }}
args: -v --no-build --nocapture -I install/windows/main.wxs --target ${{ matrix.target }} --output target/wix/starship-${{ matrix.target }}.msi --output target/wix/starship-${{ matrix.target }}.msi
- name: Post Build | Prepare artifacts [Windows] - name: Post Build | Prepare artifacts [Windows]
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
@ -284,11 +287,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
- name: Build | Publish - name: Build | Publish
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

View File

@ -7,4 +7,4 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: crate-ci/typos@v1.14.6 - uses: crate-ci/typos@v1.14.8

View File

@ -27,11 +27,8 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable
override: true
profile: minimal
components: rustfmt components: rustfmt
- name: Build | Format - name: Build | Format
@ -49,21 +46,15 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with: with:
toolchain: stable
override: true
profile: minimal
components: clippy components: clippy
- name: Setup | Cache - name: Setup | Cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Build | Lint - name: Build | Lint
uses: actions-rs/cargo@v1.0.3 uses: giraffate/clippy-action@871cc4173f2594435c7ea6b0bce499cf6c2164a1
with:
command: clippy
args: --workspace --locked --all-targets --all-features -- -D clippy::all
# Ensure that the project could be successfully compiled # Ensure that the project could be successfully compiled
cargo_check: cargo_check:
@ -74,11 +65,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
- name: Setup | Cache - name: Setup | Cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
@ -96,11 +83,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
- name: Setup | Cache - name: Setup | Cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
@ -118,11 +101,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
- name: Setup | Cache - name: Setup | Cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
@ -144,11 +123,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
- name: Setup | Cache - name: Setup | Cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
@ -185,12 +160,10 @@ jobs:
# Install all the required dependencies for testing # Install all the required dependencies for testing
- name: Setup | Rust - name: Setup | Rust
uses: actions-rs/toolchain@v1.0.7 uses: dtolnay/rust-toolchain@master
with: with:
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
components: llvm-tools-preview components: llvm-tools-preview
profile: minimal
override: true
- name: Setup | Cache - name: Setup | Cache
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
@ -228,10 +201,7 @@ jobs:
- name: Build | Installer [Windows] - name: Build | Installer [Windows]
continue-on-error: true continue-on-error: true
if: matrix.os == 'windows-latest' && matrix.rust == 'stable' if: matrix.os == 'windows-latest' && matrix.rust == 'stable'
uses: actions-rs/cargo@v1.0.3 run: cargo wix --dbg-build -v --nocapture -I install/windows/main.wxs
with:
command: wix
args: --dbg-build -v --nocapture -I install/windows/main.wxs
- name: Build | Chocolatey Package [Windows] - name: Build | Chocolatey Package [Windows]
continue-on-error: true continue-on-error: true

342
Cargo.lock generated
View File

@ -33,9 +33,9 @@ dependencies = [
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"
version = "0.7.20" version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" checksum = "e5bce8d450891e3b36f85a2230cec441fddd60e0c455b61b15bb3ffba955ca85"
dependencies = [ dependencies = [
"memchr", "memchr",
] ]
@ -244,6 +244,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813"
[[package]] [[package]]
name = "block" name = "block"
version = "0.1.6" version = "0.1.6"
@ -350,9 +356,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.2.3" version = "4.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f9152d70e42172fdb87de2efd7327160beee37886027cf86f30a233d5b30b4" checksum = "8a1f23fa97e1d1641371b51f35535cb26959b8e27ab50d167a8b996b5bada819"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@ -361,13 +367,13 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.2.3" version = "4.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e067b220911598876eb55d52725ddcc201ffe3f0904018195973bc5b012ea2ca" checksum = "0fdc5d93c358224b4d6867ef1356d740de2303e9892edc06c5340daeccd96bab"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
"bitflags", "bitflags 1.3.2",
"clap_lex", "clap_lex",
"once_cell", "once_cell",
"strsim", "strsim",
@ -377,9 +383,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_complete" name = "clap_complete"
version = "4.2.0" version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" checksum = "1a19591b2ab0e3c04b588a0e04ddde7b9eaa423646d1b4a8092879216bf47473"
dependencies = [ dependencies = [
"clap", "clap",
] ]
@ -722,9 +728,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1"
[[package]] [[package]]
name = "dunce" name = "dunce"
version = "1.0.3" version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b"
[[package]] [[package]]
name = "dyn-clone" name = "dyn-clone"
@ -959,9 +965,9 @@ dependencies = [
[[package]] [[package]]
name = "gix" name = "gix"
version = "0.43.1" version = "0.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c256ea71cc1967faaefdaad15f334146b7c806f12460dcafd3afed845c8c78dd" checksum = "6bf41b61f7df395284f7a579c0fa1a7e012c5aede655174d4e91299ef1cac643"
dependencies = [ dependencies = [
"gix-actor", "gix-actor",
"gix-attributes", "gix-attributes",
@ -970,10 +976,12 @@ dependencies = [
"gix-date", "gix-date",
"gix-diff", "gix-diff",
"gix-discover", "gix-discover",
"gix-features 0.28.1", "gix-features",
"gix-fs",
"gix-glob", "gix-glob",
"gix-hash 0.10.4", "gix-hash",
"gix-hashtable", "gix-hashtable",
"gix-ignore",
"gix-index", "gix-index",
"gix-lock", "gix-lock",
"gix-mailmap", "gix-mailmap",
@ -989,6 +997,7 @@ dependencies = [
"gix-tempfile", "gix-tempfile",
"gix-traverse", "gix-traverse",
"gix-url", "gix-url",
"gix-utils",
"gix-validate", "gix-validate",
"gix-worktree", "gix-worktree",
"log", "log",
@ -1001,9 +1010,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-actor" name = "gix-actor"
version = "0.19.0" version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc22b0cdc52237667c301dd7cdc6ead8f8f73c9f824e9942c8ebd6b764f6c0bf" checksum = "848efa0f1210cea8638f95691c82a46f98a74b9e3524f01d4955ebc25a8f84f3"
dependencies = [ dependencies = [
"bstr", "bstr",
"btoi", "btoi",
@ -1015,24 +1024,26 @@ dependencies = [
[[package]] [[package]]
name = "gix-attributes" name = "gix-attributes"
version = "0.10.0" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2231a25934a240d0a4b6f4478401c73ee81d8be52de0293eedbc172334abf3e1" checksum = "3015baa01ad2122fbcaab7863c857a603eb7b7ec12ac8141207c42c6439805e2"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-features 0.28.1",
"gix-glob", "gix-glob",
"gix-path", "gix-path",
"gix-quote", "gix-quote",
"kstring",
"log",
"smallvec",
"thiserror", "thiserror",
"unicode-bom", "unicode-bom",
] ]
[[package]] [[package]]
name = "gix-bitmap" name = "gix-bitmap"
version = "0.2.2" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "024bca0c7187517bda5ea24ab148c9ca8208dd0c3e2bea88cdb2008f91791a6d" checksum = "55a95f4942360766c3880bdb2b4b57f1ef73b190fc424755e7fdf480430af618"
dependencies = [ dependencies = [
"thiserror", "thiserror",
] ]
@ -1057,13 +1068,13 @@ dependencies = [
[[package]] [[package]]
name = "gix-config" name = "gix-config"
version = "0.20.1" version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fbad5ce54a8fc997acc50febd89ec80fa6e97cb7f8d0654cb229936407489d8" checksum = "1d252a0eddb6df74600d3d8872dc9fe98835a7da43110411d705b682f49d4ac1"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-config-value", "gix-config-value",
"gix-features 0.28.1", "gix-features",
"gix-glob", "gix-glob",
"gix-path", "gix-path",
"gix-ref", "gix-ref",
@ -1079,11 +1090,11 @@ dependencies = [
[[package]] [[package]]
name = "gix-config-value" name = "gix-config-value"
version = "0.10.2" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d09154c0c8677e4da0ec35e896f56ee3e338e741b9599fae06075edd83a4081c" checksum = "786861e84a5793ad5f863d846de5eb064cd23b87e61ad708c8c402608202e7be"
dependencies = [ dependencies = [
"bitflags", "bitflags 2.2.1",
"bstr", "bstr",
"gix-path", "gix-path",
"libc", "libc",
@ -1092,9 +1103,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-credentials" name = "gix-credentials"
version = "0.12.0" version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "750b684197374518ea057e0a0594713e07683faa0a3f43c0f93d97f64130ad8d" checksum = "4874a4fc11ffa844a3c2b87a66957bda30a73b577ef1acf15ac34df5745de5ff"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-command", "gix-command",
@ -1108,9 +1119,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-date" name = "gix-date"
version = "0.4.3" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b96271912ce39822501616f177dea7218784e6c63be90d5f36322ff3a722aae2" checksum = "99056f37270715f5c7584fd8b46899a2296af9cae92463bf58b8bd1f5a78e553"
dependencies = [ dependencies = [
"bstr", "bstr",
"itoa", "itoa",
@ -1120,11 +1131,11 @@ dependencies = [
[[package]] [[package]]
name = "gix-diff" name = "gix-diff"
version = "0.28.1" version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "103a0fa79b0d438f5ecb662502f052e530ace4fe1fe8e1c83c0c6da76d728e67" checksum = "644a0f2768bc42d7a69289ada80c9e15c589caefc6a315d2307202df83ed1186"
dependencies = [ dependencies = [
"gix-hash 0.10.4", "gix-hash",
"gix-object", "gix-object",
"imara-diff", "imara-diff",
"thiserror", "thiserror",
@ -1132,13 +1143,13 @@ dependencies = [
[[package]] [[package]]
name = "gix-discover" name = "gix-discover"
version = "0.16.2" version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6eba8ba458cb8f4a6c33409b0fe650b1258655175a7ffd1d24fafd3ed31d880b" checksum = "5012710ebdecf6193c6866d6409a3b702a4aa0d78c605bc343590b44ab9962a1"
dependencies = [ dependencies = [
"bstr", "bstr",
"dunce", "dunce",
"gix-hash 0.10.4", "gix-hash",
"gix-path", "gix-path",
"gix-ref", "gix-ref",
"gix-sec", "gix-sec",
@ -1147,14 +1158,14 @@ dependencies = [
[[package]] [[package]]
name = "gix-features" name = "gix-features"
version = "0.28.1" version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b76f9a80f6dd7be66442ae86e1f534effad9546676a392acc95e269d0c21c22" checksum = "cf69b0f5c701cc3ae22d3204b671907668f6437ca88862d355eaf9bc47a4f897"
dependencies = [ dependencies = [
"crc32fast", "crc32fast",
"crossbeam-channel", "crossbeam-channel",
"flate2", "flate2",
"gix-hash 0.10.4", "gix-hash",
"jwalk", "jwalk",
"libc", "libc",
"once_cell", "once_cell",
@ -1167,42 +1178,31 @@ dependencies = [
] ]
[[package]] [[package]]
name = "gix-features" name = "gix-fs"
version = "0.29.0" version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf69b0f5c701cc3ae22d3204b671907668f6437ca88862d355eaf9bc47a4f897" checksum = "9b37a1832f691fdc09910bd267f9a2e413737c1f9ec68c6e31f9e802616278a9"
dependencies = [ dependencies = [
"flate2", "gix-features",
"gix-hash 0.11.0",
"libc",
"thiserror",
] ]
[[package]] [[package]]
name = "gix-glob" name = "gix-glob"
version = "0.5.5" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93e43efd776bc543f46f0fd0ca3d920c37af71a764a16f2aebd89765e9ff2993" checksum = "c07c98204529ac3f24b34754540a852593d2a4c7349008df389240266627a72a"
dependencies = [ dependencies = [
"bitflags", "bitflags 2.2.1",
"bstr", "bstr",
"gix-features",
"gix-path",
] ]
[[package]] [[package]]
name = "gix-hash" name = "gix-hash"
version = "0.10.4" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a258595457bc192d1f1c59d0d168a1e34e2be9b97a614e14995416185de41a7" checksum = "078eec3ac2808cc03f0bddd2704cb661da5c5dc33b41a9d7947b141d499c7c42"
dependencies = [
"hex",
"thiserror",
]
[[package]]
name = "gix-hash"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e6692709eafc9ba8cefef657144fb4170eef1351dc44b7cc873d80ce46db370"
dependencies = [ dependencies = [
"hex", "hex",
"thiserror", "thiserror",
@ -1210,28 +1210,40 @@ dependencies = [
[[package]] [[package]]
name = "gix-hashtable" name = "gix-hashtable"
version = "0.1.3" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4e55e40dfd694884f0eb78796c5bddcf2f8b295dace47039099dd7e76534973" checksum = "afebb85691c6a085b114e01a27f4a61364519298c5826cb87a45c304802299bc"
dependencies = [ dependencies = [
"gix-hash 0.10.4", "gix-hash",
"hashbrown 0.13.2", "hashbrown 0.13.2",
"parking_lot", "parking_lot",
] ]
[[package]] [[package]]
name = "gix-index" name = "gix-ignore"
version = "0.15.1" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "717ab601ece7921f59fe86849dbe27d44a46ebb883b5885732c4f30df4996177" checksum = "ba205b6df563e2906768bb22834c82eb46c5fdfcd86ba2c347270bc8309a05b2"
dependencies = [ dependencies = [
"bitflags", "bstr",
"gix-glob",
"gix-path",
"unicode-bom",
]
[[package]]
name = "gix-index"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa282756760f79c401d4f4f42588fbb4aa27bbb4b0830f3b4d3480c21a4ac5a7"
dependencies = [
"bitflags 2.2.1",
"bstr", "bstr",
"btoi", "btoi",
"filetime", "filetime",
"gix-bitmap", "gix-bitmap",
"gix-features 0.28.1", "gix-features",
"gix-hash 0.10.4", "gix-hash",
"gix-lock", "gix-lock",
"gix-object", "gix-object",
"gix-traverse", "gix-traverse",
@ -1254,9 +1266,9 @@ dependencies = [
[[package]] [[package]]
name = "gix-mailmap" name = "gix-mailmap"
version = "0.11.0" version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b66aea5e52875cd4915f4957a6f4b75831a36981e2ec3f5fad9e370e444fe1a" checksum = "e8856cec3bdc3610c06970d28b6cb20a0c6621621cf9a8ec48cbd23f2630f362"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-actor", "gix-actor",
@ -1265,15 +1277,15 @@ dependencies = [
[[package]] [[package]]
name = "gix-object" name = "gix-object"
version = "0.28.0" version = "0.29.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8df068db9180ee935fbb70504848369e270bdcb576b05c0faa8b9fd3b86fc017" checksum = "c9bb30ce0818d37096daa29efe361a4bc6dd0b51a5726598898be7e9a40a01e1"
dependencies = [ dependencies = [
"bstr", "bstr",
"btoi", "btoi",
"gix-actor", "gix-actor",
"gix-features 0.28.1", "gix-features",
"gix-hash 0.10.4", "gix-hash",
"gix-validate", "gix-validate",
"hex", "hex",
"itoa", "itoa",
@ -1284,13 +1296,13 @@ dependencies = [
[[package]] [[package]]
name = "gix-odb" name = "gix-odb"
version = "0.43.1" version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e83af2e3e36005bfe010927f0dff41fb5acc3e3d89c6f1174135b3a34086bda2" checksum = "bca2f324aa67672b6d0f2c0fa93f96eb6a7029d260e4c1df5dce3c015f5e5add"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"gix-features 0.28.1", "gix-features",
"gix-hash 0.10.4", "gix-hash",
"gix-object", "gix-object",
"gix-pack", "gix-pack",
"gix-path", "gix-path",
@ -1302,15 +1314,15 @@ dependencies = [
[[package]] [[package]]
name = "gix-pack" name = "gix-pack"
version = "0.33.2" version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9401911c7fe032ad7b31c6a6b5be59cb283d1d6c999417a8215056efe6d635f3" checksum = "164a515900a83257ae4aa80e741655bee7a2e39113fb535d7a5ac623b445ff20"
dependencies = [ dependencies = [
"clru", "clru",
"gix-chunk", "gix-chunk",
"gix-diff", "gix-diff",
"gix-features 0.28.1", "gix-features",
"gix-hash 0.10.4", "gix-hash",
"gix-hashtable", "gix-hashtable",
"gix-object", "gix-object",
"gix-path", "gix-path",
@ -1325,24 +1337,26 @@ dependencies = [
[[package]] [[package]]
name = "gix-path" name = "gix-path"
version = "0.7.3" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32370dce200bb951df013e03dff35b4233fc7a89458642b047629b91734a7e19" checksum = "4fc78f47095a0c15aea0e66103838f0748f4494bf7a9555dfe0f00425400396c"
dependencies = [ dependencies = [
"bstr", "bstr",
"home",
"once_cell",
"thiserror", "thiserror",
] ]
[[package]] [[package]]
name = "gix-prompt" name = "gix-prompt"
version = "0.3.3" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f3034d4d935aef2c7bf719aaa54b88c520e82413118d886ae880a31d5bdee57" checksum = "330d11fdf88fff3366c2491efde2f3e454958efe7d5ddf60272e8fb1d944bb01"
dependencies = [ dependencies = [
"gix-command", "gix-command",
"gix-config-value", "gix-config-value",
"nix",
"parking_lot", "parking_lot",
"rustix",
"thiserror", "thiserror",
] ]
@ -1359,13 +1373,14 @@ dependencies = [
[[package]] [[package]]
name = "gix-ref" name = "gix-ref"
version = "0.27.2" version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4e909396ed3b176823991ccc391c276ae2a015e54edaafa3566d35123cfac9d" checksum = "b8212ecfe41815a2f1b059d82171d6276758cfac5506a5e0f04ad45ef0b1924a"
dependencies = [ dependencies = [
"gix-actor", "gix-actor",
"gix-features 0.28.1", "gix-features",
"gix-hash 0.10.4", "gix-fs",
"gix-hash",
"gix-lock", "gix-lock",
"gix-object", "gix-object",
"gix-path", "gix-path",
@ -1378,12 +1393,12 @@ dependencies = [
[[package]] [[package]]
name = "gix-refspec" name = "gix-refspec"
version = "0.9.0" version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aba332462bda2e8efeae4302b39a6ed01ad56ef772fd5b7ef197cf2798294d65" checksum = "0a6ea733820df67e4cd7797deb12727905824d8f5b7c59d943c456d314475892"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-hash 0.10.4", "gix-hash",
"gix-revision", "gix-revision",
"gix-validate", "gix-validate",
"smallvec", "smallvec",
@ -1392,13 +1407,13 @@ dependencies = [
[[package]] [[package]]
name = "gix-revision" name = "gix-revision"
version = "0.12.2" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c6f6ff53f888858afc24bf12628446a14279ceec148df6194481f306f553ad2" checksum = "810f35e9afeccca999d5d348b239f9c162353127d2e13ff3240e31b919e35476"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-date", "gix-date",
"gix-hash 0.10.4", "gix-hash",
"gix-hashtable", "gix-hashtable",
"gix-object", "gix-object",
"thiserror", "thiserror",
@ -1406,15 +1421,14 @@ dependencies = [
[[package]] [[package]]
name = "gix-sec" name = "gix-sec"
version = "0.6.2" version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8ffa5bf0772f9b01de501c035b6b084cf9b8bb07dec41e3afc6a17336a65f47" checksum = "794520043d5a024dfeac335c6e520cb616f6963e30dab995892382e998c12897"
dependencies = [ dependencies = [
"bitflags", "bitflags 2.2.1",
"dirs",
"gix-path", "gix-path",
"libc", "libc",
"windows 0.43.0", "windows 0.48.0",
] ]
[[package]] [[package]]
@ -1433,11 +1447,11 @@ dependencies = [
[[package]] [[package]]
name = "gix-traverse" name = "gix-traverse"
version = "0.24.0" version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd9a4a07bb22168dc79c60e1a6a41919d198187ca83d8a5940ad8d7122a45df3" checksum = "a5be1e807f288c33bb005075111886cceb43ed8a167b3182a0f62c186e2a0dd1"
dependencies = [ dependencies = [
"gix-hash 0.10.4", "gix-hash",
"gix-hashtable", "gix-hashtable",
"gix-object", "gix-object",
"thiserror", "thiserror",
@ -1445,18 +1459,27 @@ dependencies = [
[[package]] [[package]]
name = "gix-url" name = "gix-url"
version = "0.16.0" version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6a22b4b32ad14d68f7b7fb6458fa58d44b01797d94c1b8f4db2d9c7b3c366b5" checksum = "dfc77f89054297cc81491e31f1bab4027e554b5ef742a44bd7035db9a0f78b76"
dependencies = [ dependencies = [
"bstr", "bstr",
"gix-features 0.28.1", "gix-features",
"gix-path", "gix-path",
"home", "home",
"thiserror", "thiserror",
"url", "url",
] ]
[[package]]
name = "gix-utils"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c10b69beac219acb8df673187a1f07dde2d74092f974fb3f9eb385aeb667c909"
dependencies = [
"fastrand",
]
[[package]] [[package]]
name = "gix-validate" name = "gix-validate"
version = "0.7.4" version = "0.7.4"
@ -1469,15 +1492,18 @@ dependencies = [
[[package]] [[package]]
name = "gix-worktree" name = "gix-worktree"
version = "0.15.2" version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54ec9a000b4f24af706c3cc680c7cda235656cbe3216336522f5692773b8a301" checksum = "10bf56a1f5037d84293ea6cece61d9f27c4866b1e13c1c95f37cf56b7da7af25"
dependencies = [ dependencies = [
"bstr", "bstr",
"filetime",
"gix-attributes", "gix-attributes",
"gix-features 0.28.1", "gix-features",
"gix-fs",
"gix-glob", "gix-glob",
"gix-hash 0.10.4", "gix-hash",
"gix-ignore",
"gix-index", "gix-index",
"gix-object", "gix-object",
"gix-path", "gix-path",
@ -1550,11 +1576,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]] [[package]]
name = "home" name = "home"
version = "0.5.4" version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "747309b4b440c06d57b0b25f2aee03ee9b5e5397d288c60e21fc709bb98a7408" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
dependencies = [ dependencies = [
"winapi", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
@ -1713,6 +1739,15 @@ dependencies = [
"rayon", "rayon",
] ]
[[package]]
name = "kstring"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747"
dependencies = [
"static_assertions",
]
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.4.0" version = "1.4.0"
@ -1769,9 +1804,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.3.1" version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" checksum = "36eb31c1778188ae1e64398743890d0877fef36d11521ac60406b42016e8c2cf"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@ -1910,7 +1945,7 @@ version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"cfg-if", "cfg-if",
"libc", "libc",
"memoffset 0.7.1", "memoffset 0.7.1",
@ -2058,9 +2093,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]] [[package]]
name = "open" name = "open"
version = "4.0.2" version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "873240a4a404d44c8cd1bf394359245d466a5695771fea15a79cafbc5e5cf4d7" checksum = "d16814a067484415fda653868c9be0ac5f2abd2ef5d951082a5f2fe1b3662944"
dependencies = [ dependencies = [
"is-wsl", "is-wsl",
"pathdiff", "pathdiff",
@ -2165,9 +2200,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
[[package]] [[package]]
name = "pest" name = "pest"
version = "2.5.7" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70"
dependencies = [ dependencies = [
"thiserror", "thiserror",
"ucd-trie", "ucd-trie",
@ -2175,9 +2210,9 @@ dependencies = [
[[package]] [[package]]
name = "pest_derive" name = "pest_derive"
version = "2.5.7" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be99c4c1d2fc2769b1d00239431d711d08f6efedcecb8b6e30707160aee99c15" checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb"
dependencies = [ dependencies = [
"pest", "pest",
"pest_generator", "pest_generator",
@ -2185,9 +2220,9 @@ dependencies = [
[[package]] [[package]]
name = "pest_generator" name = "pest_generator"
version = "2.5.7" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e56094789873daa36164de2e822b3888c6ae4b4f9da555a1103587658c805b1e" checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e"
dependencies = [ dependencies = [
"pest", "pest",
"pest_meta", "pest_meta",
@ -2198,9 +2233,9 @@ dependencies = [
[[package]] [[package]]
name = "pest_meta" name = "pest_meta"
version = "2.5.7" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6733073c7cff3d8459fda0e42f13a047870242aed8b509fe98000928975f359e" checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"pest", "pest",
@ -2270,7 +2305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4be1c66a6add46bff50935c313dae30a5030cf8385c5206e8a95e9e9def974aa" checksum = "4be1c66a6add46bff50935c313dae30a5030cf8385c5206e8a95e9e9def974aa"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"bitflags", "bitflags 1.3.2",
"cfg-if", "cfg-if",
"concurrent-queue", "concurrent-queue",
"libc", "libc",
@ -2437,7 +2472,7 @@ version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
] ]
[[package]] [[package]]
@ -2446,7 +2481,7 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
] ]
[[package]] [[package]]
@ -2462,9 +2497,9 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.7.3" version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@ -2479,9 +2514,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.6.29" version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c"
[[package]] [[package]]
name = "rust-ini" name = "rust-ini"
@ -2495,11 +2530,11 @@ dependencies = [
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.37.11" version = "0.37.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"errno 0.3.1", "errno 0.3.1",
"io-lifetimes", "io-lifetimes",
"libc", "libc",
@ -2795,7 +2830,7 @@ dependencies = [
"dunce", "dunce",
"gethostname", "gethostname",
"gix", "gix",
"gix-features 0.29.0", "gix-features",
"guess_host_triple", "guess_host_triple",
"home", "home",
"indexmap", "indexmap",
@ -3005,7 +3040,7 @@ checksum = "31ef6892cc0348a9b3b8c377addba91e0f6365863d92354bf27559dca81ee8c5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64", "base64",
"bitflags", "bitflags 1.3.2",
"cfg-if", "cfg-if",
"filedescriptor", "filedescriptor",
"hex", "hex",
@ -3217,9 +3252,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
[[package]] [[package]]
name = "unicode-bom" name = "unicode-bom"
version = "1.1.4" version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63ec69f541d875b783ca40184d655f2927c95f0bffd486faa83cd3ac3529ec32" checksum = "98e90c70c9f0d4d1ee6d0a7d04aa06cb9bbd53d8cfbdd62a0269a7c2eb640552"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
@ -3449,21 +3484,6 @@ dependencies = [
"windows_x86_64_msvc 0.39.0", "windows_x86_64_msvc 0.39.0",
] ]
[[package]]
name = "windows"
version = "0.43.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04662ed0e3e5630dfa9b26e4cb823b817f1a9addda855d973a9458c236556244"
dependencies = [
"windows_aarch64_gnullvm 0.42.2",
"windows_aarch64_msvc 0.42.2",
"windows_i686_gnu 0.42.2",
"windows_i686_msvc 0.42.2",
"windows_x86_64_gnu 0.42.2",
"windows_x86_64_gnullvm 0.42.2",
"windows_x86_64_msvc 0.42.2",
]
[[package]] [[package]]
name = "windows" name = "windows"
version = "0.48.0" version = "0.48.0"

View File

@ -43,13 +43,13 @@ gix-faster = ["gix-features/zlib-stock", "gix/fast-sha1"]
[dependencies] [dependencies]
chrono = { version = "0.4.24", default-features = false, features = ["clock", "std", "wasmbind"] } chrono = { version = "0.4.24", default-features = false, features = ["clock", "std", "wasmbind"] }
clap = { version = "4.2.3", features = ["derive", "cargo", "unicode"] } clap = { version = "4.2.5", features = ["derive", "cargo", "unicode"] }
clap_complete = "4.2.0" clap_complete = "4.2.1"
dirs-next = "2.0.0" dirs-next = "2.0.0"
dunce = "1.0.3" dunce = "1.0.4"
gethostname = "0.4.2" gethostname = "0.4.2"
# default feature restriction addresses https://github.com/starship/starship/issues/4251 # default feature restriction addresses https://github.com/starship/starship/issues/4251
gix = { version = "0.43.1", default-features = false, features = ["max-performance-safe"] } gix = { version = "0.44.1", default-features = false, features = ["max-performance-safe"] }
gix-features = { version = "0.29.0", optional = true } gix-features = { version = "0.29.0", optional = true }
indexmap = { version = "1.9.3", features = ["serde"] } indexmap = { version = "1.9.3", features = ["serde"] }
log = { version = "0.4.17", features = ["std"] } log = { version = "0.4.17", features = ["std"] }
@ -58,16 +58,16 @@ log = { version = "0.4.17", features = ["std"] }
notify-rust = { version = "4.8.0", optional = true } notify-rust = { version = "4.8.0", optional = true }
nu-ansi-term = "0.47.0" nu-ansi-term = "0.47.0"
once_cell = "1.17.1" once_cell = "1.17.1"
open = "4.0.2" open = "4.1.0"
# update os module config and tests when upgrading os_info # update os module config and tests when upgrading os_info
os_info = "3.7.0" os_info = "3.7.0"
path-slash = "0.2.1" path-slash = "0.2.1"
pest = "2.5.7" pest = "2.6.0"
pest_derive = "2.5.7" pest_derive = "2.6.0"
quick-xml = "0.28.2" quick-xml = "0.28.2"
rand = "0.8.5" rand = "0.8.5"
rayon = "1.7.0" rayon = "1.7.0"
regex = "1.7.3" regex = "1.8.1"
rust-ini = "0.18.0" rust-ini = "0.18.0"
semver = "1.0.17" semver = "1.0.17"
serde = { version = "1.0.160", features = ["derive"] } serde = { version = "1.0.160", features = ["derive"] }
@ -92,7 +92,7 @@ yaml-rust = "0.4.5"
process_control = { version = "4.0.3", features = ["crossbeam-channel"] } process_control = { version = "4.0.3", features = ["crossbeam-channel"] }
guess_host_triple = "0.1.3" guess_host_triple = "0.1.3"
home = "0.5.4" home = "0.5.5"
shell-words = "1.1.0" shell-words = "1.1.0"
[dependencies.schemars] [dependencies.schemars]
@ -118,7 +118,7 @@ nix = { version = "0.26.2", default-features = false, features = ["feature", "fs
[build-dependencies] [build-dependencies]
shadow-rs = { version = "0.21.0", default-features = false } shadow-rs = { version = "0.21.0", default-features = false }
dunce = "1.0.3" dunce = "1.0.4"
[target.'cfg(windows)'.build-dependencies] [target.'cfg(windows)'.build-dependencies]
winres = "0.1.12" winres = "0.1.12"

View File

@ -114,6 +114,14 @@
alt="Русский" alt="Русский"
/></a> /></a>
&nbsp; &nbsp;
<a
href="https://github.com/starship/starship/blob/master/docs/uk-UA/guide/README.md"
><img
height="20"
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ua.png"
alt="Українська"
/></a>
&nbsp;
<a <a
href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md" href="https://github.com/starship/starship/blob/master/docs/vi-VN/guide/README.md"
><img ><img

View File

@ -74,6 +74,11 @@ module.exports = defineConfig({
title: "Starship", title: "Starship",
description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!", description: "Минималистичная, быстрая и бесконечно настраиваемая командная строка для любой оболочки!",
}, },
"/uk-UA/": {
lang: "uk-UA",
title: "Starship",
description: "Простий, супер швидкий та безмежно адаптивний командний рядок для будь-якої оболонки!",
},
"/vi-VN/": { "/vi-VN/": {
lang: "vi-VN", lang: "vi-VN",
title: "Starship", title: "Starship",
@ -276,6 +281,25 @@ module.exports = defineConfig({
faq: "Часто Задаваемые Вопросы", faq: "Часто Задаваемые Вопросы",
}), }),
}, },
"/uk-UA/": {
// text for the language dropdown
selectText: "Мови",
// label for this locale in the language dropdown
label: "Українська",
// Custom text for edit link. Defaults to "Edit this page"
editLinkText: "Редагувати цю сторінку на GitHub",
// Custom navbar values
nav: [{ text: "Налаштування", link: "/uk-UA/config/" }],
// Custom sidebar values
sidebar: sidebar("uk-UA", {
guide: "Керівництво",
installing: "Розширене встановлення",
config: "Налаштування",
"advanced-config": "Розширені налаштування",
faq: "Часті питання",
presets: "Шаблони",
}),
},
"/vi-VN/": { "/vi-VN/": {
// text for the language dropdown // text for the language dropdown
selectText: "Ngôn ngữ", selectText: "Ngôn ngữ",

View File

@ -164,7 +164,7 @@ format = '\[[$symbol($version)]($style)\]'
format = '\[[$symbol$environment]($style)\]' format = '\[[$symbol$environment]($style)\]'
[sudo] [sudo]
format = '\[[as $symbol]\]' format = '\[[as $symbol]($style)\]'
[swift] [swift]
format = '\[[$symbol($version)]($style)\]' format = '\[[$symbol($version)]($style)\]'

View File

@ -245,7 +245,7 @@ You can also set a similar output with PowerShell by creating a function named `
```powershell ```powershell
# edit $PROFILE # edit $PROFILE
function Invoke-Starship-PreCommand { function Invoke-Starship-PreCommand {
$host.ui.Write("`e]0; PS> $env:USERNAME@$env:COMPUTERNAME`: $pwd `a") $host.ui.RawUI.WindowTitle = "$env:USERNAME@$env:COMPUTERNAME`: $pwd `a"
} }
Invoke-Expression (&starship init powershell) Invoke-Expression (&starship init powershell)

BIN
media/flag-ua.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

View File

@ -74,12 +74,20 @@ parts:
snapcraftctl build snapcraftctl build
snapcraftctl set-version $(git -C ../src describe --tags | sed 's/v//') snapcraftctl set-version $(git -C ../src describe --tags | sed 's/v//')
plugs:
starship-config:
interfaces: personal-files
write:
- $HOME/.config/starship.toml
- $HOME/.cache/starship
apps: apps:
starship: starship:
command: bin/starship command: bin/starship
plugs: plugs:
- home - home
- removable-media - removable-media
- starship-config
architectures: architectures:
- build-on: amd64 - build-on: amd64

View File

@ -182,6 +182,15 @@ impl<'a> Context<'a> {
} }
} }
/// Sets the context config, overwriting the existing config
pub fn set_config(mut self, config: toml::Table) -> Context<'a> {
self.root_config = StarshipRootConfig::load(&config);
self.config = StarshipConfig {
config: Some(config),
};
self
}
// Tries to retrieve home directory from a table in testing mode or else retrieves it from the os // Tries to retrieve home directory from a table in testing mode or else retrieves it from the os
pub fn get_home(&self) -> Option<PathBuf> { pub fn get_home(&self) -> Option<PathBuf> {
home_dir(&self.env) home_dir(&self.env)
@ -256,7 +265,7 @@ impl<'a> Context<'a> {
git_sec::trust::Mapping::<gix::open::Options>::default(); git_sec::trust::Mapping::<gix::open::Options>::default();
// don't use the global git configs // don't use the global git configs
let config = gix::permissions::Config { let config = gix::open::permissions::Config {
git_binary: false, git_binary: false,
system: false, system: false,
git: false, git: false,
@ -266,13 +275,16 @@ impl<'a> Context<'a> {
}; };
// change options for config permissions without touching anything else // change options for config permissions without touching anything else
git_open_opts_map.reduced = git_open_opts_map.reduced =
git_open_opts_map.reduced.permissions(gix::Permissions { git_open_opts_map
.reduced
.permissions(gix::open::Permissions {
config, config,
..gix::Permissions::default_for_level(git_sec::Trust::Reduced) ..gix::open::Permissions::default_for_level(git_sec::Trust::Reduced)
}); });
git_open_opts_map.full = git_open_opts_map.full.permissions(gix::Permissions { git_open_opts_map.full =
git_open_opts_map.full.permissions(gix::open::Permissions {
config, config,
..gix::Permissions::default_for_level(git_sec::Trust::Full) ..gix::open::Permissions::default_for_level(git_sec::Trust::Full)
}); });
let shared_repo = let shared_repo =
@ -790,6 +802,7 @@ fn parse_width(width: &str) -> Result<usize, ParseIntError> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::test::default_context;
use std::io; use std::io;
fn testdir(paths: &[&str]) -> Result<tempfile::TempDir, std::io::Error> { fn testdir(paths: &[&str]) -> Result<tempfile::TempDir, std::io::Error> {
@ -981,6 +994,16 @@ mod tests {
assert_eq!(expected_logical_dir, context.logical_dir); assert_eq!(expected_logical_dir, context.logical_dir);
} }
#[test]
fn set_config_method_overwrites_constructor() {
let context = default_context();
let mod_context = default_context().set_config(toml::toml! {
add_newline = true
});
assert_ne!(context.config.config, mod_context.config.config);
}
#[cfg(windows)] #[cfg(windows)]
#[test] #[test]
fn strip_extended_path_prefix() { fn strip_extended_path_prefix() {

View File

@ -91,6 +91,7 @@ impl<'a> StyleVariableHolder<Cow<'a, str>> for Vec<FormatElement<'a>> {
self.iter().fold(BTreeSet::new(), |mut acc, el| match el { self.iter().fold(BTreeSet::new(), |mut acc, el| match el {
FormatElement::TextGroup(textgroup) => { FormatElement::TextGroup(textgroup) => {
acc.extend(textgroup.style.get_style_variables()); acc.extend(textgroup.style.get_style_variables());
acc.extend(textgroup.format.get_style_variables());
acc acc
} }
FormatElement::Conditional(format) => { FormatElement::Conditional(format) => {

View File

@ -569,6 +569,30 @@ mod tests {
match_next!(result_iter, "inner", inner_style); match_next!(result_iter, "inner", inner_style);
} }
#[test]
fn test_style_variable_nested() {
const STYLE_VAR_NAME: &str = "style";
let format_string = format!("[[text](${STYLE_VAR_NAME})](blue)");
let inner_style = Some(Color::Red.bold());
let formatter = StringFormatter::new(&format_string)
.unwrap()
.map_style(|variable| match variable {
STYLE_VAR_NAME => Some(Ok("red bold".to_owned())),
_ => None,
});
assert_eq!(
BTreeSet::from([STYLE_VAR_NAME.into()]),
formatter.get_style_variables()
);
let result = formatter.parse(None, None).unwrap();
let mut result_iter = result.iter();
match_next!(result_iter, "text", inner_style);
}
#[test] #[test]
fn test_styled_variable_as_text() { fn test_styled_variable_as_text() {
const FORMAT_STR: &str = "[$var](red bold)"; const FORMAT_STR: &str = "[$var](red bold)";

View File

@ -493,24 +493,18 @@ fn preset_list() -> String {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::*; use super::*;
use crate::config::StarshipConfig;
use crate::test::default_context; use crate::test::default_context;
use crate::utils; use crate::utils;
#[test] #[test]
fn main_prompt() { fn main_prompt() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
add_newline=false add_newline=false
format="$character" format="$character"
[character] [character]
format=">\n>" format=">\n>"
}), });
};
context.root_config.format = "$character".to_string();
context.target = Target::Main; context.target = Target::Main;
context.root_config.add_newline = false;
let expected = String::from(">\n>"); let expected = String::from(">\n>");
let actual = get_prompt(context); let actual = get_prompt(context);
@ -519,15 +513,11 @@ mod test {
#[test] #[test]
fn right_prompt() { fn right_prompt() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
right_format="$character" right_format="$character"
[character] [character]
format=">\n>" format=">\n>"
}), });
};
context.root_config.right_format = "$character".to_string();
context.target = Target::Right; context.target = Target::Right;
let expected = String::from(">>"); // should strip new lines let expected = String::from(">>"); // should strip new lines
@ -537,22 +527,14 @@ mod test {
#[test] #[test]
fn custom_prompt() { fn custom_prompt() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
add_newline = false add_newline = false
[profiles] [profiles]
test="0_0$character" test="0_0$character"
[character] [character]
format=">>" format=">>"
}), });
};
context
.root_config
.profiles
.insert("test".to_string(), "0_0$character".to_string());
context.target = Target::Profile("test".to_string()); context.target = Target::Profile("test".to_string());
context.root_config.add_newline = false;
let expected = String::from("0_0>>"); let expected = String::from("0_0>>");
let actual = get_prompt(context); let actual = get_prompt(context);
@ -561,22 +543,14 @@ mod test {
#[test] #[test]
fn custom_prompt_fallback() { fn custom_prompt_fallback() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
add_newline=false add_newline=false
[profiles] [profiles]
test="0_0$character" test="0_0$character"
[character] [character]
format=">>" format=">>"
}), });
};
context
.root_config
.profiles
.insert("test".to_string(), "0_0$character".to_string());
context.target = Target::Profile("wrong_prompt".to_string()); context.target = Target::Profile("wrong_prompt".to_string());
context.root_config.add_newline = false;
let expected = String::from(">"); let expected = String::from(">");
let actual = get_prompt(context); let actual = get_prompt(context);
@ -585,13 +559,9 @@ mod test {
#[test] #[test]
fn continuation_prompt() { fn continuation_prompt() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
continuation_prompt="><>" continuation_prompt="><>"
}), });
};
context.root_config.continuation_prompt = "><>".to_string();
context.target = Target::Continuation; context.target = Target::Continuation;
let expected = String::from("><>"); let expected = String::from("><>");
@ -634,10 +604,7 @@ mod test {
#[test] #[test]
fn custom_expands() -> std::io::Result<()> { fn custom_expands() -> std::io::Result<()> {
let dir = tempfile::tempdir()?; let dir = tempfile::tempdir()?;
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.current_dir = dir.path().to_path_buf();
context.config = StarshipConfig {
config: Some(toml::toml! {
format="$custom" format="$custom"
[custom.a] [custom.a]
when=true when=true
@ -645,9 +612,8 @@ mod test {
[custom.b] [custom.b]
when=true when=true
format="b" format="b"
}), });
}; context.current_dir = dir.path().to_path_buf();
context.root_config.format = "$custom".to_string();
let expected = String::from("\nab"); let expected = String::from("\nab");
let actual = get_prompt(context); let actual = get_prompt(context);
@ -657,9 +623,7 @@ mod test {
#[test] #[test]
fn env_expands() { fn env_expands() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
format="$env_var" format="$env_var"
[env_var] [env_var]
format="$env_value" format="$env_value"
@ -668,9 +632,7 @@ mod test {
format="$env_value" format="$env_value"
[env_var.c] [env_var.c]
format="$env_value" format="$env_value"
}), });
};
context.root_config.format = "$env_var".to_string();
context.env.insert("a", "a".to_string()); context.env.insert("a", "a".to_string());
context.env.insert("b", "b".to_string()); context.env.insert("b", "b".to_string());
context.env.insert("c", "c".to_string()); context.env.insert("c", "c".to_string());
@ -683,10 +645,7 @@ mod test {
#[test] #[test]
fn custom_mixed() -> std::io::Result<()> { fn custom_mixed() -> std::io::Result<()> {
let dir = tempfile::tempdir()?; let dir = tempfile::tempdir()?;
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.current_dir = dir.path().to_path_buf();
context.config = StarshipConfig {
config: Some(toml::toml! {
format="${custom.c}$custom${custom.b}" format="${custom.c}$custom${custom.b}"
[custom.a] [custom.a]
when=true when=true
@ -697,9 +656,8 @@ mod test {
[custom.c] [custom.c]
when=true when=true
format="c" format="c"
}), });
}; context.current_dir = dir.path().to_path_buf();
context.root_config.format = "${custom.c}$custom${custom.b}".to_string();
let expected = String::from("\ncab"); let expected = String::from("\ncab");
let actual = get_prompt(context); let actual = get_prompt(context);
@ -709,9 +667,7 @@ mod test {
#[test] #[test]
fn env_mixed() { fn env_mixed() {
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.config = StarshipConfig {
config: Some(toml::toml! {
format="${env_var.c}$env_var${env_var.b}" format="${env_var.c}$env_var${env_var.b}"
[env_var] [env_var]
format="$env_value" format="$env_value"
@ -722,9 +678,7 @@ mod test {
format="$env_value" format="$env_value"
[env_var.c] [env_var.c]
format="$env_value" format="$env_value"
}), });
};
context.root_config.format = "${env_var.c}$env_var${env_var.b}".to_string();
context.env.insert("a", "a".to_string()); context.env.insert("a", "a".to_string());
context.env.insert("b", "b".to_string()); context.env.insert("b", "b".to_string());
context.env.insert("c", "c".to_string()); context.env.insert("c", "c".to_string());
@ -738,10 +692,7 @@ mod test {
#[test] #[test]
fn custom_subset() -> std::io::Result<()> { fn custom_subset() -> std::io::Result<()> {
let dir = tempfile::tempdir()?; let dir = tempfile::tempdir()?;
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.current_dir = dir.path().to_path_buf();
context.config = StarshipConfig {
config: Some(toml::toml! {
format="${custom.b}" format="${custom.b}"
[custom.a] [custom.a]
when=true when=true
@ -749,9 +700,8 @@ mod test {
[custom.b] [custom.b]
when=true when=true
format="b" format="b"
}), });
}; context.current_dir = dir.path().to_path_buf();
context.root_config.format = "${custom.b}".to_string();
let expected = String::from("\nb"); let expected = String::from("\nb");
let actual = get_prompt(context); let actual = get_prompt(context);
@ -762,17 +712,13 @@ mod test {
#[test] #[test]
fn custom_missing() -> std::io::Result<()> { fn custom_missing() -> std::io::Result<()> {
let dir = tempfile::tempdir()?; let dir = tempfile::tempdir()?;
let mut context = default_context(); let mut context = default_context().set_config(toml::toml! {
context.current_dir = dir.path().to_path_buf();
context.config = StarshipConfig {
config: Some(toml::toml! {
format="${custom.b}" format="${custom.b}"
[custom.a] [custom.a]
when=true when=true
format="a" format="a"
}), });
}; context.current_dir = dir.path().to_path_buf();
context.root_config.format = "${custom.b}".to_string();
let expected = String::from("\n"); let expected = String::from("\n");
let actual = get_prompt(context); let actual = get_prompt(context);

View File

@ -1,8 +1,7 @@
use crate::context::{Context, Shell, Target}; use crate::context::{Context, Shell, Target};
use crate::logger::StarshipLogger; use crate::logger::StarshipLogger;
use crate::{ use crate::{
config::{ModuleConfig, StarshipConfig}, config::StarshipConfig,
configs::StarshipRootConfig,
utils::{create_command, CommandOutput}, utils::{create_command, CommandOutput},
}; };
use log::{Level, LevelFilter}; use log::{Level, LevelFilter};
@ -89,10 +88,7 @@ impl<'a> ModuleRenderer<'a> {
/// Sets the config of the underlying context /// Sets the config of the underlying context
pub fn config(mut self, config: toml::Table) -> Self { pub fn config(mut self, config: toml::Table) -> Self {
self.context.root_config = StarshipRootConfig::load(&config); self.context = self.context.set_config(config);
self.context.config = StarshipConfig {
config: Some(config),
};
self self
} }