Skip to content

Commit

Permalink
fix(build): sync-ts-config script needs import assertion of type json
Browse files Browse the repository at this point in the history
Fixes hyperledger-cacti#2163

Signed-off-by: aldousalvarez <aldousss.alvarez@gmail.com>
  • Loading branch information
aldousalvarez committed Sep 26, 2022
1 parent ee99c87 commit bd52bbf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/sync-npm-deps-to-tsc-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import JSON5 from "json5";
import fs from "fs-extra";
import { globby, Options as GlobbyOptions } from "globby";
import { RuntimeError } from "run-time-error";
import lernaJson from "../lerna.json";
import { readFileSync } from "fs";

const lernaJson = JSON.parse(readFileSync("lerna.json", "utf8"));
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Expand All @@ -24,11 +25,11 @@ const main = async (argv: string[], env: NodeJS.ProcessEnv) => {
console.log(`SCRIPT_DIR=${SCRIPT_DIR}`);
console.log(`PROJECT_DIR=${PROJECT_DIR}`);

const pkgJsonGlobPatterns = lernaJson.packages.map((it) =>
const pkgJsonGlobPatterns = lernaJson.packages.map((it: string) =>
"./".concat(it).concat(`/${PACKAGE_JSON}`),
);

const tsConfigJsonGlobPatterns = lernaJson.packages.map((it) =>
const tsConfigJsonGlobPatterns = lernaJson.packages.map((it: string) =>
"./".concat(it).concat(`/${TS_CONFIG}`),
);
console.log("Globbing lerna package patterns: ", pkgJsonGlobPatterns);
Expand Down

0 comments on commit bd52bbf

Please sign in to comment.