From c81399080686bb5293869f30714a6d1b97a75801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 1 Jun 2020 21:01:51 +0200 Subject: fix: compile TS dependencies of JS files (#6000) This commit fixes regression that caused TS dependencies not being compiled. Check was added that ensures TS compiler is run if any of dependencies in module graph is TS/TSX/JSX. --- cli/tests/integration_tests.rs | 5 +++++ cli/tests/ts_import_from_js.js | 1 + cli/tests/ts_import_from_js.js.out | 1 + 3 files changed, 7 insertions(+) create mode 100644 cli/tests/ts_import_from_js.js create mode 100644 cli/tests/ts_import_from_js.js.out (limited to 'cli/tests') diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 807efb1c5..5f4b37744 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1837,6 +1837,11 @@ itest!(cjs_imports { output: "cjs_imports.ts.out", }); +itest!(ts_import_from_js { + args: "run --quiet --reload ts_import_from_js.js", + output: "ts_import_from_js.js.out", +}); + itest!(proto_exploit { args: "run proto_exploit.js", output: "proto_exploit.js.out", diff --git a/cli/tests/ts_import_from_js.js b/cli/tests/ts_import_from_js.js new file mode 100644 index 000000000..e06ca15a2 --- /dev/null +++ b/cli/tests/ts_import_from_js.js @@ -0,0 +1 @@ +import "./005_more_imports.ts"; diff --git a/cli/tests/ts_import_from_js.js.out b/cli/tests/ts_import_from_js.js.out new file mode 100644 index 000000000..e965047ad --- /dev/null +++ b/cli/tests/ts_import_from_js.js.out @@ -0,0 +1 @@ +Hello -- cgit v1.2.3