Skip to content

Commit

Permalink
Fix wasm builds (#9688)
Browse files Browse the repository at this point in the history
This fixes broken WASM builds since #9682 and previously added sentry changes.
  • Loading branch information
yamadapc committed May 6, 2024
1 parent c299d7e commit 6c6b879
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/node-bindings/Cargo.toml
Expand Up @@ -23,10 +23,6 @@ dashmap = "5.4.0"
xxhash-rust = { version = "0.8.2", features = ["xxh3"] }
log = "0.4.21"

sentry = { version = "0.32.2", optional = true, default-features = false, features = ["backtrace", "contexts", "panic", "reqwest", "debug-images", "anyhow"]}
once_cell = { version = "1.19.0", optional = true }
whoami = { version = "1.5.1", optional = true }

glob = "0.3.1"
serde = "1.0.198"
serde_json = "1.0.116"
Expand All @@ -35,6 +31,10 @@ anyhow = "1.0.82"
mockall = "0.12.1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
sentry = { version = "0.32.2", optional = true, default-features = false, features = ["backtrace", "contexts", "panic", "reqwest", "debug-images", "anyhow"]}
whoami = { version = "1.5.1", optional = true }
once_cell = { version = "1.19.0", optional = true }

napi = { version = "2.16.4", features = ["serde-json", "napi4", "napi5"] }
parcel-dev-dep-resolver = { path = "../../packages/utils/dev-dep-resolver" }
parcel-macros = { path = "../macros", features = ["napi"] }
Expand Down
1 change: 1 addition & 0 deletions crates/parcel_filesystem/src/lib.rs
Expand Up @@ -11,6 +11,7 @@ pub mod js_delegate_file_system;
pub mod in_memory_file_system;

/// File-system implementation using std::fs and a canonicalize cache
#[cfg(not(target_arch = "wasm32"))]
pub mod os_file_system;

/// Trait abstracting file-system operations
Expand Down
2 changes: 0 additions & 2 deletions crates/parcel_filesystem/src/os_file_system/mod.rs
Expand Up @@ -8,11 +8,9 @@ use crate::FileSystem;

mod canonicalize;

#[cfg(not(target_arch = "wasm32"))]
#[derive(Default)]
pub struct OsFileSystem;

#[cfg(not(target_arch = "wasm32"))]
impl FileSystem for OsFileSystem {
fn cwd(&self) -> std::io::Result<PathBuf> {
std::env::current_dir()
Expand Down

0 comments on commit 6c6b879

Please sign in to comment.