Skip to content

Commit

Permalink
chore(cargo): Update dependencies (#1917)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flemmli97 authored Mar 13, 2024
1 parent 23b7267 commit 23aa2f8
Show file tree
Hide file tree
Showing 19 changed files with 1,500 additions and 1,058 deletions.
2,380 changes: 1,408 additions & 972 deletions Cargo.lock

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,54 +36,54 @@ dioxus-desktop = { git = "https://github.com/satellite-im/dioxus", rev = "1dba57
"transparent",
] }
muda = "0.9.4"
raw-window-handle = "0.5"
raw-window-handle = "0.6"
dioxus-core = { git = "https://github.com/satellite-im/dioxus", rev = "1dba57f39db8485ccdc03f3a6c11a6fcbb2f87f2" }
fermi = { git = "https://github.com/satellite-im/dioxus", rev = "1dba57f39db8485ccdc03f3a6c11a6fcbb2f87f2" }
arboard = "3.2"
arboard = "3.3"
humansize = "2.1.3"
uuid = { version = "1", features = ["serde", "v4"] }
libloading = "0.7.4"
libloading = "0.8.3"
warp = { git = "https://github.com/Satellite-im/Warp", rev = "d15be5735c5e654bbb7b424d0ea2c414df8b5e4c" }
warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "d15be5735c5e654bbb7b424d0ea2c414df8b5e4c" }
warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "d15be5735c5e654bbb7b424d0ea2c414df8b5e4c" }
rfd = "0.11.3"
mime = "0.3.16"
rfd = "0.14.0"
mime = "0.3.17"
serde = "1.0"
serde_json = "1.0"
chrono = "0.4"
either = "1"
base64 = "0.20.0"
timeago = "0.4.0"
dirs = "4.0.0"
regex = "1.6.1"
opener = "0.5.0"
open = "3.2.0"
base64 = "0.22.0"
timeago = "0.4.2"
dirs = "5.0.1"
regex = "1.10.3"
opener = "0.6.1"
open = "5.1.2"
derive_more = "0.99"
colored = "2.0.0"
notify = "5.1.0"
colored = "2.1.0"
notify = "6.1.1"
rand = "0.8"
notify-rust = { version = "4.6.0", default-features = false, features = ["d"] }
notify-rust = { version = "4.10.0", default-features = false, features = ["d"] }
titlecase = "2.2.1"
log = { version = "0.4.17", features = ["std"] }
log = { version = "0.4.21", features = ["std"] }

tempfile = "3.0.7"
fdlimit = "0.2"
tempfile = "3.10.1"
fdlimit = "0.3.0"

once_cell = "1.17"
once_cell = "1.19"
parking_lot = { version = "0.12" }
tracing = { version = "0.1" }
tracing-futures = { version = "0.2" }

futures = "0.3"
tokio = { version = "1", features = ["full"] }
isolang = "2.2.0"
clap = { version = "4.1", features = ["derive"] }
isolang = "2.4.0"
clap = { version = "4.5", features = ["derive"] }
fs_extra = "1.3"
walkdir = "2"
zip = "0.6.4"
zip = "0.6.6"

image = "0.24"
linkify = "0.9.0"
image = "0.25.0"
linkify = "0.10.0"
reqwest = { version = "0.11", default-features = false, features = [
"json",
"rustls-tls",
Expand Down
22 changes: 11 additions & 11 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.70"
unic-langid = "0.9.1"
fluent-templates = "0.8.0"
anyhow = "1.0.80"
unic-langid = "0.9.4"
fluent-templates = "0.9.1"
notify = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
once_cell = { workspace = true }
clap = { workspace = true }
rodio = "0.16"
rodio = "0.17.3"
uuid = { workspace = true }
notify-rust = { workspace = true }
dirs = { workspace = true }
base64 = { workspace = true }
lipsum = "0.8.2"
lipsum = "0.9.0"
chrono = { workspace = true }
rand = { workspace = true }
image = { workspace = true }
Expand All @@ -32,7 +32,7 @@ tracing.workspace = true
parking_lot.workspace = true
icons = { workspace = true }
humansize = { workspace = true }
zip = "0.6.4"
zip = "0.6.6"
walkdir = { workspace = true }
extensions = { workspace = true }
regex = { workspace = true }
Expand All @@ -54,13 +54,13 @@ derive_more = { workspace = true }
either = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.24.1"
cocoa = "0.25.0"
objc = "0.2.7"
core-foundation = "0.9.3"
mac-notification-sys = "0.5.6"
core-foundation = "0.9.4"
mac-notification-sys = "0.6.1"

[target.'cfg(target_env = "msvc")'.dependencies.windows]
version = "0.24.0"
version = "0.54.0"
features = [
"Win32_Foundation",
"Foundation_Collections",
Expand All @@ -70,7 +70,7 @@ features = [
]

[target.'cfg(target_env = "gnu")'.dependencies.windows]
version = "0.24.0"
version = "0.54.0"
features = [
"Win32_Foundation",
"Foundation_Collections",
Expand Down
6 changes: 2 additions & 4 deletions common/src/language/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn get_available_languages() -> Vec<String> {
}

pub fn get_local_text(text: &str) -> String {
LOCALES.lookup(&APP_LANG.read().0, text).unwrap_or_default()
LOCALES.lookup(&APP_LANG.read().0, text)
}

// Looks and formats a local text using the given args
Expand All @@ -94,7 +94,5 @@ where
builder(&mut map);
map
};
LOCALES
.lookup_with_args(&APP_LANG.read().0, text, &args)
.unwrap_or_default()
LOCALES.lookup_with_args(&APP_LANG.read().0, text, &args)
}
17 changes: 10 additions & 7 deletions common/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ fn show_with_action(notification: Notification, action_id: String, action: Notif
);

let toast_xml = windows::Data::Xml::Dom::XmlDocument::new().unwrap();
if let Err(err) = toast_xml.LoadXml(&windows::runtime::HSTRING::from(format!(
if let Err(err) = toast_xml.LoadXml(&windows::core::HSTRING::from(format!(
"<toast {} {}>
<visual>
<binding template=\"{}\">
Expand Down Expand Up @@ -165,11 +165,13 @@ fn show_with_action(notification: Notification, action_id: String, action: Notif
return;
}
};
if let Err(err) = toast_notification.Activated(windows::Foundation::TypedEventHandler::new(
move |_sender, result: &Option<windows::runtime::IInspectable>| {

let handler = windows::Foundation::TypedEventHandler::new(
move |_sender: &Option<windows::UI::Notifications::ToastNotification>,
result: &Option<windows::core::IInspectable>| {
let event: Option<
windows::runtime::Result<windows::UI::Notifications::ToastActivatedEventArgs>,
> = result.as_ref().map(windows::runtime::Interface::cast);
windows::core::Result<windows::UI::Notifications::ToastActivatedEventArgs>,
> = result.as_ref().map(windows::core::Interface::cast);
let arguments = event
.and_then(|val| val.ok())
.and_then(|args| args.Arguments().ok());
Expand All @@ -188,13 +190,14 @@ fn show_with_action(notification: Notification, action_id: String, action: Notif
};
Ok(())
},
)) {
);
if let Err(err) = toast_notification.Activated(&handler) {
log::error!("Error creating windows toast action {}", err);
return;
};

match windows::UI::Notifications::ToastNotificationManager::CreateToastNotifierWithId(
&windows::runtime::HSTRING::from(&app_id),
&windows::core::HSTRING::from(&app_id),
) {
Ok(toast_notifier) => {
if let Err(err) = toast_notifier.Show(&toast_notification) {
Expand Down
6 changes: 3 additions & 3 deletions common/src/testing/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
io::{BufWriter, Write},
};

use base64::encode;
use base64::{engine::general_purpose, Engine};
use chrono::{Duration, Utc};
use image::{ImageBuffer, Rgb, RgbImage};
use lipsum::lipsum;
Expand Down Expand Up @@ -196,7 +196,7 @@ fn generate_random_identities(count: usize) -> Vec<Identity> {
writer.write_all(&img.into_raw()).unwrap();
}

let base64_url = encode(&buffer);
let base64_url = general_purpose::STANDARD.encode(&buffer);
let image_url = format!("data:image/png;base64,{base64_url}");

let status = match rng.gen_range(0..3) {
Expand Down Expand Up @@ -248,7 +248,7 @@ fn generate_fake_message(conversation_id: Uuid, identities: &[Identity]) -> ui_a
let sender = &identities[rng.gen_range(0..identities.len())];

// Generate a random timestamp within the past 30 days.
let timestamp = Utc::now() - Duration::days(rng.gen_range(0..30));
let timestamp = Utc::now() - Duration::try_days(rng.gen_range(0..30)).unwrap_or_default();

let mut default_message = Message::default();
default_message.set_conversation_id(conversation_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::{
time::Duration,
};

use base64::{engine::general_purpose, Engine};
use derive_more::Display;

use futures::{channel::oneshot, stream, StreamExt};
Expand Down Expand Up @@ -847,7 +848,7 @@ pub fn thumbnail_to_base64(file: &File) -> String {
};

let prefix = format!("data:image/{mime};base64,");
let base64_image = base64::encode(thumbnail);
let base64_image = general_purpose::STANDARD.encode(thumbnail);

prefix + &base64_image
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::{collections::HashMap, slice, str::FromStr};

use base64::{engine::general_purpose, Engine};
use derive_more::Display;

use futures::channel::oneshot;
Expand Down Expand Up @@ -497,7 +498,7 @@ pub fn identity_image_to_base64(image: &IdentityImage) -> String {
};

let prefix = format!("data:image/{mime};base64,");
let base64_image = base64::encode(image_data);
let base64_image = general_purpose::STANDARD.encode(image_data);

prefix + &base64_image
}
4 changes: 2 additions & 2 deletions icons/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dioxus-html = { workspace = true }

[build-dependencies]
heck = "~0.4"
itertools = "~0.10"
scraper = "~0.12"
itertools = "~0.12"
scraper = "~0.19"
walkdir = "~2"

14 changes: 7 additions & 7 deletions kit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
regex = "1.8.4"
scraper = "0.17.1"
regex = "1.10.3"
scraper = "0.19.0"
chrono = { workspace = true }
dioxus = { workspace = true }
serde = { workspace = true }
Expand All @@ -23,14 +23,14 @@ humansize = { workspace = true }
common = { workspace = true }
warp = { workspace = true }
derive_more = { workspace = true }
pulldown-cmark = "0.9.2"
pulldown-cmark = "0.10.0"
linkify = { workspace = true }
reqwest = { workspace = true }
base64 = { workspace = true }
mime = { workspace = true }
futures = { workspace = true }
once_cell = { workspace = true }
emojis = "0.5"
emojis = "0.6.1"
unic-segment = "0.9"
unic-emoji-char = "0.9"
tracing = { workspace = true }
Expand All @@ -44,8 +44,8 @@ features = [
]

[build-dependencies]
glob = "0.3.0"
rsass = "0.26.0"
glob = "0.3.1"
rsass = "0.28.8"

[lib]
doctest = false
doctest = false
21 changes: 10 additions & 11 deletions kit/src/components/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use derive_more::Display;
use dioxus::prelude::*;
use futures::StreamExt;
use once_cell::sync::Lazy;
use pulldown_cmark::{CodeBlockKind, Options, Tag};
use pulldown_cmark::{CodeBlockKind, Options, Tag, TagEnd};
use regex::{Captures, Regex, Replacer};
use uuid::Uuid;
use warp::error::Error;
Expand Down Expand Up @@ -579,9 +579,9 @@ fn markdown(text: &str, emojis: bool) -> String {
for (event, range) in parser.into_offset_iter() {
if skipping {
skipping = if in_link {
matches!(event, pulldown_cmark::Event::End(Tag::Link(_, _, _)))
matches!(event, pulldown_cmark::Event::End(TagEnd::Link))
} else {
matches!(event, pulldown_cmark::Event::End(Tag::Image(_, _, _)))
matches!(event, pulldown_cmark::Event::End(TagEnd::Image))
};
continue;
}
Expand All @@ -600,8 +600,7 @@ fn markdown(text: &str, emojis: bool) -> String {
std::iter::once(pulldown_cmark::Event::Code(txt)),
)
}
pulldown_cmark::Event::End(pulldown_cmark::Tag::CodeBlock(CodeBlockKind::Indented)) => {
}
pulldown_cmark::Event::End(TagEnd::CodeBlock) => {}
pulldown_cmark::Event::SoftBreak => {
if in_paragraph {
html_output.push_str("</p>\n<p>");
Expand All @@ -611,15 +610,15 @@ fn markdown(text: &str, emojis: bool) -> String {
in_paragraph = true;
html_output.push_str("<p>");
}
pulldown_cmark::Event::End(Tag::Paragraph) => {
pulldown_cmark::Event::End(TagEnd::Paragraph) => {
in_paragraph = false;
}
pulldown_cmark::Event::Start(Tag::Image(_, _, _))
| pulldown_cmark::Event::Start(Tag::Link(_, _, _)) => {
pulldown_cmark::Event::Start(Tag::Image { .. })
| pulldown_cmark::Event::Start(Tag::Link { .. }) => {
// Ignore links and image parsing
// We only want Autolink but that doesn't work (or needs <> which we also dont weed)
skipping = true;
in_link = matches!(event, pulldown_cmark::Event::End(Tag::Link(_, _, _)));
in_link = matches!(event, pulldown_cmark::Event::End(TagEnd::Link));
html_output.push_str(&text[range]);
}
pulldown_cmark::Event::Text(t) => {
Expand All @@ -644,10 +643,10 @@ fn markdown(text: &str, emojis: bool) -> String {
}
event => {
match event {
pulldown_cmark::Event::Start(pulldown_cmark::Tag::CodeBlock(_)) => {
pulldown_cmark::Event::Start(Tag::CodeBlock(_)) => {
in_code_block = true;
}
pulldown_cmark::Event::End(pulldown_cmark::Tag::CodeBlock(_)) => {
pulldown_cmark::Event::End(TagEnd::CodeBlock) => {
in_code_block = false;
}
_ => {}
Expand Down
Loading

0 comments on commit 23aa2f8

Please sign in to comment.