From 506f7f228df9b71bcb7d826b167e7e615f131b61 Mon Sep 17 00:00:00 2001 From: wuhailong Date: Tue, 22 Jul 2025 15:10:48 +0800 Subject: [PATCH] Modify the interopTransform call location Issue: #ICNZSQ Signed-off-by: wuhailong Change-Id: I215f6060888cfc2fdf242f4a3fa1db5ca4c9401e --- .../fast_build/ets_ui/rollup-plugin-ets-typescript.ts | 10 +++++----- .../fast_build/ets_ui/rollup-plugin-ets-typescript.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/compiler/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts b/compiler/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts index 3b63b205f..d052b0cc9 100644 --- a/compiler/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts +++ b/compiler/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts @@ -506,13 +506,13 @@ async function transform(code: string, id: string) { tsProgram.emit(targetSourceFile, writeFile, undefined, undefined, { before: [ - processUISyntax(null, false, eventEmit, id, this.share, metaInfo), - expandAllImportPaths(tsProgram.getTypeChecker(), this), - processKitImport(id, metaInfo, eventEmit, true, lazyImportOptions), // interopTransform:The hybrid compilation scenario provides the following two capabilities: // 1. Support for creating 1.2 type object literals in 1.1 modules // 2. Support 1.1 classes to implement 1.2 interfaces interopTransform(tsProgram, id, mixCompile), + processUISyntax(null, false, eventEmit, id, this.share, metaInfo), + expandAllImportPaths(tsProgram.getTypeChecker(), this), + processKitImport(id, metaInfo, eventEmit, true, lazyImportOptions), collectReservedNameForObf(this.share.arkProjectConfig?.obfuscationMergedObConfig, shouldETSOrTSFileTransformToJSWithoutRemove(id, projectConfig, metaInfo)) ] @@ -528,11 +528,11 @@ async function transform(code: string, id: string) { metaInfo.checker = tsProgram.getTypeChecker(); transformResult = ts.transformNodes(emitResolver, tsProgram.getEmitHost?.(), ts.factory, tsProgram.getCompilerOptions(), [targetSourceFile], - [processUISyntax(null, false, eventTransformNodes, id, this.share, metaInfo), - // interopTransform:The hybrid compilation scenario provides the following two capabilities: + [// interopTransform:The hybrid compilation scenario provides the following two capabilities: // 1. Support for creating 1.2 type object literals in 1.1 modules // 2. Support 1.1 classes to implement 1.2 interfaces interopTransform(tsProgram, id, mixCompile), + processUISyntax(null, false, eventTransformNodes, id, this.share, metaInfo), expandAllImportPaths(tsProgram.getTypeChecker(), this), processKitImport(id, metaInfo, eventTransformNodes, false, lazyImportOptions), collectReservedNameForObf(this.share.arkProjectConfig?.obfuscationMergedObConfig, diff --git a/compiler/src/interop/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts b/compiler/src/interop/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts index 3b63b205f..d052b0cc9 100644 --- a/compiler/src/interop/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts +++ b/compiler/src/interop/src/fast_build/ets_ui/rollup-plugin-ets-typescript.ts @@ -506,13 +506,13 @@ async function transform(code: string, id: string) { tsProgram.emit(targetSourceFile, writeFile, undefined, undefined, { before: [ - processUISyntax(null, false, eventEmit, id, this.share, metaInfo), - expandAllImportPaths(tsProgram.getTypeChecker(), this), - processKitImport(id, metaInfo, eventEmit, true, lazyImportOptions), // interopTransform:The hybrid compilation scenario provides the following two capabilities: // 1. Support for creating 1.2 type object literals in 1.1 modules // 2. Support 1.1 classes to implement 1.2 interfaces interopTransform(tsProgram, id, mixCompile), + processUISyntax(null, false, eventEmit, id, this.share, metaInfo), + expandAllImportPaths(tsProgram.getTypeChecker(), this), + processKitImport(id, metaInfo, eventEmit, true, lazyImportOptions), collectReservedNameForObf(this.share.arkProjectConfig?.obfuscationMergedObConfig, shouldETSOrTSFileTransformToJSWithoutRemove(id, projectConfig, metaInfo)) ] @@ -528,11 +528,11 @@ async function transform(code: string, id: string) { metaInfo.checker = tsProgram.getTypeChecker(); transformResult = ts.transformNodes(emitResolver, tsProgram.getEmitHost?.(), ts.factory, tsProgram.getCompilerOptions(), [targetSourceFile], - [processUISyntax(null, false, eventTransformNodes, id, this.share, metaInfo), - // interopTransform:The hybrid compilation scenario provides the following two capabilities: + [// interopTransform:The hybrid compilation scenario provides the following two capabilities: // 1. Support for creating 1.2 type object literals in 1.1 modules // 2. Support 1.1 classes to implement 1.2 interfaces interopTransform(tsProgram, id, mixCompile), + processUISyntax(null, false, eventTransformNodes, id, this.share, metaInfo), expandAllImportPaths(tsProgram.getTypeChecker(), this), processKitImport(id, metaInfo, eventTransformNodes, false, lazyImportOptions), collectReservedNameForObf(this.share.arkProjectConfig?.obfuscationMergedObConfig, -- Gitee