Skip to content

Commit

Permalink
refactor: deno_graph 0.79
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jun 25, 2024
1 parent 7951a7a commit 40819bb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
45 changes: 23 additions & 22 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 @@ -8,7 +8,7 @@ members = [
[workspace.dependencies]
anyhow = "1.0.44"
base64 = "0.21.5"
deno_graph = { version = "0.78.0", default-features = false }
deno_graph = { version = "0.79.0", default-features = false }
url = { version = "2.3.1" }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion rs-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deno_ast = { version = "0.39.0", features = ["bundler", "codegen", "proposal", "
deno_graph = { workspace = true }
escape8259 = "0.5.2"
futures = "0.3.17"
import_map = "0.19.0"
import_map = "0.20.0"
parking_lot = { version = "0.11.2" }
url = { workspace = true }

Expand Down
8 changes: 4 additions & 4 deletions rs-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub async fn bundle(
maybe_import_map: Option<ImportMapInput>,
options: BundleOptions,
) -> Result<BundleEmit> {
let maybe_import_map = get_import_map_from_input(&maybe_import_map)?;
let maybe_import_map = get_import_map_from_input(maybe_import_map)?;
let import_map_resolver = ImportMapResolver(maybe_import_map);
let mut graph = ModuleGraph::new(GraphKind::CodeOnly);
graph
Expand All @@ -67,7 +67,7 @@ pub async fn transpile(
emit_options: &EmitOptions,
) -> Result<HashMap<String, Vec<u8>>> {
let analyzer = CapturingModuleAnalyzer::default();
let maybe_import_map = get_import_map_from_input(&maybe_import_map)?;
let maybe_import_map = get_import_map_from_input(maybe_import_map)?;
let import_map_resolver = ImportMapResolver(maybe_import_map);
let mut graph = ModuleGraph::new(GraphKind::CodeOnly);
graph
Expand Down Expand Up @@ -112,11 +112,11 @@ pub struct ImportMapInput {
}

fn get_import_map_from_input(
maybe_input: &Option<ImportMapInput>,
maybe_input: Option<ImportMapInput>,
) -> Result<Option<ImportMap>> {
if let Some(input) = maybe_input {
let import_map = import_map::parse_from_json_with_options(
&input.base_url,
input.base_url,
&input.json_string,
ImportMapOptions {
address_hook: None,
Expand Down

0 comments on commit 40819bb

Please sign in to comment.