SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 16 Rust

fix(lsp): avoid empty import specifier completions (#34647)

Fix LSP auto-import completion rewriting so Deno rewrites the quoted
module specifier itself instead of replacing only a previously reported
TypeScript source string. This keeps import-map aliases applied even
when TypeScript produces an empty or already-rewritten import string for
incomplete import clauses.

Adds regression coverage for completing an import-map-backed npm export
inside an empty named import clause.

Tests:
- cargo build -p test_server
- cargo build -p deno
- cargo test -p integration_tests
lsp_completions_auto_import_in_empty_import_clause_with_import_map --
--nocapture
- cargo test -p deno --features rustls/ring
lsp::tsc::tests::test_rewrite_first_quoted_specifier

Closes denoland/divybot#394
Fixes https://github.com/denoland/deno/issues/28076

Co-authored-by: divybot <divybot@users.noreply.github.com>
Co-authored-by: Divy Srivastava <me@littledivy.com>
E
em committed
708106f3aaae1cc2940857403ac54262ed402a3d
Parent: 19da4cb
Committed by GitHub <noreply@github.com> on 6/1/2026, 4:06:15 PM