@magic/fs 0.0.34 → 0.0.35

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/README.md CHANGED
@@ -325,7 +325,12 @@ update dependencies
325
325
 
326
326
  - update types
327
327
 
328
- ##### 0.0.35 - unreleased
328
+ ##### 0.0.35
329
+
330
+ - fs.getDirectories maxDepth will be at least 2 if noRoot is set.
331
+ - update dependencies
332
+
333
+ ##### 0.0.36 - unreleased
329
334
 
330
335
  ...
331
336
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic/fs",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "author": "Wizards & Witches",
5
5
  "description": "nodejs fs promises + goodies",
6
6
  "license": "AGPL-3.0",
@@ -43,7 +43,7 @@
43
43
  "@magic/core": "0.0.156",
44
44
  "@magic/format": "0.0.68",
45
45
  "@magic/test": "0.2.24",
46
- "@types/node": "24.7.2",
46
+ "@types/node": "24.9.1",
47
47
  "typescript": "5.9.3"
48
48
  },
49
49
  "dependencies": {
@@ -38,6 +38,10 @@ export const getDirectories = async (dir, options = {}) => {
38
38
  minDepth = 0
39
39
  }
40
40
 
41
+ if (noRoot && maxDepth === 1) {
42
+ maxDepth += 1
43
+ }
44
+
41
45
  if (!is.array(dir) && !is.string(dir)) {
42
46
  throw error(`${libName}: need an array or a string as first argument`, 'E_ARG_TYPE')
43
47
  }