@visulima/fs 3.1.0 → 3.1.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +166 -165
  3. package/dist/error.d.ts +1 -1
  4. package/dist/index.cjs +20 -20
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.mts +2 -2
  7. package/dist/index.d.ts +3 -3
  8. package/dist/index.mjs +22 -22
  9. package/dist/packem_shared/{collect-BtDVJEOm.mjs → collect-B615pR8z.mjs} +1 -1
  10. package/dist/packem_shared/{collect-DxUriHCH.cjs → collect-DHldhy_s.cjs} +1 -1
  11. package/dist/packem_shared/{collectSync-CGjdb50I.mjs → collectSync-CYuBdXWI.mjs} +1 -1
  12. package/dist/packem_shared/{collectSync-BaA0s001.cjs → collectSync-zahGoTi-.cjs} +1 -1
  13. package/dist/packem_shared/{ensureDir-iUK2ga5M.cjs → ensureDir-BOfUZlxG.cjs} +1 -1
  14. package/dist/packem_shared/{ensureDir-XiBlkOLR.mjs → ensureDir-BnA_fY1A.mjs} +1 -1
  15. package/dist/packem_shared/{ensureDirSync-CXdMkg0Y.cjs → ensureDirSync-DHmWi3CF.cjs} +1 -1
  16. package/dist/packem_shared/{ensureDirSync-2IFUHFK2.mjs → ensureDirSync-Dm4az3YF.mjs} +1 -1
  17. package/dist/packem_shared/{ensureFile-C2bWlBEa.mjs → ensureFile-BKrJMHfr.mjs} +2 -2
  18. package/dist/packem_shared/{ensureFile-Br8tFUJ7.cjs → ensureFile-CeGryLJI.cjs} +2 -2
  19. package/dist/packem_shared/{ensureFileSync-CZzSkNGC.cjs → ensureFileSync-B7THM1sN.cjs} +2 -2
  20. package/dist/packem_shared/{ensureFileSync-DkFfhOEs.mjs → ensureFileSync-BnhFBXaR.mjs} +2 -2
  21. package/dist/packem_shared/{ensureLink-CFiabAD3.mjs → ensureLink-ChsWDTK5.mjs} +1 -1
  22. package/dist/packem_shared/{ensureLink-Dqw5GBDq.cjs → ensureLink-CrxLNmHE.cjs} +1 -1
  23. package/dist/packem_shared/{ensureLinkSync-Dk-YeRg6.mjs → ensureLinkSync-CG-DTUoV.mjs} +1 -1
  24. package/dist/packem_shared/{ensureLinkSync-BVw3h6sK.cjs → ensureLinkSync-D8uMqLh4.cjs} +1 -1
  25. package/dist/packem_shared/{ensureSymlink-CSqngPoI.mjs → ensureSymlink-BwJ_QhzJ.mjs} +2 -2
  26. package/dist/packem_shared/{ensureSymlink-CFSfreco.cjs → ensureSymlink-D_ieOVYa.cjs} +2 -2
  27. package/dist/packem_shared/{ensureSymlinkSync-QRaNZX2E.mjs → ensureSymlinkSync-BamG29QK.mjs} +2 -2
  28. package/dist/packem_shared/{ensureSymlinkSync-BCd9bzsx.cjs → ensureSymlinkSync-DTMvUYZD.cjs} +2 -2
  29. package/dist/packem_shared/{findUp-C8_QpAtD.mjs → findUp-D5W-MTpT.mjs} +4 -4
  30. package/dist/packem_shared/{findUp-DA511Swp.cjs → findUp-DVIYN2wV.cjs} +4 -4
  31. package/dist/packem_shared/{findUpSync-u1rGibzw.cjs → findUpSync-BOiVyUOx.cjs} +4 -4
  32. package/dist/packem_shared/{findUpSync-DVOd3V-q.mjs → findUpSync-DL3NPCYg.mjs} +4 -4
  33. package/dist/packem_shared/{get-file-info-type-BpRzQHvd.cjs → get-file-info-type-BlryFnpp.cjs} +1 -1
  34. package/dist/packem_shared/{get-file-info-type-CeiZ6n6g.mjs → get-file-info-type-ButUVD6d.mjs} +1 -1
  35. package/dist/packem_shared/{index-ngvEMjBI.cjs → index-BVZL6YMm.cjs} +2 -2
  36. package/dist/packem_shared/{index-ajT9ecry.mjs → index-r9Pk9gBe.mjs} +2 -2
  37. package/dist/packem_shared/{parseJson-DcUo4Rpt.cjs → parseJson-5geAXtlm.cjs} +3 -4
  38. package/dist/packem_shared/{parseJson-n9THWOFI.mjs → parseJson-D7XcVuDD.mjs} +3 -4
  39. package/dist/packem_shared/{readFile-DUM-xNoB.mjs → readFile-b7UBVv17.mjs} +1 -1
  40. package/dist/packem_shared/{readFileSync-Cck96_o0.mjs → readFileSync-CkEJBqZB.mjs} +1 -1
  41. package/dist/packem_shared/{readJson-JrCHMN3m.cjs → readJson-CG6Pm3bL.cjs} +3 -3
  42. package/dist/packem_shared/{readJson-DIHRleEE.mjs → readJson-Ddq4aS0W.mjs} +4 -4
  43. package/dist/packem_shared/{readJsonSync-BPfxTuQL.mjs → readJsonSync-C1IyJccj.mjs} +4 -4
  44. package/dist/packem_shared/{readJsonSync-o_MAOlUv.cjs → readJsonSync-DXVlgWNf.cjs} +3 -3
  45. package/dist/packem_shared/{readYaml-vVKK8ZzY.mjs → readYaml-C5MSs2GE.mjs} +1 -1
  46. package/dist/packem_shared/{readYamlSync-MOLH4gXB.mjs → readYamlSync-CPjA-DLv.mjs} +1 -1
  47. package/dist/packem_shared/{types-CiwAWOQj.d.mts → types-Crz-rGlC.d.cts} +1 -1
  48. package/dist/packem_shared/{types-CiwAWOQj.d.cts → types-Crz-rGlC.d.mts} +1 -1
  49. package/dist/packem_shared/{types-CiwAWOQj.d.mjs → types-Crz-rGlC.d.ts} +1 -1
  50. package/dist/packem_shared/{walk-CNcSYQVq.mjs → walk-BIh3_ljI.mjs} +9 -15
  51. package/dist/packem_shared/{walk-BW7b4GXI.cjs → walk-PpNwjtjX.cjs} +9 -15
  52. package/dist/packem_shared/{walkSync-DgPj93NL.cjs → walkSync-BidUqvMI.cjs} +3 -3
  53. package/dist/packem_shared/{walkSync-BzxdFWLU.mjs → walkSync-CFwkbDz9.mjs} +3 -3
  54. package/dist/packem_shared/{writeFile-CzpkxDqy.mjs → writeFile-BZ4JBQxc.mjs} +1 -1
  55. package/dist/packem_shared/{writeFile-CnWc2ZOW.cjs → writeFile-DgCFRCe5.cjs} +1 -1
  56. package/dist/packem_shared/{writeFileSync-DYRpumrj.mjs → writeFileSync-Ctw5pNQH.mjs} +1 -1
  57. package/dist/packem_shared/{writeFileSync-da4qD9Nz.cjs → writeFileSync-DzXhx1pF.cjs} +1 -1
  58. package/dist/packem_shared/{writeJson-9_C3v2B3.cjs → writeJson-Bh4sU1Ly.cjs} +2 -2
  59. package/dist/packem_shared/{writeJson-V9KBXfw2.mjs → writeJson-axO_14yL.mjs} +2 -2
  60. package/dist/packem_shared/{writeJsonSync-CyaXNy3X.mjs → writeJsonSync-CzngmuKb.mjs} +2 -2
  61. package/dist/packem_shared/{writeJsonSync-C5kkxqE7.cjs → writeJsonSync-HFdHjunl.cjs} +2 -2
  62. package/dist/packem_shared/{writeYaml-DDLK7NDr.cjs → writeYaml-C0YnZ1bp.cjs} +1 -1
  63. package/dist/packem_shared/{writeYaml-DJ17fqNj.mjs → writeYaml-Cuj4H9ut.mjs} +1 -1
  64. package/dist/packem_shared/{writeYamlSync-DST-W6N7.cjs → writeYamlSync-BBNLBbQK.cjs} +1 -1
  65. package/dist/packem_shared/{writeYamlSync-C6nrcP2e.mjs → writeYamlSync-cL8f07FV.mjs} +1 -1
  66. package/dist/size.mjs +1 -1
  67. package/dist/utils.cjs +1 -1
  68. package/dist/utils.d.cts +1 -1
  69. package/dist/utils.d.mts +1 -1
  70. package/dist/utils.d.ts +3 -3
  71. package/dist/utils.mjs +1 -1
  72. package/dist/yaml.cjs +2 -2
  73. package/dist/yaml.d.cts +1 -1
  74. package/dist/yaml.d.mts +1 -1
  75. package/dist/yaml.d.ts +1 -1
  76. package/dist/yaml.mjs +4 -4
  77. package/package.json +2 -2
  78. /package/dist/packem_shared/{json-error-ZPgZIXcg.d.mjs → json-error-ZPgZIXcg.d.ts} +0 -0
  79. /package/dist/packem_shared/{observable-like.d-BlD8q22s.d.mjs → observable-like.d-BlD8q22s.d.ts} +0 -0
@@ -17,7 +17,7 @@ const process = new Proxy(_process, {
17
17
  if (property in processShims) {
18
18
  return processShims[property];
19
19
  }
20
- return undefined;
20
+ return void 0;
21
21
  }
22
22
  });
23
23
  var __defProp$1$1 = Object.defineProperty;
@@ -79,7 +79,6 @@ const codeFrame = /* @__PURE__ */ __name2$1((source, loc, options) => {
79
79
  linesBelow: 3,
80
80
  prefix: "",
81
81
  showGutter: true,
82
- showLineNumbers: true,
83
82
  tabWidth: 4,
84
83
  ...options,
85
84
  color: {
@@ -198,7 +197,7 @@ const generateCodeFrame = /* @__PURE__ */ __name((source, location, options) =>
198
197
  const getErrorLocation = /* @__PURE__ */ __name((source, message) => {
199
198
  const match = /in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/.exec(message);
200
199
  if (!match) {
201
- return undefined;
200
+ return void 0;
202
201
  }
203
202
  let { column, index, line } = match.groups;
204
203
  if (line && column) {
@@ -222,7 +221,7 @@ function parseJson(string, reviver, fileName, options) {
222
221
  options = fileName;
223
222
  }
224
223
  fileName = reviver;
225
- reviver = undefined;
224
+ reviver = void 0;
226
225
  }
227
226
  let message;
228
227
  try {
@@ -1,5 +1,5 @@
1
1
  import { readFile as readFile$1 } from 'node:fs/promises';
2
- import { brotliDecompress, unzip } from 'node:zlib';
2
+ import { unzip, brotliDecompress } from 'node:zlib';
3
3
  import { toPath } from '@visulima/path/utils';
4
4
  import { R_OK } from './F_OK-JER1LjUr.mjs';
5
5
  import PermissionError from './PermissionError-CqGMI9qC.mjs';
@@ -1,5 +1,5 @@
1
1
  import { readFileSync as readFileSync$1 } from 'node:fs';
2
- import { brotliDecompressSync, unzipSync } from 'node:zlib';
2
+ import { unzipSync, brotliDecompressSync } from 'node:zlib';
3
3
  import { toPath } from '@visulima/path/utils';
4
4
  import { R_OK } from './F_OK-JER1LjUr.mjs';
5
5
  import PermissionError from './PermissionError-CqGMI9qC.mjs';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const utils = require('@visulima/path/utils');
4
- const parseJson = require('./parseJson-DcUo4Rpt.cjs');
4
+ const parseJson = require('./parseJson-5geAXtlm.cjs');
5
5
  const readFile = require('./readFile-iFUhZHnh.cjs');
6
6
 
7
7
  var __defProp = Object.defineProperty;
@@ -9,11 +9,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
9
9
  async function readJson(path, reviver, options) {
10
10
  if (typeof reviver === "object") {
11
11
  options = reviver;
12
- reviver = undefined;
12
+ reviver = void 0;
13
13
  }
14
14
  const content = await readFile(path, {
15
15
  buffer: true,
16
- encoding: undefined
16
+ encoding: void 0
17
17
  });
18
18
  let data = new TextDecoder().decode(content);
19
19
  const { beforeParse, color } = options ?? {};
@@ -1,17 +1,17 @@
1
1
  import { toPath } from '@visulima/path/utils';
2
- import parseJson from './parseJson-n9THWOFI.mjs';
3
- import readFile from './readFile-DUM-xNoB.mjs';
2
+ import parseJson from './parseJson-D7XcVuDD.mjs';
3
+ import readFile from './readFile-b7UBVv17.mjs';
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
7
  async function readJson(path, reviver, options) {
8
8
  if (typeof reviver === "object") {
9
9
  options = reviver;
10
- reviver = undefined;
10
+ reviver = void 0;
11
11
  }
12
12
  const content = await readFile(path, {
13
13
  buffer: true,
14
- encoding: undefined
14
+ encoding: void 0
15
15
  });
16
16
  let data = new TextDecoder().decode(content);
17
17
  const { beforeParse, color } = options ?? {};
@@ -1,17 +1,17 @@
1
1
  import { toPath } from '@visulima/path/utils';
2
- import parseJson from './parseJson-n9THWOFI.mjs';
3
- import readFileSync from './readFileSync-Cck96_o0.mjs';
2
+ import parseJson from './parseJson-D7XcVuDD.mjs';
3
+ import readFileSync from './readFileSync-CkEJBqZB.mjs';
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
7
  function readJsonSync(path, reviver, options) {
8
8
  if (typeof reviver === "object") {
9
9
  options = reviver;
10
- reviver = undefined;
10
+ reviver = void 0;
11
11
  }
12
12
  const content = readFileSync(path, {
13
13
  buffer: true,
14
- encoding: undefined
14
+ encoding: void 0
15
15
  });
16
16
  let data = new TextDecoder().decode(content);
17
17
  const { beforeParse, color } = options ?? {};
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const utils = require('@visulima/path/utils');
4
- const parseJson = require('./parseJson-DcUo4Rpt.cjs');
4
+ const parseJson = require('./parseJson-5geAXtlm.cjs');
5
5
  const readFileSync = require('./readFileSync-B3NTOR-W.cjs');
6
6
 
7
7
  var __defProp = Object.defineProperty;
@@ -9,11 +9,11 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
9
9
  function readJsonSync(path, reviver, options) {
10
10
  if (typeof reviver === "object") {
11
11
  options = reviver;
12
- reviver = undefined;
12
+ reviver = void 0;
13
13
  }
14
14
  const content = readFileSync(path, {
15
15
  buffer: true,
16
- encoding: undefined
16
+ encoding: void 0
17
17
  });
18
18
  let data = new TextDecoder().decode(content);
19
19
  const { beforeParse, color } = options ?? {};
@@ -1,5 +1,5 @@
1
1
  import { parse } from 'yaml';
2
- import readFile from './readFile-DUM-xNoB.mjs';
2
+ import readFile from './readFile-b7UBVv17.mjs';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,5 +1,5 @@
1
1
  import { parse } from 'yaml';
2
- import readFileSync from './readFileSync-Cck96_o0.mjs';
2
+ import readFileSync from './readFileSync-CkEJBqZB.mjs';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,4 +1,4 @@
1
- import { Dirent, PathLike } from 'node:fs';
1
+ import { PathLike, Dirent } from 'node:fs';
2
2
  import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from 'yaml';
3
3
 
4
4
  declare const F_OK = 0;
@@ -1,4 +1,4 @@
1
- import { Dirent, PathLike } from 'node:fs';
1
+ import { PathLike, Dirent } from 'node:fs';
2
2
  import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from 'yaml';
3
3
 
4
4
  declare const F_OK = 0;
@@ -1,4 +1,4 @@
1
- import { Dirent, PathLike } from 'node:fs';
1
+ import { PathLike, Dirent } from 'node:fs';
2
2
  import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from 'yaml';
3
3
 
4
4
  declare const F_OK = 0;
@@ -12,12 +12,9 @@ const _createWalkEntry = /* @__PURE__ */ __name(async (path) => {
12
12
  const name = basename(normalizePath);
13
13
  const info = await stat(normalizePath);
14
14
  return {
15
- // eslint-disable-next-line @typescript-eslint/unbound-method
16
- isDirectory: info.isDirectory,
17
- // eslint-disable-next-line @typescript-eslint/unbound-method
18
- isFile: info.isFile,
19
- // eslint-disable-next-line @typescript-eslint/unbound-method
20
- isSymbolicLink: info.isSymbolicLink,
15
+ isDirectory: /* @__PURE__ */ __name(() => info.isDirectory(), "isDirectory"),
16
+ isFile: /* @__PURE__ */ __name(() => info.isFile(), "isFile"),
17
+ isSymbolicLink: /* @__PURE__ */ __name(() => info.isSymbolicLink(), "isSymbolicLink"),
21
18
  name,
22
19
  path: normalizePath
23
20
  };
@@ -36,13 +33,13 @@ async function* walk(directory, {
36
33
  if (maxDepth < 0) {
37
34
  return;
38
35
  }
39
- const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : undefined;
40
- const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : undefined;
36
+ const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : void 0;
37
+ const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : void 0;
41
38
  directory = resolve(toPath(directory));
42
39
  if (includeDirectories && walkInclude(directory, extensions, mappedMatch, mappedSkip)) {
43
40
  yield await _createWalkEntry(directory);
44
41
  }
45
- if (maxDepth < 1 || !walkInclude(directory, undefined, undefined, mappedSkip)) {
42
+ if (maxDepth < 1 || !walkInclude(directory, void 0, void 0, mappedSkip)) {
46
43
  return;
47
44
  }
48
45
  try {
@@ -81,12 +78,9 @@ async function* walk(directory, {
81
78
  });
82
79
  } else if (entry.isFile() && includeFiles && walkInclude(path, extensions, mappedMatch, mappedSkip)) {
83
80
  yield {
84
- // eslint-disable-next-line @typescript-eslint/unbound-method
85
- isDirectory: entry.isDirectory,
86
- // eslint-disable-next-line @typescript-eslint/unbound-method
87
- isFile: entry.isFile,
88
- // eslint-disable-next-line @typescript-eslint/unbound-method
89
- isSymbolicLink: entry.isSymbolicLink,
81
+ isDirectory: /* @__PURE__ */ __name(() => entry.isDirectory(), "isDirectory"),
82
+ isFile: /* @__PURE__ */ __name(() => entry.isFile(), "isFile"),
83
+ isSymbolicLink: /* @__PURE__ */ __name(() => entry.isSymbolicLink(), "isSymbolicLink"),
90
84
  name: entry.name,
91
85
  path
92
86
  };
@@ -14,12 +14,9 @@ const _createWalkEntry = /* @__PURE__ */ __name(async (path$1) => {
14
14
  const name = path.basename(normalizePath);
15
15
  const info = await promises.stat(normalizePath);
16
16
  return {
17
- // eslint-disable-next-line @typescript-eslint/unbound-method
18
- isDirectory: info.isDirectory,
19
- // eslint-disable-next-line @typescript-eslint/unbound-method
20
- isFile: info.isFile,
21
- // eslint-disable-next-line @typescript-eslint/unbound-method
22
- isSymbolicLink: info.isSymbolicLink,
17
+ isDirectory: /* @__PURE__ */ __name(() => info.isDirectory(), "isDirectory"),
18
+ isFile: /* @__PURE__ */ __name(() => info.isFile(), "isFile"),
19
+ isSymbolicLink: /* @__PURE__ */ __name(() => info.isSymbolicLink(), "isSymbolicLink"),
23
20
  name,
24
21
  path: normalizePath
25
22
  };
@@ -38,13 +35,13 @@ async function* walk(directory, {
38
35
  if (maxDepth < 0) {
39
36
  return;
40
37
  }
41
- const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : undefined;
42
- const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : undefined;
38
+ const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : void 0;
39
+ const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : void 0;
43
40
  directory = path.resolve(utils.toPath(directory));
44
41
  if (includeDirectories && walkInclude.walkInclude(directory, extensions, mappedMatch, mappedSkip)) {
45
42
  yield await _createWalkEntry(directory);
46
43
  }
47
- if (maxDepth < 1 || !walkInclude.walkInclude(directory, undefined, undefined, mappedSkip)) {
44
+ if (maxDepth < 1 || !walkInclude.walkInclude(directory, void 0, void 0, mappedSkip)) {
48
45
  return;
49
46
  }
50
47
  try {
@@ -83,12 +80,9 @@ async function* walk(directory, {
83
80
  });
84
81
  } else if (entry.isFile() && includeFiles && walkInclude.walkInclude(path$1, extensions, mappedMatch, mappedSkip)) {
85
82
  yield {
86
- // eslint-disable-next-line @typescript-eslint/unbound-method
87
- isDirectory: entry.isDirectory,
88
- // eslint-disable-next-line @typescript-eslint/unbound-method
89
- isFile: entry.isFile,
90
- // eslint-disable-next-line @typescript-eslint/unbound-method
91
- isSymbolicLink: entry.isSymbolicLink,
83
+ isDirectory: /* @__PURE__ */ __name(() => entry.isDirectory(), "isDirectory"),
84
+ isFile: /* @__PURE__ */ __name(() => entry.isFile(), "isFile"),
85
+ isSymbolicLink: /* @__PURE__ */ __name(() => entry.isSymbolicLink(), "isSymbolicLink"),
92
86
  name: entry.name,
93
87
  path: path$1
94
88
  };
@@ -37,13 +37,13 @@ function* walkSync(directory, {
37
37
  if (maxDepth < 0) {
38
38
  return;
39
39
  }
40
- const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : undefined;
41
- const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : undefined;
40
+ const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : void 0;
41
+ const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? walkInclude.globToRegExp(pattern) : pattern) : void 0;
42
42
  directory = path.resolve(utils.toPath(directory));
43
43
  if (includeDirectories && walkInclude.walkInclude(directory, extensions, mappedMatch, mappedSkip)) {
44
44
  yield _createWalkEntry(directory);
45
45
  }
46
- if (maxDepth < 1 || !walkInclude.walkInclude(directory, undefined, undefined, mappedSkip)) {
46
+ if (maxDepth < 1 || !walkInclude.walkInclude(directory, void 0, void 0, mappedSkip)) {
47
47
  return;
48
48
  }
49
49
  try {
@@ -35,13 +35,13 @@ function* walkSync(directory, {
35
35
  if (maxDepth < 0) {
36
36
  return;
37
37
  }
38
- const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : undefined;
39
- const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : undefined;
38
+ const mappedMatch = match ? match.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : void 0;
39
+ const mappedSkip = skip ? skip.map((pattern) => typeof pattern === "string" ? globToRegExp(pattern) : pattern) : void 0;
40
40
  directory = resolve(toPath(directory));
41
41
  if (includeDirectories && walkInclude(directory, extensions, mappedMatch, mappedSkip)) {
42
42
  yield _createWalkEntry(directory);
43
43
  }
44
- if (maxDepth < 1 || !walkInclude(directory, undefined, undefined, mappedSkip)) {
44
+ if (maxDepth < 1 || !walkInclude(directory, void 0, void 0, mappedSkip)) {
45
45
  return;
46
46
  }
47
47
  try {
@@ -33,7 +33,7 @@ const writeFile = /* @__PURE__ */ __name(async (path, content, options) => {
33
33
  await writeFile$1(temporaryPath, toUint8Array(content), { encoding: options.encoding, flag: options.flag });
34
34
  if (pathExists && !options.overwrite) {
35
35
  stat$1 = await stat(path);
36
- if (options.chown === undefined) {
36
+ if (options.chown === void 0) {
37
37
  options.chown = { gid: stat$1.gid, uid: stat$1.uid };
38
38
  }
39
39
  await rename(path, `${path}.bak`);
@@ -35,7 +35,7 @@ const writeFile = /* @__PURE__ */ __name(async (path$1, content, options) => {
35
35
  await promises.writeFile(temporaryPath, toUint8Array.toUint8Array(content), { encoding: options.encoding, flag: options.flag });
36
36
  if (pathExists && !options.overwrite) {
37
37
  stat = await promises.stat(path$1);
38
- if (options.chown === undefined) {
38
+ if (options.chown === void 0) {
39
39
  options.chown = { gid: stat.gid, uid: stat.uid };
40
40
  }
41
41
  await promises.rename(path$1, `${path$1}.bak`);
@@ -33,7 +33,7 @@ const writeFileSync = /* @__PURE__ */ __name((path, content, options) => {
33
33
  writeFileSync$1(temporaryPath, toUint8Array(content), { encoding: options.encoding, flag: options.flag });
34
34
  if (pathExists && !options.overwrite) {
35
35
  stat = statSync(path);
36
- if (options.chown === undefined) {
36
+ if (options.chown === void 0) {
37
37
  options.chown = { gid: stat.gid, uid: stat.uid };
38
38
  }
39
39
  renameSync(path, `${path}.bak`);
@@ -35,7 +35,7 @@ const writeFileSync = /* @__PURE__ */ __name((path$1, content, options) => {
35
35
  node_fs.writeFileSync(temporaryPath, toUint8Array.toUint8Array(content), { encoding: options.encoding, flag: options.flag });
36
36
  if (pathExists && !options.overwrite) {
37
37
  stat = node_fs.statSync(path$1);
38
- if (options.chown === undefined) {
38
+ if (options.chown === void 0) {
39
39
  options.chown = { gid: stat.gid, uid: stat.uid };
40
40
  }
41
41
  node_fs.renameSync(path$1, `${path$1}.bak`);
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const promises = require('node:fs/promises');
4
- const index = require('./index-ngvEMjBI.cjs');
4
+ const index = require('./index-BVZL6YMm.cjs');
5
5
  const F_OK = require('./F_OK-CWSqQIdF.cjs');
6
6
  const isAccessible = require('./isAccessible-ZNVGsSb7.cjs');
7
- const writeFile = require('./writeFile-CnWc2ZOW.cjs');
7
+ const writeFile = require('./writeFile-DgCFRCe5.cjs');
8
8
 
9
9
  var __defProp = Object.defineProperty;
10
10
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,8 +1,8 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { d as detectIndent } from './index-ajT9ecry.mjs';
2
+ import { d as detectIndent } from './index-r9Pk9gBe.mjs';
3
3
  import { R_OK } from './F_OK-JER1LjUr.mjs';
4
4
  import isAccessible from './isAccessible-Bonsm1Ez.mjs';
5
- import writeFile from './writeFile-CzpkxDqy.mjs';
5
+ import writeFile from './writeFile-BZ4JBQxc.mjs';
6
6
 
7
7
  var __defProp = Object.defineProperty;
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,8 +1,8 @@
1
1
  import { readFileSync } from 'node:fs';
2
- import { d as detectIndent } from './index-ajT9ecry.mjs';
2
+ import { d as detectIndent } from './index-r9Pk9gBe.mjs';
3
3
  import { R_OK } from './F_OK-JER1LjUr.mjs';
4
4
  import isAccessibleSync from './isAccessibleSync-3gnUWUwX.mjs';
5
- import writeFileSync from './writeFileSync-DYRpumrj.mjs';
5
+ import writeFileSync from './writeFileSync-Ctw5pNQH.mjs';
6
6
 
7
7
  var __defProp = Object.defineProperty;
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const node_fs = require('node:fs');
4
- const index = require('./index-ngvEMjBI.cjs');
4
+ const index = require('./index-BVZL6YMm.cjs');
5
5
  const F_OK = require('./F_OK-CWSqQIdF.cjs');
6
6
  const isAccessibleSync = require('./isAccessibleSync-VWjQa-US.cjs');
7
- const writeFileSync = require('./writeFileSync-da4qD9Nz.cjs');
7
+ const writeFileSync = require('./writeFileSync-DzXhx1pF.cjs');
8
8
 
9
9
  var __defProp = Object.defineProperty;
10
10
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const yaml = require('yaml');
4
- const writeFile = require('./writeFile-CnWc2ZOW.cjs');
4
+ const writeFile = require('./writeFile-DgCFRCe5.cjs');
5
5
 
6
6
  var __defProp = Object.defineProperty;
7
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,5 +1,5 @@
1
1
  import { stringify } from 'yaml';
2
- import writeFile from './writeFile-CzpkxDqy.mjs';
2
+ import writeFile from './writeFile-BZ4JBQxc.mjs';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const yaml = require('yaml');
4
- const writeFileSync = require('./writeFileSync-da4qD9Nz.cjs');
4
+ const writeFileSync = require('./writeFileSync-DzXhx1pF.cjs');
5
5
 
6
6
  var __defProp = Object.defineProperty;
7
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,5 +1,5 @@
1
1
  import { stringify } from 'yaml';
2
- import writeFileSync from './writeFileSync-DYRpumrj.mjs';
2
+ import writeFileSync from './writeFileSync-Ctw5pNQH.mjs';
3
3
 
4
4
  var __defProp = Object.defineProperty;
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
package/dist/size.mjs CHANGED
@@ -3,7 +3,7 @@ import { readFile } from 'node:fs/promises';
3
3
  import { isAbsolute, resolve } from 'node:path';
4
4
  import { Readable } from 'node:stream';
5
5
  import { URL } from 'node:url';
6
- import { gzipSync, brotliCompressSync, createGzip, createBrotliCompress } from 'node:zlib';
6
+ import { createBrotliCompress, brotliCompressSync, gzipSync, createGzip } from 'node:zlib';
7
7
  import { toPath } from '@visulima/path/utils';
8
8
 
9
9
  var __defProp = Object.defineProperty;
package/dist/utils.cjs CHANGED
@@ -5,7 +5,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
5
5
  const JSONError = require('./packem_shared/JSONError-gkXvBSar.cjs');
6
6
  const assertValidFileContents = require('./packem_shared/assertValidFileContents-CRVvyM6b.cjs');
7
7
  const assertValidFileOrDirectoryPath = require('./packem_shared/assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
8
- const parseJson = require('./packem_shared/parseJson-DcUo4Rpt.cjs');
8
+ const parseJson = require('./packem_shared/parseJson-5geAXtlm.cjs');
9
9
  const stripJsonComments = require('./packem_shared/stripJsonComments-eDrcJvBT.cjs');
10
10
  const utils = require('@visulima/path/utils');
11
11
 
package/dist/utils.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.cjs';
2
2
  import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.cjs';
3
- import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-CiwAWOQj.cjs';
3
+ import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-Crz-rGlC.cjs';
4
4
  export { toPath } from '@visulima/path/utils';
5
5
  import 'node:fs';
6
6
  import 'yaml';
package/dist/utils.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.mjs';
2
2
  import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.mjs';
3
- import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-CiwAWOQj.mjs';
3
+ import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-Crz-rGlC.mjs';
4
4
  export { toPath } from '@visulima/path/utils';
5
5
  import 'node:fs';
6
6
  import 'yaml';
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.d.mjs';
2
- import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.d.mjs';
3
- import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-CiwAWOQj.d.mjs';
1
+ export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.js';
2
+ import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.js';
3
+ import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-Crz-rGlC.js';
4
4
  export { toPath } from '@visulima/path/utils';
5
5
  import 'node:fs';
6
6
  import 'yaml';
package/dist/utils.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { default as JSONError } from './packem_shared/JSONError-BCIIHvzq.mjs';
2
2
  export { default as assertValidFileContents } from './packem_shared/assertValidFileContents-Ox-ScfeK.mjs';
3
3
  export { default as assertValidFileOrDirectoryPath } from './packem_shared/assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
4
- export { default as parseJson } from './packem_shared/parseJson-n9THWOFI.mjs';
4
+ export { default as parseJson } from './packem_shared/parseJson-D7XcVuDD.mjs';
5
5
  export { default as stripJsonComments } from './packem_shared/stripJsonComments-B66nRaTZ.mjs';
6
6
  export { toPath } from '@visulima/path/utils';
package/dist/yaml.cjs CHANGED
@@ -4,8 +4,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
4
4
 
5
5
  const readYaml = require('./packem_shared/readYaml-sR4bqUel.cjs');
6
6
  const readYamlSync = require('./packem_shared/readYamlSync-C3oOzxiN.cjs');
7
- const writeYaml = require('./packem_shared/writeYaml-DDLK7NDr.cjs');
8
- const writeYamlSync = require('./packem_shared/writeYamlSync-DST-W6N7.cjs');
7
+ const writeYaml = require('./packem_shared/writeYaml-C0YnZ1bp.cjs');
8
+ const writeYamlSync = require('./packem_shared/writeYamlSync-BBNLBbQK.cjs');
9
9
 
10
10
 
11
11
 
package/dist/yaml.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-CiwAWOQj.cjs';
1
+ import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-Crz-rGlC.cjs';
2
2
  import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
3
3
  import 'node:fs';
4
4
 
package/dist/yaml.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-CiwAWOQj.mjs';
1
+ import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-Crz-rGlC.mjs';
2
2
  import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
3
3
  import 'node:fs';
4
4
 
package/dist/yaml.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-CiwAWOQj.d.mjs';
1
+ import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-Crz-rGlC.js';
2
2
  import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
3
3
  import 'node:fs';
4
4
 
package/dist/yaml.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { default as readYaml } from './packem_shared/readYaml-vVKK8ZzY.mjs';
2
- export { default as readYamlSync } from './packem_shared/readYamlSync-MOLH4gXB.mjs';
3
- export { default as writeYaml } from './packem_shared/writeYaml-DJ17fqNj.mjs';
4
- export { default as writeYamlSync } from './packem_shared/writeYamlSync-C6nrcP2e.mjs';
1
+ export { default as readYaml } from './packem_shared/readYaml-C5MSs2GE.mjs';
2
+ export { default as readYamlSync } from './packem_shared/readYamlSync-CPjA-DLv.mjs';
3
+ export { default as writeYaml } from './packem_shared/writeYaml-Cuj4H9ut.mjs';
4
+ export { default as writeYamlSync } from './packem_shared/writeYamlSync-cL8f07FV.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/fs",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "Human friendly file system utilities for Node.js",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -161,7 +161,7 @@
161
161
  "LICENSE.md"
162
162
  ],
163
163
  "dependencies": {
164
- "@visulima/path": "1.3.4"
164
+ "@visulima/path": "1.3.5"
165
165
  },
166
166
  "peerDependencies": {
167
167
  "yaml": "^2.7.0"