fenge 0.12.3 → 0.12.5-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fenge",
3
- "version": "0.12.3",
3
+ "version": "0.12.5-beta.0",
4
4
  "description": "A CLI tool for code quality",
5
5
  "keywords": [
6
6
  "cli",
@@ -51,10 +51,10 @@
51
51
  "prettier": "3.6.2",
52
52
  "pretty-ms": "9.3.0",
53
53
  "yoctocolors": "2.1.2",
54
- "@fenge/eslint-config": "0.7.18",
55
- "@fenge/tsconfig": "0.10.0",
56
54
  "@fenge/prettier-config": "0.3.10",
57
- "prettier-ignore": "0.4.0"
55
+ "@fenge/tsconfig": "0.10.0",
56
+ "prettier-ignore": "0.4.0",
57
+ "@fenge/eslint-config": "0.7.19"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/node": "18.19.123"
@@ -71,6 +71,6 @@
71
71
  "node": "^18.20.0 || >=20.10.0"
72
72
  },
73
73
  "scripts": {
74
- "test": "tsc --noEmit"
74
+ "test": "tsc --noEmit && node --test"
75
75
  }
76
76
  }
@@ -18,7 +18,7 @@ export async function format(
18
18
  default: useDefaultConfig = false,
19
19
  } = {},
20
20
  ) {
21
- return execAsync("💃 Checking formatting")(
21
+ const result = await execAsync("💃 Checking formatting")(
22
22
  [
23
23
  process.execPath,
24
24
  await getPrettierPath(useDefaultConfig),
@@ -45,6 +45,10 @@ export async function format(
45
45
  },
46
46
  },
47
47
  );
48
+ return {
49
+ ...result,
50
+ stderr: result.stderr.replace(/ Run Prettier with --write to fix\.$/, ""),
51
+ };
48
52
  }
49
53
 
50
54
  /**
@@ -1,7 +1,8 @@
1
1
  // @ts-check
2
2
  import path from "node:path";
3
+ import process from "node:process";
3
4
  import { dir, resolveConfig } from "../utils.js";
4
5
 
5
6
  const cliPath = path.resolve(dir(import.meta.url), "..", "bin", "fenge.cli.js");
6
- const defaultConfig = { "*": [`${cliPath} format -u`] };
7
+ const defaultConfig = { "*": [`${process.execPath} ${cliPath} format -u`] };
7
8
  export default (await resolveConfig("lint-staged"))?.config ?? defaultConfig;
@@ -1,7 +1,8 @@
1
1
  // @ts-check
2
2
  import path from "node:path";
3
+ import process from "node:process";
3
4
  import { dir, resolveConfig } from "../utils.js";
4
5
 
5
6
  const cliPath = path.resolve(dir(import.meta.url), "..", "bin", "fenge.cli.js");
6
- const defaultConfig = { "*": [`${cliPath} lint`] };
7
+ const defaultConfig = { "*": [`${process.execPath} ${cliPath} lint`] };
7
8
  export default (await resolveConfig("lint-staged"))?.config ?? defaultConfig;
@@ -1,7 +1,8 @@
1
1
  // @ts-check
2
2
  import path from "node:path";
3
+ import process from "node:process";
3
4
  import { dir, resolveConfig } from "../utils.js";
4
5
 
5
6
  const cliPath = path.resolve(dir(import.meta.url), "..", "bin", "fenge.cli.js");
6
- const defaultConfig = { "*": [`${cliPath} -w`] };
7
+ const defaultConfig = { "*": [`${process.execPath} ${cliPath} -w`] };
7
8
  export default (await resolveConfig("lint-staged"))?.config ?? defaultConfig;