@unshared/fs 0.5.0 → 0.6.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/dist/createTemporaryDirectory.d.ts +2 -1
- package/dist/createTemporaryDirectory.js +1 -1
- package/dist/createTemporaryFile.d.ts +2 -1
- package/dist/createTemporaryFile.js +1 -1
- package/dist/glob.d.ts +2 -1
- package/dist/loadObject.d.ts +2 -1
- package/dist/touch.d.ts +2 -1
- package/dist/updateFile.d.ts +2 -1
- package/dist/withTemporaryDirectories.d.ts +1 -1
- package/dist/withTemporaryFiles.d.ts +1 -1
- package/package.json +7 -7
@@ -32,4 +32,5 @@ interface CreateTemporaryDirectoryOptions {
|
|
32
32
|
*/
|
33
33
|
declare function createTemporaryDirectory(options?: CreateTemporaryDirectoryOptions): Promise<readonly [string, () => Promise<void>]>;
|
34
34
|
|
35
|
-
export {
|
35
|
+
export { createTemporaryDirectory };
|
36
|
+
export type { CreateTemporaryDirectoryOptions };
|
@@ -41,4 +41,5 @@ interface CreateTemporaryFileOptions {
|
|
41
41
|
*/
|
42
42
|
declare function createTemporaryFile(content?: Parameters<typeof writeFile>[1], options?: CreateTemporaryFileOptions): Promise<readonly [string, () => Promise<void>]>;
|
43
43
|
|
44
|
-
export {
|
44
|
+
export { createTemporaryFile };
|
45
|
+
export type { CreateTemporaryFileOptions };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { randomInt } from "node:crypto";
|
2
|
-
import { mkdir, writeFile
|
2
|
+
import { rm, mkdir, writeFile } from "node:fs/promises";
|
3
3
|
import { tmpdir } from "node:os";
|
4
4
|
import { join } from "node:path";
|
5
5
|
async function createTemporaryFile(content, options = {}) {
|
package/dist/glob.d.ts
CHANGED
@@ -68,4 +68,5 @@ declare function glob(pattern: MaybeArray<string>, options?: GlobOptions<false>)
|
|
68
68
|
declare function glob(pattern: MaybeArray<string>, options?: GlobOptions<true>): GlobResult<true>;
|
69
69
|
declare function glob<T extends boolean>(pattern: MaybeArray<string>, options?: GlobOptions<T>): GlobResult<T>;
|
70
70
|
|
71
|
-
export {
|
71
|
+
export { glob };
|
72
|
+
export type { GlobEntry, GlobOptions, GlobResult };
|
package/dist/loadObject.d.ts
CHANGED
@@ -226,4 +226,5 @@ declare class FSObject<T extends object> extends EventEmitter<FSObjectEventMap<T
|
|
226
226
|
*/
|
227
227
|
declare function loadObject<T extends object>(path: PathLike, options?: FSObjectOptions<T>): Awaitable<FSObject<T>, Reactive<T>>;
|
228
228
|
|
229
|
-
export { FSObject,
|
229
|
+
export { FSObject, loadObject };
|
230
|
+
export type { FSObjectEventMap, FSObjectOptions };
|
package/dist/touch.d.ts
CHANGED
package/dist/updateFile.d.ts
CHANGED
@@ -29,4 +29,5 @@ type UpdateFileCallback<T extends Buffer | string> = (content: T) => MaybePromis
|
|
29
29
|
declare function updateFile(path: PathLike, callback: UpdateFileCallback<Buffer>): Promise<void>;
|
30
30
|
declare function updateFile(path: PathLike, callback: UpdateFileCallback<string>, encoding: BufferEncoding): Promise<void>;
|
31
31
|
|
32
|
-
export {
|
32
|
+
export { updateFile };
|
33
|
+
export type { UpdateFileCallback };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Tuple, TupleLength } from '@unshared/types';
|
2
2
|
import { CreateTemporaryDirectoryOptions } from './createTemporaryDirectory.js';
|
3
3
|
|
4
4
|
type Callback<U, N extends number> = (...paths: Tuple<N, string>) => Promise<U> | U;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@unshared/fs",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.6.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"sideEffects": false,
|
7
7
|
"author": "Stanley Horwood <stanley@hsjm.io>",
|
@@ -78,13 +78,13 @@
|
|
78
78
|
"LICENSE.md"
|
79
79
|
],
|
80
80
|
"dependencies": {
|
81
|
-
"@unshared/collection": "0.
|
82
|
-
"@unshared/functions": "0.
|
83
|
-
"@unshared/reactivity": "0.
|
84
|
-
"@unshared/string": "0.
|
85
|
-
"@unshared/types": "0.
|
81
|
+
"@unshared/collection": "0.6.0",
|
82
|
+
"@unshared/functions": "0.6.0",
|
83
|
+
"@unshared/reactivity": "0.6.0",
|
84
|
+
"@unshared/string": "0.6.0",
|
85
|
+
"@unshared/types": "0.6.0"
|
86
86
|
},
|
87
87
|
"devDependencies": {
|
88
|
-
"memfs": "4.
|
88
|
+
"memfs": "4.17.2"
|
89
89
|
}
|
90
90
|
}
|