diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba53159..a1b03d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: | - cargo publish -p deno_emit -vv + cargo publish -p deno_emit - name: Get tag version if: contains(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags/') diff --git a/Cargo.lock b/Cargo.lock index 759580f..333a70a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.69.0" +version = "0.69.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98448adebbc12b8b1fc0eb42ce06cf3830dff0dcb48f3276039360b90405612f" +checksum = "2798952afefd96567e93e15db4817f083cac81712210c92b8179bd0bfa0c2222" dependencies = [ "anyhow", "async-trait", @@ -650,12 +650,13 @@ checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" [[package]] name = "import_map" -version = "0.18.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bad4ef70a3e0f2ee403925d77d1e7b74e471b57ea75593f332aac31b57958b4" +checksum = "696717335b077e26921a60be7b7bdc15d1246074f1ac79d9e8560792535f7d07" dependencies = [ "indexmap", "log", + "percent-encoding", "serde", "serde_json", "url", diff --git a/Cargo.toml b/Cargo.toml index a00bd0e..df64c48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ [workspace.dependencies] anyhow = "1.0.44" base64 = "0.21.5" -deno_graph = { version = "0.69.0", default-features = false } +deno_graph = { version = "0.69.3", default-features = false } url = { version = "2.3.1" } [profile.release] diff --git a/rs-lib/Cargo.toml b/rs-lib/Cargo.toml index 63594b9..2a9462f 100644 --- a/rs-lib/Cargo.toml +++ b/rs-lib/Cargo.toml @@ -15,7 +15,7 @@ deno_ast = { version = "0.34.0", features = ["bundler", "codegen", "proposal", " deno_graph = { workspace = true } escape8259 = "0.5.2" futures = "0.3.17" -import_map = "0.18.1" +import_map = "0.19.0" parking_lot = { version = "0.11.2" } url = { workspace = true } diff --git a/rs-lib/src/lib.rs b/rs-lib/src/lib.rs index 5e13b0b..7f5e847 100644 --- a/rs-lib/src/lib.rs +++ b/rs-lib/src/lib.rs @@ -17,6 +17,7 @@ use deno_graph::ModuleGraph; use deno_graph::ParsedSourceStore; use deno_graph::Range; use import_map::ImportMap; +use import_map::ImportMapOptions; use std::collections::HashMap; use url::Url; @@ -143,9 +144,14 @@ async fn get_import_map_from_input( specifier, maybe_headers: _, } => { - let import_map = import_map::parse_from_json( + let import_map = import_map::parse_from_json_with_options( &specifier, &String::from_utf8(content.to_vec())?, + ImportMapOptions { + address_hook: None, + // always do this for simplicity + expand_imports: true, + }, )? .import_map; Ok(Some(import_map)) @@ -156,8 +162,16 @@ async fn get_import_map_from_input( base_url, json_string, } => { - let import_map = - import_map::parse_from_json(base_url, json_string)?.import_map; + let import_map = import_map::parse_from_json_with_options( + base_url, + json_string, + ImportMapOptions { + address_hook: None, + // always do this for simplicity + expand_imports: true, + }, + )? + .import_map; Ok(Some(import_map)) } }