Skip to content

Commit

Permalink
chore: add missing wasm cases to matches
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhrznr committed Dec 31, 2024
1 parent 2dad120 commit 82d29aa
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions api/src/api/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1822,10 +1822,10 @@ impl<'a> GraphDependencyCollector<'a> {
}
}
}
Module::Npm(_) => {
return None;
}
Module::Node(_) | Module::External(_) => {
Module::Wasm(_)
| Module::Npm(_)
| Module::Node(_)
| Module::External(_) => {
return None;
}
};
Expand All @@ -1834,15 +1834,21 @@ impl<'a> GraphDependencyCollector<'a> {
Some(info.id)
} else {
let maybe_size = match module {
Module::Js(module) => Some(module.size() as u64),
Module::Json(module) => Some(module.size() as u64),
Module::Node(_) | Module::Npm(_) | Module::External(_) => None,
Module::Js(js) => Some(js.size() as u64),
Module::Json(json) => Some(json.size() as u64),
Module::Wasm(_)
| Module::Node(_)
| Module::Npm(_)
| Module::External(_) => None,
};

let media_type = match module {
Module::Js(js) => Some(js.media_type),
Module::Json(json) => Some(json.media_type),
Module::Npm(_) | Module::Node(_) | Module::External(_) => None,
Module::Wasm(_)
| Module::Npm(_)
| Module::Node(_)
| Module::External(_) => None,
};

let mut children = vec![];
Expand All @@ -1868,6 +1874,7 @@ impl<'a> GraphDependencyCollector<'a> {
}
}
Module::Json(_)
| Module::Wasm(_)
| Module::Npm(_)
| Module::Node(_)
| Module::External(_) => {}
Expand Down

0 comments on commit 82d29aa

Please sign in to comment.