fenge 0.7.0 → 0.7.2
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/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/package.json +5 -5
- package/src/utils.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# fenge
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [57c267d]
|
|
8
|
+
- @fenge/eslint-config@0.6.2
|
|
9
|
+
|
|
10
|
+
## 0.7.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- c4931eb: chore: upgrade deps
|
|
15
|
+
- Updated dependencies [c4931eb]
|
|
16
|
+
- Updated dependencies [9b7c7f4]
|
|
17
|
+
- Updated dependencies [d15775e]
|
|
18
|
+
- @fenge/eslint-config@0.6.1
|
|
19
|
+
|
|
3
20
|
## 0.7.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -329,7 +329,7 @@ npm run prepare
|
|
|
329
329
|
## Contributing
|
|
330
330
|
|
|
331
331
|
- Clone this repository.
|
|
332
|
-
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable
|
|
332
|
+
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` or globally install [@rnm/pm](https://www.npmjs.com/package/@rnm/pm).
|
|
333
333
|
- Install dependencies using `pnpm install`.
|
|
334
334
|
- Run `pnpm style:update` to develop.
|
|
335
335
|
- Start coding and submit your PR.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fenge",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "A CLI tool for code quality",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"commander": "13.1.0",
|
|
48
48
|
"eslint": "9.22.0",
|
|
49
49
|
"lilconfig": "3.1.3",
|
|
50
|
-
"lint-staged": "15.
|
|
50
|
+
"lint-staged": "15.5.0",
|
|
51
51
|
"ora": "8.2.0",
|
|
52
52
|
"prettier": "3.5.3",
|
|
53
53
|
"yoctocolors": "2.1.1",
|
|
54
|
+
"@fenge/eslint-config": "0.6.2",
|
|
54
55
|
"@fenge/prettier-config": "0.3.0",
|
|
55
|
-
"@fenge/
|
|
56
|
+
"@fenge/tsconfig": "0.5.0",
|
|
56
57
|
"prettier-ignore": "0.3.0",
|
|
57
|
-
"@fenge/
|
|
58
|
-
"@fenge/tsconfig": "0.5.0"
|
|
58
|
+
"@fenge/types": "0.3.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/node": "22.13.10"
|
package/src/utils.js
CHANGED
|
@@ -138,21 +138,23 @@ function getExitCode(error) {
|
|
|
138
138
|
export async function getBinPath(
|
|
139
139
|
moduleName,
|
|
140
140
|
from = fileURLToPath(import.meta.url),
|
|
141
|
+
cliName = moduleName,
|
|
141
142
|
) {
|
|
142
143
|
const fromPath =
|
|
143
144
|
!from.endsWith(path.sep) && (await fs.stat(from)).isDirectory()
|
|
144
145
|
? from + path.sep
|
|
145
146
|
: from;
|
|
146
|
-
const cliName = moduleName;
|
|
147
147
|
const packageJsonPath = createRequire(fromPath).resolve(
|
|
148
148
|
`${moduleName}/package.json`,
|
|
149
149
|
);
|
|
150
150
|
/** @type {any} */
|
|
151
151
|
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
|
|
152
|
-
const modulePath =
|
|
152
|
+
const modulePath = path.dirname(packageJsonPath);
|
|
153
153
|
const binPath =
|
|
154
154
|
typeof packageJson.bin === "string"
|
|
155
155
|
? packageJson.bin
|
|
156
156
|
: packageJson.bin[cliName];
|
|
157
|
+
if (typeof binPath !== "string")
|
|
158
|
+
throw new Error(`Cannot find bin ${cliName} in module ${moduleName}`);
|
|
157
159
|
return path.resolve(modulePath, binPath);
|
|
158
160
|
}
|