From a329cdf70f31cb663b34d500ec133db3956e5989 Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Tue, 15 Mar 2022 22:34:35 +0800 Subject: [PATCH] fixed 4509c4c from https://gitee.com/houhaoyu/developtools_ace-ets2bundle/pulls/390 houhaoyu@huawei.com remove whitelist Signed-off-by: houhaoyu Change-Id: Id75f6c1faa61aee08589138df367b05b47d2bff6 --- BUILD.gn | 9 +-------- compiler/src/compile_info.ts | 8 +------- compiler/src/validate_ui_syntax.ts | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index e1893c741..2013f16b7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -289,16 +289,9 @@ ohos_copy("ohos_declaration_ets_ark") { outputs = [ target_out_dir + "/../api" ] } -ohos_copy("common_api_ark") { - sources = common_api_src - deps = [ ":ohos_declaration_ets_ark" ] - outputs = [ target_out_dir + "/../../developtools/api/{{source_file_part}}" ] - module_install_name = "" -} - ohos_copy("ets_loader_node_modules") { deps = [ - ":common_api_ark", + ":ohos_declaration_ets_ark", ":ets_loader_ark", ":ets_loader_ark_codegen", ":ets_loader_ark_components", diff --git a/compiler/src/compile_info.ts b/compiler/src/compile_info.ts index 50cf43f1d..bd45a97d6 100644 --- a/compiler/src/compile_info.ts +++ b/compiler/src/compile_info.ts @@ -289,18 +289,12 @@ export class ResultStates { const stateInfoReg: RegExp = /Property\s*'(\$?[_a-zA-Z0-9]+)' does not exist on type/; const importInfoReg: RegExp = /Cannot find namespace\s*'([_a-zA-Z0-9]+)'\./; if (this.matchMessage(message, props, propInfoReg) || - this.matchMessage(message, props, stateInfoReg) || - this.matchMessage(message, [...importModuleCollection], importInfoReg)) { + this.matchMessage(message, props, stateInfoReg)) { return false; } return true; } private matchMessage(message: string, nameArr: any, reg: RegExp): boolean { - importModuleCollection.forEach(item => { - if (message.includes(item)) { - return true; - } - }) if (reg.test(message)) { const match: string[] = message.match(reg); if (match[1] && nameArr.includes(match[1])) { diff --git a/compiler/src/validate_ui_syntax.ts b/compiler/src/validate_ui_syntax.ts index 882859c5f..6a326f3e7 100644 --- a/compiler/src/validate_ui_syntax.ts +++ b/compiler/src/validate_ui_syntax.ts @@ -752,7 +752,7 @@ export function processSystemApi(content: string, isProcessWhiteList: boolean = if (!VALIDATE_MODULE.includes(systemValue)){ importModuleCollection.add(systemValue); } - if (!isProcessWhiteList && validateWhiteListModule(moduleType, systemKey)) { + if (!isProcessWhiteList) { return item; } else if (isProcessWhiteList) { systemValue = item2; -- Gitee