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

Fix issues with Request.clone in http types #440

Merged
merged 7 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
62 changes: 31 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ lto = true
[profile.release.package."*"]
codegen-units = 1
opt-level = "z"

[workspace.dependencies]
wasm-bindgen = "=0.2.87"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be easier to set this at the workspace level.

2 changes: 1 addition & 1 deletion worker-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ worker-sys = { path = "../worker-sys", version = "0.0.9" }
syn = "2.0.17"
proc-macro2 = "1.0.60"
quote = "1.0.28"
wasm-bindgen = "=0.2.86"
wasm-bindgen = {workspace=true}
wasm-bindgen-futures = "0.4.36"
wasm-bindgen-macro-support = "0.2.86"

Expand Down
6 changes: 5 additions & 1 deletion worker-sandbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ use std::{
use router_service::unsync::Router;
use serde::{Deserialize, Serialize};
use tower::Service;
use worker::{body::Body, http::{Response, HttpClone, RequestRedirect}, *};
use worker::{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran cargo fmt

body::Body,
http::{HttpClone, RequestRedirect, Response},
*,
};

mod alarm;
mod counter;
Expand Down
2 changes: 1 addition & 1 deletion worker-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "Low-level extern definitions / FFI bindings to the Cloudflare Wor
[dependencies]
cfg-if = "1.0.0"
js-sys = "0.3.63"
wasm-bindgen = "=0.2.86"
wasm-bindgen = {workspace=true}

[dependencies.web-sys]
version = "0.3.63"
Expand Down
4 changes: 2 additions & 2 deletions worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ serde = { version = "1.0.164", features = ["derive"] }
serde_json = "1.0.96"
tokio = { version = "1.28", default-features = false }
url = "2.4.0"
wasm-bindgen = "=0.2.86"
wasm-bindgen = {workspace=true}
wasm-bindgen-futures = "0.4.36"
serde-wasm-bindgen = "0.5.0"
wasm-streams = "0.3.0"
wasm-streams = "0.4.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had to be bumped due to incompatibility in ReadableStream types in the prior version (now re-exports web_sys types).

worker-kv = "0.6.0"
worker-macros = { path = "../worker-macros", version = "0.0.9" }
worker-sys = { path = "../worker-sys", version = "0.0.9" }
Expand Down
17 changes: 0 additions & 17 deletions worker/js/hacks.js

This file was deleted.

1 change: 1 addition & 0 deletions worker/src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod wasm;

pub use body::Body;
pub(crate) use body::BodyInner;
pub(crate) use body::BoxBodyReader;
pub use http_body::Body as HttpBody;
pub use to_bytes::to_bytes;

Expand Down
Loading
Loading