resolve the differences from the blue and yellow zones

Issue: https://gitee.com/openharmony/third_party_typescript/issues/IAEPHM

Signed-off-by: liyancheng2 <liyancheng2@huawei.com>
Change-Id: Ib61d29bb1204fbb542d73a75d63cda86517fb166
This commit is contained in:
liyancheng2 2024-07-22 16:19:32 +08:00
parent 4428af7cc3
commit 7774bcdb9a
10 changed files with 15 additions and 12 deletions

View File

@ -24,7 +24,7 @@ def run_cmd(cmd, execution_path=None):
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=execution_path)
stdout, stderr = proc.communicate()
stdout, stderr = proc.communicate(timeout=120)
if proc.returncode != 0:
print(stdout.decode(), stderr.decode())
raise Exception(stderr.decode())

View File

@ -98136,7 +98136,7 @@ var ts;
function emitSourceFile(node) {
writeLine();
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
var statements = node.statements;
var shouldEmitDetachedComment = statements.length === 0 ||

View File

@ -118504,7 +118504,7 @@ var ts;
writeLine();
// @ts-ignore
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
var statements = node.statements;
// Emit detached comment if there are no prologue directives or if the first node is synthesized.

View File

@ -118503,7 +118503,7 @@ var ts;
writeLine();
// @ts-ignore
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
var statements = node.statements;
// Emit detached comment if there are no prologue directives or if the first node is synthesized.

View File

@ -118494,7 +118494,7 @@ var ts;
writeLine();
// @ts-ignore
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
var statements = node.statements;
// Emit detached comment if there are no prologue directives or if the first node is synthesized.

View File

@ -118494,7 +118494,7 @@ var ts;
writeLine();
// @ts-ignore
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
var statements = node.statements;
// Emit detached comment if there are no prologue directives or if the first node is synthesized.

View File

@ -118484,7 +118484,7 @@ var ts;
writeLine();
// @ts-ignore
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
var statements = node.statements;
// Emit detached comment if there are no prologue directives or if the first node is synthesized.

View File

@ -30457,7 +30457,7 @@ namespace ts {
}
if (isConstEnumObjectType(objectType)) {
checkConstEnumRelate(node, objectType.symbol)
checkConstEnumRelate(node, objectType.symbol);
}
const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;

View File

@ -4031,7 +4031,7 @@ namespace ts {
writeLine();
// @ts-ignore
if (node.writeTsHarComments) {
writeComment("// @keepTs\n// @ts-nocheck\n");
writeComment('// @keepTs\n// @ts-nocheck\n');
}
const statements = node.statements;
// Emit detached comment if there are no prologue directives or if the first node is synthesized.

View File

@ -2218,14 +2218,17 @@ namespace ts {
);
}
function getBindAndCheckDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined, isForLinter: boolean = false): readonly Diagnostic[] {
function getBindAndCheckDiagnosticsForFile(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined,
isForLinter: boolean = false): readonly Diagnostic[] {
if (!isForLinter) {
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache);
}
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFileForLinter, getBindAndCheckDiagnosticsForFileNoCache, true);
return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFileForLinter,
getBindAndCheckDiagnosticsForFileNoCache, true);
}
function getBindAndCheckDiagnosticsForFileNoCache(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined, isForLinter: boolean = false): readonly Diagnostic[] {
function getBindAndCheckDiagnosticsForFileNoCache(sourceFile: SourceFile, cancellationToken: CancellationToken | undefined,
isForLinter: boolean = false): readonly Diagnostic[] {
return runWithCancellationToken(() => {
// Only check and block .d.ts import .ets behavior when it is called by "ets-loader" and scanned.
const filterFlag = !!options.needDoArkTsLinter;