@warlock.js/fs 4.1.7 → 4.1.9

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/cjs/index.cjs CHANGED
@@ -32,7 +32,7 @@ let node_path = require("node:path");
32
32
  node_path = __toESM(node_path, 1);
33
33
  let node_fs = require("node:fs");
34
34
 
35
- //#region ../../@warlock.js/fs/src/atomic.ts
35
+ //#region ../@warlock.js/fs/src/atomic.ts
36
36
  /**
37
37
  * Write a file atomically.
38
38
  *
@@ -66,7 +66,7 @@ async function atomicWriteJsonAsync(filePath, value) {
66
66
  }
67
67
 
68
68
  //#endregion
69
- //#region ../../@warlock.js/fs/src/copy.ts
69
+ //#region ../@warlock.js/fs/src/copy.ts
70
70
  /**
71
71
  * Copy a single file. Creates the destination's parent directory if needed.
72
72
  */
@@ -89,7 +89,7 @@ function copyDirectory(source, destination) {
89
89
  }
90
90
 
91
91
  //#endregion
92
- //#region ../../@warlock.js/fs/src/dirs.ts
92
+ //#region ../@warlock.js/fs/src/dirs.ts
93
93
  /**
94
94
  * Ensure a directory exists (recursively creating parents).
95
95
  * Idempotent — no error if the directory already exists.
@@ -102,7 +102,7 @@ function ensureDirectory(path) {
102
102
  }
103
103
 
104
104
  //#endregion
105
- //#region ../../@warlock.js/fs/src/exists.ts
105
+ //#region ../@warlock.js/fs/src/exists.ts
106
106
  /**
107
107
  * Check whether a path exists, REGARDLESS of type — resolves `true` for both
108
108
  * files and directories, `false` only when nothing is there (ENOENT).
@@ -183,7 +183,7 @@ function directoryExists(path) {
183
183
  }
184
184
 
185
185
  //#endregion
186
- //#region ../../@warlock.js/fs/src/hash.ts
186
+ //#region ../@warlock.js/fs/src/hash.ts
187
187
  /**
188
188
  * Compute a hex digest of a file's contents. Uses streaming for large
189
189
  * files so memory doesn't spike when hashing big assets.
@@ -229,7 +229,7 @@ async function hashFileSmallAsync(path, algorithm = "sha256") {
229
229
  }
230
230
 
231
231
  //#endregion
232
- //#region ../../@warlock.js/fs/src/list.ts
232
+ //#region ../@warlock.js/fs/src/list.ts
233
233
  /**
234
234
  * List immediate children of a directory (files + subdirs), returning
235
235
  * full paths.
@@ -262,7 +262,7 @@ function listDirectories(directoryPath) {
262
262
  }
263
263
 
264
264
  //#endregion
265
- //#region ../../@warlock.js/fs/src/read.ts
265
+ //#region ../@warlock.js/fs/src/read.ts
266
266
  /**
267
267
  * Read a file as UTF-8 text.
268
268
  */
@@ -285,7 +285,7 @@ function getJsonFile(path) {
285
285
  }
286
286
 
287
287
  //#endregion
288
- //#region ../../@warlock.js/fs/src/remove.ts
288
+ //#region ../@warlock.js/fs/src/remove.ts
289
289
  /**
290
290
  * Delete a single file. No error if the file doesn't exist.
291
291
  */
@@ -320,7 +320,7 @@ function removeDirectory(path) {
320
320
  }
321
321
 
322
322
  //#endregion
323
- //#region ../../@warlock.js/fs/src/rename.ts
323
+ //#region ../@warlock.js/fs/src/rename.ts
324
324
  /**
325
325
  * Rename / move a file or directory.
326
326
  */
@@ -332,7 +332,7 @@ function renameFile(from, to) {
332
332
  }
333
333
 
334
334
  //#endregion
335
- //#region ../../@warlock.js/fs/src/stats.ts
335
+ //#region ../@warlock.js/fs/src/stats.ts
336
336
  /**
337
337
  * Get last-modified time of a path. Returns a Date.
338
338
  *
@@ -355,7 +355,7 @@ function stats(path) {
355
355
  }
356
356
 
357
357
  //#endregion
358
- //#region ../../@warlock.js/fs/src/write.ts
358
+ //#region ../@warlock.js/fs/src/write.ts
359
359
  /**
360
360
  * Write a UTF-8 string to disk, creating any missing parent directories.
361
361
  */
package/esm/atomic.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/atomic.d.ts
1
+ //#region ../@warlock.js/fs/src/atomic.d.ts
2
2
  /**
3
3
  * Write a file atomically.
4
4
  *
package/esm/atomic.mjs CHANGED
@@ -2,7 +2,7 @@ import { randomBytes } from "node:crypto";
2
2
  import { mkdir, rename, unlink, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
 
5
- //#region ../../@warlock.js/fs/src/atomic.ts
5
+ //#region ../@warlock.js/fs/src/atomic.ts
6
6
  /**
7
7
  * Write a file atomically.
8
8
  *
package/esm/copy.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/copy.d.ts
1
+ //#region ../@warlock.js/fs/src/copy.d.ts
2
2
  /**
3
3
  * Copy a single file. Creates the destination's parent directory if needed.
4
4
  */
package/esm/copy.mjs CHANGED
@@ -2,7 +2,7 @@ import { copyFile, cp, mkdir } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { copyFileSync, cpSync, mkdirSync } from "node:fs";
4
4
 
5
- //#region ../../@warlock.js/fs/src/copy.ts
5
+ //#region ../@warlock.js/fs/src/copy.ts
6
6
  /**
7
7
  * Copy a single file. Creates the destination's parent directory if needed.
8
8
  */
package/esm/dirs.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/dirs.d.ts
1
+ //#region ../@warlock.js/fs/src/dirs.d.ts
2
2
  /**
3
3
  * Ensure a directory exists (recursively creating parents).
4
4
  * Idempotent — no error if the directory already exists.
package/esm/dirs.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { mkdir } from "node:fs/promises";
2
2
  import { mkdirSync } from "node:fs";
3
3
 
4
- //#region ../../@warlock.js/fs/src/dirs.ts
4
+ //#region ../@warlock.js/fs/src/dirs.ts
5
5
  /**
6
6
  * Ensure a directory exists (recursively creating parents).
7
7
  * Idempotent — no error if the directory already exists.
package/esm/exists.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/exists.d.ts
1
+ //#region ../@warlock.js/fs/src/exists.d.ts
2
2
  /**
3
3
  * Check whether a path exists, REGARDLESS of type — resolves `true` for both
4
4
  * files and directories, `false` only when nothing is there (ENOENT).
package/esm/exists.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { access, stat } from "node:fs/promises";
2
2
  import { accessSync, statSync } from "node:fs";
3
3
 
4
- //#region ../../@warlock.js/fs/src/exists.ts
4
+ //#region ../@warlock.js/fs/src/exists.ts
5
5
  /**
6
6
  * Check whether a path exists, REGARDLESS of type — resolves `true` for both
7
7
  * files and directories, `false` only when nothing is there (ENOENT).
package/esm/hash.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/hash.d.ts
1
+ //#region ../@warlock.js/fs/src/hash.d.ts
2
2
  type HashAlgorithm = "sha256" | "sha1" | "md5" | "sha512";
3
3
  /**
4
4
  * Compute a hex digest of a file's contents. Uses streaming for large
package/esm/hash.mjs CHANGED
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { createReadStream, readFileSync } from "node:fs";
4
4
 
5
- //#region ../../@warlock.js/fs/src/hash.ts
5
+ //#region ../@warlock.js/fs/src/hash.ts
6
6
  /**
7
7
  * Compute a hex digest of a file's contents. Uses streaming for large
8
8
  * files so memory doesn't spike when hashing big assets.
package/esm/list.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/list.d.ts
1
+ //#region ../@warlock.js/fs/src/list.d.ts
2
2
  /**
3
3
  * List immediate children of a directory (files + subdirs), returning
4
4
  * full paths.
package/esm/list.mjs CHANGED
@@ -2,7 +2,7 @@ import { readdir, stat } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { readdirSync, statSync } from "node:fs";
4
4
 
5
- //#region ../../@warlock.js/fs/src/list.ts
5
+ //#region ../@warlock.js/fs/src/list.ts
6
6
  /**
7
7
  * List immediate children of a directory (files + subdirs), returning
8
8
  * full paths.
package/esm/read.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/read.d.ts
1
+ //#region ../@warlock.js/fs/src/read.d.ts
2
2
  /**
3
3
  * Read a file as UTF-8 text.
4
4
  */
package/esm/read.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import { readFileSync } from "node:fs";
3
3
 
4
- //#region ../../@warlock.js/fs/src/read.ts
4
+ //#region ../@warlock.js/fs/src/read.ts
5
5
  /**
6
6
  * Read a file as UTF-8 text.
7
7
  */
package/esm/remove.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/remove.d.ts
1
+ //#region ../@warlock.js/fs/src/remove.d.ts
2
2
  /**
3
3
  * Delete a single file. No error if the file doesn't exist.
4
4
  */
package/esm/remove.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { rm, unlink } from "node:fs/promises";
2
2
  import { rmSync, unlinkSync } from "node:fs";
3
3
 
4
- //#region ../../@warlock.js/fs/src/remove.ts
4
+ //#region ../@warlock.js/fs/src/remove.ts
5
5
  /**
6
6
  * Delete a single file. No error if the file doesn't exist.
7
7
  */
package/esm/rename.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/rename.d.ts
1
+ //#region ../@warlock.js/fs/src/rename.d.ts
2
2
  /**
3
3
  * Rename / move a file or directory.
4
4
  */
package/esm/rename.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { rename } from "node:fs/promises";
2
2
  import { renameSync } from "node:fs";
3
3
 
4
- //#region ../../@warlock.js/fs/src/rename.ts
4
+ //#region ../@warlock.js/fs/src/rename.ts
5
5
  /**
6
6
  * Rename / move a file or directory.
7
7
  */
package/esm/stats.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/stats.d.ts
1
+ //#region ../@warlock.js/fs/src/stats.d.ts
2
2
  /**
3
3
  * Get last-modified time of a path. Returns a Date.
4
4
  *
package/esm/stats.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { stat } from "node:fs/promises";
2
2
  import { statSync } from "node:fs";
3
3
 
4
- //#region ../../@warlock.js/fs/src/stats.ts
4
+ //#region ../@warlock.js/fs/src/stats.ts
5
5
  /**
6
6
  * Get last-modified time of a path. Returns a Date.
7
7
  *
package/esm/write.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/fs/src/write.d.ts
1
+ //#region ../@warlock.js/fs/src/write.d.ts
2
2
  /**
3
3
  * Write a UTF-8 string to disk, creating any missing parent directories.
4
4
  */
package/esm/write.mjs CHANGED
@@ -2,7 +2,7 @@ import { mkdir, writeFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { mkdirSync, writeFileSync } from "node:fs";
4
4
 
5
- //#region ../../@warlock.js/fs/src/write.ts
5
+ //#region ../@warlock.js/fs/src/write.ts
6
6
  /**
7
7
  * Write a UTF-8 string to disk, creating any missing parent directories.
8
8
  */
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/warlockjs/fs"
7
7
  },
8
- "version": "4.1.7",
8
+ "version": "4.1.9",
9
9
  "main": "./cjs/index.cjs",
10
10
  "module": "./esm/index.mjs",
11
11
  "types": "./esm/index.d.mts",