Fix incremental building failure when package with sourceRoots changes version

Issue: Fix incremental building failure when package with sourceRoots changes version
Test: npm run test, application test

Signed-off-by: huangyu <huangyu76@huawei.com>
Change-Id: I9be40caacf90eddeb942226d61ab4644bb7c95d7
This commit is contained in:
huangyu 2024-06-26 16:44:23 +08:00
parent 7441519282
commit e0fe905754
11 changed files with 27 additions and 0 deletions

View File

@ -142190,6 +142190,10 @@ var ts;
return str + "}";
}
function getKeyForCompilationSettings(settings) {
if (settings.skipPathsInKeyForCompilationSettings) {
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return (option.name !== "paths" ? compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)) : "paths"); }).join("|") +
(settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)); }).join("|") + (settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
function getDocumentRegistryBucketKeyWithMode(key, mode) {

View File

@ -3169,6 +3169,7 @@ declare namespace ts {
emitNodeModulesFiles?: boolean;
etsLoaderPath?: string;
tsImportSendableEnable?: boolean;
skipPathsInKeyForCompilationSettings?: boolean;
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
}
export interface EtsOptions {

View File

@ -142609,6 +142609,10 @@ var ts;
return str + "}";
}
function getKeyForCompilationSettings(settings) {
if (settings.skipPathsInKeyForCompilationSettings) {
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return (option.name !== "paths" ? compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)) : "paths"); }).join("|") +
(settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)); }).join("|") + (settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
function getDocumentRegistryBucketKeyWithMode(key, mode) {

1
lib/typescript.d.ts vendored
View File

@ -3169,6 +3169,7 @@ declare namespace ts {
emitNodeModulesFiles?: boolean;
etsLoaderPath?: string;
tsImportSendableEnable?: boolean;
skipPathsInKeyForCompilationSettings?: boolean;
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
}
export interface EtsOptions {

View File

@ -142600,6 +142600,10 @@ var ts;
return str + "}";
}
function getKeyForCompilationSettings(settings) {
if (settings.skipPathsInKeyForCompilationSettings) {
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return (option.name !== "paths" ? compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)) : "paths"); }).join("|") +
(settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)); }).join("|") + (settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
function getDocumentRegistryBucketKeyWithMode(key, mode) {

View File

@ -3169,6 +3169,7 @@ declare namespace ts {
emitNodeModulesFiles?: boolean;
etsLoaderPath?: string;
tsImportSendableEnable?: boolean;
skipPathsInKeyForCompilationSettings?: boolean;
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
}
export interface EtsOptions {

View File

@ -142600,6 +142600,10 @@ var ts;
return str + "}";
}
function getKeyForCompilationSettings(settings) {
if (settings.skipPathsInKeyForCompilationSettings) {
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return (option.name !== "paths" ? compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)) : "paths"); }).join("|") +
(settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
return ts.sourceFileAffectingCompilerOptions.map(function (option) { return compilerOptionValueToString(ts.getCompilerOptionValue(settings, option)); }).join("|") + (settings.pathsBasePath ? "|".concat(settings.pathsBasePath) : undefined);
}
function getDocumentRegistryBucketKeyWithMode(key, mode) {

View File

@ -6751,6 +6751,7 @@ namespace ts {
emitNodeModulesFiles?: boolean;
etsLoaderPath?: string;
tsImportSendableEnable?: boolean;
skipPathsInKeyForCompilationSettings?: boolean;
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
}

View File

@ -391,6 +391,11 @@ namespace ts {
}
function getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey {
if (settings.skipPathsInKeyForCompilationSettings) {
return sourceFileAffectingCompilerOptions.map(
option => (option.name !== "paths" ? compilerOptionValueToString(getCompilerOptionValue(settings, option)) : "paths")).join("|") +
(settings.pathsBasePath ? `|${settings.pathsBasePath}` : undefined) as DocumentRegistryBucketKey;
}
return sourceFileAffectingCompilerOptions.map(option => compilerOptionValueToString(getCompilerOptionValue(settings, option))).join("|") + (settings.pathsBasePath ? `|${settings.pathsBasePath}` : undefined) as DocumentRegistryBucketKey;
}

View File

@ -3169,6 +3169,7 @@ declare namespace ts {
emitNodeModulesFiles?: boolean;
etsLoaderPath?: string;
tsImportSendableEnable?: boolean;
skipPathsInKeyForCompilationSettings?: boolean;
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
}
export interface EtsOptions {

View File

@ -3169,6 +3169,7 @@ declare namespace ts {
emitNodeModulesFiles?: boolean;
etsLoaderPath?: string;
tsImportSendableEnable?: boolean;
skipPathsInKeyForCompilationSettings?: boolean;
[option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
}
export interface EtsOptions {