From 3fc19dab47492e06043fc7add28e64693a4eb775 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 7 Sep 2023 08:09:16 -0500 Subject: feat: support import attributes (#20342) --- cli/tests/integration/lsp_tests.rs | 18 ++++----- cli/tests/integration/run_tests.rs | 44 +++++++++++----------- cli/tests/testdata/import_assertions/data.json | 6 --- .../testdata/import_assertions/dynamic_error.out | 5 --- .../testdata/import_assertions/dynamic_error.ts | 3 -- .../testdata/import_assertions/dynamic_import.out | 2 - .../testdata/import_assertions/dynamic_import.ts | 3 -- .../import_assertions/json_with_shebang.json | 4 -- .../import_assertions/json_with_shebang.ts | 3 -- .../import_assertions/json_with_shebang.ts.out | 1 - .../testdata/import_assertions/static_error.out | 4 -- .../testdata/import_assertions/static_error.ts | 3 -- .../testdata/import_assertions/static_export.out | 2 - .../testdata/import_assertions/static_export.ts | 3 -- .../testdata/import_assertions/static_import.out | 2 - .../testdata/import_assertions/static_import.ts | 3 -- .../testdata/import_assertions/static_reexport.ts | 1 - .../testdata/import_assertions/type_check.out | 5 --- cli/tests/testdata/import_assertions/type_check.ts | 3 -- cli/tests/testdata/import_attributes/data.json | 6 +++ .../testdata/import_attributes/dynamic_error.out | 5 +++ .../testdata/import_attributes/dynamic_error.ts | 3 ++ .../testdata/import_attributes/dynamic_import.out | 3 ++ .../testdata/import_attributes/dynamic_import.ts | 5 +++ .../import_attributes/json_with_shebang.json | 4 ++ .../import_attributes/json_with_shebang.ts | 3 ++ .../import_attributes/json_with_shebang.ts.out | 1 + .../testdata/import_attributes/static_error.out | 4 ++ .../testdata/import_attributes/static_error.ts | 3 ++ .../testdata/import_attributes/static_export.out | 2 + .../testdata/import_attributes/static_export.ts | 3 ++ .../testdata/import_attributes/static_import.out | 3 ++ .../testdata/import_attributes/static_import.ts | 5 +++ .../testdata/import_attributes/static_reexport.ts | 1 + .../testdata/import_attributes/type_check.out | 12 ++++++ cli/tests/testdata/import_attributes/type_check.ts | 5 +++ cli/tests/testdata/run/020_json_modules.ts.out | 2 +- 37 files changed, 100 insertions(+), 85 deletions(-) delete mode 100644 cli/tests/testdata/import_assertions/data.json delete mode 100644 cli/tests/testdata/import_assertions/dynamic_error.out delete mode 100644 cli/tests/testdata/import_assertions/dynamic_error.ts delete mode 100644 cli/tests/testdata/import_assertions/dynamic_import.out delete mode 100644 cli/tests/testdata/import_assertions/dynamic_import.ts delete mode 100644 cli/tests/testdata/import_assertions/json_with_shebang.json delete mode 100644 cli/tests/testdata/import_assertions/json_with_shebang.ts delete mode 100644 cli/tests/testdata/import_assertions/json_with_shebang.ts.out delete mode 100644 cli/tests/testdata/import_assertions/static_error.out delete mode 100644 cli/tests/testdata/import_assertions/static_error.ts delete mode 100644 cli/tests/testdata/import_assertions/static_export.out delete mode 100644 cli/tests/testdata/import_assertions/static_export.ts delete mode 100644 cli/tests/testdata/import_assertions/static_import.out delete mode 100644 cli/tests/testdata/import_assertions/static_import.ts delete mode 100644 cli/tests/testdata/import_assertions/static_reexport.ts delete mode 100644 cli/tests/testdata/import_assertions/type_check.out delete mode 100644 cli/tests/testdata/import_assertions/type_check.ts create mode 100644 cli/tests/testdata/import_attributes/data.json create mode 100644 cli/tests/testdata/import_attributes/dynamic_error.out create mode 100644 cli/tests/testdata/import_attributes/dynamic_error.ts create mode 100644 cli/tests/testdata/import_attributes/dynamic_import.out create mode 100644 cli/tests/testdata/import_attributes/dynamic_import.ts create mode 100644 cli/tests/testdata/import_attributes/json_with_shebang.json create mode 100644 cli/tests/testdata/import_attributes/json_with_shebang.ts create mode 100644 cli/tests/testdata/import_attributes/json_with_shebang.ts.out create mode 100644 cli/tests/testdata/import_attributes/static_error.out create mode 100644 cli/tests/testdata/import_attributes/static_error.ts create mode 100644 cli/tests/testdata/import_attributes/static_export.out create mode 100644 cli/tests/testdata/import_attributes/static_export.ts create mode 100644 cli/tests/testdata/import_attributes/static_import.out create mode 100644 cli/tests/testdata/import_attributes/static_import.ts create mode 100644 cli/tests/testdata/import_attributes/static_reexport.ts create mode 100644 cli/tests/testdata/import_attributes/type_check.out create mode 100644 cli/tests/testdata/import_attributes/type_check.ts (limited to 'cli/tests') diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs index c86d30456..2dea05015 100644 --- a/cli/tests/integration/lsp_tests.rs +++ b/cli/tests/integration/lsp_tests.rs @@ -760,7 +760,7 @@ fn lsp_deno_task() { } #[test] -fn lsp_import_assertions() { +fn lsp_import_attributes() { let context = TestContextBuilder::new().use_temp_cwd().build(); let mut client = context.new_lsp_command().build(); client.initialize(|builder| { @@ -806,9 +806,9 @@ fn lsp_import_assertions() { "end": { "line": 0, "character": 27 } }, "severity": 1, - "code": "no-assert-type", + "code": "no-attribute-type", "source": "deno", - "message": "The module is a JSON module and not being imported with an import assertion. Consider adding `assert { type: \"json\" }` to the import statement." + "message": "The module is a JSON module and not being imported with an import attribute. Consider adding `with { type: \"json\" }` to the import statement." } ]) ); @@ -831,9 +831,9 @@ fn lsp_import_assertions() { "end": { "line": 0, "character": 27 } }, "severity": 1, - "code": "no-assert-type", + "code": "no-attribute-type", "source": "deno", - "message": "The module is a JSON module and not being imported with an import assertion. Consider adding `assert { type: \"json\" }` to the import statement." + "message": "The module is a JSON module and not being imported with an import attribute. Consider adding `with { type: \"json\" }` to the import statement." }], "only": ["quickfix"] } @@ -843,7 +843,7 @@ fn lsp_import_assertions() { assert_eq!( res, json!([{ - "title": "Insert import assertion.", + "title": "Insert import attribute.", "kind": "quickfix", "diagnostics": [ { @@ -852,9 +852,9 @@ fn lsp_import_assertions() { "end": { "line": 0, "character": 27 } }, "severity": 1, - "code": "no-assert-type", + "code": "no-attribute-type", "source": "deno", - "message": "The module is a JSON module and not being imported with an import assertion. Consider adding `assert { type: \"json\" }` to the import statement." + "message": "The module is a JSON module and not being imported with an import attribute. Consider adding `with { type: \"json\" }` to the import statement." } ], "edit": { @@ -865,7 +865,7 @@ fn lsp_import_assertions() { "start": { "line": 0, "character": 27 }, "end": { "line": 0, "character": 27 } }, - "newText": " assert { type: \"json\" }" + "newText": " with { type: \"json\" }" } ] } diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index e7ff19954..dd5b346ae 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2066,14 +2066,14 @@ itest!(shebang_swc { }); itest!(shebang_with_json_imports_tsc { - args: "run --quiet import_assertions/json_with_shebang.ts", - output: "import_assertions/json_with_shebang.ts.out", + args: "run --quiet import_attributes/json_with_shebang.ts", + output: "import_attributes/json_with_shebang.ts.out", exit_code: 1, }); itest!(shebang_with_json_imports_swc { - args: "run --quiet --no-check import_assertions/json_with_shebang.ts", - output: "import_assertions/json_with_shebang.ts.out", + args: "run --quiet --no-check import_attributes/json_with_shebang.ts", + output: "import_attributes/json_with_shebang.ts.out", exit_code: 1, }); @@ -3050,36 +3050,36 @@ itest!(issue_13562 { output: "run/issue13562.ts.out", }); -itest!(import_assertions_static_import { - args: "run --allow-read import_assertions/static_import.ts", - output: "import_assertions/static_import.out", +itest!(import_attributes_static_import { + args: "run --allow-read import_attributes/static_import.ts", + output: "import_attributes/static_import.out", }); -itest!(import_assertions_static_export { - args: "run --allow-read import_assertions/static_export.ts", - output: "import_assertions/static_export.out", +itest!(import_attributes_static_export { + args: "run --allow-read import_attributes/static_export.ts", + output: "import_attributes/static_export.out", }); -itest!(import_assertions_static_error { - args: "run --allow-read import_assertions/static_error.ts", - output: "import_assertions/static_error.out", +itest!(import_attributes_static_error { + args: "run --allow-read import_attributes/static_error.ts", + output: "import_attributes/static_error.out", exit_code: 1, }); -itest!(import_assertions_dynamic_import { - args: "run --allow-read import_assertions/dynamic_import.ts", - output: "import_assertions/dynamic_import.out", +itest!(import_attributes_dynamic_import { + args: "run --allow-read --check import_attributes/dynamic_import.ts", + output: "import_attributes/dynamic_import.out", }); -itest!(import_assertions_dynamic_error { - args: "run --allow-read import_assertions/dynamic_error.ts", - output: "import_assertions/dynamic_error.out", +itest!(import_attributes_dynamic_error { + args: "run --allow-read import_attributes/dynamic_error.ts", + output: "import_attributes/dynamic_error.out", exit_code: 1, }); -itest!(import_assertions_type_check { - args: "run --allow-read --check import_assertions/type_check.ts", - output: "import_assertions/type_check.out", +itest!(import_attributes_type_check { + args: "run --allow-read --check import_attributes/type_check.ts", + output: "import_attributes/type_check.out", exit_code: 1, }); diff --git a/cli/tests/testdata/import_assertions/data.json b/cli/tests/testdata/import_assertions/data.json deleted file mode 100644 index 37b3ee1e0..000000000 --- a/cli/tests/testdata/import_assertions/data.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "a": "b", - "c": { - "d": 10 - } -} diff --git a/cli/tests/testdata/import_assertions/dynamic_error.out b/cli/tests/testdata/import_assertions/dynamic_error.out deleted file mode 100644 index 927eae0b8..000000000 --- a/cli/tests/testdata/import_assertions/dynamic_error.out +++ /dev/null @@ -1,5 +0,0 @@ -[WILDCARD] -error: Uncaught (in promise) TypeError: Expected a "JavaScriptOrWasm" module but loaded a "JSON" module. -const data = await import("./data.json"); - ^ - at async [WILDCARD]dynamic_error.ts:1:14 diff --git a/cli/tests/testdata/import_assertions/dynamic_error.ts b/cli/tests/testdata/import_assertions/dynamic_error.ts deleted file mode 100644 index 2d9c6757f..000000000 --- a/cli/tests/testdata/import_assertions/dynamic_error.ts +++ /dev/null @@ -1,3 +0,0 @@ -const data = await import("./data.json"); - -console.log(data); diff --git a/cli/tests/testdata/import_assertions/dynamic_import.out b/cli/tests/testdata/import_assertions/dynamic_import.out deleted file mode 100644 index 7a7b4c91f..000000000 --- a/cli/tests/testdata/import_assertions/dynamic_import.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -[Module: null prototype] { default: { a: "b", c: { d: 10 } } } diff --git a/cli/tests/testdata/import_assertions/dynamic_import.ts b/cli/tests/testdata/import_assertions/dynamic_import.ts deleted file mode 100644 index d6983852c..000000000 --- a/cli/tests/testdata/import_assertions/dynamic_import.ts +++ /dev/null @@ -1,3 +0,0 @@ -const data = await import("./data.json", { assert: { type: "json" } }); - -console.log(data); diff --git a/cli/tests/testdata/import_assertions/json_with_shebang.json b/cli/tests/testdata/import_assertions/json_with_shebang.json deleted file mode 100644 index b695e4457..000000000 --- a/cli/tests/testdata/import_assertions/json_with_shebang.json +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/env -S deno run -{ - "test": null -} diff --git a/cli/tests/testdata/import_assertions/json_with_shebang.ts b/cli/tests/testdata/import_assertions/json_with_shebang.ts deleted file mode 100644 index 523bf8772..000000000 --- a/cli/tests/testdata/import_assertions/json_with_shebang.ts +++ /dev/null @@ -1,3 +0,0 @@ -import json from "./json_with_shebang.json" assert { type: "json" }; - -console.log(json); diff --git a/cli/tests/testdata/import_assertions/json_with_shebang.ts.out b/cli/tests/testdata/import_assertions/json_with_shebang.ts.out deleted file mode 100644 index 23eb03720..000000000 --- a/cli/tests/testdata/import_assertions/json_with_shebang.ts.out +++ /dev/null @@ -1 +0,0 @@ -error: Uncaught SyntaxError: Unexpected token '#', "#!/usr/env"... is not valid JSON diff --git a/cli/tests/testdata/import_assertions/static_error.out b/cli/tests/testdata/import_assertions/static_error.out deleted file mode 100644 index 4efdf8682..000000000 --- a/cli/tests/testdata/import_assertions/static_error.out +++ /dev/null @@ -1,4 +0,0 @@ -[WILDCARD] -error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import assertion with the type of "json". - Specifier: [WILDCARD]/data.json - at [WILDCARD]static_error.ts:1:18 diff --git a/cli/tests/testdata/import_assertions/static_error.ts b/cli/tests/testdata/import_assertions/static_error.ts deleted file mode 100644 index 0bc3a93f8..000000000 --- a/cli/tests/testdata/import_assertions/static_error.ts +++ /dev/null @@ -1,3 +0,0 @@ -import data from "./data.json"; - -console.log(data); diff --git a/cli/tests/testdata/import_assertions/static_export.out b/cli/tests/testdata/import_assertions/static_export.out deleted file mode 100644 index 42fbc066c..000000000 --- a/cli/tests/testdata/import_assertions/static_export.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -{ a: "b", c: { d: 10 } } diff --git a/cli/tests/testdata/import_assertions/static_export.ts b/cli/tests/testdata/import_assertions/static_export.ts deleted file mode 100644 index ac3ee694f..000000000 --- a/cli/tests/testdata/import_assertions/static_export.ts +++ /dev/null @@ -1,3 +0,0 @@ -import data from "./static_reexport.ts"; - -console.log(data); diff --git a/cli/tests/testdata/import_assertions/static_import.out b/cli/tests/testdata/import_assertions/static_import.out deleted file mode 100644 index 42fbc066c..000000000 --- a/cli/tests/testdata/import_assertions/static_import.out +++ /dev/null @@ -1,2 +0,0 @@ -[WILDCARD] -{ a: "b", c: { d: 10 } } diff --git a/cli/tests/testdata/import_assertions/static_import.ts b/cli/tests/testdata/import_assertions/static_import.ts deleted file mode 100644 index 180ab75f2..000000000 --- a/cli/tests/testdata/import_assertions/static_import.ts +++ /dev/null @@ -1,3 +0,0 @@ -import data from "./data.json" assert { type: "json" }; - -console.log(data); diff --git a/cli/tests/testdata/import_assertions/static_reexport.ts b/cli/tests/testdata/import_assertions/static_reexport.ts deleted file mode 100644 index 81af428be..000000000 --- a/cli/tests/testdata/import_assertions/static_reexport.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./data.json" assert { type: "json" }; diff --git a/cli/tests/testdata/import_assertions/type_check.out b/cli/tests/testdata/import_assertions/type_check.out deleted file mode 100644 index 8e1387456..000000000 --- a/cli/tests/testdata/import_assertions/type_check.out +++ /dev/null @@ -1,5 +0,0 @@ -[WILDCARD] -error: TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'. -console.log(data.foo); - ~~~ - at [WILDCARD]type_check.ts:3:18 diff --git a/cli/tests/testdata/import_assertions/type_check.ts b/cli/tests/testdata/import_assertions/type_check.ts deleted file mode 100644 index 19adb3eae..000000000 --- a/cli/tests/testdata/import_assertions/type_check.ts +++ /dev/null @@ -1,3 +0,0 @@ -import data from "./data.json" assert { type: "json" }; - -console.log(data.foo); diff --git a/cli/tests/testdata/import_attributes/data.json b/cli/tests/testdata/import_attributes/data.json new file mode 100644 index 000000000..37b3ee1e0 --- /dev/null +++ b/cli/tests/testdata/import_attributes/data.json @@ -0,0 +1,6 @@ +{ + "a": "b", + "c": { + "d": 10 + } +} diff --git a/cli/tests/testdata/import_attributes/dynamic_error.out b/cli/tests/testdata/import_attributes/dynamic_error.out new file mode 100644 index 000000000..927eae0b8 --- /dev/null +++ b/cli/tests/testdata/import_attributes/dynamic_error.out @@ -0,0 +1,5 @@ +[WILDCARD] +error: Uncaught (in promise) TypeError: Expected a "JavaScriptOrWasm" module but loaded a "JSON" module. +const data = await import("./data.json"); + ^ + at async [WILDCARD]dynamic_error.ts:1:14 diff --git a/cli/tests/testdata/import_attributes/dynamic_error.ts b/cli/tests/testdata/import_attributes/dynamic_error.ts new file mode 100644 index 000000000..2d9c6757f --- /dev/null +++ b/cli/tests/testdata/import_attributes/dynamic_error.ts @@ -0,0 +1,3 @@ +const data = await import("./data.json"); + +console.log(data); diff --git a/cli/tests/testdata/import_attributes/dynamic_import.out b/cli/tests/testdata/import_attributes/dynamic_import.out new file mode 100644 index 000000000..01bc76c8a --- /dev/null +++ b/cli/tests/testdata/import_attributes/dynamic_import.out @@ -0,0 +1,3 @@ +[WILDCARD] +[Module: null prototype] { default: { a: "b", c: { d: 10 } } } +[Module: null prototype] { default: { a: "b", c: { d: 10 } } } diff --git a/cli/tests/testdata/import_attributes/dynamic_import.ts b/cli/tests/testdata/import_attributes/dynamic_import.ts new file mode 100644 index 000000000..73f348697 --- /dev/null +++ b/cli/tests/testdata/import_attributes/dynamic_import.ts @@ -0,0 +1,5 @@ +const data1 = await import("./data.json", { with: { type: "json" } }); +const data2 = await import("./data.json", { assert: { type: "json" } }); + +console.log(data1); +console.log(data2); diff --git a/cli/tests/testdata/import_attributes/json_with_shebang.json b/cli/tests/testdata/import_attributes/json_with_shebang.json new file mode 100644 index 000000000..b695e4457 --- /dev/null +++ b/cli/tests/testdata/import_attributes/json_with_shebang.json @@ -0,0 +1,4 @@ +#!/usr/env -S deno run +{ + "test": null +} diff --git a/cli/tests/testdata/import_attributes/json_with_shebang.ts b/cli/tests/testdata/import_attributes/json_with_shebang.ts new file mode 100644 index 000000000..523bf8772 --- /dev/null +++ b/cli/tests/testdata/import_attributes/json_with_shebang.ts @@ -0,0 +1,3 @@ +import json from "./json_with_shebang.json" assert { type: "json" }; + +console.log(json); diff --git a/cli/tests/testdata/import_attributes/json_with_shebang.ts.out b/cli/tests/testdata/import_attributes/json_with_shebang.ts.out new file mode 100644 index 000000000..23eb03720 --- /dev/null +++ b/cli/tests/testdata/import_attributes/json_with_shebang.ts.out @@ -0,0 +1 @@ +error: Uncaught SyntaxError: Unexpected token '#', "#!/usr/env"... is not valid JSON diff --git a/cli/tests/testdata/import_attributes/static_error.out b/cli/tests/testdata/import_attributes/static_error.out new file mode 100644 index 000000000..171ae0c1a --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_error.out @@ -0,0 +1,4 @@ +[WILDCARD] +error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import attribute with the type of "json". + Specifier: [WILDCARD]/data.json + at [WILDCARD]static_error.ts:1:18 diff --git a/cli/tests/testdata/import_attributes/static_error.ts b/cli/tests/testdata/import_attributes/static_error.ts new file mode 100644 index 000000000..0bc3a93f8 --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_error.ts @@ -0,0 +1,3 @@ +import data from "./data.json"; + +console.log(data); diff --git a/cli/tests/testdata/import_attributes/static_export.out b/cli/tests/testdata/import_attributes/static_export.out new file mode 100644 index 000000000..42fbc066c --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_export.out @@ -0,0 +1,2 @@ +[WILDCARD] +{ a: "b", c: { d: 10 } } diff --git a/cli/tests/testdata/import_attributes/static_export.ts b/cli/tests/testdata/import_attributes/static_export.ts new file mode 100644 index 000000000..ac3ee694f --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_export.ts @@ -0,0 +1,3 @@ +import data from "./static_reexport.ts"; + +console.log(data); diff --git a/cli/tests/testdata/import_attributes/static_import.out b/cli/tests/testdata/import_attributes/static_import.out new file mode 100644 index 000000000..b3b71cd8f --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_import.out @@ -0,0 +1,3 @@ +[WILDCARD] +{ a: "b", c: { d: 10 } } +{ a: "b", c: { d: 10 } } diff --git a/cli/tests/testdata/import_attributes/static_import.ts b/cli/tests/testdata/import_attributes/static_import.ts new file mode 100644 index 000000000..d46d93b4a --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_import.ts @@ -0,0 +1,5 @@ +import data1 from "./data.json" with { type: "json" }; +import data2 from "./data.json" assert { type: "json" }; + +console.log(data1); +console.log(data2); diff --git a/cli/tests/testdata/import_attributes/static_reexport.ts b/cli/tests/testdata/import_attributes/static_reexport.ts new file mode 100644 index 000000000..81af428be --- /dev/null +++ b/cli/tests/testdata/import_attributes/static_reexport.ts @@ -0,0 +1 @@ +export { default } from "./data.json" assert { type: "json" }; diff --git a/cli/tests/testdata/import_attributes/type_check.out b/cli/tests/testdata/import_attributes/type_check.out new file mode 100644 index 000000000..5ecdec82d --- /dev/null +++ b/cli/tests/testdata/import_attributes/type_check.out @@ -0,0 +1,12 @@ +Check file:///[WILDCARD]/type_check.ts +error: TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'. +console.log(data1.foo); + ~~~ + at [WILDCARD]type_check.ts:4:19 + +TS2339 [ERROR]: Property 'foo' does not exist on type '{ a: string; c: { d: number; }; }'. +console.log(data2.foo); + ~~~ + at [WILDCARD]type_check.ts:5:19 + +Found 2 errors. diff --git a/cli/tests/testdata/import_attributes/type_check.ts b/cli/tests/testdata/import_attributes/type_check.ts new file mode 100644 index 000000000..ddf28e67a --- /dev/null +++ b/cli/tests/testdata/import_attributes/type_check.ts @@ -0,0 +1,5 @@ +import data1 from "./data.json" with { type: "json" }; +import data2 from "./data.json" assert { type: "json" }; + +console.log(data1.foo); +console.log(data2.foo); diff --git a/cli/tests/testdata/run/020_json_modules.ts.out b/cli/tests/testdata/run/020_json_modules.ts.out index da33c40bf..750363da2 100644 --- a/cli/tests/testdata/run/020_json_modules.ts.out +++ b/cli/tests/testdata/run/020_json_modules.ts.out @@ -1,4 +1,4 @@ [WILDCARD] -error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import assertion with the type of "json". +error: Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import attribute with the type of "json". Specifier: [WILDCARD]/subdir/config.json [WILDCARD] \ No newline at end of file -- cgit v1.2.3