From f612ca466da124bf79b8fdc04d6bf86cd27b3c82 Mon Sep 17 00:00:00 2001 From: fanglou Date: Sat, 7 Jun 2025 15:52:51 +0800 Subject: [PATCH] fix build linter timeout Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICDCEU Signed-off-by: fanglou Change-Id: If1769f1d31d5182725422c9273ed55e82791e56c --- ets2panda/linter/build_linter.py | 6 +++--- ets2panda/linter/package.json | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ets2panda/linter/build_linter.py b/ets2panda/linter/build_linter.py index bac519dd17..fc44485d81 100755 --- a/ets2panda/linter/build_linter.py +++ b/ets2panda/linter/build_linter.py @@ -36,6 +36,9 @@ def copy_files(source_path, dest_path, is_file=False): def run_cmd(cmd, execution_path=None): + if (cmd and cmd[0].strip().endswith('npm')): + cmd.append('--registry') + cmd.append('https://repo.huaweicloud.com/repository/npm/') proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, @@ -103,9 +106,6 @@ def copy_output(options): copy_files(os.path.join(options.output_path, 'package'), options.output_path) run_cmd(['rm', '-rf', os.path.join(options.output_path, 'package')]) run_cmd(['rm', '-rf', dest]) - src = os.path.join(options.source_path, 'tsconfig.json') - dest = os.path.join(options.output_path, 'tsconfig.json') - copy_files(src, dest, True) def install_typescript(options): diff --git a/ets2panda/linter/package.json b/ets2panda/linter/package.json index cadf353451..7b374c9944 100644 --- a/ets2panda/linter/package.json +++ b/ets2panda/linter/package.json @@ -16,9 +16,8 @@ "compile": "npm run tsc", "postcompile": "node scripts/testRunner/post-compile.mjs", "build": "npm run clean && npm run compile && npm run webpack && npm run pack:linter", - "preinstall": "npm install --production --prefix arkanalyzer && npm install --production --prefix homecheck", "install-ohos-typescript": "node scripts/install-ohos-typescript-and-homecheck.mjs", - "pack:linter": "rimraf bundle && mkdir bundle && npm pack --pack-destination bundle", + "pack:linter": "rimraf bundle && mkdir bundle && npm pack && mv panda-tslinter-*.tgz bundle", "pretest": " npm run fix", "test": "npm run test_all && npm run test_ts_import_ets", "test_all": "npm run testrunner -- -d test/main,test/rules,test/regression,test/extended_features,test/migration,test/ohmurl,test/interop,test/sdkwhite,test/concurrent,test/builtin", -- Gitee