summaryrefslogtreecommitdiff
path: root/cli/util/import_map.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-02-21 14:12:36 -0500
committerGitHub <noreply@github.com>2024-02-21 14:12:36 -0500
commita2c1cc5a1a8513b9f6434de2764602ae97e6d8b3 (patch)
treee0ca38197835482660c169674125a3e6ba2c954d /cli/util/import_map.rs
parent8aa529f1b8934fc8aefdfd721e363b71a7c9c269 (diff)
fix(publish): better no-slow-types type discovery (#22517)
Diffstat (limited to 'cli/util/import_map.rs')
-rw-r--r--cli/util/import_map.rs14
1 files changed, 8 insertions, 6 deletions
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(),