8000 all: Bump dependencies by udoprog · Pull Request #845 · rune-rs/rune · GitHub
[go: up one dir, main page]

Skip to content

all: Bump dependencies #845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/rune-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ alloc = ["serde/alloc", "rune-alloc/alloc"]
[dependencies]
rune-alloc = { version = "0.14.0", path = "../rune-alloc", default-features = false, features = ["serde"] }

twox-hash = { version = "1.6.3", default-features = false }
twox-hash = { version = "2.0.0", default-features = false, features = ["xxhash64"] }
serde = { version = "1.0.163", default-features = false, features = ["derive"] }
musli = { version = "0.0.121", default-features = false, optional = true }
musli = { version = "0.0.124", default-features = false, optional = true }

[dev-dependencies]
rune = { package = "rune-shim", path = "../rune-shim", features = ["core", "alloc"] }
6 changes: 3 additions & 3 deletions crates/rune-modules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ fmt = []
macros = []

[dependencies]
base64 = { version = "0.22.1", optional = true }
reqwest = { version = "0.11.17", optional = true, default-features = false, features = [
base64 = { version = "0.22.0", optional = true }
reqwest = { version = "0.12.8", optional = true, default-features = false, features = [
"rustls-tls",
"gzip",
"json",
] }
tokio = { version = "1.28.1", optional = true }
serde_json = { version = "1.0.96", optional = true }
toml = { version = "0.7.3", optional = true }
toml = { version = "0.8.19", optional = true }
nanorand = { version = "0.7.0", optional = true, features = ["getrandom"] }

rune = { version = "0.14.0", path = "../rune" }
Expand Down
2 changes: 1 addition & 1 deletion crates/rune-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ wasm-bindgen = { version = "0.2.85", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.35"
js-sys = "0.3.62"
anyhow = "1.0.71"
gloo-utils = "0.1.6"
gloo-utils = "0.2.0"

[dependencies.web-sys]
version = "0.3.62"
Expand Down
17 changes: 9 additions & 8 deletions crates/rune/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tracing = ["tracing/enabled"]
emit = ["std", "codespan-reporting"]
bench = []
workspace = ["std", "toml", "semver", "relative-path", "serde-hashkey", "linked-hash-map"]
doc = ["std", "rust-embed", "handlebars", "pulldown-cmark", "syntect", "sha2", "base64", "rune-core/doc", "relative-path"]
doc = ["std", "rust-embed", "handlebars", "pulldown-cmark", "pulldown-cmark-escape", "syntect", "sha2", "base64", "rune-core/doc", "relative-path"]
cli = ["std", "emit", "doc", "bincode", "tracing-subscriber", "clap", "webbrowser", "capture-io", "disable-io", "languageserver", "fmt", "similar", "rand"]
languageserver = ["std", "lsp", "ropey", "percent-encoding", "url", "serde_json", "tokio", "workspace", "doc", "fmt"]
byte-code = ["alloc", "musli/storage"]
Expand All @@ -46,34 +46,35 @@ num = { version = "0.4.0", default-features = false, features = ["alloc"] }
pin-project = "1.1.0"
ryu = "1.0.13"
serde = { version = "1.0.163", default-features = false, features = ["derive", "rc"] }
musli = { version = "0.0.121", default-features = false, features = ["alloc"] }
musli = { version = "0.0.124", default-features = false, features = ["alloc"] }
once_cell = { version = "1.18.0", default-features = false, features = ["critical-section"] }

anyhow = { version = "1.0.71", default-features = false, optional = true }
bincode = { version = "1.3.3", optional = true }
clap = { version = "4.2.7", features = ["derive"], optional = true }
codespan-reporting = { version = "0.11.1", optional = true }
handlebars = { version = "6.0.0", optional = true }
pulldown-cmark = { version = "0.9.2", optional = true }
pulldown-cmark = { version = "0.12.2", optional = true }
pulldown-cmark-escape = { version = "0.11.0", optional = true }
relative-path = { version = "1.8.0", optional = true, features = ["serde"] }
rust-embed = { version = "6.6.1", optional = true }
rust-embed = { version = "6.8.1", optional = true }
semver = { version = "1.0.17", optional = true, features = ["serde"] }
serde-hashkey = { version = "0.4.5", optional = true }
syntect = { version = "5.0.0", optional = true }
tokio = { version = "1.28.1", features = ["rt-multi-thread", "fs", "macros", "sync", "io-std", "io-util"], optional = true }
toml = { version = "0.7.3", optional = true, features = ["parse"] }
toml = { version = "0.8.19", optional = true, features = ["parse"] }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"], optional = true }
webbrowser = { version = "0.8.9", optional = true }
webbrowser = { version = "1.0.2", optional = true }
parking_lot = { version = "0.12.1", optional = true }
lsp = { version = "0.94.0", package = "lsp-types", optional = true }
lsp = { version = "0.95.0", package = "lsp-types", optional = true }
ropey = { version = "1.6.0", optional = true }
percent-encoding = { version = "2.2.0", optional = true }
url = { version = "2.3.1", optional = true }
serde_json = { version = "1.0.96", optional = true }
linked-hash-map = { version = "0.5.6", optional = true }
similar = { version = "2.2.1", optional = true, features = ["inline", "bytes"] }
sha2 = { version = "0.10.6", optional = true }
base64 = { version = "0.21.0", optional = true }
base64 = { version = "0.22.0", optional = true }
rand = { version = "0.8.5", optional = true }
memchr = "2.7.4"
unicode-ident = "1.0.12"
Expand Down
122 changes: 84 additions & 38 deletions crates/rune/src/doc/markdown.rs
6377
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use core::fmt;
use std::io;

use crate::alloc::fmt::TryWrite;
use crate::alloc::{try_vec, HashMap, String, Vec};
use crate::alloc::{self, try_vec, HashMap, String, Vec};
use crate::doc::TestParams;

use anyhow::Result;
use pulldown_cmark::escape::{escape_href, escape_html, StrWrite};
use pulldown_cmark::{Alignment, CodeBlockKind, CowStr, Event, LinkType, Tag};
use pulldown_cmark::{Alignment, CodeBlockKind, CowStr, Event, LinkType, Tag, TagEnd};
use pulldown_cmark_escape::{escape_href, escape_html, StrWrite};
use syntect::html::{ClassStyle, ClassedHTMLGenerator};
use syntect::parsing::{SyntaxReference, SyntaxSet};

Expand All @@ -26,15 +25,14 @@ struct StringWriter<'a> {
}

impl StrWrite for StringWriter<'_> {
fn write_str(&mut self, s: &str) -> io::Result<()> {
self.string
.try_push_str(s)
.map_err(|error| io::Error::new(io::ErrorKind::Other, error))
type Error = alloc::Error;

fn write_str(&mut self, s: &str) -> Result<(), Self::Error> {
self.string.try_push_str(s)
}

fn write_fmt(&mut self, args: fmt::Arguments) -> io::Result<()> {
fn write_fmt(&mut self, args: fmt::Arguments) -> Result<(), Self::Error> {
TryWrite::write_fmt(self.string, args)
.map_err(|error| io::Error::new(io::ErrorKind::Other, error))
}
}

Expand Down Expand Up @@ -119,6 +117,19 @@ where
TaskListMarker(false) => {
self.write("<input disabled=\"\" type=\"checkbox\"/>")?;
}
InlineMath(text) => {
self.write(r#"<span class="math math-inline">"#)?;
escape_html(&mut self.out, &text)?;
self.write("</span>")?;
}
DisplayMath(text) => {
self.write(r#"<span class="math math-display">"#)?;
escape_html(&mut self.out, &text)?;
self.write("</span>")?;
}
InlineHtml(text) => {
self.write(&text)?;
}
}
}

Expand All @@ -130,14 +141,16 @@ where
Tag::Paragraph => {
self.write("<p>")?;
}
Tag::Heading(level, id, classes) => {
Tag::Heading {
level, id, classes, ..
} => {
self.write("<")?;

write!(&mut self.out, "{}", level)?;

if let Some(id) = id {
self.write(" id=\"")?;
escape_html(&mut self.out, id)?;
escape_html(&mut self.out, &id)?;
self.write("\"")?;
}

Expand Down Expand Up @@ -193,7 +206,7 @@ where
}
}
}
Tag::BlockQuote => {
Tag::BlockQuote(..) => {
self.write("<blockquote>")?;
}
Tag::CodeBlock(kind) => {
Expand Down Expand Up @@ -226,27 +239,36 @@ where
Tag::Strikethrough => {
self.write("<del>")?;
}
Tag::Link(LinkType::Email, dest, title) => {
Tag::Link {
link_type: LinkType::Email,
dest_url,
title,
..
} => {
self.write("<a href=\"mailto:")?;
escape_href(&mut self.out, &dest)?;
escape_href(&mut self.out, &dest_url)?;
if !title.is_empty() {
self.write("\" title=\"")?;
escape_html(&mut self.out, &title)?;
}
self.write("\">")?;
}
Tag::Link(_link_type, dest, title) => {
Tag::Link {
dest_url, title, ..
} => {
self.write("<a href=\"")?;
escape_href(&mut self.out, &dest)?;
escape_href(&mut self.out, &dest_url)?;
if !title.is_empty() {
self.write("\" title=\"")?;
escape_html(&mut self.out, &title)?;
}
self.write("\">")?;
}
Tag::Image(_link_type, dest, title) => {
Tag::Image {
dest_url, title, ..
} => {
self.write("<img src=\"")?;
escape_href(&mut self.out, &dest)?;
escape_href(&mut self.out, &dest_url)?;
self.write("\" alt=\"")?;
self.raw_text()?;

Expand All @@ -266,6 +288,17 @@ where
write!(&mut self.out, "{}", number)?;
self.write("</sup>")?;
}
Tag::HtmlBlock => {}
Tag::DefinitionList => {
self.write("<dl>")?;
}
Tag::DefinitionListTitle => {
self.write("<dt>")?;
}
Tag::DefinitionListDefinition => {
self.write("<dd>")?;
}
Tag::MetadataBlock(..) => {}
}

Ok(())
Expand Down Expand Up @@ -320,27 +353,27 @@ where
(RUNE_TOKEN, syntax, Some(params))
}

fn end_tag(&mut self, tag: Tag) -> Result<()> {
fn end_tag(&mut self, tag: TagEnd) -> Result<()> {
match tag {
Tag::Paragraph => {
TagEnd::Paragraph => {
self.write("</p>")?;
}
Tag::Heading(level, _id, _classes) => {
TagEnd::Heading(level) => {
self.write("</")?;
write!(&mut self.out, "{}", level)?;
self.write(">")?;
}
Tag::Table(_) => {
TagEnd::Table => {
self.write("</tbody></table>")?;
}
Tag::TableHead => {
TagEnd::TableHead => {
self.write("</tr></thead><tbody>")?;
self.table_state = TableState::Body;
}
Tag::TableRow => {
TagEnd::TableRow => {
self.write("</tr>")?;
}
Tag::TableCell => {
TagEnd::TableCell => {
match self.table_state {
TableState::Head => {
self.write("</th>")?;
Expand All @@ -351,39 +384,51 @@ where
}
self.table_cell_index += 1;
}
Tag::BlockQuote => {
TagEnd::BlockQuote(_) => {
self.write("</blockquote>")?;
}
Tag::CodeBlock(..) => {
TagEnd::CodeBlock => {
self.write("</code></pre>")?;
self.codeblock = None;
}
Tag::List(Some(_)) => {
TagEnd::List(true) => {
self.write("</ol>")?;
}
Tag::List(None) => {
TagEnd::List(false) => {
self.write("</ul>")?;
}
Tag::Item => {
TagEnd::Item => {
self.write("</li>")?;
}
Tag::Emphasis => {
TagEnd::Emphasis => {
self.write("</em>")?;
}
Tag::Strong => {
TagEnd::Strong => {
self.write("</strong>")?;
}
Tag::Strikethrough => {
TagEnd::Strikethrough => {
self.write("</del>")?;
}
Tag::Link(_, _, _) => {
TagEnd::Link { .. } => {
self.write("</a>")?;
}
Tag::Image(_, _, _) => (),
Tag::FootnoteDefinition(_) => {
TagEnd::Image { .. } => (),
TagEnd::FootnoteDefinition => {
self.write("</div>")?;
}
TagEnd::HtmlBlock => {}
TagEnd::DefinitionList => {
self.write("</dl>")?;
}
TagEnd::DefinitionListTitle => {
self.write("</dt>")?;
}
TagEnd::DefinitionListDefinition => {
self.write("</dd>")?;
}
TagEnd::MetadataBlock(..) => {}
}

Ok(())
}

Expand All @@ -399,7 +444,8 @@ where
}
nest -= 1;
}
Html(text) | Code(text) | Text(text) => {
Html(text) | Code(text) | Text(text) | InlineMath(text) | DisplayMath(text)
| InlineHtml(text) => {
escape_html(&mut self.out, &text).map_err(|_| fmt::Error)?;
}
SoftBreak | HardBreak | Rule => {
Expand Down
1 change: 1 addition & 0 deletions crates/rune/src/languageserver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ async fn initialize(

let mut rebuild = false;

#[allow(deprecated)]
if let Some(root_uri) = &params.root_uri {
let mut manifest_uri = root_uri.clone();

Expand Down
4 changes: 2 additions & 2 deletions crates/rune/src/runtime/unit/byte_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl<'a> Iterator for ByteCodeUnitIter<'a> {
}

let ip = self.len.checked_sub(self.address.len())?;
let inst = musli::storage::decode(&mut self.address).ok()?;
let inst = musli::storage::decode(self.address).ok()?;
Some((ip, inst))
}
}
Expand Down Expand Up @@ -102,7 +102,7 @@ impl UnitStorage for ByteCodeUnit {
};

let start = bytes.as_ptr();
let inst: Inst = musli::storage::decode(&mut bytes).map_err(|_| BadInstruction { ip })?;
let inst: Inst = musli::storage::decode(bytes).map_err(|_| BadInstruction { ip })?;
let len = (bytes.as_ptr() as usize).wrapping_sub(start as usize);
Ok(Some((inst, len)))
}
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ rune = { path = "../crates/rune" }
rune-modules = { path = "../crates/rune-modules" }

tokio = { version = "1.28.1", features = ["macros"] }
notify = "6.1.1"
notify = "7.0.0"
anyhow = "1.0.82"
pin-project = "1.1.5"
2 changes: 1 addition & 1 deletion tools/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ publish = false
[dependencies]
anyhow = "1.0.71"
regex = { version = "1.8.1", default-features = false, features = ["std", "unicode-perl"] }
zip = "0.6.5"
zip = "2.2.0"
flate2 = { version = "1.0.26", features = ["zlib"], default-features = false }
2 changes: 1 addition & 1 deletion tools/builder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ where
I::Item: AsRef<Path>,
{
let options =
zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored);
zip::write::SimpleFileOptions::default().compression_method(zip::CompressionMethod::Stored);

let out = fs::File::create(file)?;
let mut zip = zip::ZipWriter::new(out);
Expand Down
Loading
Loading
0