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

chore: update deno_graph to v0.56.0 #149

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ path = "src/examples/viewer.rs"
anyhow = "1"
base64 = "0.21.0"
deno_ast = { version = "0.29.3", features = ["transpiling"] }
deno_graph = "0.55.0"
deno_graph = "0.56.0"
deno_npm = "0.15.0"
deno_semver = "0.5.0"
futures = "0.3.26"
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ crate-type = ["cdylib"]
[dependencies]
anyhow = "1"
console_error_panic_hook = "0.1.7"
deno_graph = "0.55.0"
deno_graph = "0.56.0"
eszip = { path = "../" }
import_map = "0.15.0"
js-sys = { version = "0.3.64" }
Expand Down
7 changes: 5 additions & 2 deletions lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use deno_graph::source::load_data_url;
use deno_graph::source::CacheInfo;
use deno_graph::source::LoadFuture;
use deno_graph::source::Loader;
use deno_graph::source::ResolveError;
use deno_graph::source::Resolver;
use deno_graph::BuildOptions;
use deno_graph::GraphKind;
Expand Down Expand Up @@ -385,9 +386,11 @@ impl Resolver for GraphResolver {
&self,
specifier: &str,
referrer: &deno_graph::ModuleSpecifier,
) -> Result<deno_graph::ModuleSpecifier, anyhow::Error> {
) -> Result<deno_graph::ModuleSpecifier, ResolveError> {
if let Some(import_map) = &self.0 {
Ok(import_map.resolve(specifier, referrer)?)
import_map
.resolve(specifier, referrer)
.map_err(|err| ResolveError::Other(err.into()))
} else {
Ok(deno_graph::resolve_import(specifier, referrer)?)
}
Expand Down
7 changes: 5 additions & 2 deletions src/examples/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::sync::Arc;

use deno_ast::EmitOptions;
use deno_graph::source::CacheSetting;
use deno_graph::source::ResolveError;
use deno_graph::BuildOptions;
use deno_graph::CapturingModuleAnalyzer;
use deno_graph::GraphKind;
Expand Down Expand Up @@ -94,9 +95,11 @@ impl deno_graph::source::Resolver for Resolver {
&self,
specifier: &str,
referrer: &deno_graph::ModuleSpecifier,
) -> Result<deno_graph::ModuleSpecifier, anyhow::Error> {
) -> Result<deno_graph::ModuleSpecifier, ResolveError> {
if let Some(import_map) = &self.0 {
Ok(import_map.resolve(specifier, referrer)?)
import_map
.resolve(specifier, referrer)
.map_err(|e| ResolveError::Other(e.into()))
} else {
Ok(deno_graph::resolve_import(specifier, referrer)?)
}
Expand Down
8 changes: 6 additions & 2 deletions src/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,7 @@ mod tests {
use deno_ast::EmitOptions;
use deno_graph::source::CacheSetting;
use deno_graph::source::LoadResponse;
use deno_graph::source::ResolveError;
use deno_graph::BuildOptions;
use deno_graph::CapturingModuleAnalyzer;
use deno_graph::GraphKind;
Expand Down Expand Up @@ -1220,8 +1221,11 @@ mod tests {
&self,
specifier: &str,
referrer: &ModuleSpecifier,
) -> Result<ModuleSpecifier, anyhow::Error> {
Ok(self.0.resolve(specifier, referrer)?)
) -> Result<ModuleSpecifier, ResolveError> {
self
.0
.resolve(specifier, referrer)
.map_err(|err| ResolveError::Other(err.into()))
}
}

Expand Down
Loading