From 9306ed52b1284988dcd2d28b8b7ddff3e13db80e Mon Sep 17 00:00:00 2001 From: ruzell22 Date: Thu, 4 Jul 2024 13:47:18 +0800 Subject: [PATCH] build(sync-ts-config): fix no such file or directory protos-js/tsconfig.json Primary Changes --------------- 1. Fix issue with the object key 2. Temporarily added ignore paths for the missing tsconfig.json so the script will run successfully Fixes: #3069 Related to: #3366 Signed-off-by: ruzell22 --- tools/sync-npm-deps-to-tsc-projects.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/sync-npm-deps-to-tsc-projects.ts b/tools/sync-npm-deps-to-tsc-projects.ts index bb4327796b..69a8e13413 100644 --- a/tools/sync-npm-deps-to-tsc-projects.ts +++ b/tools/sync-npm-deps-to-tsc-projects.ts @@ -40,6 +40,12 @@ const main = async (argv: string[], env: NodeJS.ProcessEnv) => { const globbyOptions: GlobbyOptions = { cwd: PROJECT_DIR, absolute: true, + ignore: [ + "**/packages/cacti-plugin-weaver-driver-fabric/**", + "**/weaver/common/protos-js/**", + "**/weaver/samples/besu/simpleasset/**", + "**/weaver/samples/besu/simplestate/**", + ], // Follow-up issue regarding these hardcoded paths (https://github.com/hyperledger/cacti/issues/3366) }; const pkgJsonPaths = await globby(pkgJsonGlobPatterns, globbyOptions); console.log(`Package paths (${pkgJsonPaths.length}): `, pkgJsonPaths); @@ -70,7 +76,7 @@ const main = async (argv: string[], env: NodeJS.ProcessEnv) => { const pkg = await fs.readJson(pkgJsonPath); - const deps = Object.keys(pkg.dependencies).filter((it) => + const deps = Object.keys(pkg.dependencies || {}).filter((it) => it.startsWith("@hyperledger/cactus-"), );