Skip to content

Commit ba94d90

Browse files
committed
chore: update scripts
1 parent 7df25f3 commit ba94d90

File tree

4 files changed

+6
-24
lines changed

4 files changed

+6
-24
lines changed

eslint.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ export default tseslint.config(
341341
rules: {
342342
"no-console": "off",
343343
"@nx/enforce-module-boundaries": "off",
344+
...disableTypeCheckedRules,
344345
},
345346
},
346347
{

scripts/lib/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export * from "./glob";
2-
export * from "./json";
32
export * from "./version";

scripts/lib/json.ts

-20
This file was deleted.

scripts/update-version.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
import fs from "node:fs";
2+
13
import pc from "picocolors";
24
import { isMatching, match, P } from "ts-pattern";
35

46
import { ignores } from "./ignores";
5-
import { glob, readJsonFile, writeJsonFile } from "./lib";
7+
import { glob } from "./lib";
68
import { version } from "./version";
79

810
const GLOB_PACKAGE_JSON = ["package.json", "packages/*/package.json", "packages/*/*/package.json"];
911

1012
async function update(path: string) {
11-
const packageJson = await readJsonFile(path);
13+
const packageJson = JSON.parse(fs.readFileSync(path, "utf8"));
1214
if (!isMatching({ version: P.string }, packageJson)) {
1315
throw new Error(`Invalid package.json at ${path}`);
1416
}
@@ -24,7 +26,7 @@ async function update(path: string) {
2426
...packageJson,
2527
version: newVersion,
2628
};
27-
await writeJsonFile(path, packageJsonUpdated);
29+
fs.writeFileSync(path, JSON.stringify(packageJsonUpdated, null, 2) + "\n");
2830
console.info(pc.green(`Updated ${path} to version ${packageJsonUpdated.version}`));
2931
}
3032

0 commit comments

Comments
 (0)