Skip to content
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

Update dev-dependencies #4040

Merged
merged 1 commit into from
Aug 3, 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/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.92" }
wasm-bindgen-shared = { path = "../shared", version = "=0.2.92" }

[dev-dependencies]
assert_cmd = "1.0"
assert_cmd = "2"
diff = "0.1"
predicates = "1.0.0"
predicates = "3"
rayon = "1.0"
tempfile = "3.0"
wasmparser = "0.212"
Expand Down
15 changes: 8 additions & 7 deletions crates/example-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ edition = "2018"
[dependencies]
anyhow = "1.0.75"
futures-util = { version = "0.3.28", features = ["sink"] }
http = "0.2.9"
hyper = { version = "0.14.27", features = ["server", "tcp", "http1"] }
mozprofile = "0.8.0"
mozrunner = "0.14.0"
http = "1"
hyper = "1"
hyper-util = { version = "0.1.6", features = ["http1", "service", "server", "tokio"] }
mozprofile = "0.9"
mozrunner = "0.15"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.29.1", features = ["macros", "time"] }
tokio-tungstenite = "0.17.2"
tokio = { version = "1.29.1", features = ["macros", "net", "time"] }
tokio-tungstenite = "0.23"
tower = { version = "0.4.13", features = ["make"] }
tower-http = { version = "0.3.5", features = ["fs", "util", "set-header"] }
tower-http = { version = "0.5", features = ["fs", "util", "set-header"] }
54 changes: 35 additions & 19 deletions crates/example-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ use std::{env, str};
use anyhow::{bail, Context};
use futures_util::{future, SinkExt, StreamExt};
use http::{HeaderName, HeaderValue};
use hyper_util::rt::{TokioExecutor, TokioIo};
use hyper_util::server::conn::auto::Builder;
use hyper_util::service::TowerToHyperService;
use mozprofile::profile::Profile;
use mozrunner::firefox_default_path;
use mozrunner::runner::{FirefoxProcess, FirefoxRunner, Runner, RunnerProcess};
Expand All @@ -20,7 +23,6 @@ use tokio::sync::oneshot;
use tokio::time::timeout;
use tokio_tungstenite::tungstenite::{self, Message};
use tokio_tungstenite::{MaybeTlsStream, WebSocketStream};
use tower::make::Shared;
use tower::ServiceBuilder;
use tower_http::services::ServeDir;
use tower_http::ServiceBuilderExt;
Expand Down Expand Up @@ -146,7 +148,7 @@ impl WebDriver {
// For the moment, we're only supporting Firefox here.
let mut builder = FirefoxRunner::new(
&firefox_default_path().context("failed to find Firefox installation")?,
Some(Profile::new()?),
Some(Profile::new(None)?),
);
builder
.arg("--remote-debugging-port")
Expand Down Expand Up @@ -326,27 +328,41 @@ pub async fn test_example(
let mut driver = WebDriver::new().await?;

// Serve the path.
let service = ServiceBuilder::new()
.override_response_header(
HeaderName::from_static("cross-origin-opener-policy"),
HeaderValue::from_static("same-origin"),
)
.override_response_header(
HeaderName::from_static("cross-origin-embedder-policy"),
HeaderValue::from_static("require-corp"),
)
.service(ServeDir::new(path));
let server =
hyper::Server::try_bind(&"127.0.0.1:0".parse().unwrap())?.serve(Shared::new(service));

let addr = server.local_addr();
let service = TowerToHyperService::new(
ServiceBuilder::new()
.override_response_header(
HeaderName::from_static("cross-origin-opener-policy"),
HeaderValue::from_static("same-origin"),
)
.override_response_header(
HeaderName::from_static("cross-origin-embedder-policy"),
HeaderValue::from_static("require-corp"),
)
.service(ServeDir::new(path)),
);

let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await?;
let addr = listener.local_addr()?;
let builder = Builder::new(TokioExecutor::new()).http1_only();

let (tx, rx) = oneshot::channel();

let (server_result, result) = future::join(
server.with_graceful_shutdown(async move {
let _ = rx.await;
}),
async move {
let (stream, _) = listener.accept().await?;

let conn = builder.serve_connection(TokioIo::new(stream), &service);
tokio::pin!(conn);

tokio::select! {
res = conn.as_mut() => {
res.map_err(|e| anyhow::Error::msg(e.to_string()))
}
_ = rx => {
Ok(())
}
}
},
async {
#[derive(Deserialize)]
struct BrowsingContextCreateResult {
Expand Down
2 changes: 1 addition & 1 deletion crates/externref-xform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ wasm-bindgen-wasm-conventions = { path = "../wasm-conventions", version = "=0.2.
[dev-dependencies]
rayon = "1.0"
wasmprinter = "0.212"
wast = "21.0"
wast = "212"
wat = "1.0"

[[test]]
Expand Down
8 changes: 4 additions & 4 deletions crates/externref-xform/tests/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ impl<'a> Parse<'a> for Directive {
wast::custom_keyword!(externref_borrowed);
wast::custom_keyword!(other);

let kind = if parser.peek::<kw::import>() {
let kind = if parser.peek::<kw::import>()? {
parser.parse::<kw::import>()?;
DirectiveKind::Import(parser.parse()?, parser.parse()?)
} else if parser.peek::<kw::export>() {
} else if parser.peek::<kw::export>()? {
parser.parse::<kw::export>()?;
DirectiveKind::Export(parser.parse()?)
} else {
Expand All @@ -234,10 +234,10 @@ impl<'a> Parse<'a> for Directive {
parser.parens(|p| {
let mut i = 0;
while !p.is_empty() {
if parser.peek::<externref_owned>() {
if parser.peek::<externref_owned>()? {
parser.parse::<externref_owned>()?;
args.push((i, true));
} else if parser.peek::<externref_borrowed>() {
} else if parser.peek::<externref_borrowed>()? {
parser.parse::<externref_borrowed>()?;
args.push((i, false));
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/multi-value-xform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ wasm-bindgen-wasm-conventions = { path = "../wasm-conventions", version = "=0.2.
[dev-dependencies]
rayon = "1.0"
wasmprinter = "0.212"
wast = "21.0"
wast = "212"
wat = "1.0"

[[test]]
Expand Down
2 changes: 1 addition & 1 deletion crates/multi-value-xform/tests/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ fn update_output(path: &Path, output: &str) -> Result<()> {

impl<'a> Parse<'a> for Directive {
fn parse(parser: Parser<'a>) -> wast::parser::Result<Self> {
use wast::{kw, ValType};
use wast::{core::ValType, kw};

parser.parse::<kw::export>()?;
let name = parser.parse()?;
Expand Down
4 changes: 2 additions & 2 deletions crates/webidl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ edition = "2018"
[dependencies]
env_logger = "0.11.5"
anyhow = "1.0"
heck = "0.3"
heck = "0.5"
log = "0.4.1"
proc-macro2 = "1.0"
quote = '1.0'
syn = { version = '2.0', features = ['extra-traits', 'full'] }
wasm-bindgen-backend = { version = "=0.2.92", path = "../backend" }
weedle = { git = "https://github.com/rustwasm/weedle.git" }
once_cell = "1.12"
sourcefile = "0.1"
sourcefile = "0.2"
structopt = "0.3.9"
lazy_static = "1.4.0"
2 changes: 1 addition & 1 deletion crates/webidl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ pub fn generate(from: &Path, to: &Path, options: Options) -> Result<String> {
if path.extension() != Some(OsStr::new("webidl")) {
continue;
}
source = source
source
.add_file(&path)
.with_context(|| format!("reading contents of file \"{}\"", path.display()))?;
}
Expand Down
4 changes: 2 additions & 2 deletions crates/webidl/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::iter::FromIterator;
use std::path::{Path, PathBuf};
use std::ptr;

use heck::{CamelCase, ShoutySnakeCase, SnakeCase};
use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase};
use proc_macro2::{Ident, TokenStream};
use quote::quote;
use wasm_bindgen_backend::util::{ident_ty, raw_ident, rust_ident};
Expand Down Expand Up @@ -71,7 +71,7 @@ fn fix_ident(identifier: &str) -> String {

/// Convert an identifier to camel case
pub fn camel_case_ident(identifier: &str) -> String {
fix_ident(identifier).to_camel_case()
fix_ident(identifier).to_upper_camel_case()
}

/// Convert an identifier to shouty snake case
Expand Down
2 changes: 1 addition & 1 deletion examples/raytrace-parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ js-sys = "0.3.69"
rayon = "1.1.0"
rayon-core = "1.5.0"
raytracer = { git = 'https://github.com/alexcrichton/raytracer', branch = 'update-deps' }
serde-wasm-bindgen = "0.4.3"
serde-wasm-bindgen = "0.6"
futures-channel-preview = "0.3.0-alpha.18"
wasm-bindgen = "0.2.92"
wasm-bindgen-futures = "0.4.42"
Expand Down
4 changes: 2 additions & 2 deletions examples/todomvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ edition = "2018"
crate-type = ["cdylib"]

[build-dependencies]
askama = "0.10.0"
askama = "0.12"

[dependencies]
js-sys = "0.3.69"
wasm-bindgen = "0.2.92"
askama = "0.10.0"
askama = "0.12"
console_error_panic_hook = "0.1.5"

[dependencies.web-sys]
Expand Down
2 changes: 1 addition & 1 deletion examples/wasm-audio-worklet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
console_log = "0.2.0"
console_log = "1"
js-sys = "0.3.69"
wasm-bindgen = "0.2.92"
wasm-bindgen-futures = "0.4.42"
Expand Down
6 changes: 3 additions & 3 deletions examples/weather_report/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ crate-type = ["cdylib"]

[dependencies]
chrono = "0.4.11"
reqwest = "0.10.6"
reqwest = "0.12"
wasm-bindgen-futures = "0.4.1"
json= "*"
json= "0.12"
wasm-bindgen = "0.2.92"
gloo = "0.2.1"
gloo = "0.11"

[dependencies.web-sys]
version = "0.3.40"
Expand Down
Loading