summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock4
-rw-r--r--cli/Cargo.toml2
-rw-r--r--cli/util/import_map.rs14
-rw-r--r--tests/integration/run_tests.rs6
-rw-r--r--tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json1
-rw-r--r--tests/testdata/publish/unanalyzable_dynamic_import.out4
6 files changed, 16 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 797939090..01f2ce4a7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1418,9 +1418,9 @@ dependencies = [
[[package]]
name = "deno_graph"
-version = "0.68.0"
+version = "0.68.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47a122de1af66e3b5389a914ce0bf6296271138d259fb78259b839ca7e0722a7"
+checksum = "85cc3b07418c76c385f51442a12ad679b38cdbf16ce2233fe8bd20d2a68b8bc2"
dependencies = [
"anyhow",
"async-trait",
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 2379f3b62..a8b7a0b25 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -68,7 +68,7 @@ deno_config = "=0.10.0"
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
deno_doc = { version = "=0.110.0", features = ["html"] }
deno_emit = "=0.38.0"
-deno_graph = "=0.68.0"
+deno_graph = "=0.68.1"
deno_lint = { version = "=0.57.0", features = ["docs"] }
deno_lockfile.workspace = true
deno_npm = "=0.17.0"
diff --git a/cli/util/import_map.rs b/cli/util/import_map.rs
index b8b8b9a1a..50a74b285 100644
--- a/cli/util/import_map.rs
+++ b/cli/util/import_map.rs
@@ -142,12 +142,14 @@ impl<'a> ImportMapUnfurler<'a> {
);
if !success {
- let start_pos =
- parsed_source.text_info().line_start(dep.range.start.line)
- + dep.range.start.character;
- let end_pos =
- parsed_source.text_info().line_start(dep.range.end.line)
- + dep.range.end.character;
+ let start_pos = parsed_source
+ .text_info()
+ .line_start(dep.argument_range.start.line)
+ + dep.argument_range.start.character;
+ let end_pos = parsed_source
+ .text_info()
+ .line_start(dep.argument_range.end.line)
+ + dep.argument_range.end.character;
diagnostic_reporter(
ImportMapUnfurlDiagnostic::UnanalyzableDynamicImport {
specifier: url.to_owned(),
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index f737c0a81..ff983ed4c 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -1054,7 +1054,7 @@ fn lock_deno_json_package_json_deps() {
},
"jsr": {
"@denotest/module_graph@1.4.0": {
- "integrity": "555bbe259f55a4a2e7a39e8bf4bcbf25da4c874a313c3e98771eddceedac050b"
+ "integrity": "32de0973c5fa55772326fcd504a757f386d2b010db3e13e78f3bcf851e69473d"
}
},
"npm": {
@@ -1106,7 +1106,7 @@ fn lock_deno_json_package_json_deps() {
},
"jsr": {
"@denotest/module_graph@1.4.0": {
- "integrity": "555bbe259f55a4a2e7a39e8bf4bcbf25da4c874a313c3e98771eddceedac050b"
+ "integrity": "32de0973c5fa55772326fcd504a757f386d2b010db3e13e78f3bcf851e69473d"
}
},
"npm": {
@@ -1146,7 +1146,7 @@ fn lock_deno_json_package_json_deps() {
},
"jsr": {
"@denotest/module_graph@1.4.0": {
- "integrity": "555bbe259f55a4a2e7a39e8bf4bcbf25da4c874a313c3e98771eddceedac050b"
+ "integrity": "32de0973c5fa55772326fcd504a757f386d2b010db3e13e78f3bcf851e69473d"
}
}
},
diff --git a/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json b/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json
index ff105b58a..6cd99b42b 100644
--- a/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json
+++ b/tests/testdata/jsr/registry/@denotest/module_graph/1.4.0_meta.json
@@ -8,7 +8,6 @@
"dependencies": [{
"kind": "import",
"type": "static",
- "range": [[0, 0], [0, 35]],
"specifier": "./other.ts",
"specifierRange": [[0, 22], [0, 34]]
}]
diff --git a/tests/testdata/publish/unanalyzable_dynamic_import.out b/tests/testdata/publish/unanalyzable_dynamic_import.out
index a68b29932..da6a6f902 100644
--- a/tests/testdata/publish/unanalyzable_dynamic_import.out
+++ b/tests/testdata/publish/unanalyzable_dynamic_import.out
@@ -2,10 +2,10 @@ Check file://[WILDCARD]/mod.ts
Checking for slow types in the public API...
Check file://[WILDCARD]/mod.ts
warning[unanalyzable-dynamic-import]: unable to analyze dynamic import
- --> [WILDCARD]mod.ts:2:7
+ --> [WILDCARD]mod.ts:2:14
|
2 | await import("asd " + asd);
- | ^^^^^^^^^^^^^^^^^^^^ the unanalyzable dynamic import
+ | ^^^^^^^^^^^^ the unanalyzable dynamic import
info: after publishing this package, imports from the local import map do not work
info: dynamic imports that can not be analyzed at publish time will not be rewritten automatically