diff --git a/compiler/src/ark_utils.ts b/compiler/src/ark_utils.ts index 5162a53f2db463ce32f146fe78f62e8180a42889..f1550c5b5afcd8de65e6aab9ffc0cff92e50e45e 100644 --- a/compiler/src/ark_utils.ts +++ b/compiler/src/ark_utils.ts @@ -286,7 +286,7 @@ export function getBuildModeInLowerCase(projectConfig: Object): string { * @param sourceCode The intermediate js source code */ export function writeFileSyncByString(sourcePath: string, sourceCode: string, projectConfig: Object, logger: Object): void { - const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cachePath, projectConfig); + const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cachePath, projectConfig, undefined, logger); if (filePath.length === 0) { return; } @@ -695,7 +695,7 @@ export function getPackageInfo(configFile: string): Array { */ export function generateSourceFilesToTemporary(sourcePath: string, sourceContent: string, sourceMap: Object, projectConfig: Object, logger: Object): void { - let jsFilePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cachePath, projectConfig); + let jsFilePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cachePath, projectConfig, undefined, logger); if (jsFilePath.length === 0) { return; } diff --git a/compiler/src/compile_info.ts b/compiler/src/compile_info.ts index 036643d89fcf6e992a8c2f9259bf2c0f07345fa0..4578cd40f1febbc162783fe56562118f29730457 100644 --- a/compiler/src/compile_info.ts +++ b/compiler/src/compile_info.ts @@ -482,9 +482,9 @@ function handleFinishModules(modules, callback) { const filePath: string = module.resourceResolveData.path; if (!filePath.match(/node_modules/)) { const jsCacheFilePath: string = genTemporaryPath(filePath, projectConfig.moduleRootPath, process.env.cachePath, - projectConfig); + projectConfig, undefined, undefined); const jsBuildFilePath: string = genTemporaryPath(filePath, projectConfig.moduleRootPath, - projectConfig.buildPath, projectConfig, true); + projectConfig.buildPath, projectConfig, undefined, undefined, true); if (filePath.match(/\.e?ts$/)) { this.incrementalFileInHar.set(jsCacheFilePath.replace(/\.ets$/, '.d.ets').replace(/\.ts$/, '.d.ts'), jsBuildFilePath.replace(/\.ets$/, '.d.ets').replace(/\.ts$/, '.d.ts')); diff --git a/compiler/src/fast_build/ark_compiler/module/module_mode.ts b/compiler/src/fast_build/ark_compiler/module/module_mode.ts index ab379d4369bb736cd05b52c41e469adcc284c69b..28de0aaf64e26c7a928ae4b5dc2784ea76d0ad6f 100644 --- a/compiler/src/fast_build/ark_compiler/module/module_mode.ts +++ b/compiler/src/fast_build/ark_compiler/module/module_mode.ts @@ -414,7 +414,7 @@ export class ModuleMode extends CommonMode { let moduleName: string = metaInfo.moduleName; let recordName: string = ''; let cacheFilePath: string = - this.genFileCachePath(filePath, this.projectConfig.projectRootPath, this.projectConfig.cachePath); + this.genFileCachePath(filePath, this.projectConfig.projectRootPath, this.projectConfig.cachePath, metaInfo); let packageName: string = ''; if (this.useNormalizedOHMUrl) { @@ -695,8 +695,10 @@ export class ModuleMode extends CommonMode { generateAot(this.arkConfig.arkRootPath, this.moduleAbcPath, this.projectConfig, this.logger, faultHandler); } - private genFileCachePath(filePath: string, projectRootPath: string, cachePath: string): string { - const sufStr: string = toUnixPath(filePath).replace(toUnixPath(projectRootPath), ''); + private genFileCachePath(filePath: string, projectRootPath: string, cachePath: string, metaInfo: Object): string { + const sufStr: string = toUnixPath(filePath).startsWith(toUnixPath(projectRootPath)) ? + toUnixPath(filePath).replace(toUnixPath(projectRootPath) + '/', '') : + toUnixPath(filePath).replace(toUnixPath(metaInfo.belongProjectPath) + '/', '') const output: string = path.join(cachePath, sufStr); return output; } diff --git a/compiler/src/fast_build/ark_compiler/module/module_source_file.ts b/compiler/src/fast_build/ark_compiler/module/module_source_file.ts index f2d786d4daa6c2f444b609b93d87ec2f70fbca43..d3c8de6bf358a553072df228e6544aba5718d063 100644 --- a/compiler/src/fast_build/ark_compiler/module/module_source_file.ts +++ b/compiler/src/fast_build/ark_compiler/module/module_source_file.ts @@ -76,6 +76,7 @@ export class ModuleSourceFile { private static sourceFiles: ModuleSourceFile[] = []; private moduleId: string; private source: string | ts.SourceFile; + private metaInfo: Object; private isSourceNode: boolean = false; private static projectConfig: Object; private static logger: Object; @@ -86,9 +87,10 @@ export class ModuleSourceFile { private static mockConfigKeyToModuleInfo: Object = {}; private static needProcessMock: boolean = false; - constructor(moduleId: string, source: string | ts.SourceFile) { + constructor(moduleId: string, source: string | ts.SourceFile, metaInfo: Object) { this.moduleId = moduleId; this.source = source; + this.metaInfo = metaInfo; if (typeof this.source !== 'string') { this.isSourceNode = true; } @@ -283,8 +285,8 @@ export class ModuleSourceFile { } } - static newSourceFile(moduleId: string, source: string | ts.SourceFile) { - ModuleSourceFile.sourceFiles.push(new ModuleSourceFile(moduleId, source)); + static newSourceFile(moduleId: string, source: string | ts.SourceFile, metaInfo: Object) { + ModuleSourceFile.sourceFiles.push(new ModuleSourceFile(moduleId, source, metaInfo)); } static getSourceFiles(): ModuleSourceFile[] { @@ -365,9 +367,9 @@ export class ModuleSourceFile { private async writeSourceFile(parentEvent: Object): Promise { if (this.isSourceNode && !isJsSourceFile(this.moduleId)) { - await writeFileSyncByNode( this.source, ModuleSourceFile.projectConfig, this.moduleId, parentEvent, ModuleSourceFile.logger); + await writeFileSyncByNode( this.source, ModuleSourceFile.projectConfig, this.metaInfo, this.moduleId, parentEvent, ModuleSourceFile.logger); } else { - await writeFileContentToTempDir(this.moduleId, this.source, ModuleSourceFile.projectConfig, ModuleSourceFile.logger, parentEvent); + await writeFileContentToTempDir(this.moduleId, this.source, ModuleSourceFile.projectConfig, ModuleSourceFile.logger, parentEvent, this.metaInfo); } } @@ -509,8 +511,9 @@ export class ModuleSourceFile { if (hasDynamicImport) { // update sourceMap - const relativeSourceFilePath: string = - toUnixPath(this.moduleId.replace(ModuleSourceFile.projectConfig.projectRootPath + path.sep, '')); + const relativeSourceFilePath: string = this.moduleId.startsWith(ModuleSourceFile.projectConfig.projectRootPath) ? + toUnixPath(this.moduleId.replace(ModuleSourceFile.projectConfig.projectRootPath + path.sep, '')) : + toUnixPath(this.moduleId.replace(this.metaInfo.belongProjectPath, '')); const updatedMap: Object = code.generateMap({ source: relativeSourceFilePath, file: `${path.basename(this.moduleId)}`, diff --git a/compiler/src/fast_build/ark_compiler/transform.ts b/compiler/src/fast_build/ark_compiler/transform.ts index 47be1e21769314aca5f8bb0ebc0b75199a151864..6a71c46dd451a311014495ec1a9a92b33210ebaa 100644 --- a/compiler/src/fast_build/ark_compiler/transform.ts +++ b/compiler/src/fast_build/ark_compiler/transform.ts @@ -45,10 +45,11 @@ export function transformForModule(code: string, id: string) { const hookEventFactory = getHookEventFactory(this.share, 'genAbc', 'transform'); const eventTransformForModule = createAndStartEvent(hookEventFactory, 'transform for module'); if (this.share.projectConfig.compileMode === ESMODULE) { + const metaInfo: Object = this.getModuleInfo(id).meta; const projectConfig: Object = Object.assign(this.share.arkProjectConfig, this.share.projectConfig); if (isTsOrEtsSourceFile(id) && shouldETSOrTSFileTransformToJS(id, projectConfig)) { - preserveSourceMap(id, this.getCombinedSourcemap(), projectConfig, eventTransformForModule); - ModuleSourceFile.newSourceFile(id, code); + preserveSourceMap(id, this.getCombinedSourcemap(), projectConfig, metaInfo, eventTransformForModule); + ModuleSourceFile.newSourceFile(id, code, metaInfo); } if (isJsSourceFile(id) || isJsonSourceFile(id)) { @@ -57,26 +58,28 @@ export function transformForModule(code: string, id: string) { if (projectConfig.compatibleSdkVersion <= 10) { const transformedResult: object = transformJsByBabelPlugin(code, eventTransformForModule); code = transformedResult.code; - preserveSourceMap(id, transformedResult.map, projectConfig, eventTransformForModule); + preserveSourceMap(id, transformedResult.map, projectConfig, metaInfo, eventTransformForModule); } else { // preserve sourceMap of js file without transforming - preserveSourceMap(id, this.getCombinedSourcemap(), projectConfig, eventTransformForModule); + preserveSourceMap(id, this.getCombinedSourcemap(), projectConfig, metaInfo, eventTransformForModule); } } - ModuleSourceFile.newSourceFile(id, code); + ModuleSourceFile.newSourceFile(id, code, metaInfo); } } stopEvent(eventTransformForModule); } -function preserveSourceMap(sourceFilePath: string, sourcemap: Object, projectConfig: Object, parentEvent: Object): void { +function preserveSourceMap(sourceFilePath: string, sourcemap: Object, projectConfig: Object, metaInfo: Object, parentEvent: Object): void { if (isCommonJsPluginVirtualFile(sourceFilePath)) { // skip automatic generated files like 'jsfile.js?commonjs-exports' return; } const eventAddSourceMapInfo = createAndStartEvent(parentEvent, 'preserve source map for ts/ets files'); - const relativeSourceFilePath = toUnixPath(sourceFilePath.replace(projectConfig.projectRootPath + path.sep, '')); + const relativeSourceFilePath = sourceFilePath.startsWith(projectConfig.projectRootPath)? + toUnixPath(sourceFilePath.replace(projectConfig.projectRootPath + path.sep, '')) : + toUnixPath(sourceFilePath.replace(metaInfo.belongProjectPath + path.sep, '')); sourcemap.sources = [relativeSourceFilePath]; sourcemap.file = path.basename(relativeSourceFilePath); sourcemap.sourcesContent && delete sourcemap.sourcesContent; diff --git a/compiler/src/fast_build/ark_compiler/utils.ts b/compiler/src/fast_build/ark_compiler/utils.ts index 6ed3c77dcf688bd12693dc1ed2bdad8ac3034a85..64e5a40ced86ba40e60fc8ced10730ef3f6c75a5 100644 --- a/compiler/src/fast_build/ark_compiler/utils.ts +++ b/compiler/src/fast_build/ark_compiler/utils.ts @@ -128,7 +128,7 @@ function updateCacheFilePathIfEnableObuscatedFilePath(filePath: string, cacheFil } export async function writeFileContentToTempDir(id: string, content: string, projectConfig: Object, - logger: Object, parentEvent: Object): Promise { + logger: Object, parentEvent: Object, metaInfo: Object): Promise { if (isCommonJsPluginVirtualFile(id)) { return; } @@ -143,9 +143,9 @@ export async function writeFileContentToTempDir(id: string, content: string, pro filePath = genTemporaryPath(id, projectConfig.compileShared ? projectConfig.projectRootPath : projectConfig.moduleRootPath, projectConfig.compileShared ? path.resolve(projectConfig.aceModuleBuild, '../etsFortgz') : projectConfig.cachePath, - projectConfig, projectConfig.compileShared); + projectConfig, metaInfo, logger, projectConfig.compileShared); } else { - filePath = genTemporaryPath(id, projectConfig.projectPath, projectConfig.cachePath, projectConfig); + filePath = genTemporaryPath(id, projectConfig.projectPath, projectConfig.cachePath, projectConfig, metaInfo, logger); } const eventWriteFileContent = createAndStartEvent(parentEvent, 'write file content'); @@ -198,6 +198,14 @@ export function isCommonJsPluginVirtualFile(filePath: string): boolean { } export function isCurrentProjectFiles(filePath: string, projectConfig: Object): boolean { + if (projectConfig.rootPathSet) { + for (const projectRootPath of projectConfig.rootPathSet) { + if (filePath.indexOf(projectRootPath) !== -1) { + return true; + } + } + return false; + } return filePath.indexOf(projectConfig.projectRootPath) >= 0; } 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 4da4f43c1c396682e4f89b147aa90f481a013798..17b9b3762c06da0208345fb19034fd8943442f80 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 @@ -179,9 +179,9 @@ export function etsTransform() { } const cacheFilePath: string = genTemporaryPath(filePath, projectConfig.moduleRootPath, - process.env.cachePath, projectConfig); + process.env.cachePath, projectConfig, undefined, undefined); const buildFilePath: string = genTemporaryPath(filePath, projectConfig.moduleRootPath, - projectConfig.buildPath, projectConfig, true); + projectConfig.buildPath, projectConfig, undefined, undefined, true); if (filePath.match(/\.e?ts$/)) { setIncrementalFileInHar(cacheFilePath, buildFilePath, allFilesInHar); } else { @@ -377,6 +377,7 @@ async function transform(code: string, id: string) { // close `noEmit` to make invoking emit() effective. tsProgram.getCompilerOptions().noEmit = false; + const metaInfo: Object = this.getModuleInfo(id).meta; // use `try finally` to restore `noEmit` when error thrown by `processUISyntax` in preview mode try { startTimeStatisticsLocation(compilationTime ? compilationTime.tsProgramEmitTime : undefined); @@ -388,7 +389,7 @@ async function transform(code: string, id: string) { { before: [ processUISyntax(null, false, compilationTime), - processKitImport(id) + processKitImport(id, metaInfo) ] } ); diff --git a/compiler/src/gen_abc_plugin.ts b/compiler/src/gen_abc_plugin.ts index 682f2dabfabe11e752f6a159a0ff76ceb9370174..19ec2a35fa316240da401d55a3b3f43879ad45eb 100644 --- a/compiler/src/gen_abc_plugin.ts +++ b/compiler/src/gen_abc_plugin.ts @@ -322,7 +322,7 @@ function getEntryInfo(filePath: string, resourceResolveData: Object): string { const fakeEntryPath: string = path.resolve(npmInfoPath, 'fake.js'); const tempFakeEntryPath: string = genTemporaryPath(fakeEntryPath, projectConfig.projectPath, process.env.cachePath, - projectConfig); + projectConfig, undefined, undefined); const buildFakeEntryPath: string = genBuildPath(fakeEntryPath, projectConfig.projectPath, projectConfig.buildPath, projectConfig); npmInfoPath = toUnixPath(path.resolve(tempFakeEntryPath, '..')); @@ -543,7 +543,7 @@ function handleFullModuleFiles(modules, callback): void { modules.forEach(module => { if (module !== undefined && module.resourceResolveData !== undefined) { const filePath: string = module.resourceResolveData.path; - let tempFilePath = genTemporaryPath(filePath, projectConfig.projectPath, process.env.cachePath, projectConfig); + let tempFilePath = genTemporaryPath(filePath, projectConfig.projectPath, process.env.cachePath, projectConfig, undefined, undefined); if (tempFilePath.length === 0) { return; } @@ -1099,7 +1099,7 @@ function handleHotReloadChangedFiles() { for (let file of changedFileList) { let filePath: string = path.join(projectConfig.projectPath, file); validateFilePathLength(filePath, logger); - let tempFilePath: string = genTemporaryPath(filePath, projectConfig.projectPath, process.env.cachePath, projectConfig); + let tempFilePath: string = genTemporaryPath(filePath, projectConfig.projectPath, process.env.cachePath, projectConfig, undefined, undefined); if (tempFilePath.length === 0) { return; } diff --git a/compiler/src/process_kit_import.ts b/compiler/src/process_kit_import.ts index 9075da70a6fb4aa61370937e834dcf31e7d2f7ab..ca1e0c72a5ae7555ad7e69266970be9b1406a955 100644 --- a/compiler/src/process_kit_import.ts +++ b/compiler/src/process_kit_import.ts @@ -52,7 +52,7 @@ const KEEPTS = '// @keepTs'; * import ErrorCode from '@ohos.ability.errorCode' * ``` */ -export function processKitImport(id: string): Function { +export function processKitImport(id: string, metaInfo: Object): Function { return (context: ts.TransformationContext) => { const visitor: ts.Visitor = node => { // only transform static import/export declaration @@ -97,7 +97,7 @@ export function processKitImport(id: string): Function { // process [ConstEnum] + [TypeExportImport] + [KitImport] transforming const processedNode: ts.SourceFile = ts.visitEachChild(ts.getTypeExportImportAndConstEnumTransformer(context)(node), visitor, context); - ModuleSourceFile.newSourceFile(id, processedNode); + ModuleSourceFile.newSourceFile(id, processedNode, metaInfo); return node; // this node not used for [writeFile] } // process KitImport transforming diff --git a/compiler/src/process_module_files.ts b/compiler/src/process_module_files.ts index 56c026012f0bcf32ea1fc53347f79c31c874ac24..f7d749bb3e689de6c938e1f0d3cca008214f0cac 100644 --- a/compiler/src/process_module_files.ts +++ b/compiler/src/process_module_files.ts @@ -40,14 +40,14 @@ import { isDebug } from './fast_build/ark_compiler/utils'; export const SRC_MAIN: string = 'src/main'; -export async function writeFileSyncByNode(node: ts.SourceFile, projectConfig: Object, moduleId?: string , parentEvent?: Object, logger?: Object): Promise { +export async function writeFileSyncByNode(node: ts.SourceFile, projectConfig: Object, metaInfo: Object, moduleId?: string , parentEvent?: Object, logger?: Object): Promise { const eventWriteFileSyncByNode = createAndStartEvent(parentEvent, 'write file sync by node'); const eventGenContentAndSourceMapInfo = createAndStartEvent(eventWriteFileSyncByNode, 'generate content and source map information'); - const mixedInfo: { content: string, sourceMapJson: ts.RawSourceMap } = genContentAndSourceMapInfo(node, projectConfig); + const mixedInfo: { content: string, sourceMapJson: ts.RawSourceMap } = genContentAndSourceMapInfo(node, projectConfig, metaInfo); const sourceMapGenerator = SourceMapGenerator.getInstance(); stopEvent(eventGenContentAndSourceMapInfo); let temporaryFile: string = genTemporaryPath(node.fileName, projectConfig.projectPath, process.env.cachePath, - projectConfig); + projectConfig, metaInfo, logger); if (temporaryFile.length === 0) { return; } @@ -84,7 +84,7 @@ export async function writeFileSyncByNode(node: ts.SourceFile, projectConfig: Ob stopEvent(eventWriteFileSyncByNode); } -function genContentAndSourceMapInfo(node: ts.SourceFile, projectConfig: Object): Object { +function genContentAndSourceMapInfo(node: ts.SourceFile, projectConfig: Object, metaInfo: Object): Object { const printer: ts.Printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }); const options: ts.CompilerOptions = { sourceMap: true @@ -114,7 +114,11 @@ function genContentAndSourceMapInfo(node: ts.SourceFile, projectConfig: Object): ts.getNewLineCharacter({ newLine: ts.NewLineKind.LineFeed, removeComments: false })); printer.writeFile(node, writer, sourceMapGenerator); const sourceMapJson: ts.RawSourceMap = sourceMapGenerator.toJSON(); - sourceMapJson.sources = [toUnixPath(fileName).replace(toUnixPath(projectConfig.projectRootPath) + '/', '')]; + sourceMapJson.sources = [ + toUnixPath(fileName).startsWith(toUnixPath(projectConfig.projectRootPath)) ? + toUnixPath(fileName).replace(toUnixPath(projectConfig.projectRootPath) + '/', '') : + toUnixPath(fileName).replace(toUnixPath(metaInfo.belongProjectPath) + '/', '') + ]; let content: string = writer.getText(); if (process.env.compileTool !== 'rollup') { content = transformModuleSpecifier(fileName, processSystemApi(content, true), projectConfig); diff --git a/compiler/src/process_ui_syntax.ts b/compiler/src/process_ui_syntax.ts index c049c09818c466f90fccf3dd08777077a0f47cb7..5e70159b456fcc51b80f759dab8fed423147c0b3 100644 --- a/compiler/src/process_ui_syntax.ts +++ b/compiler/src/process_ui_syntax.ts @@ -187,7 +187,7 @@ export function processUISyntax(program: ts.Program, ut = false, if (projectConfig.compileMode === ESMODULE && projectConfig.processTs === true) { if (process.env.compileTool !== 'rollup') { const processedNode: ts.SourceFile = ts.getTypeExportImportAndConstEnumTransformer(context)(node); - writeFileSyncByNode(processedNode, projectConfig); + writeFileSyncByNode(processedNode, projectConfig, undefined); } } return ts.visitEachChild(node, visitor, context); @@ -216,7 +216,7 @@ export function processUISyntax(program: ts.Program, ut = false, if (projectConfig.compileMode === ESMODULE && projectConfig.processTs === true) { if (process.env.compileTool !== 'rollup') { const processedNode: ts.SourceFile = ts.getTypeExportImportAndConstEnumTransformer(context)(node); - writeFileSyncByNode(processedNode, projectConfig); + writeFileSyncByNode(processedNode, projectConfig, undefined); } } return ts.visitEachChild(node, visitor, context); diff --git a/compiler/src/utils.ts b/compiler/src/utils.ts index a4c34d4fd4aef399901a19afab7dacbe7fcd5379..35040eb0758e323e608d74e7fd8221f2d583bae0 100644 --- a/compiler/src/utils.ts +++ b/compiler/src/utils.ts @@ -336,13 +336,24 @@ export function genLoaderOutPathOfHar(filePath: string, cachePath: string, build } export function genTemporaryPath(filePath: string, projectPath: string, buildPath: string, - projectConfig: Object, buildInHar: boolean = false): string { + projectConfig: Object, metaInfo: Object, logger: Object, buildInHar: boolean = false): string { filePath = toUnixPath(filePath).replace(/\.[cm]js$/, EXTNAME_JS); projectPath = toUnixPath(projectPath); if (process.env.compileTool === 'rollup') { + const red: string = '\u001b[31m'; + const reset: string = '\u001b[39m'; const projectRootPath: string = toUnixPath(buildInHar ? projectPath : projectConfig.projectRootPath); - const relativeFilePath: string = filePath.replace(projectRootPath, ''); + let relativeFilePath: string = ''; + if (filePath.startsWith(projectRootPath)) { + relativeFilePath = filePath.replace(projectRootPath, ''); + } else if (metaInfo.belongProjectPath) { + relativeFilePath = filePath.replace(toUnixPath(metaInfo.belongProjectPath), ''); + } else { + logger.error(red, 'ARKTS:INTERNAL ERROR\n' + + `Error Message: Failed to generate the cache path corresponding to file ${filePath}.\n` + + 'Because the file belongs to a module outside the project and has no project information.', reset); + } const output: string = path.join(buildPath, relativeFilePath); return output; } @@ -412,7 +423,7 @@ export function generateSourceFilesInHar(sourcePath: string, sourceContent: stri let jsFilePath: string = genTemporaryPath(sourcePath, projectConfig.compileShared ? projectConfig.projectRootPath : projectConfig.moduleRootPath, projectConfig.compileShared || projectConfig.byteCodeHar ? path.resolve(projectConfig.aceModuleBuild, '../etsFortgz') : projectConfig.cachePath, - projectConfig, projectConfig.compileShared); + projectConfig, undefined, undefined, projectConfig.compileShared); if (!jsFilePath.match(new RegExp(projectConfig.packageDir))) { jsFilePath = jsFilePath.replace(/\.ets$/, suffix).replace(/\.ts$/, suffix); if (projectConfig.obfuscateHarType === 'uglify' && suffix === '.js') { diff --git a/compiler/test/ark_compiler_ut/common/process_kit_import.test.ts b/compiler/test/ark_compiler_ut/common/process_kit_import.test.ts index 4cde58f31bfde00fac2c8cb3b7d5e390a8864b4d..cf5a31ed3f01c5391f12e29b139b60b47db3c1ca 100644 --- a/compiler/test/ark_compiler_ut/common/process_kit_import.test.ts +++ b/compiler/test/ark_compiler_ut/common/process_kit_import.test.ts @@ -62,7 +62,7 @@ const KIT_STAR_EXPORT_CODE_EXPECT: string = 'export * from "@ohos.multimedia.audio";\n' + 'export * from "@ohos.multimedia.audioHaptic";\n'+ 'export * from "@ohos.multimedia.systemSoundManager";\n'+ -'export * from "@ohos.multimedia.AVVolumePanel";\n' + +'export * from "@ohos.multimedia.avVolumePanel";\n' + '//# sourceMappingURL=kitTest.js.map' const KIT_IMPORT_ERROR_CODE: string =