Update dependencies to latest (#510)

* Update dependencies

* Update dependencies again

* Enable cargo resolver v2

* Use hashbrown instead and add getrandom js feature flag

* cargo fmt

* Move benchmark to new crate
This commit is contained in:
Luke 2022-11-27 00:04:04 +00:00 committed by GitHub
parent 9d7af243d5
commit c33a808ade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 115 additions and 96 deletions

View File

@ -20,7 +20,7 @@ jobs:
ref: ${{ github.base_ref }}
- name: Run cargo bench on base
run: cargo bench
run: cd packages/tools/bench && cargo bench
- name: Checkout repository head
uses: actions/checkout@v2
@ -30,7 +30,7 @@ jobs:
clean: false # Do not remove benchmark results from base branch
- name: Run cargo bench on head
run: cargo bench
run: cd packages/tools/bench && cargo bench
- name: Upload benchmark report
uses: actions/upload-artifact@v2

View File

@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
# Packages
"packages/sycamore",
@ -35,5 +36,6 @@ members = [
"website",
# Tools
"packages/tools/bench",
"packages/tools/bench-diff",
]

View File

@ -5,7 +5,7 @@ version = "0.1.0"
[dependencies]
pulldown-cmark = "0.9.2"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.89"
syntect = "5.0.0"
walkdir = "2.3.2"

View File

@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
log = "0.4.17"
sycamore = { path = "../../packages/sycamore" }

View File

@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
reqwasm = "0.4.1"
serde = "1.0.136"
log = "0.4.17"
reqwasm = "0.5.0"
serde = "1.0.147"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
reqwasm = "0.4.1"
serde = "1.0.136"
log = "0.4.17"
reqwasm = "0.5.0"
serde = "1.0.147"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -8,9 +8,9 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
log = "0.4.17"
sycamore = { path = "../../packages/sycamore", features = [
"hydrate",
"ssr",
] }
wasm-bindgen = "0.2.79"
wasm-bindgen = "0.2.83"

View File

@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
getrandom = { version = "0.2.5", features = ["js"] }
getrandom = { version = "0.2.8", features = ["js"] }
rand = "0.8.5"
sycamore = { path = "../../packages/sycamore" }
wasm-bindgen = "0.2.79"
web-sys = "0.3.56"
wasm-bindgen = "0.2.83"
web-sys = "0.3.60"

View File

@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
gloo-timers = { version = "0.2.3", features = ["futures"] }
gloo-timers = { version = "0.2.4", features = ["futures"] }
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -8,13 +8,13 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
log = "0.4.17"
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.89"
sycamore = { path = "../../packages/sycamore", features = ["serde"] }
uuid = { version = "0.8.2", features = ["serde", "v4", "wasm-bindgen"] }
wasm-bindgen = "0.2.79"
uuid = { version = "1.2.2", features = ["serde", "v4", "wasm-bindgen"] }
wasm-bindgen = "0.2.83"
[dependencies.web-sys]
features = ["InputEvent", "KeyboardEvent", "Location", "Storage"]
version = "0.3.56"
version = "0.3.60"

View File

@ -8,8 +8,8 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
getrandom = { version = "0.2.5", features = ["js"] }
gloo-timers = { version = "0.2.3", features = ["futures"] }
log = "0.4.14"
getrandom = { version = "0.2.8", features = ["js"] }
gloo-timers = { version = "0.2.4", features = ["futures"] }
log = "0.4.17"
rand = "0.8.5"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -11,7 +11,7 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2"
[dependencies]
ahash = "0.7.6"
hashbrown = "0.13.1"
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
[dev-dependencies]

View File

@ -2,7 +2,7 @@
use std::rc::Rc;
use ahash::AHashMap;
use hashbrown::HashMap;
use sycamore_reactive::*;
use crate::generic_node::GenericNode;
@ -265,7 +265,7 @@ pub fn reconcile_fragments<G: GenericNode>(parent: &G, a: &mut [G], b: &[G]) {
let mut b_end = b_len;
let mut a_start = 0;
let mut b_start = 0;
let mut map = None::<AHashMap<G, usize>>;
let mut map = None::<HashMap<G, usize>>;
// Last node in a.
let after = a[a_end - 1].next_sibling();

View File

@ -11,11 +11,11 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.0"
[dependencies]
futures = "0.3.21"
futures = "0.3.25"
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4.29"
wasm-bindgen-futures = "0.4.33"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.17.0", features = ["rt"] }
tokio = { version = "1.22.0", features = ["rt"] }

View File

@ -14,14 +14,14 @@ version = "0.8.2"
proc-macro = true
[dependencies]
once_cell = "1.10.0"
proc-macro2 = "1.0.36"
quote = "1.0.15"
syn = { version = "1.0.86", features = ["extra-traits", "full"] }
once_cell = "1.16.0"
proc-macro2 = "1.0.47"
quote = "1.0.21"
syn = { version = "1.0.103", features = ["extra-traits", "full"] }
[dev-dependencies]
sycamore = { path = "../sycamore", features = ["hydrate", "suspense"] }
trybuild = "1.0.56"
trybuild = "1.0.71"
[features]
default = []

View File

@ -11,12 +11,13 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.1"
[dependencies]
ahash = "0.7.6"
bumpalo = { version = "3.9.1", features = ["boxed"] }
indexmap = "1.8.0"
serde = { version = "1.0.136", optional = true }
bumpalo = { version = "3.11.1", features = ["boxed"] }
indexmap = "1.9.2"
getrandom = { version = "0.2.8", features = ["js"] }
hashbrown = "0.13.1"
serde = { version = "1.0.147", optional = true }
slotmap = "1.0.6"
smallvec = { version = "1.8.0", features = ["const_generics"] }
smallvec = { version = "1.10.0", features = ["const_generics"] }
[features]
default = []

View File

@ -1,6 +1,6 @@
//! Side effects.
use ahash::AHashSet;
use hashbrown::HashSet;
use crate::*;
@ -17,7 +17,7 @@ pub(crate) struct EffectState<'a> {
/// The callback when the effect is re-executed.
cb: Rc<RefCell<dyn FnMut() + 'a>>,
/// A list of dependencies that can trigger this effect.
dependencies: AHashSet<EffectDependency>,
dependencies: HashSet<EffectDependency>,
}
/// Implements reference equality for [`WeakSignalEmitter`]s.
@ -122,7 +122,7 @@ fn _create_effect<'a>(cx: Scope<'a>, mut f: Box<(dyn FnMut() + 'a)>) {
// Initialize initial effect state.
*effect.borrow_mut() = Some(EffectState {
cb: cb.clone(),
dependencies: AHashSet::new(),
dependencies: HashSet::new(),
});
// Initial callback call to get everything started.

View File

@ -4,7 +4,7 @@ use std::hash::Hash;
use std::mem;
use std::rc::Rc;
use ahash::AHashMap;
use hashbrown::HashMap;
use crate::*;
@ -107,7 +107,7 @@ where
// 0) Prepare a map of indices in newItems. Scan backwards so we encounter them in
// natural order.
let mut new_indices = AHashMap::with_capacity(new_end - start);
let mut new_indices = HashMap::with_capacity(new_end - start);
// Indexes for new_indices_next are shifted by start because values at 0..start are
// always None.

View File

@ -16,10 +16,10 @@ use std::marker::PhantomData;
use std::mem;
use std::rc::{Rc, Weak};
use ahash::AHashMap;
use arena::*;
pub use context::*;
pub use effect::*;
use hashbrown::HashMap;
use indexmap::IndexMap;
pub use iter::*;
pub use memo::*;
@ -47,7 +47,7 @@ struct ScopeInner<'a> {
/// usually read and rarely created. Making this heap allocated when prevent blowing up the
/// size of the [`ScopeInner`] struct when most of the times, this field is unneeded.
#[allow(clippy::box_collection)]
contexts: Option<Box<AHashMap<TypeId, &'a dyn Any>>>,
contexts: Option<Box<HashMap<TypeId, &'a dyn Any>>>,
// Make sure that 'a is invariant.
_phantom: InvariantLifetime<'a>,
}

View File

@ -16,13 +16,13 @@ proc-macro = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
nom = "7.1.0"
proc-macro2 = "1.0.36"
quote = "1.0.15"
syn = "1.0.86"
unicode-xid = "0.2.2"
nom = "7.1.1"
proc-macro2 = "1.0.47"
quote = "1.0.21"
syn = "1.0.103"
unicode-xid = "0.2.4"
[dev-dependencies]
expect-test = "1.2.2"
expect-test = "1.4.0"
sycamore-router = { path = "../sycamore-router" }
trybuild = "1.0.56"
trybuild = "1.0.71"

View File

@ -15,7 +15,7 @@ version = "0.8.0"
[dependencies]
sycamore = { path = "../sycamore", version = "0.8.0" }
sycamore-router-macro = { path = "../sycamore-router-macro", version = "0.8.0" }
wasm-bindgen = "0.2.79"
wasm-bindgen = "0.2.83"
[dependencies.web-sys]
features = [
@ -30,7 +30,7 @@ features = [
"Url",
"Window",
]
version = "0.3.56"
version = "0.3.60"
[dev-dependencies]
sycamore = { path = "../sycamore", features = ["ssr"] }

View File

@ -11,14 +11,14 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2"
[dependencies]
html-escape = "0.2.11"
indexmap = "1.8.1"
js-sys = "0.3.57"
once_cell = "1.10.0"
html-escape = "0.2.12"
indexmap = "1.9.2"
js-sys = "0.3.60"
once_cell = "1.16.0"
sycamore-core = { path = "../sycamore-core", version = "0.8.0" }
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
wasm-bindgen = "0.2.80"
web-sys = { version = "0.3.57", features = [
wasm-bindgen = "0.2.83"
web-sys = { version = "0.3.60", features = [
"console",
"Comment",
"Document",

View File

@ -11,20 +11,20 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2"
[dependencies]
ahash = "0.7.6"
futures = { version = "0.3.21", optional = true }
html-escape = { version = "0.2.9", optional = true }
indexmap = { version = "1.8.0", features = ["std"] }
js-sys = { version = "0.3.56", optional = true }
once_cell = { version = "1.10.0", optional = true }
paste = "1.0.6"
futures = { version = "0.3.25", optional = true }
hashbrown = "0.13.1"
html-escape = { version = "0.2.12", optional = true }
indexmap = { version = "1.9.2", features = ["std"] }
js-sys = { version = "0.3.60", optional = true }
once_cell = { version = "1.16.0", optional = true }
paste = "1.0.9"
sycamore-core = { path = "../sycamore-core", version = "0.8.0" }
sycamore-futures = { path = "../sycamore-futures", version = "0.8.0", optional = true }
sycamore-macro = { path = "../sycamore-macro", version = "0.8.0" }
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
sycamore-web = { path = "../sycamore-web", version = "0.8.0", optional = true }
wasm-bindgen = { version = "0.2.79", optional = true }
wasm-bindgen-futures = { version = "0.4.29", optional = true }
wasm-bindgen = { version = "0.2.83", optional = true }
wasm-bindgen-futures = { version = "0.4.33", optional = true }
[dependencies.web-sys]
features = [
@ -43,14 +43,13 @@ features = [
"Text",
"Window",
]
version = "0.3.56"
version = "0.3.60"
optional = true
[dev-dependencies]
criterion = "0.3.5"
expect-test = "1.2.2"
tokio = { version = "1.17.0", features = ["macros", "rt"] }
wasm-bindgen-test = "0.3.29"
expect-test = "1.4.0"
tokio = { version = "1.22.0", features = ["macros", "rt"] }
wasm-bindgen-test = "0.3.33"
[features]
default = ["web", "wasm-bindgen-interning"]
@ -73,15 +72,6 @@ serde = ["sycamore-reactive/serde"]
wasm-bindgen-interning = ["web", "wasm-bindgen/enable-interning"]
web = ["wasm-bindgen", "web-sys", "js-sys", "sycamore-web"]
[[bench]]
harness = false
name = "reactivity"
[[bench]]
harness = false
name = "ssr"
required-features = ["ssr"]
[[test]]
name = "ssr"
required-features = ["ssr"]

View File

@ -2,9 +2,10 @@
name = "bench-diff"
version = "0.1.0"
edition = "2021"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.89"

View File

@ -0,0 +1,22 @@
[package]
name = "bench"
version = "0.1.0"
edition = "2021"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
sycamore = { path = "../../sycamore" }
[dev-dependencies]
criterion = "0.4.0"
[[bench]]
harness = false
name = "reactivity"
[[bench]]
harness = false
name = "ssr"
required-features = ["sycamore/ssr"]

View File

@ -0,0 +1,3 @@
fn main() {
println!("Run `cargo bench`.");
}

View File

@ -8,15 +8,15 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
js-sys = "0.3.56"
log = "0.4.14"
reqwasm = "0.4.1"
serde-lite = { version = "0.2.0", features = ["derive"] }
serde_json = "1.0.79"
js-sys = "0.3.60"
log = "0.4.17"
reqwasm = "0.5.0"
serde-lite = { version = "0.3.2", features = ["derive"] }
serde_json = "1.0.89"
sycamore = { path = "../packages/sycamore", features = ["suspense"] }
sycamore-router = { path = "../packages/sycamore-router" }
wasm-bindgen = "0.2.79"
wasm-bindgen = "0.2.83"
[dependencies.web-sys]
features = ["MediaQueryList", "Storage", "Window"]
version = "0.3.56"
version = "0.3.60"