fix: update to wasm-bindgen 0.2.93 (#2827)

This commit is contained in:
Saber Haj Rabiee 2024-08-13 15:21:57 -07:00 committed by GitHub
parent 49c1661f92
commit e01dfbf497
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 65 additions and 59 deletions

View file

@ -15,7 +15,7 @@ leptos = { path = "../../leptos" }
leptos_meta = { path = "../../meta" } leptos_meta = { path = "../../meta" }
leptos_actix = { path = "../../integrations/actix", optional = true } leptos_actix = { path = "../../integrations/actix", optional = true }
leptos_router = { path = "../../router" } leptos_router = { path = "../../router" }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
[features] [features]

View file

@ -16,6 +16,6 @@ console_error_panic_hook = "0.1.7"
gloo-timers = { version = "0.3.0", features = ["futures"] } gloo-timers = { version = "0.3.0", features = ["futures"] }
[dev-dependencies] [dev-dependencies]
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
wasm-bindgen-test = "0.3.42" wasm-bindgen-test = "0.3.42"
web-sys = "0.3.69" web-sys = "0.3.69"

View file

@ -24,7 +24,7 @@ leptos_router = { path = "../../router" }
log = "0.4.22" log = "0.4.22"
once_cell = "1.19" once_cell = "1.19"
gloo-net = { version = "0.6.0" } gloo-net = { version = "0.6.0" }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
simple_logger = "5.0" simple_logger = "5.0"
tracing = { version = "0.1.40", optional = true } tracing = { version = "0.1.40", optional = true }

View file

@ -13,6 +13,6 @@ leptos_router = { path = "../../router", features = [] }
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
[dev-dependencies] [dev-dependencies]
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
wasm-bindgen-test = "0.3.42" wasm-bindgen-test = "0.3.42"
web-sys = "0.3.69" web-sys = "0.3.69"

View file

@ -9,5 +9,5 @@ console_error_panic_hook = "0.1.7"
[dev-dependencies] [dev-dependencies]
wasm-bindgen-test = "0.3.42" wasm-bindgen-test = "0.3.42"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
web-sys = "0.3.69" web-sys = "0.3.69"

View file

@ -12,5 +12,5 @@ web-sys = { version = "0.3.69", features = ["Clipboard", "Navigator"] }
[dev-dependencies] [dev-dependencies]
wasm-bindgen-test = "0.3.42" wasm-bindgen-test = "0.3.42"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
web-sys = { version = "0.3.69", features = ["NodeList"] } web-sys = { version = "0.3.69", features = ["NodeList"] }

View file

@ -19,7 +19,7 @@ tower-http = { version = "0.5.2", features = ["fs"], optional = true }
tokio = { version = "1.39", features = ["full"], optional = true } tokio = { version = "1.39", features = ["full"], optional = true }
http = { version = "1.1" } http = { version = "1.1" }
thiserror = "1.0" thiserror = "1.0"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
hydrate = ["leptos/hydrate"] hydrate = ["leptos/hydrate"]

View file

@ -25,7 +25,7 @@ log = "0.4.22"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
gloo-net = { version = "0.6.0", features = ["http"] } gloo-net = { version = "0.6.0", features = ["http"] }
reqwest = { version = "0.12.5", features = ["json"] } reqwest = { version = "0.12.5", features = ["json"] }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
web-sys = { version = "0.3.69", features = ["AbortController", "AbortSignal"] } web-sys = { version = "0.3.69", features = ["AbortController", "AbortSignal"] }
send_wrapper = "0.6.0" send_wrapper = "0.6.0"

View file

@ -26,7 +26,7 @@ tower-http = { version = "0.5.2", features = ["fs"], optional = true }
tokio = { version = "1.39", features = ["full"], optional = true } tokio = { version = "1.39", features = ["full"], optional = true }
http = { version = "1.1", optional = true } http = { version = "1.1", optional = true }
web-sys = { version = "0.3.69", features = ["AbortController", "AbortSignal"] } web-sys = { version = "0.3.69", features = ["AbortController", "AbortSignal"] }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
send_wrapper = { version = "0.6.0", features = ["futures"] } send_wrapper = { version = "0.6.0", features = ["futures"] }
[features] [features]

View file

@ -30,7 +30,7 @@ tower-http = { version = "0.5.2", features = [
tokio = { version = "1.39", features = ["full"], optional = true } tokio = { version = "1.39", features = ["full"], optional = true }
http = { version = "1.1", optional = true } http = { version = "1.1", optional = true }
web-sys = { version = "0.3.69", features = ["AbortController", "AbortSignal"] } web-sys = { version = "0.3.69", features = ["AbortController", "AbortSignal"] }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
lazy_static = "1.5" lazy_static = "1.5"
rust-embed = { version = "8.5", features = [ rust-embed = { version = "8.5", features = [
"axum", "axum",

View file

@ -33,7 +33,7 @@ web-sys = { version = "0.3.69", features = [
"Response", "Response",
] } ] }
getrandom = { version = "0.2.15", features = ["js"] } getrandom = { version = "0.2.15", features = ["js"] }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
wasm-bindgen-futures = { version = "0.4.42", features = [ wasm-bindgen-futures = { version = "0.4.42", features = [
"futures-core-03-stream", "futures-core-03-stream",
], optional = true } ], optional = true }

View file

@ -22,7 +22,7 @@ axum = { version = "0.7.5", optional = true }
tower = { version = "0.4.13", optional = true } tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.5.2", features = ["fs"], optional = true } tower-http = { version = "0.5.2", features = ["fs"], optional = true }
tokio = { version = "1.39", features = ["full"], optional = true } tokio = { version = "1.39", features = ["full"], optional = true }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
hydrate = ["leptos/hydrate"] hydrate = ["leptos/hydrate"]

View file

@ -25,7 +25,7 @@ axum = { version = "0.7.5", optional = true }
tower = { version = "0.4.13", optional = true } tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.5.2", features = ["fs"], optional = true } tower-http = { version = "0.5.2", features = ["fs"], optional = true }
tokio = { version = "1.39", features = ["full"], optional = true } tokio = { version = "1.39", features = ["full"], optional = true }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
hydrate = ["leptos/hydrate"] hydrate = ["leptos/hydrate"]

View file

@ -8,9 +8,9 @@ leptos = { path = "../../leptos", features = ["csr"] }
log = "0.4.22" log = "0.4.22"
console_log = "1.0" console_log = "1.0"
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[dev-dependencies] [dev-dependencies]
wasm-bindgen-test = "0.3.42" wasm-bindgen-test = "0.3.42"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
web-sys = "0.3.69" web-sys = "0.3.69"

View file

@ -29,7 +29,7 @@ tower-http = { version = "0.5.2", features = [
], optional = true } ], optional = true }
tokio = { version = "1.39", features = ["full"], optional = true } tokio = { version = "1.39", features = ["full"], optional = true }
thiserror = "1.0" thiserror = "1.0"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
serde_toml = "0.0.1" serde_toml = "0.0.1"
toml = "0.8.19" toml = "0.8.19"
web-sys = { version = "0.3.69", features = ["FileList", "File"] } web-sys = { version = "0.3.69", features = ["FileList", "File"] }

View file

@ -20,7 +20,7 @@ log = "0.4.22"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0" thiserror = "1.0"
tokio = { version = "1.39", features = ["time"] } tokio = { version = "1.39", features = ["time"] }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
hydrate = ["leptos/hydrate"] hydrate = ["leptos/hydrate"]

View file

@ -27,7 +27,7 @@ tokio = { version = "1.39", features = [
"macros", "macros",
"time", "time",
], optional = true } ], optional = true }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
hydrate = ["leptos/hydrate"] hydrate = ["leptos/hydrate"]

View file

@ -15,6 +15,6 @@ reactive_stores_macro = { path = "../../reactive_stores_macro" }
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
[dev-dependencies] [dev-dependencies]
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
wasm-bindgen-test = "0.3.42" wasm-bindgen-test = "0.3.42"
web-sys = "0.3.69" web-sys = "0.3.69"

View file

@ -14,7 +14,7 @@ leptos = { path = "../../leptos" }
leptos_actix = { path = "../../integrations/actix", optional = true } leptos_actix = { path = "../../integrations/actix", optional = true }
leptos_router = { path = "../../router" } leptos_router = { path = "../../router" }
log = "0.4.22" log = "0.4.22"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
serde = "1.0" serde = "1.0"
tokio = { version = "1.39", features = ["time", "rt"], optional = true } tokio = { version = "1.39", features = ["time", "rt"], optional = true }

View file

@ -14,7 +14,7 @@ leptos_router = { path = "../../router" }
# dependencies for browser (enable when hydrate set) # dependencies for browser (enable when hydrate set)
console_error_panic_hook = { version = "0.1.7", optional = true } console_error_panic_hook = { version = "0.1.7", optional = true }
wasm-bindgen = { version = "0.2.92", optional = true } wasm-bindgen = { version = "0.2.93", optional = true }
# dependencies for server (enable when ssr set) # dependencies for server (enable when ssr set)
actix-files = { version = "0.6.6", optional = true } actix-files = { version = "0.6.6", optional = true }

View file

@ -19,7 +19,7 @@ tokio = { version = "1.39", features = [
], optional = true } ], optional = true }
tower = { version = "0.4.13", optional = true } tower = { version = "0.4.13", optional = true }
tower-http = { version = "0.5.2", features = ["fs"], optional = true } tower-http = { version = "0.5.2", features = ["fs"], optional = true }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
thiserror = "1.0" thiserror = "1.0"
tracing = { version = "0.1.40", optional = true } tracing = { version = "0.1.40", optional = true }
http = "1.1" http = "1.1"

View file

@ -12,7 +12,7 @@ leptos = { path = "../../leptos", features = ["csr"] }
console_log = "1.0" console_log = "1.0"
log = "0.4.22" log = "0.4.22"
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[dependencies.web-sys] [dependencies.web-sys]
version = "0.3.69" version = "0.3.69"

View file

@ -24,7 +24,7 @@ sqlx = { version = "0.8.0", features = [
"runtime-tokio-rustls", "runtime-tokio-rustls",
"sqlite", "sqlite",
], optional = true } ], optional = true }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
tokio = { version = "1.39", features = ["rt", "time"], optional = true } tokio = { version = "1.39", features = ["rt", "time"], optional = true }
server_fn = { path = "../../server_fn", features = ["cbor"] } server_fn = { path = "../../server_fn", features = ["cbor"] }

View file

@ -25,7 +25,7 @@ sqlx = { version = "0.8.0", features = [
"sqlite", "sqlite",
], optional = true } ], optional = true }
thiserror = "1.0" thiserror = "1.0"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
hydrate = ["leptos/hydrate"] hydrate = ["leptos/hydrate"]

View file

@ -25,7 +25,7 @@ sqlx = { version = "0.8.0", features = [
"sqlite", "sqlite",
], optional = true } ], optional = true }
thiserror = "1.0" thiserror = "1.0"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[features] [features]
csr = ["leptos/csr"] csr = ["leptos/csr"]

View file

@ -14,7 +14,7 @@ throw_error = { workspace = true }
or_poisoned = { workspace = true } or_poisoned = { workspace = true }
futures = "0.3.30" futures = "0.3.30"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
wasm-bindgen = { version = "0.2.92", optional = true } wasm-bindgen = { version = "0.2.93", optional = true }
js-sys = { version = "0.3.69", optional = true } js-sys = { version = "0.3.69", optional = true }
once_cell = "1.19" once_cell = "1.19"
pin-project-lite = "0.2.14" pin-project-lite = "0.2.14"

View file

@ -12,19 +12,23 @@ use wasm_bindgen::{prelude::wasm_bindgen, JsCast};
#[wasm_bindgen] #[wasm_bindgen]
extern "C" { extern "C" {
#[wasm_bindgen(thread_local)]
static __RESOLVED_RESOURCES: Array; static __RESOLVED_RESOURCES: Array;
#[wasm_bindgen(thread_local)]
static __SERIALIZED_ERRORS: Array; static __SERIALIZED_ERRORS: Array;
#[wasm_bindgen(thread_local)]
static __INCOMPLETE_CHUNKS: Array; static __INCOMPLETE_CHUNKS: Array;
} }
fn serialized_errors() -> Vec<(SerializedDataId, ErrorId, Error)> { fn serialized_errors() -> Vec<(SerializedDataId, ErrorId, Error)> {
__SERIALIZED_ERRORS __SERIALIZED_ERRORS.with(|s| {
.iter() s.iter()
.flat_map(|value| { .flat_map(|value| {
value.dyn_ref::<Array>().map(|value| { value.dyn_ref::<Array>().map(|value| {
let error_boundary_id = value.get(0).as_f64().unwrap() as usize; let error_boundary_id =
value.get(0).as_f64().unwrap() as usize;
let error_id = value.get(1).as_f64().unwrap() as usize; let error_id = value.get(1).as_f64().unwrap() as usize;
let value = value let value = value
.get(2) .get(2)
@ -38,16 +42,18 @@ fn serialized_errors() -> Vec<(SerializedDataId, ErrorId, Error)> {
}) })
}) })
.collect() .collect()
})
} }
fn incomplete_chunks() -> Vec<SerializedDataId> { fn incomplete_chunks() -> Vec<SerializedDataId> {
__INCOMPLETE_CHUNKS __INCOMPLETE_CHUNKS.with(|i| {
.iter() i.iter()
.map(|value| { .map(|value| {
let id = value.as_f64().unwrap() as usize; let id = value.as_f64().unwrap() as usize;
SerializedDataId(id) SerializedDataId(id)
}) })
.collect() .collect()
})
} }
/// An error that has been serialized across the network boundary. /// An error that has been serialized across the network boundary.
@ -118,7 +124,7 @@ impl SharedContext for HydrateSharedContext {
fn write_async(&self, _id: SerializedDataId, _fut: PinnedFuture<String>) {} fn write_async(&self, _id: SerializedDataId, _fut: PinnedFuture<String>) {}
fn read_data(&self, id: &SerializedDataId) -> Option<String> { fn read_data(&self, id: &SerializedDataId) -> Option<String> {
__RESOLVED_RESOURCES.get(id.0 as u32).as_string() __RESOLVED_RESOURCES.with(|r| r.get(id.0 as u32).as_string())
} }
fn await_data(&self, _id: &SerializedDataId) -> Option<String> { fn await_data(&self, _id: &SerializedDataId) -> Option<String> {

View file

@ -45,7 +45,7 @@ web-sys = { version = "0.3.69", features = [
"ShadowRootInit", "ShadowRootInit",
"ShadowRootMode", "ShadowRootMode",
] } ] }
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
serde_qs = "0.13.0" serde_qs = "0.13.0"
slotmap = "1.0" slotmap = "1.0"
futures = "0.3.30" futures = "0.3.30"

View file

@ -15,7 +15,7 @@ or_poisoned = { workspace = true }
js-sys = "0.3.69" js-sys = "0.3.69"
send_wrapper = "0.6.0" send_wrapper = "0.6.0"
tracing = "0.1.40" tracing = "0.1.40"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
[dev-dependencies] [dev-dependencies]
leptos = { path = "../leptos" } leptos = { path = "../leptos" }

View file

@ -24,7 +24,7 @@ tachys = { workspace = true, optional = true, features = ["reactive_graph"] }
# serialization formats # serialization formats
serde = { version = "1.0" } serde = { version = "1.0" }
js-sys = { version = "0.3.69", optional = true } js-sys = { version = "0.3.69", optional = true }
wasm-bindgen = { version = "0.2.92", optional = true } wasm-bindgen = { version = "0.2.93", optional = true }
serde_json = { version = "1.0" } serde_json = { version = "1.0" }
[features] [features]

View file

@ -15,7 +15,7 @@ or_poisoned = { workspace = true }
indexmap = "2.3" indexmap = "2.3"
send_wrapper = "0.6.0" send_wrapper = "0.6.0"
tracing = "0.1.40" tracing = "0.1.40"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
futures = "0.3.30" futures = "0.3.30"
[dependencies.web-sys] [dependencies.web-sys]

View file

@ -20,7 +20,7 @@ tachys = { workspace = true, features = ["reactive_graph"] }
futures = "0.3.30" futures = "0.3.30"
url = "2.5" url = "2.5"
js-sys = { version = "0.3.69" } js-sys = { version = "0.3.69" }
wasm-bindgen = { version = "0.2.92" } wasm-bindgen = { version = "0.2.93" }
tracing = { version = "0.1.40", optional = true } tracing = { version = "0.1.40", optional = true }
paste = "1.0" paste = "1.0"
once_cell = "1.19" once_cell = "1.19"

View file

@ -60,7 +60,7 @@ rmp-serde = { version = "1.3.0", optional = true }
# client # client
gloo-net = { version = "0.6.0", optional = true } gloo-net = { version = "0.6.0", optional = true }
js-sys = { version = "0.3.69", optional = true } js-sys = { version = "0.3.69", optional = true }
wasm-bindgen = { version = "0.2.92", optional = true } wasm-bindgen = { version = "0.2.93", optional = true }
wasm-bindgen-futures = { version = "0.4.42", optional = true } wasm-bindgen-futures = { version = "0.4.42", optional = true }
wasm-streams = { version = "0.4.0", optional = true } wasm-streams = { version = "0.4.0", optional = true }
web-sys = { version = "0.3.69", optional = true, features = [ web-sys = { version = "0.3.69", optional = true, features = [

View file

@ -22,7 +22,7 @@ oco_ref = { workspace = true, optional = true }
once_cell = "1.19" once_cell = "1.19"
paste = "1.0" paste = "1.0"
pin-project-lite = "0.2.14" pin-project-lite = "0.2.14"
wasm-bindgen = "0.2.92" wasm-bindgen = "0.2.93"
html-escape = "0.2.13" html-escape = "0.2.13"
js-sys = "0.3.69" js-sys = "0.3.69"
web-sys = { version = "0.3.69", features = [ web-sys = { version = "0.3.69", features = [