Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rossmacarthur committed Jun 9, 2024
1 parent ee5d6ff commit b946203
Show file tree
Hide file tree
Showing 24 changed files with 351 additions and 288 deletions.
345 changes: 202 additions & 143 deletions Cargo.lock

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,46 +28,46 @@ codegen-units = 1
pkg-url = "{ repo }/releases/download/{ version }/sheldon-{ version }-{ target }.tar.gz"

[dependencies]
anyhow = "1.0.75"
anyhow = "1.0.86"
casual = "0.2.0"
clap_complete = "4.4.4"
constcat = "0.4.0"
curl = "0.4.44"
clap_complete = "4.4.10"
constcat = "0.5.0"
curl = "0.4.46"
fmutex = "0.1.0"
git2 = "0.18.1"
globwalk = "0.8.1"
home = "0.5.5"
indexmap = { version = "2.1.0", features = ["rayon", "serde"] }
itertools = "0.12.0"
git2 = "0.18.3"
globwalk = "0.9.1"
home = "0.5.9"
indexmap = { version = "2.2.6", features = ["rayon", "serde"] }
itertools = "0.13.0"
maplit = "1.0.2"
once_cell = "1.18.0"
rayon = "1.8.0"
once_cell = "1.19.0"
rayon = "1.10.0"
regex-macro = "0.2.0"
serde = { version = "1.0.192", features = ["derive"] }
thiserror = "1.0.50"
toml = { version = "0.8.8", features = ["preserve_order"] }
toml_edit = "0.21.0"
upon = { version = "0.8.0", default-features = false, features = ["serde", "filters"] }
url = { version = "2.4.1", features = ["serde"] }
walkdir = "2.4.0"
which = { version = "5.0.0", default-features = false }
yansi = "0.5.1"
serde = { version = "1.0.203", features = ["derive"] }
thiserror = "1.0.61"
toml = { version = "0.8.14", features = ["preserve_order"] }
toml_edit = "0.22.14"
upon = { version = "0.8.1", default-features = false, features = ["serde", "filters"] }
url = { version = "2.5.0", features = ["serde"] }
walkdir = "2.5.0"
which = { version = "6.0.1", default-features = false }
yansi = "1.0.1"

[dependencies.clap]
version = "4.4.8"
version = "4.4.18"
default-features = false
features = [
"std", "help", "usage", "error-context", "suggestions", # default excluding "color"
"cargo", "env", "derive" # optional
]

[build-dependencies]
anyhow = "1.0.75"
anyhow = "1.0.86"

[dev-dependencies]
goldie = "0.4.3"
goldie = "0.5.0"
pretty_assertions = "1.4.0"
tempfile = "3.8.1"
tempfile = "3.10.1"

[features]
# By default vendor libgit2 since we rely on some modern features.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ following.

```toml
[templates]
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
Expand Down
6 changes: 5 additions & 1 deletion completions/sheldon.bash
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,8 @@ _sheldon() {
esac
}

complete -F _sheldon -o nosort -o bashdefault -o default sheldon
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
complete -F _sheldon -o nosort -o bashdefault -o default sheldon
else
complete -F _sheldon -o bashdefault -o default sheldon
fi
18 changes: 9 additions & 9 deletions completions/sheldon.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _sheldon() {
fi

local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'--color=[Output coloring\: always, auto, or never]:WHEN: ' \
'--config-dir=[The configuration directory]:PATH:_files' \
'--data-dir=[The data directory]:PATH:_files' \
Expand All @@ -39,14 +39,14 @@ _sheldon() {
curcontext="${curcontext%:*:*}:sheldon-command-$line[1]:"
case $line[1] in
(init)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'--shell=[The type of shell, accepted values are\: bash, fish, zsh]:SHELL: ' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'--git=[Add a clonable Git repository]:URL: ' \
'--gist=[Add a clonable Gist snippet]:ID: ' \
'--github=[Add a clonable GitHub repository]:REPO: ' \
Expand All @@ -67,28 +67,28 @@ _arguments "${_arguments_options[@]}" \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':name -- A unique name for this plugin:' \
&& ret=0
;;
(lock)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'--update[Update all plugin sources]' \
'(--update)--reinstall[Reinstall all plugin sources]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(source)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'--relock[Regenerate the lock file]' \
'--update[Update all plugin sources (implies --relock)]' \
'(--update)--reinstall[Reinstall all plugin sources (implies --relock)]' \
Expand All @@ -97,14 +97,14 @@ _arguments "${_arguments_options[@]}" \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'--shell=[The type of shell, accepted values are\: bash, zsh]:SHELL: ' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" \
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
Expand Down
6 changes: 3 additions & 3 deletions docs/src/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ following.

```toml
[templates]
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
Expand Down
6 changes: 3 additions & 3 deletions src/config/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct EditPlugin {
#[derive(Debug)]
pub struct EditConfig {
/// The parsed TOML version of the config.
doc: toml_edit::Document,
doc: toml_edit::DocumentMut,
}

impl From<RawPlugin> for EditPlugin {
Expand Down Expand Up @@ -58,7 +58,7 @@ impl EditConfig {
{
let doc = s
.as_ref()
.parse::<toml_edit::Document>()
.parse::<toml_edit::DocumentMut>()
.context("failed to deserialize contents as TOML")?;
Ok(Self { doc })
}
Expand All @@ -80,7 +80,7 @@ impl EditConfig {
toml::to_string_pretty(&plugin.inner).expect("failed to serialize plugin as TOML");

let mini = contents
.parse::<toml_edit::Document>()
.parse::<toml_edit::DocumentMut>()
.expect("failed to parse valid TOML");

match &mut self.doc["plugins"] {
Expand Down
12 changes: 6 additions & 6 deletions tests/testdata/clean/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ config_file = "<config>/plugins.toml"
plugins = []

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/clean_permission_denied/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ config_file = "<config>/plugins.toml"
plugins = []

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/deprecated_directories/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/deprecated_get_filter/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks | get: \"pre\" | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks | get: \"post\" | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks | get: "pre" | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks | get: "post" | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/directories_default/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/directories_xdg_from_env/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/empty/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ config_file = "<config>/plugins.toml"
plugins = []

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/github_bad_reinstall/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/github_branch/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/github_https/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
12 changes: 6 additions & 6 deletions tests/testdata/github_submodule/plugins.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ apply = ["source"]
[plugins.hooks]

[templates]
PATH = "export PATH=\"{{ dir }}:$PATH\""
path = "path=( \"{{ dir }}\" $path )"
fpath = "fpath=( \"{{ dir }}\" $fpath )"
source = """
{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"
{% endfor %}{{ hooks?.post | nl }}"""
PATH = 'export PATH="{{ dir }}:$PATH"'
path = 'path=( "{{ dir }}" $path )'
fpath = 'fpath=( "{{ dir }}" $fpath )'
source = '''
{{ hooks?.pre | nl }}{% for file in files %}source "{{ file }}"
{% endfor %}{{ hooks?.post | nl }}'''
Loading

0 comments on commit b946203

Please sign in to comment.