@typescript-deploys/pr-build 6.0.0-pr-62418-27 → 6.0.0-pr-62789-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_tsc.js +30 -46
- package/lib/typescript.js +30 -49
- package/package.json +1 -1
package/lib/_tsc.js
CHANGED
|
@@ -6241,6 +6241,7 @@ var Diagnostics = {
|
|
|
6241
6241
|
await_using_declarations_are_not_allowed_in_ambient_contexts: diag(1546, 1 /* Error */, "await_using_declarations_are_not_allowed_in_ambient_contexts_1546", "'await using' declarations are not allowed in ambient contexts."),
|
|
6242
6242
|
using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1547, 1 /* Error */, "using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1547", "'using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
6243
6243
|
await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1548, 1 /* Error */, "await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548", "'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
6244
|
+
Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files: diag(1549, 3 /* Message */, "Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files_1549", "Ignore the tsconfig found and build with commandline options and files."),
|
|
6244
6245
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
6245
6246
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
6246
6247
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -6936,7 +6937,6 @@ var Diagnostics = {
|
|
|
6936
6937
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6937
6938
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6938
6939
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
6939
|
-
The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
|
|
6940
6940
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
6941
6941
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
6942
6942
|
Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
|
|
@@ -7001,6 +7001,7 @@ var Diagnostics = {
|
|
|
7001
7001
|
Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
|
|
7002
7002
|
Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
|
|
7003
7003
|
Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information: diag(5111, 3 /* Message */, "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111", "Visit https://aka.ms/ts6 for migration information."),
|
|
7004
|
+
tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error: diag(5112, 1 /* Error */, "tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConf_5112", "tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error."),
|
|
7004
7005
|
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
|
7005
7006
|
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
|
7006
7007
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -16587,7 +16588,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
16587
16588
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
16588
16589
|
if (options.outFile) return true;
|
|
16589
16590
|
if (!options.outDir) return false;
|
|
16590
|
-
if (options.rootDir || options.configFilePath) {
|
|
16591
|
+
if (options.rootDir || options.composite && options.configFilePath) {
|
|
16591
16592
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
16592
16593
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
16593
16594
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -36863,6 +36864,15 @@ var commandOptionsWithoutBuild = [
|
|
|
36863
36864
|
description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
36864
36865
|
defaultValueDescription: false
|
|
36865
36866
|
},
|
|
36867
|
+
{
|
|
36868
|
+
name: "ignoreConfig",
|
|
36869
|
+
type: "boolean",
|
|
36870
|
+
showInSimplifiedHelpView: true,
|
|
36871
|
+
category: Diagnostics.Command_line_Options,
|
|
36872
|
+
isCommandLineOnly: true,
|
|
36873
|
+
description: Diagnostics.Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files,
|
|
36874
|
+
defaultValueDescription: false
|
|
36875
|
+
},
|
|
36866
36876
|
// Basic
|
|
36867
36877
|
targetOptionDeclaration,
|
|
36868
36878
|
moduleOptionDeclaration,
|
|
@@ -41723,7 +41733,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
41723
41733
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
41724
41734
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
41725
41735
|
const commonSourceDirGuesses = [];
|
|
41726
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
41736
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
41727
41737
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
41728
41738
|
commonSourceDirGuesses.push(commonDir);
|
|
41729
41739
|
} else if (state.requestContainingDirectory) {
|
|
@@ -79799,7 +79809,8 @@ function createTypeChecker(host) {
|
|
|
79799
79809
|
}
|
|
79800
79810
|
}
|
|
79801
79811
|
function isNotWithinNullishCoalesceExpression(node) {
|
|
79802
|
-
|
|
79812
|
+
const parent = walkUpOuterExpressions(node);
|
|
79813
|
+
return !isBinaryExpression(parent) || parent.operatorToken.kind !== 61 /* QuestionQuestionToken */;
|
|
79803
79814
|
}
|
|
79804
79815
|
function getSyntacticNullishnessSemantics(node) {
|
|
79805
79816
|
node = skipOuterExpressions(node);
|
|
@@ -115959,7 +115970,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115959
115970
|
if (options.rootDir) {
|
|
115960
115971
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
115961
115972
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
115962
|
-
} else if (options.configFilePath) {
|
|
115973
|
+
} else if (options.composite && options.configFilePath) {
|
|
115963
115974
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
115964
115975
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
115965
115976
|
} else {
|
|
@@ -115970,13 +115981,6 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
115970
115981
|
}
|
|
115971
115982
|
return commonSourceDirectory;
|
|
115972
115983
|
}
|
|
115973
|
-
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
115974
|
-
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
115975
|
-
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
115976
|
-
commonSourceDirectory += directorySeparator;
|
|
115977
|
-
}
|
|
115978
|
-
return commonSourceDirectory;
|
|
115979
|
-
}
|
|
115980
115984
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
115981
115985
|
return getCommonSourceDirectory(
|
|
115982
115986
|
options,
|
|
@@ -124409,31 +124413,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
124409
124413
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
124410
124414
|
}
|
|
124411
124415
|
}
|
|
124412
|
-
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
124413
|
-
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
124414
|
-
options.outFile)) {
|
|
124415
|
-
const dir = getCommonSourceDirectory2();
|
|
124416
|
-
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
124417
|
-
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
124418
|
-
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
124419
|
-
createDiagnosticForOption(
|
|
124420
|
-
/*onKey*/
|
|
124421
|
-
true,
|
|
124422
|
-
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
124423
|
-
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
124424
|
-
chainDiagnosticMessages(
|
|
124425
|
-
chainDiagnosticMessages(
|
|
124426
|
-
/*details*/
|
|
124427
|
-
void 0,
|
|
124428
|
-
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
124429
|
-
),
|
|
124430
|
-
Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
|
|
124431
|
-
getBaseFileName(options.configFilePath),
|
|
124432
|
-
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
124433
|
-
)
|
|
124434
|
-
);
|
|
124435
|
-
}
|
|
124436
|
-
}
|
|
124437
124416
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
124438
124417
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
124439
124418
|
}
|
|
@@ -132088,18 +132067,23 @@ function executeCommandLineWorker(sys2, cb, commandLine) {
|
|
|
132088
132067
|
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132089
132068
|
}
|
|
132090
132069
|
}
|
|
132091
|
-
} else if (commandLine.fileNames.length === 0) {
|
|
132070
|
+
} else if (!commandLine.options.ignoreConfig || commandLine.fileNames.length === 0) {
|
|
132092
132071
|
const searchPath = normalizePath(sys2.getCurrentDirectory());
|
|
132093
132072
|
configFileName = findConfigFile(searchPath, (fileName) => sys2.fileExists(fileName));
|
|
132094
|
-
|
|
132095
|
-
|
|
132096
|
-
|
|
132097
|
-
|
|
132098
|
-
|
|
132099
|
-
|
|
132100
|
-
|
|
132073
|
+
if (commandLine.fileNames.length !== 0) {
|
|
132074
|
+
if (configFileName) {
|
|
132075
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error));
|
|
132076
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132077
|
+
}
|
|
132078
|
+
} else if (!configFileName) {
|
|
132079
|
+
if (commandLine.options.showConfig) {
|
|
132080
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, normalizePath(sys2.getCurrentDirectory())));
|
|
132081
|
+
} else {
|
|
132082
|
+
printVersion(sys2);
|
|
132083
|
+
printHelp(sys2, commandLine);
|
|
132084
|
+
}
|
|
132085
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132101
132086
|
}
|
|
132102
|
-
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
132103
132087
|
}
|
|
132104
132088
|
const currentDirectory = sys2.getCurrentDirectory();
|
|
132105
132089
|
const commandLineOptions = convertToOptionsWithAbsolutePaths(
|
package/lib/typescript.js
CHANGED
|
@@ -673,7 +673,6 @@ __export(typescript_exports, {
|
|
|
673
673
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
674
674
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
675
675
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
676
|
-
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
677
676
|
getConditions: () => getConditions,
|
|
678
677
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
679
678
|
getConstantValue: () => getConstantValue,
|
|
@@ -9643,6 +9642,7 @@ var Diagnostics = {
|
|
|
9643
9642
|
await_using_declarations_are_not_allowed_in_ambient_contexts: diag(1546, 1 /* Error */, "await_using_declarations_are_not_allowed_in_ambient_contexts_1546", "'await using' declarations are not allowed in ambient contexts."),
|
|
9644
9643
|
using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1547, 1 /* Error */, "using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1547", "'using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
9645
9644
|
await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block: diag(1548, 1 /* Error */, "await_using_declarations_are_not_allowed_in_case_or_default_clauses_unless_contained_within_a_block_1548", "'await using' declarations are not allowed in 'case' or 'default' clauses unless contained within a block."),
|
|
9645
|
+
Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files: diag(1549, 3 /* Message */, "Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files_1549", "Ignore the tsconfig found and build with commandline options and files."),
|
|
9646
9646
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
9647
9647
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
9648
9648
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -10338,7 +10338,6 @@ var Diagnostics = {
|
|
|
10338
10338
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
10339
10339
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
10340
10340
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
10341
|
-
The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout: diag(5011, 1 /* Error */, "The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another__5011", "The common source directory of '{0}' is '{1}'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout."),
|
|
10342
10341
|
Cannot_read_file_0_Colon_1: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."),
|
|
10343
10342
|
Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."),
|
|
10344
10343
|
Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* Error */, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."),
|
|
@@ -10403,6 +10402,7 @@ var Diagnostics = {
|
|
|
10403
10402
|
Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),
|
|
10404
10403
|
Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),
|
|
10405
10404
|
Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information: diag(5111, 3 /* Message */, "Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information_5111", "Visit https://aka.ms/ts6 for migration information."),
|
|
10405
|
+
tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error: diag(5112, 1 /* Error */, "tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConf_5112", "tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error."),
|
|
10406
10406
|
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
|
10407
10407
|
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
|
10408
10408
|
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
|
@@ -20415,7 +20415,7 @@ function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) {
|
|
|
20415
20415
|
if (host.getRedirectFromSourceFile(sourceFile.fileName)) return false;
|
|
20416
20416
|
if (options.outFile) return true;
|
|
20417
20417
|
if (!options.outDir) return false;
|
|
20418
|
-
if (options.rootDir || options.configFilePath) {
|
|
20418
|
+
if (options.rootDir || options.composite && options.configFilePath) {
|
|
20419
20419
|
const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory());
|
|
20420
20420
|
const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName);
|
|
20421
20421
|
if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) return false;
|
|
@@ -41142,6 +41142,15 @@ var commandOptionsWithoutBuild = [
|
|
|
41142
41142
|
description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
41143
41143
|
defaultValueDescription: false
|
|
41144
41144
|
},
|
|
41145
|
+
{
|
|
41146
|
+
name: "ignoreConfig",
|
|
41147
|
+
type: "boolean",
|
|
41148
|
+
showInSimplifiedHelpView: true,
|
|
41149
|
+
category: Diagnostics.Command_line_Options,
|
|
41150
|
+
isCommandLineOnly: true,
|
|
41151
|
+
description: Diagnostics.Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files,
|
|
41152
|
+
defaultValueDescription: false
|
|
41153
|
+
},
|
|
41145
41154
|
// Basic
|
|
41146
41155
|
targetOptionDeclaration,
|
|
41147
41156
|
moduleOptionDeclaration,
|
|
@@ -46234,7 +46243,7 @@ function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirec
|
|
|
46234
46243
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) {
|
|
46235
46244
|
const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) });
|
|
46236
46245
|
const commonSourceDirGuesses = [];
|
|
46237
|
-
if (state.compilerOptions.rootDir || state.compilerOptions.configFilePath) {
|
|
46246
|
+
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
46238
46247
|
const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
46239
46248
|
commonSourceDirGuesses.push(commonDir);
|
|
46240
46249
|
} else if (state.requestContainingDirectory) {
|
|
@@ -84428,7 +84437,8 @@ function createTypeChecker(host) {
|
|
|
84428
84437
|
}
|
|
84429
84438
|
}
|
|
84430
84439
|
function isNotWithinNullishCoalesceExpression(node) {
|
|
84431
|
-
|
|
84440
|
+
const parent2 = walkUpOuterExpressions(node);
|
|
84441
|
+
return !isBinaryExpression(parent2) || parent2.operatorToken.kind !== 61 /* QuestionQuestionToken */;
|
|
84432
84442
|
}
|
|
84433
84443
|
function getSyntacticNullishnessSemantics(node) {
|
|
84434
84444
|
node = skipOuterExpressions(node);
|
|
@@ -120770,7 +120780,7 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120770
120780
|
if (options.rootDir) {
|
|
120771
120781
|
commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory);
|
|
120772
120782
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir);
|
|
120773
|
-
} else if (options.configFilePath) {
|
|
120783
|
+
} else if (options.composite && options.configFilePath) {
|
|
120774
120784
|
commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath));
|
|
120775
120785
|
checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory);
|
|
120776
120786
|
} else {
|
|
@@ -120781,13 +120791,6 @@ function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCa
|
|
|
120781
120791
|
}
|
|
120782
120792
|
return commonSourceDirectory;
|
|
120783
120793
|
}
|
|
120784
|
-
function getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName) {
|
|
120785
|
-
let commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
120786
|
-
if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) {
|
|
120787
|
-
commonSourceDirectory += directorySeparator;
|
|
120788
|
-
}
|
|
120789
|
-
return commonSourceDirectory;
|
|
120790
|
-
}
|
|
120791
120794
|
function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) {
|
|
120792
120795
|
return getCommonSourceDirectory(
|
|
120793
120796
|
options,
|
|
@@ -129277,31 +129280,6 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
|
|
|
129277
129280
|
createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir");
|
|
129278
129281
|
}
|
|
129279
129282
|
}
|
|
129280
|
-
if (!options.noEmit && !options.composite && !options.rootDir && options.configFilePath && (options.outDir || // there is --outDir specified
|
|
129281
|
-
getEmitDeclarations(options) && options.declarationDir || // there is --declarationDir specified
|
|
129282
|
-
options.outFile)) {
|
|
129283
|
-
const dir = getCommonSourceDirectory2();
|
|
129284
|
-
const emittedFiles = mapDefined(files, (file) => !file.isDeclarationFile && sourceFileMayBeEmitted(file, program) ? file.fileName : void 0);
|
|
129285
|
-
const dir59 = getComputedCommonSourceDirectory(emittedFiles, currentDirectory, getCanonicalFileName);
|
|
129286
|
-
if (dir59 !== "" && getCanonicalFileName(dir) !== getCanonicalFileName(dir59)) {
|
|
129287
|
-
createDiagnosticForOption(
|
|
129288
|
-
/*onKey*/
|
|
129289
|
-
true,
|
|
129290
|
-
options.outFile ? "outFile" : options.outDir ? "outDir" : "declarationDir",
|
|
129291
|
-
!options.outFile && options.outDir ? "declarationDir" : void 0,
|
|
129292
|
-
chainDiagnosticMessages(
|
|
129293
|
-
chainDiagnosticMessages(
|
|
129294
|
-
/*details*/
|
|
129295
|
-
void 0,
|
|
129296
|
-
Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information
|
|
129297
|
-
),
|
|
129298
|
-
Diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
|
|
129299
|
-
getBaseFileName(options.configFilePath),
|
|
129300
|
-
getRelativePathFromFile(options.configFilePath, dir59, getCanonicalFileName)
|
|
129301
|
-
)
|
|
129302
|
-
);
|
|
129303
|
-
}
|
|
129304
|
-
}
|
|
129305
129283
|
if (options.checkJs && !getAllowJSCompilerOption(options)) {
|
|
129306
129284
|
createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs");
|
|
129307
129285
|
}
|
|
@@ -137074,18 +137052,23 @@ function executeCommandLineWorker(sys2, cb, commandLine) {
|
|
|
137074
137052
|
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137075
137053
|
}
|
|
137076
137054
|
}
|
|
137077
|
-
} else if (commandLine.fileNames.length === 0) {
|
|
137055
|
+
} else if (!commandLine.options.ignoreConfig || commandLine.fileNames.length === 0) {
|
|
137078
137056
|
const searchPath = normalizePath(sys2.getCurrentDirectory());
|
|
137079
137057
|
configFileName = findConfigFile(searchPath, (fileName) => sys2.fileExists(fileName));
|
|
137080
|
-
|
|
137081
|
-
|
|
137082
|
-
|
|
137083
|
-
|
|
137084
|
-
|
|
137085
|
-
|
|
137086
|
-
|
|
137058
|
+
if (commandLine.fileNames.length !== 0) {
|
|
137059
|
+
if (configFileName) {
|
|
137060
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error));
|
|
137061
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137062
|
+
}
|
|
137063
|
+
} else if (!configFileName) {
|
|
137064
|
+
if (commandLine.options.showConfig) {
|
|
137065
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, normalizePath(sys2.getCurrentDirectory())));
|
|
137066
|
+
} else {
|
|
137067
|
+
printVersion(sys2);
|
|
137068
|
+
printHelp(sys2, commandLine);
|
|
137069
|
+
}
|
|
137070
|
+
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137087
137071
|
}
|
|
137088
|
-
return sys2.exit(1 /* DiagnosticsPresent_OutputsSkipped */);
|
|
137089
137072
|
}
|
|
137090
137073
|
const currentDirectory = sys2.getCurrentDirectory();
|
|
137091
137074
|
const commandLineOptions = convertToOptionsWithAbsolutePaths(
|
|
@@ -184045,7 +184028,6 @@ __export(ts_exports2, {
|
|
|
184045
184028
|
getCommonSourceDirectory: () => getCommonSourceDirectory,
|
|
184046
184029
|
getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig,
|
|
184047
184030
|
getCompilerOptionValue: () => getCompilerOptionValue,
|
|
184048
|
-
getComputedCommonSourceDirectory: () => getComputedCommonSourceDirectory,
|
|
184049
184031
|
getConditions: () => getConditions,
|
|
184050
184032
|
getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics,
|
|
184051
184033
|
getConstantValue: () => getConstantValue,
|
|
@@ -198808,7 +198790,6 @@ if (typeof console !== "undefined") {
|
|
|
198808
198790
|
getCommonSourceDirectory,
|
|
198809
198791
|
getCommonSourceDirectoryOfConfig,
|
|
198810
198792
|
getCompilerOptionValue,
|
|
198811
|
-
getComputedCommonSourceDirectory,
|
|
198812
198793
|
getConditions,
|
|
198813
198794
|
getConfigFileParsingDiagnostics,
|
|
198814
198795
|
getConstantValue,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "6.0.0-pr-
|
|
5
|
+
"version": "6.0.0-pr-62789-2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|