From 46f1348f145116cda4c74d9bdbf075bedaffccf2 Mon Sep 17 00:00:00 2001 From: Arnau Orriols <4871949+arnauorriols@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:31:05 +0200 Subject: [PATCH] chore: fix wasm support (#119) --- src/workspace/resolver.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/workspace/resolver.rs b/src/workspace/resolver.rs index a15f312..0c7d7db 100644 --- a/src/workspace/resolver.rs +++ b/src/workspace/resolver.rs @@ -27,6 +27,7 @@ use url::Url; use crate::sync::new_rc; use crate::util::url_from_directory_path; +use crate::util::url_to_file_path; use crate::workspace::Workspace; use super::UrlRc; @@ -456,11 +457,9 @@ impl WorkspaceResolver { .package_jsons .into_iter() .map(|(relative_path, json)| { - let path = root_dir_url - .join(&relative_path) - .unwrap() - .to_file_path() - .unwrap(); + let path = + url_to_file_path(&root_dir_url.join(&relative_path).unwrap()) + .unwrap(); let pkg_json = deno_package_json::PackageJson::load_from_value(path, json); PackageJsonRc::new(pkg_json)