Skip to content

Commit

Permalink
fix(wasm): get node-maintainer working on wasm again
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 18, 2023
1 parent be5712e commit b1f6bc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/nassun/src/lib.rs
Expand Up @@ -6,7 +6,10 @@ pub use oro_package_spec::{GitHost, GitInfo, PackageSpec, VersionSpec};

pub mod client;
pub mod entries;
#[cfg(not(target_arch = "wasm32"))]
mod error;
#[cfg(target_arch = "wasm32")]
pub mod error;
pub mod fetch;
pub mod package;
pub mod resolver;
Expand Down
7 changes: 7 additions & 0 deletions crates/node-maintainer/src/error.rs
Expand Up @@ -101,11 +101,18 @@ pub enum NodeMaintainerError {
#[diagnostic(code(node_maintainer::io_error), url(docsrs))]
IoError(#[from] std::io::Error),

#[cfg(not(target_arch = "wasm32"))]
/// Generic error returned from Nassun.
#[error(transparent)]
#[diagnostic(transparent)]
NassunError(#[from] nassun::NassunError),

#[cfg(target_arch = "wasm32")]
/// Generic error returned from Nassun.
#[error(transparent)]
#[diagnostic(transparent)]
NassunError(#[from] nassun::error::NassunError),

/// Generic serde_json error.
#[error(transparent)]
#[diagnostic(code(node_maintainer::serde_json_error), url(docsrs))]
Expand Down

0 comments on commit b1f6bc8

Please sign in to comment.