While writing tsbuildinfo sort the properties of compiler options to make sure they stay same if nothing changes. (#43601)

Fixes #43571
This commit is contained in:
Sheetal Nandi
2021-04-08 16:32:09 -07:00
committed by GitHub
parent 970554733a
commit 75e9c94e50
178 changed files with 2180 additions and 2182 deletions

View File

@@ -828,14 +828,12 @@ namespace ts {
const result: CompilerOptions = {};
const { optionsNameMap } = getOptionsNameMap();
for (const name in options) {
if (hasProperty(options, name)) {
result[name] = convertToReusableCompilerOptionValue(
optionsNameMap.get(name.toLowerCase()),
options[name] as CompilerOptionsValue,
relativeToBuildInfo
);
}
for (const name of getOwnKeys(options).sort(compareStringsCaseSensitive)) {
result[name] = convertToReusableCompilerOptionValue(
optionsNameMap.get(name.toLowerCase()),
options[name] as CompilerOptionsValue,
relativeToBuildInfo
);
}
if (result.configFilePath) {
result.configFilePath = relativeToBuildInfo(result.configFilePath);