Merge pull request #28438 from Microsoft/maxNodeModuleJsDepth
Add affectsModuleResolution to compile options: maxNodeModuleJsDepth
This commit is contained in:
commit
89a58aee14
|
@ -777,7 +777,7 @@ namespace ts {
|
|||
{
|
||||
name: "maxNodeModuleJsDepth",
|
||||
type: "number",
|
||||
// TODO: GH#27108 affectsModuleResolution: true,
|
||||
affectsModuleResolution: true,
|
||||
category: Diagnostics.Advanced_Options,
|
||||
description: Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
|
||||
},
|
||||
|
|
|
@ -1228,11 +1228,10 @@ namespace ts.server {
|
|||
|
||||
setCompilerOptions(options?: CompilerOptions) {
|
||||
// Avoid manipulating the given options directly
|
||||
const newOptions = options ? cloneCompilerOptions(options) : this.getCompilationSettings();
|
||||
if (!newOptions) {
|
||||
if (!options && !this.getCompilationSettings()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const newOptions = cloneCompilerOptions(options || this.getCompilationSettings());
|
||||
if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== "number") {
|
||||
newOptions.maxNodeModuleJsDepth = 2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue