mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
Update wasm-bindgen and fix cargo config (#853)
* Update wasm-bindgen and fix cargo config * clippy
This commit is contained in:
parent
5d27094370
commit
99220f542f
@ -1,8 +1,5 @@
|
||||
[target.'cfg(not(not(feature = "doc_test")))']
|
||||
[build]
|
||||
target = 'wasm32-unknown-unknown'
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))']
|
||||
runner = 'wasm-bindgen-test-runner'
|
||||
|
||||
[alias]
|
||||
doc_test = "test --doc --features doc_test"
|
||||
|
||||
@ -30,7 +30,7 @@ install:
|
||||
- rustup component add clippy
|
||||
- rustup target add wasm32-unknown-unknown
|
||||
- cargo install cargo-update || true
|
||||
- cargo install-update-config --version =0.2.57 wasm-bindgen-cli
|
||||
- cargo install-update-config --version =0.2.58 wasm-bindgen-cli
|
||||
- cargo install-update wasm-bindgen-cli
|
||||
- LATEST_CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"`
|
||||
- curl --retry 5 -LO "https://chromedriver.storage.googleapis.com/${LATEST_CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
|
||||
|
||||
@ -38,8 +38,7 @@ toml = { version = "0.5", optional = true }
|
||||
yew-macro = { version = "0.11.1", path = "crates/macro" }
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))'.dependencies]
|
||||
wasm-bindgen = "0.2.57"
|
||||
wasm-bindgen-futures = "0.4.4"
|
||||
wasm-bindgen = "0.2.58"
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))'.dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.4"
|
||||
|
||||
@ -12,5 +12,16 @@ fi
|
||||
cargo test --features wasm_test --target wasm32-unknown-unknown
|
||||
cargo test --test macro_test
|
||||
cargo test --test derive_props_test
|
||||
cargo doc_test --all-features
|
||||
(cd crates/macro && cargo doc_test)
|
||||
|
||||
# Disable cargo config for doc tests because the default target prevents doc
|
||||
# tests from running
|
||||
set +e
|
||||
mv .cargo/config .cargo/config.tmp
|
||||
cargo test --doc --all-features
|
||||
doc_test_failed=$?
|
||||
(cd crates/macro && cargo test --doc)
|
||||
macro_doc_test_failed=$?
|
||||
mv .cargo/config.tmp .cargo/config
|
||||
if (($doc_test_failed)) || (($macro_doc_test_failed)); then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -26,4 +26,4 @@ features = [
|
||||
]
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dependencies]
|
||||
wasm-bindgen = "0.2.57"
|
||||
wasm-bindgen = "0.2.58"
|
||||
|
||||
@ -9,4 +9,4 @@ yew = { path = "../.." }
|
||||
stdweb = "^0.4.20"
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dependencies]
|
||||
wasm-bindgen = "0.2.57"
|
||||
wasm-bindgen = "0.2.58"
|
||||
|
||||
@ -73,7 +73,7 @@ impl HandlerId {
|
||||
self.0
|
||||
}
|
||||
/// Indicates if a handler id corresponds to callback in the Agent runtime.
|
||||
pub fn is_respondable(&self) -> bool {
|
||||
pub fn is_respondable(self) -> bool {
|
||||
self.1
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user