release v0.7.1 🥳
This commit is contained in:
parent
10c6512231
commit
a570b07672
7 changed files with 329 additions and 298 deletions
|
@ -4,6 +4,10 @@ Dates are given in YYYY-MM-DD format - for example, the 15th of October 2021 is
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
|
||||||
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## v0.7.1 - 2024-01-24
|
||||||
|
### Changed
|
||||||
|
- Updated and pinned dependencies, using the latest MSRV-compatible versions available.
|
||||||
|
|
||||||
## v0.7.0 - 2023-03-15
|
## v0.7.0 - 2023-03-15
|
||||||
### Changed
|
### Changed
|
||||||
- The Minimum Supported Rust Version (MSRV) is now **1.64.0**.
|
- The Minimum Supported Rust Version (MSRV) is now **1.64.0**.
|
||||||
|
|
598
Cargo.lock
generated
598
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
16
Cargo.toml
16
Cargo.toml
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "fif"
|
name = "fif"
|
||||||
description = "A command-line tool for detecting and optionally correcting files with incorrect extensions."
|
description = "A command-line tool for detecting and optionally correcting files with incorrect extensions."
|
||||||
version = "0.7.0"
|
version = "0.7.1"
|
||||||
authors = ["Lynnesbian <lynne@bune.city>"]
|
authors = ["Lynnesbian <lynne@bune.city>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
|
@ -23,7 +23,7 @@ xdg-mime-backend = ["xdg-mime"]
|
||||||
json = ["serde", "serde_json"]
|
json = ["serde", "serde_json"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
walkdir = "~2.3.2"
|
walkdir = "2.4.0"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
mime = "0.3.16"
|
mime = "0.3.16"
|
||||||
mime_guess = { package = "new_mime_guess", version = "4.0.0" }
|
mime_guess = { package = "new_mime_guess", version = "4.0.0" }
|
||||||
|
@ -32,7 +32,7 @@ once_cell = "1.8.0"
|
||||||
rayon = { version = "1.5.0", optional = true }
|
rayon = { version = "1.5.0", optional = true }
|
||||||
exitcode = "1.1.2"
|
exitcode = "1.1.2"
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
itertools = "0.10.0"
|
itertools = "0.12.0"
|
||||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||||
serde_json = { version = "1.0", optional = true }
|
serde_json = { version = "1.0", optional = true }
|
||||||
num_cpus = { version = "1.13.0", optional = true }
|
num_cpus = { version = "1.13.0", optional = true }
|
||||||
|
@ -42,11 +42,11 @@ maplit = "1.0.2"
|
||||||
|
|
||||||
[target.'cfg(not(unix))'.dependencies]
|
[target.'cfg(not(unix))'.dependencies]
|
||||||
xdg-mime = { version = "0.3.3", optional = true }
|
xdg-mime = { version = "0.3.3", optional = true }
|
||||||
infer = "0.13.0"
|
infer = "=0.13.0" # 0.14.0 uses `let else`, which requires rust 1.65
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
xdg-mime = "0.3.3"
|
xdg-mime = "0.3.3"
|
||||||
infer = { version = "0.13.0", optional = true }
|
infer = { version = "=0.13.0", optional = true }
|
||||||
|
|
||||||
[dependencies.clap]
|
[dependencies.clap]
|
||||||
version = "~4.1"
|
version = "~4.1"
|
||||||
|
@ -61,8 +61,8 @@ features = ["color"]
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3.2.0"
|
tempfile = "3.2.0"
|
||||||
rand = "0.8.3"
|
rand = "0.8.3"
|
||||||
assert_cmd = "2.0.5"
|
assert_cmd = "=2.0.5" # higher versions than this have dependencies that require later rust versions
|
||||||
regex = { version = "1.5.4", default-features = false, features = ["std"] }
|
regex = { version = "=1.9.5", default-features = false, features = ["std"] } # 1.9.6 requires rust 1.65
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "thin"
|
lto = "thin"
|
||||||
|
@ -75,4 +75,4 @@ opt-level = 3
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
msrv = "1.57.0"
|
msrv = "1.64.0"
|
||||||
|
|
|
@ -317,7 +317,7 @@ pub fn mime_type<T: MimeDb>(db: &T, path: &Path) -> io::Result<Option<Mime>> {
|
||||||
// attempt to read up to BUF_SIZE bytes of the file.
|
// attempt to read up to BUF_SIZE bytes of the file.
|
||||||
let mut buffer = [0; BUF_SIZE];
|
let mut buffer = [0; BUF_SIZE];
|
||||||
file.seek(SeekFrom::Start(0))?;
|
file.seek(SeekFrom::Start(0))?;
|
||||||
file.read(&mut buffer)?;
|
_ = file.read(&mut buffer)?;
|
||||||
Ok(db.get_type(&buffer))
|
Ok(db.get_type(&buffer))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ use crate::String;
|
||||||
/// // ...just use:
|
/// // ...just use:
|
||||||
/// smart_write(&mut f, writables!["hello", Newline]);
|
/// smart_write(&mut f, writables!["hello", Newline]);
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! writables {
|
macro_rules! writables {
|
||||||
[$($args:tt),+] => {
|
[$($args:tt),+] => {
|
||||||
|
|
|
@ -182,7 +182,7 @@ fn main() {
|
||||||
loop {
|
loop {
|
||||||
// until file is renamed successfully
|
// until file is renamed successfully
|
||||||
match std::fs::rename(&f.file, &rename_to) {
|
match std::fs::rename(&f.file, &rename_to) {
|
||||||
Ok(_) => {
|
Ok(()) => {
|
||||||
info!("Renamed {:#?} -> {:#?}", f.file, rename_to);
|
info!("Renamed {:#?} -> {:#?}", f.file, rename_to);
|
||||||
renamed += 1;
|
renamed += 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -357,7 +357,7 @@ fn check_version_output() {
|
||||||
let output = cmd.arg("-V").ok().unwrap().stdout;
|
let output = cmd.arg("-V").ok().unwrap().stdout;
|
||||||
let output = String::from_utf8(output).unwrap();
|
let output = String::from_utf8(output).unwrap();
|
||||||
assert!(
|
assert!(
|
||||||
Regex::new(r#"fif v([0-9]\.){2}[0-9]"#).unwrap().is_match(output.trim()),
|
Regex::new(r"fif v([0-9]\.){2}[0-9]").unwrap().is_match(output.trim()),
|
||||||
"\"{output}\" does not match the expected `-v` format!"
|
"\"{output}\" does not match the expected `-v` format!"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ fn check_version_output() {
|
||||||
let output = cmd.arg("--version").ok().unwrap().stdout;
|
let output = cmd.arg("--version").ok().unwrap().stdout;
|
||||||
let output = String::from_utf8(output).unwrap();
|
let output = String::from_utf8(output).unwrap();
|
||||||
assert!(
|
assert!(
|
||||||
Regex::new(r#"fif v([0-9]\.){2}[0-9] \(.+, .+ backend, (unknown commit|commit #[[:xdigit:]]{7})\)"#)
|
Regex::new(r"fif v([0-9]\.){2}[0-9] \(.+, .+ backend, (unknown commit|commit #[[:xdigit:]]{7})\)")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.is_match(output.trim()),
|
.is_match(output.trim()),
|
||||||
"\"{}\" does not match the expected `--version` format!",
|
"\"{}\" does not match the expected `--version` format!",
|
||||||
|
|
Loading…
Reference in a new issue