Skip to content

Commit 89a58ae

Browse files
authored
Merge pull request microsoft#28438 from Microsoft/maxNodeModuleJsDepth
Add affectsModuleResolution to compile options: maxNodeModuleJsDepth
2 parents 972a149 + c77f0c4 commit 89a58ae

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ namespace ts {
777777
{
778778
name: "maxNodeModuleJsDepth",
779779
type: "number",
780-
// TODO: GH#27108 affectsModuleResolution: true,
780+
affectsModuleResolution: true,
781781
category: Diagnostics.Advanced_Options,
782782
description: Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
783783
},

src/server/project.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,11 +1228,10 @@ namespace ts.server {
12281228

12291229
setCompilerOptions(options?: CompilerOptions) {
12301230
// Avoid manipulating the given options directly
1231-
const newOptions = options ? cloneCompilerOptions(options) : this.getCompilationSettings();
1232-
if (!newOptions) {
1231+
if (!options && !this.getCompilationSettings()) {
12331232
return;
12341233
}
1235-
1234+
const newOptions = cloneCompilerOptions(options || this.getCompilationSettings());
12361235
if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== "number") {
12371236
newOptions.maxNodeModuleJsDepth = 2;
12381237
}

0 commit comments

Comments
 (0)