diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2023-12-02 13:20:06 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-02 03:20:06 +0100 |
commit | d2b5254c33e1cc0e686b38755b439e1df292d38e (patch) | |
tree | ff7c097b3bbcf37d5fd18b820b905c3ab9a2f8dc /cli/lsp/diagnostics.rs | |
parent | ec0207e9b1cd61d2c14e36df43f56aa0bea56222 (diff) |
chore: update std to 0.208.0 (#21318)
Re-attempt at #21284. I was more thorough this time.
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 47 |
1 files changed, 30 insertions, 17 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 4b43a478c..00f535391 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1650,14 +1650,27 @@ let c: number = "a"; let (snapshot, _) = setup( &temp_dir, &[ - ("file:///std/testing/asserts.ts", "export function assert() {}", 1, LanguageId::TypeScript), - ("file:///a/file.ts", "import { assert } from \"../std/testing/asserts.ts\";\n\nassert();\n", 1, LanguageId::TypeScript), + ( + "file:///std/assert/mod.ts", + "export function assert() {}", + 1, + LanguageId::TypeScript, + ), + ( + "file:///a/file.ts", + "import { assert } from \"../std/assert/mod.ts\";\n\nassert();\n", + 1, + LanguageId::TypeScript, + ), ], - Some(("file:///a/import-map.json", r#"{ + Some(( + "file:///a/import-map.json", + r#"{ "imports": { "/~/std/": "../std/" } - }"#)), + }"#, + )), ); let config = mock_config(); let token = CancellationToken::new(); @@ -1665,7 +1678,7 @@ let c: number = "a"; assert_eq!(actual.len(), 2); for record in actual { match record.specifier.as_str() { - "file:///std/testing/asserts.ts" => { + "file:///std/assert/mod.ts" => { assert_eq!(json!(record.versioned.diagnostics), json!([])) } "file:///a/file.ts" => assert_eq!( @@ -1679,16 +1692,16 @@ let c: number = "a"; }, "end": { "line": 0, - "character": 50 + "character": 45 } }, "severity": 4, "code": "import-map-remap", "source": "deno", - "message": "The import specifier can be remapped to \"/~/std/testing/asserts.ts\" which will resolve it via the active import map.", + "message": "The import specifier can be remapped to \"/~/std/assert/mod.ts\" which will resolve it via the active import map.", "data": { - "from": "../std/testing/asserts.ts", - "to": "/~/std/testing/asserts.ts" + "from": "../std/assert/mod.ts", + "to": "/~/std/assert/mod.ts" } } ]) @@ -1709,10 +1722,10 @@ let c: number = "a"; severity: Some(lsp::DiagnosticSeverity::HINT), code: Some(lsp::NumberOrString::String("import-map-remap".to_string())), source: Some("deno".to_string()), - message: "The import specifier can be remapped to \"/~/std/testing/asserts.ts\" which will resolve it via the active import map.".to_string(), + message: "The import specifier can be remapped to \"/~/std/assert/mod.ts\" which will resolve it via the active import map.".to_string(), data: Some(json!({ - "from": "../std/testing/asserts.ts", - "to": "/~/std/testing/asserts.ts" + "from": "../std/assert/mod.ts", + "to": "/~/std/assert/mod.ts" })), ..Default::default() }); @@ -1721,7 +1734,7 @@ let c: number = "a"; assert_eq!( json!(actual), json!({ - "title": "Update \"../std/testing/asserts.ts\" to \"/~/std/testing/asserts.ts\" to use import map.", + "title": "Update \"../std/assert/mod.ts\" to \"/~/std/assert/mod.ts\" to use import map.", "kind": "quickfix", "diagnostics": [ { @@ -1738,10 +1751,10 @@ let c: number = "a"; "severity": 4, "code": "import-map-remap", "source": "deno", - "message": "The import specifier can be remapped to \"/~/std/testing/asserts.ts\" which will resolve it via the active import map.", + "message": "The import specifier can be remapped to \"/~/std/assert/mod.ts\" which will resolve it via the active import map.", "data": { - "from": "../std/testing/asserts.ts", - "to": "/~/std/testing/asserts.ts" + "from": "../std/assert/mod.ts", + "to": "/~/std/assert/mod.ts" } } ], @@ -1759,7 +1772,7 @@ let c: number = "a"; "character": 50 } }, - "newText": "\"/~/std/testing/asserts.ts\"" + "newText": "\"/~/std/assert/mod.ts\"" } ] } |