From fe3b3436e658528dfeca2ccc7d635776c6a0931b Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 30 Oct 2020 15:38:20 -0700 Subject: [PATCH] Add affectsModuleResolution: true ot jsx and jsxImportSource options --- src/compiler/commandLineParser.ts | 2 ++ .../programUpdates/updates-emit-on-jsx-option-change.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 56cc83516e5..1698ee97a72 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -382,6 +382,7 @@ namespace ts { type: jsxOptionMap, affectsSourceFile: true, affectsEmit: true, + affectsModuleResolution: true, paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Basic_Options, @@ -802,6 +803,7 @@ namespace ts { { name: "jsxImportSource", type: "string", + affectsModuleResolution: true, category: Diagnostics.Advanced_Options, description: Diagnostics.Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react }, diff --git a/tests/baselines/reference/tscWatch/programUpdates/updates-emit-on-jsx-option-change.js b/tests/baselines/reference/tscWatch/programUpdates/updates-emit-on-jsx-option-change.js index 914da832499..6ac860391b9 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/updates-emit-on-jsx-option-change.js +++ b/tests/baselines/reference/tscWatch/programUpdates/updates-emit-on-jsx-option-change.js @@ -80,7 +80,7 @@ Output:: Program root files: ["/user/username/projects/myproject/index.tsx"] Program options: {"jsx":2,"watch":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} -Program structureReused: Completely +Program structureReused: Not Program files:: /a/lib/lib.d.ts /user/username/projects/myproject/index.tsx @@ -98,10 +98,10 @@ WatchedFiles:: FsWatches:: FsWatchesRecursive:: -/user/username/projects/myproject/node_modules/@types: - {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} /user/username/projects/myproject: {"directoryName":"/user/username/projects/myproject","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} +/user/username/projects/myproject/node_modules/@types: + {"directoryName":"/user/username/projects/myproject/node_modules/@types","fallbackPollingInterval":500,"fallbackOptions":{"watchFile":"PriorityPollingInterval"}} exitCode:: ExitStatus.undefined