Skip to content

Commit 50a4b92

Browse files
authored
fix(48053) Description of tsBuildInfoFile is misleading in generated tsconfig.json (microsoft#48072)
* add check for path default value * fix wrong tsBuildInfoFile description * updated files to file
1 parent 45c1e58 commit 50a4b92

File tree

17 files changed

+19
-18
lines changed

17 files changed

+19
-18
lines changed

src/compiler/commandLineParser.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ namespace ts {
568568
category: Diagnostics.Projects,
569569
transpileOptionValue: undefined,
570570
defaultValueDescription: ".tsbuildinfo",
571-
description: Diagnostics.Specify_the_folder_for_tsbuildinfo_incremental_compilation_files,
571+
description: Diagnostics.Specify_the_path_to_tsbuildinfo_incremental_compilation_file,
572572
},
573573
{
574574
name: "removeComments",
@@ -3635,7 +3635,8 @@ namespace ts {
36353635
case "boolean":
36363636
return true;
36373637
case "string":
3638-
return option.isFilePath ? "./" : "";
3638+
const defaultValue = option.defaultValueDescription;
3639+
return option.isFilePath ? `./${defaultValue && typeof defaultValue === "string" ? defaultValue : ""}` : "";
36393640
case "list":
36403641
return [];
36413642
case "object":

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5693,7 +5693,7 @@
56935693
"category": "Message",
56945694
"code": 6706
56955695
},
5696-
"Specify the folder for .tsbuildinfo incremental compilation files.": {
5696+
"Specify the path to .tsbuildinfo incremental compilation file.": {
56975697
"category": "Message",
56985698
"code": 6707
56995699
},

tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Projects */
66
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
77
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
8+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
99
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
1010
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
1111
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/declarationDir-is-specified.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Array<T> { length: number; [n: number]: T; }
2626
/* Projects */
2727
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
2828
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
29-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
29+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
3030
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
3131
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
3232
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-and-declarationDir-is-specified.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Array<T> { length: number; [n: number]: T; }
2626
/* Projects */
2727
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
2828
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
29-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
29+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
3030
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
3131
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
3232
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/when-outDir-is-specified.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Array<T> { length: number; [n: number]: T; }
2626
/* Projects */
2727
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
2828
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
29-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
29+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
3030
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
3131
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
3232
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/with-outFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Array<T> { length: number; [n: number]: T; }
2626
/* Projects */
2727
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
2828
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
29-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
29+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
3030
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
3131
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
3232
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified-with-declaration-enabled.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Array<T> { length: number; [n: number]: T; }
2626
/* Projects */
2727
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
2828
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
29-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
29+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
3030
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
3131
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
3232
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

tests/baselines/reference/tscWatch/programUpdates/should-not-trigger-recompilation-because-of-program-emit/without-outDir-or-outFile-is-specified.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Array<T> { length: number; [n: number]: T; }
2626
/* Projects */
2727
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
2828
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
29-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
29+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
3030
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
3131
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
3232
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

0 commit comments

Comments
 (0)