diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index e2b48977106b6..32c4b5c988af2 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -1,530 +1,114 @@ namespace ts { describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => { - - function assertParseResult(commandLine: string[], expectedParsedCommandLine: ParsedCommandLine, workerDiagnostic?: () => ParseCommandLineWorkerDiagnostics) { - const parsed = parseCommandLineWorker(workerDiagnostic?.() || compilerOptionsDidYouMeanDiagnostics, commandLine); - assert.deepEqual(parsed.options, expectedParsedCommandLine.options); - assert.deepEqual(parsed.watchOptions, expectedParsedCommandLine.watchOptions); - - const parsedErrors = parsed.errors; - const expectedErrors = expectedParsedCommandLine.errors; - assert.isTrue(parsedErrors.length === expectedErrors.length, `Expected error: ${JSON.stringify(expectedErrors)}. Actual error: ${JSON.stringify(parsedErrors)}.`); - for (let i = 0; i < parsedErrors.length; i++) { - const parsedError = parsedErrors[i]; - const expectedError = expectedErrors[i]; - assert.equal(parsedError.code, expectedError.code); - assert.equal(parsedError.category, expectedError.category); - // Allow matching a prefix of the error message - if (typeof expectedError.messageText === "string" && expectedError.messageText.includes("[...]")) { - const prefix = expectedError.messageText.split("[...]")[0]; - assert(expectedError.messageText.startsWith(prefix)); - } - else { - assert.equal(parsedError.messageText, expectedError.messageText); - } - } - - const parsedFileNames = parsed.fileNames; - const expectedFileNames = expectedParsedCommandLine.fileNames; - assert.isTrue(parsedFileNames.length === expectedFileNames.length, `Expected fileNames: [${JSON.stringify(expectedFileNames)}]. Actual fileNames: [${JSON.stringify(parsedFileNames)}].`); - for (let i = 0; i < parsedFileNames.length; i++) { - const parsedFileName = parsedFileNames[i]; - const expectedFileName = expectedFileNames[i]; - assert.equal(parsedFileName, expectedFileName); - } - } - - it("Parse single option of library flag ", () => { - // --lib es6 0.ts - assertParseResult(["--lib", "es6", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { - lib: ["lib.es2015.d.ts"] - } - }); - }); - - it("Handles 'may only be used with --build' flags", () => { - const buildFlags = ["--clean", "--dry", "--force", "--verbose"]; - - assertParseResult(buildFlags, { - errors: buildFlags.map(buildFlag => ({ - messageText: `Compiler option '${buildFlag}' may only be used with '--build'.`, - category: Diagnostics.Compiler_option_0_may_only_be_used_with_build.category, - code: Diagnostics.Compiler_option_0_may_only_be_used_with_build.code, - file: undefined, - start: undefined, - length: undefined - })), - fileNames: [], - options: {} + function assertParseResult(subScenario: string, commandLine: string[], workerDiagnostic?: () => ParseCommandLineWorkerDiagnostics) { + it(subScenario, () => { + const baseline: string[] = []; + baseline.push(commandLine.join(" ")); + const parsed = parseCommandLineWorker(workerDiagnostic?.() || compilerOptionsDidYouMeanDiagnostics, commandLine); + baseline.push("CompilerOptions::"); + baseline.push(JSON.stringify(parsed.options, /*replacer*/ undefined, " ")); + baseline.push("WatchOptions::"); + baseline.push(JSON.stringify(parsed.watchOptions, /*replacer*/ undefined, " ")); + baseline.push("FileNames::"); + baseline.push(parsed.fileNames.join()); + baseline.push("Errors::"); + baseline.push(formatDiagnostics(parsed.errors, { + getCurrentDirectory: () => "/", + getCanonicalFileName: identity, + getNewLine: () => "\n", + })); + Harness.Baseline.runBaseline(`config/commandLineParsing/parseCommandLine/${subScenario}.js`, baseline.join("\n")); }); - }); - - it("Handles 'did you mean?' for misspelt flags", () => { - // --declarations --allowTS - assertParseResult(["--declarations", "--allowTS"], { - errors: [ - { - messageText: "Unknown compiler option '--declarations'. Did you mean 'declaration'?", - category: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.category, - code: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.code, - file: undefined, - start: undefined, - length: undefined - }, - { - messageText: "Unknown compiler option '--allowTS'. Did you mean 'allowJs'?", - category: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.category, - code: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1.code, - file: undefined, - start: undefined, - length: undefined - } - ], - fileNames: [], - options: {} - }); - }); - - - it("Parse multiple options of library flags ", () => { - // --lib es5,es2015.symbol.wellknown 0.ts - assertParseResult(["--lib", "es5,es2015.symbol.wellknown", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { - lib: ["lib.es5.d.ts", "lib.es2015.symbol.wellknown.d.ts"] - } - }); - }); - - it("Parse invalid option of library flags ", () => { - // --lib es5,invalidOption 0.ts - assertParseResult(["--lib", "es5,invalidOption", "0.ts"], - { - errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6' [...]", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { - lib: ["lib.es5.d.ts"] - } - }); - }); - it("Parse empty options of --jsx ", () => { - // 0.ts --jsx - assertParseResult(["0.ts", "--jsx"], - { - errors: [{ - messageText: "Compiler option 'jsx' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }, { - messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { jsx: undefined } - }); - }); - - it("Parse empty options of --module ", () => { - // 0.ts -- - assertParseResult(["0.ts", "--module"], - { - errors: [{ - messageText: "Compiler option 'module' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }, { - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { module: undefined } - }); - }); - - it("Parse empty options of --newLine ", () => { - // 0.ts --newLine - assertParseResult(["0.ts", "--newLine"], - { - errors: [{ - messageText: "Compiler option 'newLine' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }, { - messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { newLine: undefined } - }); - }); - - it("Parse empty options of --target ", () => { - // 0.ts --target - assertParseResult(["0.ts", "--target"], - { - errors: [{ - messageText: "Compiler option 'target' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }, { - messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { target: undefined } - }); - }); - - it("Parse empty options of --moduleResolution ", () => { - // 0.ts --moduleResolution - assertParseResult(["0.ts", "--moduleResolution"], - { - errors: [{ - messageText: "Compiler option 'moduleResolution' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }, { - messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { moduleResolution: undefined } - }); - }); - - it("Parse empty options of --lib ", () => { - // 0.ts --lib - assertParseResult(["0.ts", "--lib"], - { - errors: [{ - messageText: "Compiler option 'lib' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { - lib: [] - } - }); - }); - - it("Parse empty string of --lib ", () => { - // 0.ts --lib - // This test is an error because the empty string is falsey - assertParseResult(["0.ts", "--lib", ""], - { - errors: [{ - messageText: "Compiler option 'lib' expects an argument.", - category: Diagnostics.Compiler_option_0_expects_an_argument.category, - code: Diagnostics.Compiler_option_0_expects_an_argument.code, - - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["0.ts"], - options: { - lib: [] - } - }); - }); - - it("Parse immediately following command line argument of --lib ", () => { - // 0.ts --lib - assertParseResult(["0.ts", "--lib", "--sourcemap"], - { - errors: [], - fileNames: ["0.ts"], - options: { - lib: [], - sourceMap: true - } - }); - }); - - it("Parse --lib option with extra comma ", () => { - // --lib es5, es7 0.ts - assertParseResult(["--lib", "es5,", "es7", "0.ts"], - { - errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6' [...].", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["es7", "0.ts"], - options: { - lib: ["lib.es5.d.ts"] - } - }); - }); - - it("Parse --lib option with trailing white-space ", () => { - // --lib es5, es7 0.ts - assertParseResult(["--lib", "es5, ", "es7", "0.ts"], - { - errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', [...]", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - file: undefined, - start: undefined, - length: undefined, - }], - fileNames: ["es7", "0.ts"], - options: { - lib: ["lib.es5.d.ts"] - } - }); - }); - - it("Parse multiple compiler flags with input files at the end", () => { - // --lib es5,es2015.symbol.wellknown --target es5 0.ts - assertParseResult(["--lib", "es5,es2015.symbol.wellknown", "--target", "es5", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { - lib: ["lib.es5.d.ts", "lib.es2015.symbol.wellknown.d.ts"], - target: ScriptTarget.ES5, - } - }); - }); - - it("Parse multiple compiler flags with input files in the middle", () => { - // --module commonjs --target es5 0.ts --lib es5,es2015.symbol.wellknown - assertParseResult(["--module", "commonjs", "--target", "es5", "0.ts", "--lib", "es5,es2015.symbol.wellknown"], - { - errors: [], - fileNames: ["0.ts"], - options: { - module: ModuleKind.CommonJS, - target: ScriptTarget.ES5, - lib: ["lib.es5.d.ts", "lib.es2015.symbol.wellknown.d.ts"], - } - }); - }); - - it("Parse multiple library compiler flags ", () => { - // --module commonjs --target es5 --lib es5 0.ts --library es2015.array,es2015.symbol.wellknown - assertParseResult(["--module", "commonjs", "--target", "es5", "--lib", "es5", "0.ts", "--lib", "es2015.core, es2015.symbol.wellknown "], - { - errors: [], - fileNames: ["0.ts"], - options: { - module: ModuleKind.CommonJS, - target: ScriptTarget.ES5, - lib: ["lib.es2015.core.d.ts", "lib.es2015.symbol.wellknown.d.ts"], - } - }); - }); - - it("Parse explicit boolean flag value", () => { - assertParseResult(["--strictNullChecks", "false", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { - strictNullChecks: false, - } - }); - }); - - it("Parse non boolean argument after boolean flag", () => { - assertParseResult(["--noImplicitAny", "t", "0.ts"], - { - errors: [], - fileNames: ["t", "0.ts"], - options: { - noImplicitAny: true, - } - }); - }); - - it("Parse implicit boolean flag value", () => { - assertParseResult(["--strictNullChecks"], - { - errors: [], - fileNames: [], - options: { - strictNullChecks: true, - } - }); - }); - - it("parse --incremental", () => { - // --lib es6 0.ts - assertParseResult(["--incremental", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { incremental: true } - }); - }); + } - it("parse --tsBuildInfoFile", () => { - // --lib es6 0.ts - assertParseResult(["--tsBuildInfoFile", "build.tsbuildinfo", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { tsBuildInfoFile: "build.tsbuildinfo" } - }); - }); + // --lib es6 0.ts + assertParseResult("Parse single option of library flag", ["--lib", "es6", "0.ts"]); + assertParseResult("Handles 'may only be used with --build' flags", ["--clean", "--dry", "--force", "--verbose"]); + // --declarations --allowTS + assertParseResult("Handles 'did you mean?' for misspelt flags", ["--declarations", "--allowTS"]); + // --lib es5,es2015.symbol.wellknown 0.ts + assertParseResult("Parse multiple options of library flags", ["--lib", "es5,es2015.symbol.wellknown", "0.ts"]); + // --lib es5,invalidOption 0.ts + assertParseResult("Parse invalid option of library flags", ["--lib", "es5,invalidOption", "0.ts"]); + // 0.ts --jsx + assertParseResult("Parse empty options of --jsx", ["0.ts", "--jsx"]); + // 0.ts -- + assertParseResult("Parse empty options of --module", ["0.ts", "--module"]); + // 0.ts --newLine + assertParseResult("Parse empty options of --newLine", ["0.ts", "--newLine"]); + // 0.ts --target + assertParseResult("Parse empty options of --target", ["0.ts", "--target"]); + // 0.ts --moduleResolution + assertParseResult("Parse empty options of --moduleResolution", ["0.ts", "--moduleResolution"]); + // 0.ts --lib + assertParseResult("Parse empty options of --lib", ["0.ts", "--lib"]); + // 0.ts --lib + // This test is an error because the empty string is falsey + assertParseResult("Parse empty string of --lib", ["0.ts", "--lib", ""]); + // 0.ts --lib + assertParseResult("Parse immediately following command line argument of --lib", ["0.ts", "--lib", "--sourcemap"]); + // --lib es5, es7 0.ts + assertParseResult("Parse --lib option with extra comma", ["--lib", "es5,", "es7", "0.ts"]); + // --lib es5, es7 0.ts + assertParseResult("Parse --lib option with trailing white-space", ["--lib", "es5, ", "es7", "0.ts"]); + // --lib es5,es2015.symbol.wellknown --target es5 0.ts + assertParseResult("Parse multiple compiler flags with input files at the end", ["--lib", "es5,es2015.symbol.wellknown", "--target", "es5", "0.ts"]); + // --module commonjs --target es5 0.ts --lib es5,es2015.symbol.wellknown + assertParseResult("Parse multiple compiler flags with input files in the middle", ["--module", "commonjs", "--target", "es5", "0.ts", "--lib", "es5,es2015.symbol.wellknown"]); + // --module commonjs --target es5 --lib es5 0.ts --library es2015.array,es2015.symbol.wellknown + assertParseResult("Parse multiple library compiler flags ", ["--module", "commonjs", "--target", "es5", "--lib", "es5", "0.ts", "--lib", "es2015.core, es2015.symbol.wellknown "]); + assertParseResult("Parse explicit boolean flag value", ["--strictNullChecks", "false", "0.ts"]); + assertParseResult("Parse non boolean argument after boolean flag", ["--noImplicitAny", "t", "0.ts"]); + assertParseResult("Parse implicit boolean flag value", ["--strictNullChecks"]); + assertParseResult("parse --incremental", ["--incremental", "0.ts"]); + assertParseResult("parse --tsBuildInfoFile", ["--tsBuildInfoFile", "build.tsbuildinfo", "0.ts"]); describe("parses command line null for tsconfig only option", () => { interface VerifyNull { + subScenario: string, optionName: string; nonNullValue?: string; workerDiagnostic?: () => ParseCommandLineWorkerDiagnostics; - diagnosticMessage: DiagnosticMessage; } - function verifyNull({ optionName, nonNullValue, workerDiagnostic, diagnosticMessage }: VerifyNull) { - it("allows setting it to null", () => { + function verifyNull({ subScenario, optionName, nonNullValue, workerDiagnostic }: VerifyNull) { + describe(subScenario, () => { assertParseResult( + `${subScenario} allows setting it to null`, [`--${optionName}`, "null", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { [optionName]: undefined } - }, workerDiagnostic ); - }); - - if (nonNullValue) { - it("errors if non null value is passed", () => { + if (nonNullValue) { assertParseResult( + `${subScenario} errors if non null value is passed`, [`--${optionName}`, nonNullValue, "0.ts"], - { - errors: [{ - messageText: formatStringFromArgs(diagnosticMessage.message, [optionName]), - category: diagnosticMessage.category, - code: diagnosticMessage.code, - file: undefined, - start: undefined, - length: undefined - }], - fileNames: ["0.ts"], - options: {} - }, workerDiagnostic ); - }); - } + } - it("errors if its followed by another option", () => { assertParseResult( + `${subScenario} errors if its followed by another option`, ["0.ts", "--strictNullChecks", `--${optionName}`], - { - errors: [{ - messageText: formatStringFromArgs(diagnosticMessage.message, [optionName]), - category: diagnosticMessage.category, - code: diagnosticMessage.code, - file: undefined, - start: undefined, - length: undefined - }], - fileNames: ["0.ts"], - options: { strictNullChecks: true } - }, workerDiagnostic ); - }); - it("errors if its last option", () => { assertParseResult( + `${subScenario} errors if its last option`, ["0.ts", `--${optionName}`], - { - errors: [{ - messageText: formatStringFromArgs(diagnosticMessage.message, [optionName]), - category: diagnosticMessage.category, - code: diagnosticMessage.code, - file: undefined, - start: undefined, - length: undefined - }], - fileNames: ["0.ts"], - options: {} - }, workerDiagnostic ); }); } interface VerifyNullNonIncludedOption { + subScenario: string, type: () => "string" | "number" | ESMap; nonNullValue?: string; } - function verifyNullNonIncludedOption({ type, nonNullValue }: VerifyNullNonIncludedOption) { + function verifyNullNonIncludedOption({ subScenario, type, nonNullValue }: VerifyNullNonIncludedOption) { verifyNull({ + subScenario, optionName: "optionName", nonNullValue, - diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, workerDiagnostic: () => { const optionDeclarations: CommandLineOption[] = [ ...compilerOptionsDidYouMeanDiagnostics.optionDeclarations, @@ -547,392 +131,101 @@ namespace ts { } describe("option of type boolean", () => { - it("allows setting it to false", () => { - assertParseResult( - ["--composite", "false", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { composite: false } - } - ); - }); + assertParseResult( + "allows setting option type boolean to false", + ["--composite", "false", "0.ts"], + ); verifyNull({ + subScenario: "option of type boolean", optionName: "composite", nonNullValue: "true", - diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line }); }); - describe("option of type object", () => { - verifyNull({ - optionName: "paths", - diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line - }); + verifyNull({ + subScenario: "option of type object", + optionName: "paths", }); - describe("option of type list", () => { - verifyNull({ - optionName: "rootDirs", - nonNullValue: "abc,xyz", - diagnosticMessage: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line - }); + verifyNull({ + subScenario: "option of type list", + optionName: "rootDirs", + nonNullValue: "abc,xyz", }); - - describe("option of type string", () => { - verifyNullNonIncludedOption({ - type: () => "string", - nonNullValue: "hello" - }); + verifyNullNonIncludedOption({ + subScenario: "option of type string", + type: () => "string", + nonNullValue: "hello" }); - describe("option of type number", () => { - verifyNullNonIncludedOption({ - type: () => "number", - nonNullValue: "10" - }); + verifyNullNonIncludedOption({ + subScenario: "option of type number", + type: () => "number", + nonNullValue: "10" }); - describe("option of type Map", () => { - verifyNullNonIncludedOption({ - type: () => new Map(getEntries({ - node: ModuleResolutionKind.NodeJs, - classic: ModuleResolutionKind.Classic, - })), - nonNullValue: "node" - }); + verifyNullNonIncludedOption({ + subScenario: "option of type Map", + type: () => new Map(getEntries({ + node: ModuleResolutionKind.NodeJs, + classic: ModuleResolutionKind.Classic, + })), + nonNullValue: "node" }); }); - it("allows tsconfig only option to be set to null", () => { - assertParseResult(["--composite", "null", "-tsBuildInfoFile", "null", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: { composite: undefined, tsBuildInfoFile: undefined } - }); - }); + assertParseResult("allows tsconfig only option to be set to null", ["--composite", "null", "-tsBuildInfoFile", "null", "0.ts"]); describe("Watch options", () => { - it("parse --watchFile", () => { - assertParseResult(["--watchFile", "UseFsEvents", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: {}, - watchOptions: { watchFile: WatchFileKind.UseFsEvents } - }); - }); - - it("parse --watchDirectory", () => { - assertParseResult(["--watchDirectory", "FixedPollingInterval", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: {}, - watchOptions: { watchDirectory: WatchDirectoryKind.FixedPollingInterval } - }); - }); - - it("parse --fallbackPolling", () => { - assertParseResult(["--fallbackPolling", "PriorityInterval", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: {}, - watchOptions: { fallbackPolling: PollingWatchKind.PriorityInterval } - }); - }); - - it("parse --synchronousWatchDirectory", () => { - assertParseResult(["--synchronousWatchDirectory", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: {}, - watchOptions: { synchronousWatchDirectory: true } - }); - }); - - it("errors on missing argument to --fallbackPolling", () => { - assertParseResult(["0.ts", "--fallbackPolling"], - { - errors: [ - { - messageText: "Watch option 'fallbackPolling' requires a value of type string.", - category: Diagnostics.Watch_option_0_requires_a_value_of_type_1.category, - code: Diagnostics.Watch_option_0_requires_a_value_of_type_1.code, - file: undefined, - start: undefined, - length: undefined - }, - { - messageText: "Argument for '--fallbackPolling' option must be: 'fixedinterval', 'priorityinterval', 'dynamicpriority', 'fixedchunksize'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - file: undefined, - start: undefined, - length: undefined - } - ], - fileNames: ["0.ts"], - options: {}, - watchOptions: { fallbackPolling: undefined } - }); - }); - - it("parse --excludeDirectories", () => { - assertParseResult(["--excludeDirectories", "**/temp", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: {}, - watchOptions: { excludeDirectories: ["**/temp"] } - }); - }); - - it("errors on invalid excludeDirectories", () => { - assertParseResult(["--excludeDirectories", "**/../*", "0.ts"], - { - errors: [ - { - messageText: `File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'.`, - category: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.category, - code: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.code, - file: undefined, - start: undefined, - length: undefined - } - ], - fileNames: ["0.ts"], - options: {}, - watchOptions: { excludeDirectories: [] } - }); - }); - - it("parse --excludeFiles", () => { - assertParseResult(["--excludeFiles", "**/temp/*.ts", "0.ts"], - { - errors: [], - fileNames: ["0.ts"], - options: {}, - watchOptions: { excludeFiles: ["**/temp/*.ts"] } - }); - }); - - it("errors on invalid excludeFiles", () => { - assertParseResult(["--excludeFiles", "**/../*", "0.ts"], - { - errors: [ - { - messageText: `File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'.`, - category: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.category, - code: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.code, - file: undefined, - start: undefined, - length: undefined - } - ], - fileNames: ["0.ts"], - options: {}, - watchOptions: { excludeFiles: [] } - }); - }); + assertParseResult("parse --watchFile", ["--watchFile", "UseFsEvents", "0.ts"]); + assertParseResult("parse --watchDirectory", ["--watchDirectory", "FixedPollingInterval", "0.ts"]); + assertParseResult("parse --fallbackPolling", ["--fallbackPolling", "PriorityInterval", "0.ts"]); + assertParseResult("parse --synchronousWatchDirectory", ["--synchronousWatchDirectory", "0.ts"]); + assertParseResult("errors on missing argument to --fallbackPolling", ["0.ts", "--fallbackPolling"]); + assertParseResult("parse --excludeDirectories", ["--excludeDirectories", "**/temp", "0.ts"]); + assertParseResult("errors on invalid excludeDirectories", ["--excludeDirectories", "**/../*", "0.ts"]); + assertParseResult("parse --excludeFiles", ["--excludeFiles", "**/temp/*.ts", "0.ts"]); + assertParseResult("errors on invalid excludeFiles", ["--excludeFiles", "**/../*", "0.ts"]); }); }); describe("unittests:: config:: commandLineParsing:: parseBuildOptions", () => { - function assertParseResult(commandLine: string[], expectedParsedBuildCommand: ParsedBuildCommand) { - const parsed = parseBuildCommand(commandLine); - assert.deepEqual(parsed.buildOptions, expectedParsedBuildCommand.buildOptions); - assert.deepEqual(parsed.watchOptions, expectedParsedBuildCommand.watchOptions); - - const parsedErrors = parsed.errors; - const expectedErrors = expectedParsedBuildCommand.errors; - assert.isTrue(parsedErrors.length === expectedErrors.length, `Expected error: ${JSON.stringify(expectedErrors)}. Actual error: ${JSON.stringify(parsedErrors)}.`); - for (let i = 0; i < parsedErrors.length; i++) { - const parsedError = parsedErrors[i]; - const expectedError = expectedErrors[i]; - assert.equal(parsedError.code, expectedError.code); - assert.equal(parsedError.category, expectedError.category); - assert.equal(parsedError.messageText, expectedError.messageText); - } - - const parsedProjects = parsed.projects; - const expectedProjects = expectedParsedBuildCommand.projects; - assert.deepEqual(parsedProjects, expectedProjects, `Expected projects: [${JSON.stringify(expectedProjects)}]. Actual projects: [${JSON.stringify(parsedProjects)}].`); - } - it("parse build without any options ", () => { - // --lib es6 0.ts - assertParseResult([], - { - errors: [], - projects: ["."], - buildOptions: {}, - watchOptions: undefined - }); - }); - - it("Parse multiple options", () => { - // --lib es5,es2015.symbol.wellknown 0.ts - assertParseResult(["--verbose", "--force", "tests"], - { - errors: [], - projects: ["tests"], - buildOptions: { verbose: true, force: true }, - watchOptions: undefined - }); - }); - - it("Parse option with invalid option ", () => { - // --lib es5,invalidOption 0.ts - assertParseResult(["--verbose", "--invalidOption"], - { - errors: [{ - messageText: "Unknown build option '--invalidOption'.", - category: Diagnostics.Unknown_build_option_0.category, - code: Diagnostics.Unknown_build_option_0.code, - file: undefined, - start: undefined, - length: undefined, - }], - projects: ["."], - buildOptions: { verbose: true }, - watchOptions: undefined - }); - }); - - it("parse build with listFilesOnly ", () => { - // --lib es6 0.ts - assertParseResult(["--listFilesOnly"], - { - errors: [{ - messageText: "Compiler option '--listFilesOnly' may not be used with '--build'.", - category: Diagnostics.Compiler_option_0_may_not_be_used_with_build.category, - code: Diagnostics.Compiler_option_0_may_not_be_used_with_build.code, - file: undefined, - start: undefined, - length: undefined, - }], - projects: ["."], - buildOptions: {}, - watchOptions: undefined, - }); - }); - - it("Parse multiple flags with input projects at the end", () => { - // --lib es5,es2015.symbol.wellknown --target es5 0.ts - assertParseResult(["--force", "--verbose", "src", "tests"], - { - errors: [], - projects: ["src", "tests"], - buildOptions: { force: true, verbose: true }, - watchOptions: undefined, - }); - }); - - it("Parse multiple flags with input projects in the middle", () => { - // --module commonjs --target es5 0.ts --lib es5,es2015.symbol.wellknown - assertParseResult(["--force", "src", "tests", "--verbose"], - { - errors: [], - projects: ["src", "tests"], - buildOptions: { force: true, verbose: true }, - watchOptions: undefined, - }); - }); - - it("Parse multiple flags with input projects in the beginning", () => { - // --module commonjs --target es5 0.ts --lib es5,es2015.symbol.wellknown - assertParseResult(["src", "tests", "--force", "--verbose"], - { - errors: [], - projects: ["src", "tests"], - buildOptions: { force: true, verbose: true }, - watchOptions: undefined, - }); - }); - - it("parse build with --incremental", () => { - // --lib es6 0.ts - assertParseResult(["--incremental", "tests"], - { - errors: [], - projects: ["tests"], - buildOptions: { incremental: true }, - watchOptions: undefined, - }); - }); - - it("parse build with --locale en-us", () => { - // --lib es6 0.ts - assertParseResult(["--locale", "en-us", "src"], - { - errors: [], - projects: ["src"], - buildOptions: { locale: "en-us" }, - watchOptions: undefined, - }); - }); - - it("parse build with --tsBuildInfoFile", () => { - // --lib es6 0.ts - assertParseResult(["--tsBuildInfoFile", "build.tsbuildinfo", "tests"], - { - errors: [{ - messageText: "Compiler option '--tsBuildInfoFile' may not be used with '--build'.", - category: Diagnostics.Compiler_option_0_may_not_be_used_with_build.category, - code: Diagnostics.Compiler_option_0_may_not_be_used_with_build.code, - file: undefined, - start: undefined, - length: undefined - }], - projects: ["build.tsbuildinfo", "tests"], - buildOptions: {}, - watchOptions: undefined, - }); - }); - - it("reports other common 'may not be used with --build' flags", () => { - const buildFlags = ["--declaration", "--strict"]; - - assertParseResult(buildFlags, { - errors: buildFlags.map(buildFlag => ({ - messageText: `Compiler option '${buildFlag}' may not be used with '--build'.`, - category: Diagnostics.Compiler_option_0_may_not_be_used_with_build.category, - code: Diagnostics.Compiler_option_0_may_not_be_used_with_build.code, - file: undefined, - start: undefined, - length: undefined - })), - buildOptions: {}, - projects: ["."], - watchOptions: undefined, + function assertParseResult(subScenario: string, commandLine: string[]) { + it(subScenario, () => { + const baseline: string[] = []; + baseline.push(commandLine.join(" ")); + const parsed = parseBuildCommand(commandLine); + baseline.push("buildOptions::"); + baseline.push(JSON.stringify(parsed.buildOptions, /*replacer*/ undefined, " ")); + baseline.push("WatchOptions::"); + baseline.push(JSON.stringify(parsed.watchOptions, /*replacer*/ undefined, " ")); + baseline.push("Projects::"); + baseline.push(parsed.projects.join()); + baseline.push("Errors::"); + baseline.push(formatDiagnostics(parsed.errors, { + getCurrentDirectory: () => "/", + getCanonicalFileName: identity, + getNewLine: () => "\n", + })); + Harness.Baseline.runBaseline(`config/commandLineParsing/parseBuildOptions/${subScenario}.js`, baseline.join("\n")); }); - }); + } + assertParseResult("parse build without any options ", []); + assertParseResult("Parse multiple options", ["--verbose", "--force", "tests"]); + assertParseResult("Parse option with invalid option", ["--verbose", "--invalidOption"]); + assertParseResult("Parse multiple flags with input projects at the end", ["--force", "--verbose", "src", "tests"]); + assertParseResult("Parse multiple flags with input projects in the middle", ["--force", "src", "tests", "--verbose"]); + assertParseResult("Parse multiple flags with input projects in the beginning", ["src", "tests", "--force", "--verbose"]); + assertParseResult("parse build with --incremental", ["--incremental", "tests"]); + assertParseResult("parse build with --locale en-us", ["--locale", "en-us", "src"]); + assertParseResult("parse build with --tsBuildInfoFile", ["--tsBuildInfoFile", "build.tsbuildinfo", "tests"]); + assertParseResult("reports other common may not be used with --build flags", ["--declaration", "--strict"]); describe("Combining options that make no sense together", () => { function verifyInvalidCombination(flag1: keyof BuildOptions, flag2: keyof BuildOptions) { - it(`--${flag1} and --${flag2} together is invalid`, () => { - // --module commonjs --target es5 0.ts --lib es5,es2015.symbol.wellknown - assertParseResult([`--${flag1}`, `--${flag2}`], - { - errors: [{ - messageText: `Options '${flag1}' and '${flag2}' cannot be combined.`, - category: Diagnostics.Options_0_and_1_cannot_be_combined.category, - code: Diagnostics.Options_0_and_1_cannot_be_combined.code, - file: undefined, - start: undefined, - length: undefined, - }], - projects: ["."], - buildOptions: { [flag1]: true, [flag2]: true }, - watchOptions: undefined, - }); - }); + assertParseResult(`--${flag1} and --${flag2} together is invalid`, [`--${flag1}`, `--${flag2}`]); } - verifyInvalidCombination("clean", "force"); verifyInvalidCombination("clean", "verbose"); verifyInvalidCombination("clean", "watch"); @@ -940,120 +233,14 @@ namespace ts { }); describe("Watch options", () => { - it("parse --watchFile", () => { - assertParseResult(["--watchFile", "UseFsEvents", "--verbose"], - { - errors: [], - projects: ["."], - buildOptions: { verbose: true }, - watchOptions: { watchFile: WatchFileKind.UseFsEvents } - }); - }); - - it("parse --watchDirectory", () => { - assertParseResult(["--watchDirectory", "FixedPollingInterval", "--verbose"], - { - errors: [], - projects: ["."], - buildOptions: { verbose: true }, - watchOptions: { watchDirectory: WatchDirectoryKind.FixedPollingInterval } - }); - }); - - it("parse --fallbackPolling", () => { - assertParseResult(["--fallbackPolling", "PriorityInterval", "--verbose"], - { - errors: [], - projects: ["."], - buildOptions: { verbose: true }, - watchOptions: { fallbackPolling: PollingWatchKind.PriorityInterval } - }); - }); - - it("parse --synchronousWatchDirectory", () => { - assertParseResult(["--synchronousWatchDirectory", "--verbose"], - { - errors: [], - projects: ["."], - buildOptions: { verbose: true }, - watchOptions: { synchronousWatchDirectory: true } - }); - }); - - it("errors on missing argument", () => { - assertParseResult(["--verbose", "--fallbackPolling"], - { - errors: [ - { - messageText: "Watch option 'fallbackPolling' requires a value of type string.", - category: Diagnostics.Watch_option_0_requires_a_value_of_type_1.category, - code: Diagnostics.Watch_option_0_requires_a_value_of_type_1.code, - file: undefined, - start: undefined, - length: undefined - }, - { - messageText: "Argument for '--fallbackPolling' option must be: 'fixedinterval', 'priorityinterval', 'dynamicpriority', 'fixedchunksize'.", - category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, - code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, - file: undefined, - start: undefined, - length: undefined - } - ], - projects: ["."], - buildOptions: { verbose: true }, - watchOptions: { fallbackPolling: undefined } - }); - }); - - it("errors on invalid excludeDirectories", () => { - assertParseResult(["--excludeDirectories", "**/../*"], - { - errors: [ - { - messageText: `File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'.`, - category: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.category, - code: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.code, - file: undefined, - start: undefined, - length: undefined - } - ], - projects: ["."], - buildOptions: {}, - watchOptions: { excludeDirectories: [] } - }); - }); - - it("parse --excludeFiles", () => { - assertParseResult(["--excludeFiles", "**/temp/*.ts"], - { - errors: [], - projects: ["."], - buildOptions: {}, - watchOptions: { excludeFiles: ["**/temp/*.ts"] } - }); - }); - - it("errors on invalid excludeFiles", () => { - assertParseResult(["--excludeFiles", "**/../*"], - { - errors: [ - { - messageText: `File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'.`, - category: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.category, - code: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.code, - file: undefined, - start: undefined, - length: undefined - } - ], - projects: ["."], - buildOptions: {}, - watchOptions: { excludeFiles: [] } - }); - }); + assertParseResult("parse --watchFile", ["--watchFile", "UseFsEvents", "--verbose"]); + assertParseResult("parse --watchDirectory", ["--watchDirectory", "FixedPollingInterval", "--verbose"]); + assertParseResult("parse --fallbackPolling", ["--fallbackPolling", "PriorityInterval", "--verbose"]); + assertParseResult("parse --synchronousWatchDirectory", ["--synchronousWatchDirectory", "--verbose"]); + assertParseResult("errors on missing argument", ["--verbose", "--fallbackPolling"]); + assertParseResult("errors on invalid excludeDirectories", ["--excludeDirectories", "**/../*"]); + assertParseResult("parse --excludeFiles", ["--excludeFiles", "**/temp/*.ts"]); + assertParseResult("errors on invalid excludeFiles", ["--excludeFiles", "**/../*"]); }); }); } diff --git a/src/testRunner/unittests/config/initializeTSConfig.ts b/src/testRunner/unittests/config/initializeTSConfig.ts index 68c56ac4e179f..d92c906f46180 100644 --- a/src/testRunner/unittests/config/initializeTSConfig.ts +++ b/src/testRunner/unittests/config/initializeTSConfig.ts @@ -4,7 +4,7 @@ namespace ts { describe(name, () => { const commandLine = parseCommandLine(commandLinesArgs); const initResult = generateTSConfig(commandLine.options, commandLine.fileNames, "\n"); - const outputFileName = `tsConfig/${name.replace(/[^a-z0-9\-. ]/ig, "")}/tsconfig.json`; + const outputFileName = `config/initTSConfig/${name.replace(/[^a-z0-9\-. ]/ig, "")}/tsconfig.json`; it(`Correct output for ${outputFileName}`, () => { Harness.Baseline.runBaseline(outputFileName, initResult, { PrintDiff: true }); diff --git a/src/testRunner/unittests/config/showConfig.ts b/src/testRunner/unittests/config/showConfig.ts index f8905e3412677..530d3c7e56904 100644 --- a/src/testRunner/unittests/config/showConfig.ts +++ b/src/testRunner/unittests/config/showConfig.ts @@ -2,7 +2,7 @@ namespace ts { describe("unittests:: config:: showConfig", () => { function showTSConfigCorrectly(name: string, commandLinesArgs: string[], configJson?: object) { describe(name, () => { - const outputFileName = `showConfig/${name.replace(/[^a-z0-9\-./ ]/ig, "")}/tsconfig.json`; + const outputFileName = `config/showConfig/${name.replace(/[^a-z0-9\-./ ]/ig, "")}/tsconfig.json`; it(`Correct output for ${outputFileName}`, () => { const cwd = `/${name}`; diff --git a/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts b/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts index 120dd42d2c542..3987ed148f550 100644 --- a/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts +++ b/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts @@ -42,190 +42,144 @@ namespace ts { interface VerifyWatchOptions { json: object; - expectedOptions: WatchOptions | undefined; additionalFiles?: vfs.FileSet; existingWatchOptions?: WatchOptions | undefined; - expectedErrors?: (sourceFile?: SourceFile) => Diagnostic[]; } - function verifyWatchOptions(scenario: () => VerifyWatchOptions[]) { - it("with json api", () => { - for (const { json, expectedOptions, additionalFiles, existingWatchOptions, expectedErrors } of scenario()) { - const parsed = getParsedCommandJson(json, additionalFiles, existingWatchOptions); - assert.deepEqual(parsed.watchOptions, expectedOptions, `With ${JSON.stringify(json)}`); - if (length(parsed.errors)) { - assert.deepEqual(parsed.errors, expectedErrors?.()); + function verifyWatchOptions(subScenario: string, scenario: () => VerifyWatchOptions[]) { + describe(subScenario, () => { + it("with json api", () => { + const baseline: string[] = []; + for (const { json, additionalFiles, existingWatchOptions } of scenario()) { + addToBaseLine(baseline, json, getParsedCommandJson(json, additionalFiles, existingWatchOptions)); } - else { - assert.equal(0, length(expectedErrors?.()), `Expected no errors`); - } - } - }); + runBaseline(`${subScenario} with json api`, baseline); + }); - it("with json source file api", () => { - for (const { json, expectedOptions, additionalFiles, existingWatchOptions, expectedErrors } of scenario()) { - const parsed = getParsedCommandJsonNode(json, additionalFiles, existingWatchOptions); - assert.deepEqual(parsed.watchOptions, expectedOptions); - if (length(parsed.errors)) { - assert.deepEqual(parsed.errors, expectedErrors?.(parsed.options.configFile)); - } - else { - assert.equal(0, length(expectedErrors?.(parsed.options.configFile)), `Expected no errors`); + it("with json source file api", () => { + const baseline: string[] = []; + for (const { json, additionalFiles, existingWatchOptions, } of scenario()) { + addToBaseLine(baseline, json, getParsedCommandJsonNode(json, additionalFiles, existingWatchOptions)); } - } + runBaseline(`${subScenario} with jsonSourceFile api`, baseline); + }); }); + function addToBaseLine(baseline: string[], json: object, parsed: ParsedCommandLine) { + baseline.push(`Input:: ${JSON.stringify(json, /*replacer*/ undefined, " ")}`); + baseline.push(`Result: WatchOptions::`); + baseline.push(JSON.stringify(parsed.watchOptions, /*replacer*/ undefined, " ")); + baseline.push(`Result: Errors::`); + baseline.push(formatDiagnosticsWithColorAndContext(parsed.errors, { + getCurrentDirectory: () => "/", + getCanonicalFileName: identity, + getNewLine: () => "\n" + })); + } + function runBaseline(subScenario: string, baseline: readonly string[]) { + Harness.Baseline.runBaseline(`config/tsconfigParsingWatchOptions/${subScenario}.js`, baseline.join("\n")); + } } - describe("no watchOptions specified option", () => { - verifyWatchOptions(() => [{ - json: {}, - expectedOptions: undefined - }]); - }); + verifyWatchOptions("no watchOptions specified option", () => [{ + json: {}, + }]); - describe("empty watchOptions specified option", () => { - verifyWatchOptions(() => [{ - json: { watchOptions: {} }, - expectedOptions: undefined - }]); - }); + verifyWatchOptions("empty watchOptions specified option", () => [{ + json: { watchOptions: {} }, + }]); - describe("extending config file", () => { - describe("when extending config file without watchOptions", () => { - verifyWatchOptions(() => [ - { - json: { - extends: "./base.json", - watchOptions: { watchFile: "UseFsEvents" } - }, - expectedOptions: { watchFile: WatchFileKind.UseFsEvents }, - additionalFiles: { "/base.json": "{}" } - }, - { - json: { extends: "./base.json", }, - expectedOptions: undefined, - additionalFiles: { "/base.json": "{}" } - } - ]); - }); + verifyWatchOptions("when extending config file without watchOptions", () => [ + { + json: { + extends: "./base.json", + watchOptions: { watchFile: "UseFsEvents" } + }, + additionalFiles: { "/base.json": "{}" } + }, + { + json: { extends: "./base.json", }, + additionalFiles: { "/base.json": "{}" } + } + ]); - describe("when extending config file with watchOptions", () => { - verifyWatchOptions(() => [ - { - json: { - extends: "./base.json", - watchOptions: { - watchFile: "UseFsEvents", - } - }, - expectedOptions: { - watchFile: WatchFileKind.UseFsEvents, - watchDirectory: WatchDirectoryKind.FixedPollingInterval - }, - additionalFiles: { - "/base.json": JSON.stringify({ - watchOptions: { - watchFile: "UseFsEventsOnParentDirectory", - watchDirectory: "FixedPollingInterval" - } - }) - } - }, - { - json: { - extends: "./base.json", - }, - expectedOptions: { - watchFile: WatchFileKind.UseFsEventsOnParentDirectory, - watchDirectory: WatchDirectoryKind.FixedPollingInterval - }, - additionalFiles: { - "/base.json": JSON.stringify({ - watchOptions: { - watchFile: "UseFsEventsOnParentDirectory", - watchDirectory: "FixedPollingInterval" - } - }) - } + verifyWatchOptions("when extending config file with watchOptions", () => [ + { + json: { + extends: "./base.json", + watchOptions: { + watchFile: "UseFsEvents", } - ]); - }); - }); - - describe("different options", () => { - verifyWatchOptions(() => [ - { - json: { watchOptions: { watchFile: "UseFsEvents" } }, - expectedOptions: { watchFile: WatchFileKind.UseFsEvents } - }, - { - json: { watchOptions: { watchDirectory: "UseFsEvents" } }, - expectedOptions: { watchDirectory: WatchDirectoryKind.UseFsEvents } - }, - { - json: { watchOptions: { fallbackPolling: "DynamicPriority" } }, - expectedOptions: { fallbackPolling: PollingWatchKind.DynamicPriority } - }, - { - json: { watchOptions: { synchronousWatchDirectory: true } }, - expectedOptions: { synchronousWatchDirectory: true } - }, - { - json: { watchOptions: { excludeDirectories: ["**/temp"] } }, - expectedOptions: { excludeDirectories: ["/**/temp"] } - }, - { - json: { watchOptions: { excludeFiles: ["**/temp/*.ts"] } }, - expectedOptions: { excludeFiles: ["/**/temp/*.ts"] } }, - { - json: { watchOptions: { excludeDirectories: ["**/../*"] } }, - expectedOptions: { excludeDirectories: [] }, - expectedErrors: sourceFile => [ - { - messageText: `File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'.`, - category: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.category, - code: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.code, - file: sourceFile, - start: sourceFile && sourceFile.text.indexOf(`"**/../*"`), - length: sourceFile && `"**/../*"`.length, - reportsDeprecated: undefined, - reportsUnnecessary: undefined + additionalFiles: { + "/base.json": JSON.stringify({ + watchOptions: { + watchFile: "UseFsEventsOnParentDirectory", + watchDirectory: "FixedPollingInterval" } - ] + }) + } + }, + { + json: { + extends: "./base.json", }, - { - json: { watchOptions: { excludeFiles: ["**/../*"] } }, - expectedOptions: { excludeFiles: [] }, - expectedErrors: sourceFile => [ - { - messageText: `File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'.`, - category: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.category, - code: Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0.code, - file: sourceFile, - start: sourceFile && sourceFile.text.indexOf(`"**/../*"`), - length: sourceFile && `"**/../*"`.length, - reportsDeprecated: undefined, - reportsUnnecessary: undefined + additionalFiles: { + "/base.json": JSON.stringify({ + watchOptions: { + watchFile: "UseFsEventsOnParentDirectory", + watchDirectory: "FixedPollingInterval" } - ] - }, - ]); - }); + }) + } + } + ]); - describe("watch options extending passed in watch options", () => { - verifyWatchOptions(() => [ - { - json: { watchOptions: { watchFile: "UseFsEvents" } }, - expectedOptions: { watchFile: WatchFileKind.UseFsEvents, watchDirectory: WatchDirectoryKind.FixedPollingInterval }, - existingWatchOptions: { watchDirectory: WatchDirectoryKind.FixedPollingInterval } - }, - { - json: {}, - expectedOptions: { watchDirectory: WatchDirectoryKind.FixedPollingInterval }, - existingWatchOptions: { watchDirectory: WatchDirectoryKind.FixedPollingInterval } - }, - ]); - }); + verifyWatchOptions("different options", () => [ + { + json: { watchOptions: { watchFile: "UseFsEvents" } }, + }, + { + json: { watchOptions: { watchDirectory: "UseFsEvents" } }, + }, + { + json: { watchOptions: { fallbackPolling: "DynamicPriority" } }, + }, + { + json: { watchOptions: { synchronousWatchDirectory: true } }, + }, + { + json: { watchOptions: { excludeDirectories: ["**/temp"] } }, + }, + { + json: { watchOptions: { excludeFiles: ["**/temp/*.ts"] } }, + }, + { + json: { watchOptions: { excludeDirectories: ["**/../*"] } }, + }, + { + json: { watchOptions: { excludeFiles: ["**/../*"] } }, + }, + { + json: { watchOptions: { watchFactory: "somefactory" } }, + }, + { + json: { watchOptions: { watchFactory: { name: "somefactory", myconfig: "somethingelse" } } }, + }, + { + json: { watchOptions: { watchFactory: "somefactory/../malicious" } }, + }, + { + json: { watchOptions: { watchFactory: { name: "somefactory/../malicious" } } }, + }, + ]); + + verifyWatchOptions("watch options extending passed in watch options", () => [ + { + json: { watchOptions: { watchFile: "UseFsEvents" } }, + }, + { + json: {}, + }, + ]); }); } diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js new file mode 100644 index 0000000000000..ff703f25ce7fa --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --force together is invalid.js @@ -0,0 +1,12 @@ +--clean --force +buildOptions:: +{ + "clean": true, + "force": true +} +WatchOptions:: + +Projects:: +. +Errors:: +error TS6370: Options 'clean' and 'force' cannot be combined. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js new file mode 100644 index 0000000000000..a5f665c196d61 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --verbose together is invalid.js @@ -0,0 +1,12 @@ +--clean --verbose +buildOptions:: +{ + "clean": true, + "verbose": true +} +WatchOptions:: + +Projects:: +. +Errors:: +error TS6370: Options 'clean' and 'verbose' cannot be combined. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js new file mode 100644 index 0000000000000..754283ce029bd --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--clean and --watch together is invalid.js @@ -0,0 +1,12 @@ +--clean --watch +buildOptions:: +{ + "clean": true, + "watch": true +} +WatchOptions:: + +Projects:: +. +Errors:: +error TS6370: Options 'clean' and 'watch' cannot be combined. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js new file mode 100644 index 0000000000000..841b0dfbb57eb --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/--watch and --dry together is invalid.js @@ -0,0 +1,12 @@ +--watch --dry +buildOptions:: +{ + "watch": true, + "dry": true +} +WatchOptions:: + +Projects:: +. +Errors:: +error TS6370: Options 'watch' and 'dry' cannot be combined. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js new file mode 100644 index 0000000000000..e647a4a039c25 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects at the end.js @@ -0,0 +1,11 @@ +--force --verbose src tests +buildOptions:: +{ + "force": true, + "verbose": true +} +WatchOptions:: + +Projects:: +src,tests +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js new file mode 100644 index 0000000000000..42aae4de856c4 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the beginning.js @@ -0,0 +1,11 @@ +src tests --force --verbose +buildOptions:: +{ + "force": true, + "verbose": true +} +WatchOptions:: + +Projects:: +src,tests +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js new file mode 100644 index 0000000000000..0dbec2c7666ad --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple flags with input projects in the middle.js @@ -0,0 +1,11 @@ +--force src tests --verbose +buildOptions:: +{ + "force": true, + "verbose": true +} +WatchOptions:: + +Projects:: +src,tests +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple options.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple options.js new file mode 100644 index 0000000000000..e29895636f602 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse multiple options.js @@ -0,0 +1,11 @@ +--verbose --force tests +buildOptions:: +{ + "verbose": true, + "force": true +} +WatchOptions:: + +Projects:: +tests +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse option with invalid option.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse option with invalid option.js new file mode 100644 index 0000000000000..d385a51f7320d --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/Parse option with invalid option.js @@ -0,0 +1,11 @@ +--verbose --invalidOption +buildOptions:: +{ + "verbose": true +} +WatchOptions:: + +Projects:: +. +Errors:: +error TS5072: Unknown build option '--invalidOption'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js new file mode 100644 index 0000000000000..35f0a639f9c8d --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on invalid excludeDirectories.js @@ -0,0 +1,11 @@ +--excludeDirectories **/../* +buildOptions:: +{} +WatchOptions:: +{ + "excludeDirectories": [] +} +Projects:: +. +Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js new file mode 100644 index 0000000000000..89d564b19aa96 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on invalid excludeFiles.js @@ -0,0 +1,11 @@ +--excludeFiles **/../* +buildOptions:: +{} +WatchOptions:: +{ + "excludeFiles": [] +} +Projects:: +. +Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on missing argument.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on missing argument.js new file mode 100644 index 0000000000000..212cae1eb636e --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/errors on missing argument.js @@ -0,0 +1,12 @@ +--verbose --fallbackPolling +buildOptions:: +{ + "verbose": true +} +WatchOptions:: +{} +Projects:: +. +Errors:: +error TS5080: Watch option 'fallbackPolling' requires a value of type string. +error TS6046: Argument for '--fallbackPolling' option must be: 'fixedinterval', 'priorityinterval', 'dynamicpriority', 'fixedchunksize'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --excludeFiles.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --excludeFiles.js new file mode 100644 index 0000000000000..d62c5f98e0450 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --excludeFiles.js @@ -0,0 +1,12 @@ +--excludeFiles **/temp/*.ts +buildOptions:: +{} +WatchOptions:: +{ + "excludeFiles": [ + "**/temp/*.ts" + ] +} +Projects:: +. +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js new file mode 100644 index 0000000000000..1fd285ef9759f --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --fallbackPolling.js @@ -0,0 +1,12 @@ +--fallbackPolling PriorityInterval --verbose +buildOptions:: +{ + "verbose": true +} +WatchOptions:: +{ + "fallbackPolling": 1 +} +Projects:: +. +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js new file mode 100644 index 0000000000000..5b065234cf12c --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --synchronousWatchDirectory.js @@ -0,0 +1,12 @@ +--synchronousWatchDirectory --verbose +buildOptions:: +{ + "verbose": true +} +WatchOptions:: +{ + "synchronousWatchDirectory": true +} +Projects:: +. +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --watchDirectory.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --watchDirectory.js new file mode 100644 index 0000000000000..62a74a7a9d26c --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --watchDirectory.js @@ -0,0 +1,12 @@ +--watchDirectory FixedPollingInterval --verbose +buildOptions:: +{ + "verbose": true +} +WatchOptions:: +{ + "watchDirectory": 1 +} +Projects:: +. +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --watchFile.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --watchFile.js new file mode 100644 index 0000000000000..1f881f80f8a8e --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse --watchFile.js @@ -0,0 +1,12 @@ +--watchFile UseFsEvents --verbose +buildOptions:: +{ + "verbose": true +} +WatchOptions:: +{ + "watchFile": 4 +} +Projects:: +. +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --incremental.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --incremental.js new file mode 100644 index 0000000000000..91cebea73a395 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --incremental.js @@ -0,0 +1,10 @@ +--incremental tests +buildOptions:: +{ + "incremental": true +} +WatchOptions:: + +Projects:: +tests +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js new file mode 100644 index 0000000000000..8b3e814d4f1c7 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --locale en-us.js @@ -0,0 +1,10 @@ +--locale en-us src +buildOptions:: +{ + "locale": "en-us" +} +WatchOptions:: + +Projects:: +src +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js new file mode 100644 index 0000000000000..1ddf67e0c54ab --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build with --tsBuildInfoFile.js @@ -0,0 +1,9 @@ +--tsBuildInfoFile build.tsbuildinfo tests +buildOptions:: +{} +WatchOptions:: + +Projects:: +build.tsbuildinfo,tests +Errors:: +error TS5094: Compiler option '--tsBuildInfoFile' may not be used with '--build'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build without any options .js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build without any options .js new file mode 100644 index 0000000000000..36e1149f47356 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/parse build without any options .js @@ -0,0 +1,8 @@ + +buildOptions:: +{} +WatchOptions:: + +Projects:: +. +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js new file mode 100644 index 0000000000000..b758998ce1620 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseBuildOptions/reports other common may not be used with --build flags.js @@ -0,0 +1,10 @@ +--declaration --strict +buildOptions:: +{} +WatchOptions:: + +Projects:: +. +Errors:: +error TS5094: Compiler option '--declaration' may not be used with '--build'. +error TS5094: Compiler option '--strict' may not be used with '--build'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Handles 'may only be used with --build' flags.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Handles 'may only be used with --build' flags.js new file mode 100644 index 0000000000000..d7e2490b18fdf --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Handles 'may only be used with --build' flags.js @@ -0,0 +1,12 @@ +--clean --dry --force --verbose +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: + +Errors:: +error TS5093: Compiler option '--clean' may only be used with '--build'. +error TS5093: Compiler option '--dry' may only be used with '--build'. +error TS5093: Compiler option '--force' may only be used with '--build'. +error TS5093: Compiler option '--verbose' may only be used with '--build'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js new file mode 100644 index 0000000000000..cd9c9e4957d17 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with extra comma.js @@ -0,0 +1,13 @@ +--lib es5, es7 0.ts +CompilerOptions:: +{ + "lib": [ + "lib.es5.d.ts" + ] +} +WatchOptions:: + +FileNames:: +es7,0.ts +Errors:: +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js new file mode 100644 index 0000000000000..db535ca00f994 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse --lib option with trailing white-space.js @@ -0,0 +1,13 @@ +--lib es5, es7 0.ts +CompilerOptions:: +{ + "lib": [ + "lib.es5.d.ts" + ] +} +WatchOptions:: + +FileNames:: +es7,0.ts +Errors:: +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js new file mode 100644 index 0000000000000..a4a41ae126044 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --jsx.js @@ -0,0 +1,10 @@ +0.ts --jsx +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'jsx' expects an argument. +error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --lib.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --lib.js new file mode 100644 index 0000000000000..d3f0a03b606d1 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --lib.js @@ -0,0 +1,11 @@ +0.ts --lib +CompilerOptions:: +{ + "lib": [] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'lib' expects an argument. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --module.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --module.js new file mode 100644 index 0000000000000..6eac025950521 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --module.js @@ -0,0 +1,10 @@ +0.ts --module +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'module' expects an argument. +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --moduleResolution.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --moduleResolution.js new file mode 100644 index 0000000000000..fb361238364f5 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --moduleResolution.js @@ -0,0 +1,10 @@ +0.ts --moduleResolution +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'moduleResolution' expects an argument. +error TS6046: Argument for '--moduleResolution' option must be: 'node', 'classic', 'node16', 'nodenext'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --newLine.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --newLine.js new file mode 100644 index 0000000000000..cd6c862f1320c --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --newLine.js @@ -0,0 +1,10 @@ +0.ts --newLine +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'newLine' expects an argument. +error TS6046: Argument for '--newLine' option must be: 'crlf', 'lf'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js new file mode 100644 index 0000000000000..35926083139a7 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty options of --target.js @@ -0,0 +1,10 @@ +0.ts --target +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'target' expects an argument. +error TS6046: Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty string of --lib.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty string of --lib.js new file mode 100644 index 0000000000000..a21dc499ae458 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse empty string of --lib.js @@ -0,0 +1,11 @@ +0.ts --lib +CompilerOptions:: +{ + "lib": [] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6044: Compiler option 'lib' expects an argument. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse explicit boolean flag value.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse explicit boolean flag value.js new file mode 100644 index 0000000000000..dd8cca535a400 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse explicit boolean flag value.js @@ -0,0 +1,10 @@ +--strictNullChecks false 0.ts +CompilerOptions:: +{ + "strictNullChecks": false +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse immediately following command line argument of --lib.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse immediately following command line argument of --lib.js new file mode 100644 index 0000000000000..635303d8967ef --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse immediately following command line argument of --lib.js @@ -0,0 +1,11 @@ +0.ts --lib --sourcemap +CompilerOptions:: +{ + "lib": [], + "sourceMap": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse implicit boolean flag value.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse implicit boolean flag value.js new file mode 100644 index 0000000000000..b278bb6260549 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse implicit boolean flag value.js @@ -0,0 +1,10 @@ +--strictNullChecks +CompilerOptions:: +{ + "strictNullChecks": true +} +WatchOptions:: + +FileNames:: + +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js new file mode 100644 index 0000000000000..06df71f899e4b --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse invalid option of library flags.js @@ -0,0 +1,13 @@ +--lib es5,invalidOption 0.ts +CompilerOptions:: +{ + "lib": [ + "lib.es5.d.ts" + ] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6046: Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'webworker.iterable', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2019.intl', 'es2020.bigint', 'es2020.date', 'es2020.promise', 'es2020.sharedmemory', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'es2020.number', 'es2021.promise', 'es2021.string', 'es2021.weakref', 'es2021.intl', 'es2022.array', 'es2022.error', 'es2022.intl', 'es2022.object', 'es2022.sharedmemory', 'es2022.string', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise', 'esnext.weakref'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files at the end.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files at the end.js new file mode 100644 index 0000000000000..b3c7bea3fd566 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files at the end.js @@ -0,0 +1,14 @@ +--lib es5,es2015.symbol.wellknown --target es5 0.ts +CompilerOptions:: +{ + "lib": [ + "lib.es5.d.ts", + "lib.es2015.symbol.wellknown.d.ts" + ], + "target": 1 +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files in the middle.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files in the middle.js new file mode 100644 index 0000000000000..6dd0ef5b372dc --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple compiler flags with input files in the middle.js @@ -0,0 +1,15 @@ +--module commonjs --target es5 0.ts --lib es5,es2015.symbol.wellknown +CompilerOptions:: +{ + "module": 1, + "target": 1, + "lib": [ + "lib.es5.d.ts", + "lib.es2015.symbol.wellknown.d.ts" + ] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple library compiler flags .js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple library compiler flags .js new file mode 100644 index 0000000000000..fe6bf903acfca --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple library compiler flags .js @@ -0,0 +1,15 @@ +--module commonjs --target es5 --lib es5 0.ts --lib es2015.core, es2015.symbol.wellknown +CompilerOptions:: +{ + "module": 1, + "target": 1, + "lib": [ + "lib.es2015.core.d.ts", + "lib.es2015.symbol.wellknown.d.ts" + ] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple options of library flags.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple options of library flags.js new file mode 100644 index 0000000000000..02be8361d616c --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse multiple options of library flags.js @@ -0,0 +1,13 @@ +--lib es5,es2015.symbol.wellknown 0.ts +CompilerOptions:: +{ + "lib": [ + "lib.es5.d.ts", + "lib.es2015.symbol.wellknown.d.ts" + ] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse non boolean argument after boolean flag.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse non boolean argument after boolean flag.js new file mode 100644 index 0000000000000..f170c944b910d --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse non boolean argument after boolean flag.js @@ -0,0 +1,10 @@ +--noImplicitAny t 0.ts +CompilerOptions:: +{ + "noImplicitAny": true +} +WatchOptions:: + +FileNames:: +t,0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse single option of library flag.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse single option of library flag.js new file mode 100644 index 0000000000000..085396bb590ef --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/Parse single option of library flag.js @@ -0,0 +1,12 @@ +--lib es6 0.ts +CompilerOptions:: +{ + "lib": [ + "lib.es2015.d.ts" + ] +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/allows setting option type boolean to false.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/allows setting option type boolean to false.js new file mode 100644 index 0000000000000..f030755d829ca --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/allows setting option type boolean to false.js @@ -0,0 +1,10 @@ +--composite false 0.ts +CompilerOptions:: +{ + "composite": false +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/allows tsconfig only option to be set to null.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/allows tsconfig only option to be set to null.js new file mode 100644 index 0000000000000..7b0c75eb519e5 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/allows tsconfig only option to be set to null.js @@ -0,0 +1,8 @@ +--composite null -tsBuildInfoFile null 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on invalid excludeDirectories.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on invalid excludeDirectories.js new file mode 100644 index 0000000000000..fbe68473c5a5b --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on invalid excludeDirectories.js @@ -0,0 +1,11 @@ +--excludeDirectories **/../* 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "excludeDirectories": [] +} +FileNames:: +0.ts +Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on invalid excludeFiles.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on invalid excludeFiles.js new file mode 100644 index 0000000000000..83588c628de48 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on invalid excludeFiles.js @@ -0,0 +1,11 @@ +--excludeFiles **/../* 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "excludeFiles": [] +} +FileNames:: +0.ts +Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on missing argument to --fallbackPolling.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on missing argument to --fallbackPolling.js new file mode 100644 index 0000000000000..0ccf34a297a4d --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/errors on missing argument to --fallbackPolling.js @@ -0,0 +1,10 @@ +0.ts --fallbackPolling +CompilerOptions:: +{} +WatchOptions:: +{} +FileNames:: +0.ts +Errors:: +error TS5080: Watch option 'fallbackPolling' requires a value of type string. +error TS6046: Argument for '--fallbackPolling' option must be: 'fixedinterval', 'priorityinterval', 'dynamicpriority', 'fixedchunksize'. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean allows setting it to null.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean allows setting it to null.js new file mode 100644 index 0000000000000..5c75a44457e94 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean allows setting it to null.js @@ -0,0 +1,8 @@ +--composite null 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if its followed by another option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if its followed by another option.js new file mode 100644 index 0000000000000..7c257fe64a8b7 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if its followed by another option.js @@ -0,0 +1,11 @@ +0.ts --strictNullChecks --composite +CompilerOptions:: +{ + "strictNullChecks": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6230: Option 'composite' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if its last option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if its last option.js new file mode 100644 index 0000000000000..7ecdc431d698b --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if its last option.js @@ -0,0 +1,9 @@ +0.ts --composite +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6230: Option 'composite' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if non null value is passed.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if non null value is passed.js new file mode 100644 index 0000000000000..6955df27f9c83 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type boolean errors if non null value is passed.js @@ -0,0 +1,9 @@ +--composite true 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6230: Option 'composite' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list allows setting it to null.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list allows setting it to null.js new file mode 100644 index 0000000000000..3cd02971c418a --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list allows setting it to null.js @@ -0,0 +1,8 @@ +--rootDirs null 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if its followed by another option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if its followed by another option.js new file mode 100644 index 0000000000000..66cf451885b78 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if its followed by another option.js @@ -0,0 +1,11 @@ +0.ts --strictNullChecks --rootDirs +CompilerOptions:: +{ + "strictNullChecks": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'rootDirs' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if its last option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if its last option.js new file mode 100644 index 0000000000000..21b489264bf4c --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if its last option.js @@ -0,0 +1,9 @@ +0.ts --rootDirs +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'rootDirs' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if non null value is passed.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if non null value is passed.js new file mode 100644 index 0000000000000..6ad60c46173c9 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type list errors if non null value is passed.js @@ -0,0 +1,9 @@ +--rootDirs abc,xyz 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'rootDirs' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number allows setting it to null.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number allows setting it to null.js new file mode 100644 index 0000000000000..996e097ab4150 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number allows setting it to null.js @@ -0,0 +1,8 @@ +--optionName null 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if its followed by another option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if its followed by another option.js new file mode 100644 index 0000000000000..c37d4e514708f --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if its followed by another option.js @@ -0,0 +1,11 @@ +0.ts --strictNullChecks --optionName +CompilerOptions:: +{ + "strictNullChecks": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'optionName' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if its last option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if its last option.js new file mode 100644 index 0000000000000..e6a3e96e4c377 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if its last option.js @@ -0,0 +1,9 @@ +0.ts --optionName +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'optionName' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if non null value is passed.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if non null value is passed.js new file mode 100644 index 0000000000000..240c1b2bff023 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type number errors if non null value is passed.js @@ -0,0 +1,9 @@ +--optionName 10 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'optionName' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object allows setting it to null.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object allows setting it to null.js new file mode 100644 index 0000000000000..ee407a280596b --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object allows setting it to null.js @@ -0,0 +1,8 @@ +--paths null 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object errors if its followed by another option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object errors if its followed by another option.js new file mode 100644 index 0000000000000..f7fe0fb368ee6 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object errors if its followed by another option.js @@ -0,0 +1,11 @@ +0.ts --strictNullChecks --paths +CompilerOptions:: +{ + "strictNullChecks": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'paths' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object errors if its last option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object errors if its last option.js new file mode 100644 index 0000000000000..f0e5be51c62fd --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type object errors if its last option.js @@ -0,0 +1,9 @@ +0.ts --paths +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'paths' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string allows setting it to null.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string allows setting it to null.js new file mode 100644 index 0000000000000..996e097ab4150 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string allows setting it to null.js @@ -0,0 +1,8 @@ +--optionName null 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if its followed by another option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if its followed by another option.js new file mode 100644 index 0000000000000..c37d4e514708f --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if its followed by another option.js @@ -0,0 +1,11 @@ +0.ts --strictNullChecks --optionName +CompilerOptions:: +{ + "strictNullChecks": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'optionName' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if its last option.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if its last option.js new file mode 100644 index 0000000000000..e6a3e96e4c377 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if its last option.js @@ -0,0 +1,9 @@ +0.ts --optionName +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'optionName' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if non null value is passed.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if non null value is passed.js new file mode 100644 index 0000000000000..0af5f2676a8e6 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/option of type string errors if non null value is passed.js @@ -0,0 +1,9 @@ +--optionName hello 0.ts +CompilerOptions:: +{} +WatchOptions:: + +FileNames:: +0.ts +Errors:: +error TS6064: Option 'optionName' can only be specified in 'tsconfig.json' file or set to 'null' on command line. diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --excludeDirectories.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --excludeDirectories.js new file mode 100644 index 0000000000000..4c27ef1ace0e0 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --excludeDirectories.js @@ -0,0 +1,12 @@ +--excludeDirectories **/temp 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "excludeDirectories": [ + "**/temp" + ] +} +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --excludeFiles.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --excludeFiles.js new file mode 100644 index 0000000000000..0ec40cbf6a32b --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --excludeFiles.js @@ -0,0 +1,12 @@ +--excludeFiles **/temp/*.ts 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "excludeFiles": [ + "**/temp/*.ts" + ] +} +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --fallbackPolling.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --fallbackPolling.js new file mode 100644 index 0000000000000..3380894332710 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --fallbackPolling.js @@ -0,0 +1,10 @@ +--fallbackPolling PriorityInterval 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "fallbackPolling": 1 +} +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --incremental.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --incremental.js new file mode 100644 index 0000000000000..d2abf3408a1fc --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --incremental.js @@ -0,0 +1,10 @@ +--incremental 0.ts +CompilerOptions:: +{ + "incremental": true +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --synchronousWatchDirectory.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --synchronousWatchDirectory.js new file mode 100644 index 0000000000000..c8dbf2744c9a7 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --synchronousWatchDirectory.js @@ -0,0 +1,10 @@ +--synchronousWatchDirectory 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "synchronousWatchDirectory": true +} +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --tsBuildInfoFile.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --tsBuildInfoFile.js new file mode 100644 index 0000000000000..2abe1bcc152a9 --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --tsBuildInfoFile.js @@ -0,0 +1,10 @@ +--tsBuildInfoFile build.tsbuildinfo 0.ts +CompilerOptions:: +{ + "tsBuildInfoFile": "build.tsbuildinfo" +} +WatchOptions:: + +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --watchDirectory.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --watchDirectory.js new file mode 100644 index 0000000000000..f2ac41de85c1f --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --watchDirectory.js @@ -0,0 +1,10 @@ +--watchDirectory FixedPollingInterval 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "watchDirectory": 1 +} +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --watchFile.js b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --watchFile.js new file mode 100644 index 0000000000000..6869e6d47b0ce --- /dev/null +++ b/tests/baselines/reference/config/commandLineParsing/parseCommandLine/parse --watchFile.js @@ -0,0 +1,10 @@ +--watchFile UseFsEvents 0.ts +CompilerOptions:: +{} +WatchOptions:: +{ + "watchFile": 4 +} +FileNames:: +0.ts +Errors:: diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Default initialized TSConfig/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with --help/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with --help/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --help/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with --watch/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with --watch/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with --watch/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with advanced options/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with enum value compiler options/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with files options/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json similarity index 100% rename from tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json rename to tests/baselines/reference/config/initTSConfig/Initialized TSConfig with list compiler options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/config/showConfig/Default initialized TSConfig/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Default initialized TSConfig/tsconfig.json rename to tests/baselines/reference/config/showConfig/Default initialized TSConfig/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with advanced options/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with advanced options/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with advanced options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with boolean value compiler options/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with boolean value compiler options/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with boolean value compiler options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with compileOnSave and more/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with enum value compiler options/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with enum value compiler options/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with enum value compiler options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with files options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with files options/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with files options/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with files options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with incorrect compiler option value/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with incorrect compiler option value/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with incorrect compiler option value/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with incorrect compiler option/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with incorrect compiler option/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with incorrect compiler option/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with list compiler options with enum value/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with list compiler options with enum value/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with list compiler options with enum value/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with list compiler options/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with list compiler options/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with list compiler options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with paths and more/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with paths and more/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with paths and more/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Show TSConfig with watch options/tsconfig.json b/tests/baselines/reference/config/showConfig/Show TSConfig with watch options/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Show TSConfig with watch options/tsconfig.json rename to tests/baselines/reference/config/showConfig/Show TSConfig with watch options/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/all/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/all/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/all/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/all/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/allowJs/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowJs/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/allowJs/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowJs/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/allowSyntheticDefaultImports/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowSyntheticDefaultImports/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/allowSyntheticDefaultImports/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowSyntheticDefaultImports/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/allowUmdGlobalAccess/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowUmdGlobalAccess/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/allowUmdGlobalAccess/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowUmdGlobalAccess/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/allowUnreachableCode/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowUnreachableCode/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/allowUnreachableCode/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowUnreachableCode/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/allowUnusedLabels/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowUnusedLabels/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/allowUnusedLabels/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/allowUnusedLabels/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/alwaysStrict/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/alwaysStrict/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/alwaysStrict/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/alwaysStrict/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/assumeChangesOnlyAffectDirectDependencies/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/assumeChangesOnlyAffectDirectDependencies/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/assumeChangesOnlyAffectDirectDependencies/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/assumeChangesOnlyAffectDirectDependencies/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/baseUrl/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/baseUrl/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/baseUrl/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/baseUrl/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/build/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/build/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/build/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/build/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/charset/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/charset/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/charset/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/charset/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/checkJs/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/composite/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/composite/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/composite/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/composite/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/declaration/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/declaration/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/declaration/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/declaration/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/declarationDir/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/declarationDir/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/declarationDir/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/declarationDir/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/declarationMap/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/declarationMap/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/declarationMap/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/declarationMap/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/diagnostics/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/diagnostics/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/diagnostics/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/diagnostics/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/disableReferencedProjectLoad/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableReferencedProjectLoad/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/disableReferencedProjectLoad/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableReferencedProjectLoad/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/disableSizeLimit/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableSizeLimit/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/disableSizeLimit/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableSizeLimit/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/disableSolutionSearching/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableSolutionSearching/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/disableSolutionSearching/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableSolutionSearching/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/disableSourceOfProjectReferenceRedirect/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableSourceOfProjectReferenceRedirect/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/disableSourceOfProjectReferenceRedirect/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/disableSourceOfProjectReferenceRedirect/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/downlevelIteration/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/downlevelIteration/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/downlevelIteration/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/downlevelIteration/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/emitBOM/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/emitBOM/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/emitBOM/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/emitBOM/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/emitDeclarationOnly/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/emitDeclarationOnly/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/emitDeclarationOnly/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/emitDeclarationOnly/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/emitDecoratorMetadata/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/emitDecoratorMetadata/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/emitDecoratorMetadata/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/emitDecoratorMetadata/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/esModuleInterop/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/esModuleInterop/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/esModuleInterop/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/esModuleInterop/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/exactOptionalPropertyTypes/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/exactOptionalPropertyTypes/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/exactOptionalPropertyTypes/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/exactOptionalPropertyTypes/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/excludeDirectories/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/excludeDirectories/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/excludeDirectories/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/excludeDirectories/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/excludeFiles/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/excludeFiles/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/excludeFiles/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/excludeFiles/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/experimentalDecorators/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/experimentalDecorators/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/experimentalDecorators/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/experimentalDecorators/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/explainFiles/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/explainFiles/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/explainFiles/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/explainFiles/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/extendedDiagnostics/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/extendedDiagnostics/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/extendedDiagnostics/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/extendedDiagnostics/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/fallbackPolling/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/fallbackPolling/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/fallbackPolling/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/fallbackPolling/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/forceConsistentCasingInFileNames/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/forceConsistentCasingInFileNames/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/forceConsistentCasingInFileNames/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/forceConsistentCasingInFileNames/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/generateCpuProfile/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/generateCpuProfile/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/generateCpuProfile/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/generateCpuProfile/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/generateTrace/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/generateTrace/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/generateTrace/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/generateTrace/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/help/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/help/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/help/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/help/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/importHelpers/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/importHelpers/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/importHelpers/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/importHelpers/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/importsNotUsedAsValues/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/importsNotUsedAsValues/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/importsNotUsedAsValues/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/importsNotUsedAsValues/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/incremental/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/incremental/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/incremental/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/incremental/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/init/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/init/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/init/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/init/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/inlineSourceMap/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/inlineSourceMap/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/inlineSourceMap/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/inlineSourceMap/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/inlineSources/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/inlineSources/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/inlineSources/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/inlineSources/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedModules/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/jsx/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsx/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/jsx/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsx/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/jsxFactory/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsxFactory/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/jsxFactory/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsxFactory/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/jsxFragmentFactory/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsxFragmentFactory/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/jsxFragmentFactory/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsxFragmentFactory/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/jsxImportSource/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsxImportSource/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/jsxImportSource/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/jsxImportSource/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/keyofStringsOnly/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/keyofStringsOnly/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/keyofStringsOnly/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/keyofStringsOnly/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/lib/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/lib/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/lib/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/lib/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/listEmittedFiles/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/listEmittedFiles/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/listEmittedFiles/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/listEmittedFiles/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/listFiles/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/listFiles/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/listFiles/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/listFiles/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/listFilesOnly/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/listFilesOnly/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/listFilesOnly/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/listFilesOnly/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/locale/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/locale/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/locale/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/locale/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/mapRoot/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/mapRoot/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/mapRoot/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/mapRoot/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/maxNodeModuleJsDepth/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/maxNodeModuleJsDepth/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/maxNodeModuleJsDepth/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/maxNodeModuleJsDepth/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/module/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/module/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/module/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/module/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/moduleDetection/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/moduleDetection/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/moduleDetection/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/moduleDetection/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/moduleResolution/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/moduleResolution/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/moduleResolution/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/moduleResolution/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/moduleSuffixes/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/moduleSuffixes/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/moduleSuffixes/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/moduleSuffixes/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/newLine/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/newLine/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/newLine/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/newLine/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noEmit/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noEmit/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noEmit/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noEmit/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noEmitHelpers/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noEmitHelpers/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noEmitHelpers/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noEmitHelpers/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noEmitOnError/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noEmitOnError/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noEmitOnError/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noEmitOnError/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noErrorTruncation/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noErrorTruncation/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noErrorTruncation/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noErrorTruncation/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noFallthroughCasesInSwitch/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noFallthroughCasesInSwitch/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noFallthroughCasesInSwitch/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noFallthroughCasesInSwitch/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitAny/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitAny/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitAny/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitAny/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitOverride/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitOverride/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitOverride/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitOverride/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitReturns/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitReturns/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitReturns/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitReturns/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitThis/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitThis/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitThis/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitThis/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitUseStrict/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitUseStrict/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noImplicitUseStrict/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noImplicitUseStrict/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noLib/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noLib/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noLib/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noLib/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noPropertyAccessFromIndexSignature/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noPropertyAccessFromIndexSignature/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noPropertyAccessFromIndexSignature/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noPropertyAccessFromIndexSignature/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noResolve/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noResolve/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noResolve/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noResolve/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noStrictGenericChecks/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noStrictGenericChecks/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noStrictGenericChecks/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noStrictGenericChecks/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noUncheckedIndexedAccess/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noUncheckedIndexedAccess/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noUncheckedIndexedAccess/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noUncheckedIndexedAccess/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noUnusedLocals/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noUnusedLocals/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noUnusedLocals/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noUnusedLocals/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/noUnusedParameters/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noUnusedParameters/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/noUnusedParameters/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/noUnusedParameters/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/out/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/out/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/out/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/out/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/outDir/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/outDir/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/outDir/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/outDir/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/outFile/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/outFile/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/outFile/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/outFile/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/paths/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/paths/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/paths/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/paths/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/plugins/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/plugins/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/plugins/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/plugins/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveConstEnums/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveConstEnums/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveConstEnums/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveConstEnums/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveSymlinks/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveSymlinks/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveSymlinks/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveSymlinks/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveValueImports/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveValueImports/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveValueImports/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveValueImports/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveWatchOutput/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveWatchOutput/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/preserveWatchOutput/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/preserveWatchOutput/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/pretty/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/pretty/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/pretty/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/pretty/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/reactNamespace/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/reactNamespace/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/reactNamespace/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/reactNamespace/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/removeComments/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/removeComments/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/removeComments/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/removeComments/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/resolveJsonModule/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/resolveJsonModule/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/resolveJsonModule/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/resolveJsonModule/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/rootDir/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/rootDir/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/rootDir/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/rootDir/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/rootDirs/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/rootDirs/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/rootDirs/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/rootDirs/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/showConfig/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/showConfig/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/showConfig/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/showConfig/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/skipDefaultLibCheck/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/skipDefaultLibCheck/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/skipDefaultLibCheck/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/skipDefaultLibCheck/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/skipLibCheck/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/skipLibCheck/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/skipLibCheck/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/skipLibCheck/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/sourceMap/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/sourceMap/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/sourceMap/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/sourceMap/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/sourceRoot/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/sourceRoot/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/sourceRoot/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/sourceRoot/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/strict/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/strict/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strict/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/strictBindCallApply/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictBindCallApply/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/strictBindCallApply/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictBindCallApply/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/strictFunctionTypes/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictFunctionTypes/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/strictFunctionTypes/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictFunctionTypes/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/strictNullChecks/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictNullChecks/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/strictNullChecks/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictNullChecks/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/strictPropertyInitialization/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictPropertyInitialization/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/strictPropertyInitialization/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/strictPropertyInitialization/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/stripInternal/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/stripInternal/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/stripInternal/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/stripInternal/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/suppressExcessPropertyErrors/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/suppressExcessPropertyErrors/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/suppressExcessPropertyErrors/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/suppressExcessPropertyErrors/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/suppressImplicitAnyIndexErrors/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/suppressImplicitAnyIndexErrors/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/suppressImplicitAnyIndexErrors/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/suppressImplicitAnyIndexErrors/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/synchronousWatchDirectory/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/synchronousWatchDirectory/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/synchronousWatchDirectory/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/synchronousWatchDirectory/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/target/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/target/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/target/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/target/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/traceResolution/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/traceResolution/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/traceResolution/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/traceResolution/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/tsBuildInfoFile/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/tsBuildInfoFile/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/tsBuildInfoFile/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/tsBuildInfoFile/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/typeRoots/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/typeRoots/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/typeRoots/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/typeRoots/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/types/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/types/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/types/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/types/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/useUnknownInCatchVariables/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/useUnknownInCatchVariables/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/useUnknownInCatchVariables/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/useUnknownInCatchVariables/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/version/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/version/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/version/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/version/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/watch/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/watch/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/watch/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/watch/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/watchDirectory/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/watchDirectory/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/watchDirectory/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/watchDirectory/tsconfig.json diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/watchFile/tsconfig.json b/tests/baselines/reference/config/showConfig/Shows tsconfig for single option/watchFile/tsconfig.json similarity index 100% rename from tests/baselines/reference/showConfig/Shows tsconfig for single option/watchFile/tsconfig.json rename to tests/baselines/reference/config/showConfig/Shows tsconfig for single option/watchFile/tsconfig.json diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/different options with json api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/different options with json api.js new file mode 100644 index 0000000000000..127d065dcdb22 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/different options with json api.js @@ -0,0 +1,158 @@ +Input:: { + "watchOptions": { + "watchFile": "UseFsEvents" + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "watchFile": 4 +} +Result: Errors:: + +Input:: { + "watchOptions": { + "watchDirectory": "UseFsEvents" + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "watchDirectory": 0 +} +Result: Errors:: + +Input:: { + "watchOptions": { + "fallbackPolling": "DynamicPriority" + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "fallbackPolling": 2 +} +Result: Errors:: + +Input:: { + "watchOptions": { + "synchronousWatchDirectory": true + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "synchronousWatchDirectory": true +} +Result: Errors:: + +Input:: { + "watchOptions": { + "excludeDirectories": [ + "**/temp" + ] + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "excludeDirectories": [ + "/**/temp" + ] +} +Result: Errors:: + +Input:: { + "watchOptions": { + "excludeFiles": [ + "**/temp/*.ts" + ] + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "excludeFiles": [ + "/**/temp/*.ts" + ] +} +Result: Errors:: + +Input:: { + "watchOptions": { + "excludeDirectories": [ + "**/../*" + ] + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "excludeDirectories": [] +} +Result: Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. + +Input:: { + "watchOptions": { + "excludeFiles": [ + "**/../*" + ] + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "excludeFiles": [] +} +Result: Errors:: +error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. + +Input:: { + "watchOptions": { + "watchFactory": "somefactory" + }, + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: +error TS5078: Unknown watch option 'watchFactory'. + +Input:: { + "watchOptions": { + "watchFactory": { + "name": "somefactory", + "myconfig": "somethingelse" + } + }, + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: +error TS5078: Unknown watch option 'watchFactory'. + +Input:: { + "watchOptions": { + "watchFactory": "somefactory/../malicious" + }, + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: +error TS5078: Unknown watch option 'watchFactory'. + +Input:: { + "watchOptions": { + "watchFactory": { + "name": "somefactory/../malicious" + } + }, + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: +error TS5078: Unknown watch option 'watchFactory'. diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/different options with jsonSourceFile api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/different options with jsonSourceFile api.js new file mode 100644 index 0000000000000..eccd6f014aae1 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/different options with jsonSourceFile api.js @@ -0,0 +1,164 @@ +Input:: { + "watchOptions": { + "watchFile": "UseFsEvents" + } +} +Result: WatchOptions:: +{ + "watchFile": 4 +} +Result: Errors:: + +Input:: { + "watchOptions": { + "watchDirectory": "UseFsEvents" + } +} +Result: WatchOptions:: +{ + "watchDirectory": 0 +} +Result: Errors:: + +Input:: { + "watchOptions": { + "fallbackPolling": "DynamicPriority" + } +} +Result: WatchOptions:: +{ + "fallbackPolling": 2 +} +Result: Errors:: + +Input:: { + "watchOptions": { + "synchronousWatchDirectory": true + } +} +Result: WatchOptions:: +{ + "synchronousWatchDirectory": true +} +Result: Errors:: + +Input:: { + "watchOptions": { + "excludeDirectories": [ + "**/temp" + ] + } +} +Result: WatchOptions:: +{ + "excludeDirectories": [ + "/**/temp" + ] +} +Result: Errors:: + +Input:: { + "watchOptions": { + "excludeFiles": [ + "**/temp/*.ts" + ] + } +} +Result: WatchOptions:: +{ + "excludeFiles": [ + "/**/temp/*.ts" + ] +} +Result: Errors:: + +Input:: { + "watchOptions": { + "excludeDirectories": [ + "**/../*" + ] + } +} +Result: WatchOptions:: +{ + "excludeDirectories": [] +} +Result: Errors:: +tsconfig.json:1:40 - error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. + +1 {"watchOptions":{"excludeDirectories":["**/../*"]}} +   ~~~~~~~~~ + +Input:: { + "watchOptions": { + "excludeFiles": [ + "**/../*" + ] + } +} +Result: WatchOptions:: +{ + "excludeFiles": [] +} +Result: Errors:: +tsconfig.json:1:34 - error TS5065: File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '**/../*'. + +1 {"watchOptions":{"excludeFiles":["**/../*"]}} +   ~~~~~~~~~ + +Input:: { + "watchOptions": { + "watchFactory": "somefactory" + } +} +Result: WatchOptions:: + +Result: Errors:: +tsconfig.json:1:18 - error TS5078: Unknown watch option 'watchFactory'. + +1 {"watchOptions":{"watchFactory":"somefactory"}} +   ~~~~~~~~~~~~~~ + +Input:: { + "watchOptions": { + "watchFactory": { + "name": "somefactory", + "myconfig": "somethingelse" + } + } +} +Result: WatchOptions:: + +Result: Errors:: +tsconfig.json:1:18 - error TS5078: Unknown watch option 'watchFactory'. + +1 {"watchOptions":{"watchFactory":{"name":"somefactory","myconfig":"somethingelse"}}} +   ~~~~~~~~~~~~~~ + +Input:: { + "watchOptions": { + "watchFactory": "somefactory/../malicious" + } +} +Result: WatchOptions:: + +Result: Errors:: +tsconfig.json:1:18 - error TS5078: Unknown watch option 'watchFactory'. + +1 {"watchOptions":{"watchFactory":"somefactory/../malicious"}} +   ~~~~~~~~~~~~~~ + +Input:: { + "watchOptions": { + "watchFactory": { + "name": "somefactory/../malicious" + } + } +} +Result: WatchOptions:: + +Result: Errors:: +tsconfig.json:1:18 - error TS5078: Unknown watch option 'watchFactory'. + +1 {"watchOptions":{"watchFactory":{"name":"somefactory/../malicious"}}} +   ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/empty watchOptions specified option with json api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/empty watchOptions specified option with json api.js new file mode 100644 index 0000000000000..2087b9e744a7c --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/empty watchOptions specified option with json api.js @@ -0,0 +1,7 @@ +Input:: { + "watchOptions": {}, + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/empty watchOptions specified option with jsonSourceFile api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/empty watchOptions specified option with jsonSourceFile api.js new file mode 100644 index 0000000000000..a25c30df65e04 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/empty watchOptions specified option with jsonSourceFile api.js @@ -0,0 +1,6 @@ +Input:: { + "watchOptions": {} +} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/no watchOptions specified option with json api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/no watchOptions specified option with json api.js new file mode 100644 index 0000000000000..b37ccbed5fdb3 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/no watchOptions specified option with json api.js @@ -0,0 +1,6 @@ +Input:: { + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/no watchOptions specified option with jsonSourceFile api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/no watchOptions specified option with jsonSourceFile api.js new file mode 100644 index 0000000000000..4c0e952e8eaa9 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/no watchOptions specified option with jsonSourceFile api.js @@ -0,0 +1,4 @@ +Input:: {} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/watch options extending passed in watch options with json api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/watch options extending passed in watch options with json api.js new file mode 100644 index 0000000000000..8d535837e9f48 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/watch options extending passed in watch options with json api.js @@ -0,0 +1,18 @@ +Input:: { + "watchOptions": { + "watchFile": "UseFsEvents" + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "watchFile": 4 +} +Result: Errors:: + +Input:: { + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/watch options extending passed in watch options with jsonSourceFile api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/watch options extending passed in watch options with jsonSourceFile api.js new file mode 100644 index 0000000000000..3cef381ecb232 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/watch options extending passed in watch options with jsonSourceFile api.js @@ -0,0 +1,15 @@ +Input:: { + "watchOptions": { + "watchFile": "UseFsEvents" + } +} +Result: WatchOptions:: +{ + "watchFile": 4 +} +Result: Errors:: + +Input:: {} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file with watchOptions with json api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file with watchOptions with json api.js new file mode 100644 index 0000000000000..919753d60dbf5 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file with watchOptions with json api.js @@ -0,0 +1,24 @@ +Input:: { + "extends": "./base.json", + "watchOptions": { + "watchFile": "UseFsEvents" + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "watchFile": 4, + "watchDirectory": 1 +} +Result: Errors:: + +Input:: { + "extends": "./base.json", + "compileOnSave": false +} +Result: WatchOptions:: +{ + "watchFile": 5, + "watchDirectory": 1 +} +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file with watchOptions with jsonSourceFile api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file with watchOptions with jsonSourceFile api.js new file mode 100644 index 0000000000000..9e02dd5173914 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file with watchOptions with jsonSourceFile api.js @@ -0,0 +1,22 @@ +Input:: { + "extends": "./base.json", + "watchOptions": { + "watchFile": "UseFsEvents" + } +} +Result: WatchOptions:: +{ + "watchFile": 4, + "watchDirectory": 1 +} +Result: Errors:: + +Input:: { + "extends": "./base.json" +} +Result: WatchOptions:: +{ + "watchFile": 5, + "watchDirectory": 1 +} +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file without watchOptions with json api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file without watchOptions with json api.js new file mode 100644 index 0000000000000..2414081976400 --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file without watchOptions with json api.js @@ -0,0 +1,20 @@ +Input:: { + "extends": "./base.json", + "watchOptions": { + "watchFile": "UseFsEvents" + }, + "compileOnSave": false +} +Result: WatchOptions:: +{ + "watchFile": 4 +} +Result: Errors:: + +Input:: { + "extends": "./base.json", + "compileOnSave": false +} +Result: WatchOptions:: + +Result: Errors:: diff --git a/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file without watchOptions with jsonSourceFile api.js b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file without watchOptions with jsonSourceFile api.js new file mode 100644 index 0000000000000..476bc99e4d83f --- /dev/null +++ b/tests/baselines/reference/config/tsconfigParsingWatchOptions/when extending config file without watchOptions with jsonSourceFile api.js @@ -0,0 +1,18 @@ +Input:: { + "extends": "./base.json", + "watchOptions": { + "watchFile": "UseFsEvents" + } +} +Result: WatchOptions:: +{ + "watchFile": 4 +} +Result: Errors:: + +Input:: { + "extends": "./base.json" +} +Result: WatchOptions:: + +Result: Errors::