fabrique 2.0.13 → 2.0.14
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 +3 -3
- package/src/helpers.private/file/package-json/read-package-json-file.d.ts +3 -3
- package/src/helpers.private/file/package-json/read-package-json-file.js +3 -3
- package/src/helpers.private/file/package-json/read-package-json-file.js.map +1 -1
- package/src/helpers.private/file/read-json-file.d.ts +3 -3
- package/src/helpers.private/file/read-json-file.js +4 -4
- package/src/helpers.private/file/read-json-file.js.map +1 -1
- package/static/templates/lib/package.json +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fabrique",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI to build a library",
|
|
6
6
|
"keywords": [],
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@inquirer/prompts": "^8.
|
|
23
|
+
"@inquirer/prompts": "^8.7.1",
|
|
24
24
|
"chalk": "^6.0.0",
|
|
25
25
|
"commander": "^15.0.0",
|
|
26
|
-
"zod": "^4.4
|
|
26
|
+
"zod": "^4.5.4"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PathLike, ReadFileOptionsWithStringEncoding } from 'node:fs';
|
|
2
|
+
import type { FileHandle } from 'node:fs/promises';
|
|
2
3
|
import type { PackageJson } from './package-json.ts';
|
|
3
|
-
export
|
|
4
|
-
export declare function readPackageJsonFile(...args: ReadPackageJsonFileArguments): Promise<PackageJson>;
|
|
4
|
+
export declare function readPackageJsonFile(path: PathLike | FileHandle, options?: ReadFileOptionsWithStringEncoding): Promise<PackageJson>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { readJsonFile } from '../read-json-file.js';
|
|
2
2
|
import { packageJsonSchema } from './package-json.schema.js';
|
|
3
|
-
export async function readPackageJsonFile(
|
|
3
|
+
export async function readPackageJsonFile(path, options) {
|
|
4
4
|
try {
|
|
5
|
-
return packageJsonSchema.parse(await readJsonFile(
|
|
5
|
+
return packageJsonSchema.parse(await readJsonFile(path, options));
|
|
6
6
|
}
|
|
7
7
|
catch (error) {
|
|
8
|
-
throw new Error(`Failed to read package.json file: ${JSON.stringify(
|
|
8
|
+
throw new Error(`Failed to read package.json file: ${JSON.stringify(path)}`, {
|
|
9
9
|
cause: error,
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-package-json-file.js","sourceRoot":"","sources":["../../../../../src/helpers.private/file/package-json/read-package-json-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-package-json-file.js","sourceRoot":"","sources":["../../../../../src/helpers.private/file/package-json/read-package-json-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAA2B,EAC3B,OAA2C;IAE3C,IAAI,CAAC;QACH,OAAO,iBAAiB,CAAC,KAAK,CAAC,MAAM,YAAY,CAAc,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IACjF,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,qCAAqC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE;YAC3E,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function readJsonFile<GValue = any>(
|
|
1
|
+
import type { PathLike, ReadFileOptionsWithStringEncoding } from 'node:fs';
|
|
2
|
+
import { type FileHandle } from 'node:fs/promises';
|
|
3
|
+
export declare function readJsonFile<GValue = any>(path: PathLike | FileHandle, options?: ReadFileOptionsWithStringEncoding): Promise<GValue>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
export async function readJsonFile(
|
|
3
|
-
return JSON.parse(
|
|
4
|
-
...(typeof args[1] === 'object' ? args[1] : {}),
|
|
2
|
+
export async function readJsonFile(path, options) {
|
|
3
|
+
return JSON.parse(await readFile(path, {
|
|
5
4
|
encoding: 'utf-8',
|
|
6
|
-
|
|
5
|
+
...options,
|
|
6
|
+
}));
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=read-json-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-json-file.js","sourceRoot":"","sources":["../../../../src/helpers.private/file/read-json-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-json-file.js","sourceRoot":"","sources":["../../../../src/helpers.private/file/read-json-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAA2B,EAC3B,OAA2C;IAE3C,OAAO,IAAI,CAAC,KAAK,CACf,MAAM,QAAQ,CAAC,IAAI,EAAE;QACnB,QAAQ,EAAE,OAAO;QACjB,GAAG,OAAO;KACX,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"url": "{{giturl}}"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@types/node": "^26.
|
|
36
|
-
"@vitest/coverage-istanbul": "^
|
|
35
|
+
"@types/node": "^26.4.1",
|
|
36
|
+
"@vitest/coverage-istanbul": "^5.0.0",
|
|
37
37
|
"prettier": "^3.9.6",
|
|
38
38
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
39
39
|
"typedoc": "^0.28.20",
|
|
40
40
|
"typescript": "^7.0.2",
|
|
41
|
-
"vitest": "^
|
|
41
|
+
"vitest": "^5.0.0"
|
|
42
42
|
},
|
|
43
43
|
"packageManager": "yarn@4.18.0"
|
|
44
44
|
}
|