Comparing version 0.0.15 to 0.0.16
{ | ||
"name": "@magic/fs", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"author": "Wizards & Witches", | ||
@@ -38,7 +38,7 @@ "description": "nodejs fs promises + goodies", | ||
"@magic-modules/no-spy": "0.0.6", | ||
"@magic-modules/pre": "0.0.10", | ||
"@magic-themes/docs": "0.0.13", | ||
"@magic/core": "0.0.127", | ||
"@magic/format": "0.0.27", | ||
"@magic/test": "0.1.72" | ||
"@magic-modules/pre": "0.0.11", | ||
"@magic-themes/docs": "0.0.14", | ||
"@magic/core": "0.0.129", | ||
"@magic/format": "0.0.29", | ||
"@magic/test": "0.1.74" | ||
}, | ||
@@ -45,0 +45,0 @@ "dependencies": { |
@@ -103,13 +103,19 @@ # @magic/fs | ||
// first level directories | ||
const directories = await fs.getDirectories(process.cwd()) | ||
const directories = await fs.getDirectories(process.cwd(), false) | ||
console.log(directories) | ||
// first level again | ||
const dirs = await fs.getDirectories(process.cwd(), { depth: false }) | ||
// recursive run | ||
const deepDirectories = await fs.getDirectories(process.cwd(), true) | ||
const deepDirectories = await fs.getDirectories(process.cwd()) | ||
console.log(deepDirectories) | ||
// recursive run with specified depth, | ||
// just pass a number as second argument | ||
const deepDirectoriesDepth2 = await fs.getDirectories(process.cwd(), 2) | ||
// recursive run with specified depth | ||
const deepDirectoriesDepth2 = await fs.getDirectories(process.cwd(), { depth: 2 }) | ||
console.log(deepDirectoriesDepth2) | ||
// use /some/dir as root instead of process.cwd() | ||
const deepDirWithRoot = await fs.getDirectories(process.cwd(), { depth: true, root: '/some/dir' }) | ||
console.log(deepDirWithRoot) | ||
} | ||
@@ -132,9 +138,8 @@ run() | ||
// recursive run | ||
const deepFiles = await fs.getFiles(process.cwd(), true) | ||
const deepFiles = await fs.getFiles(process.cwd(), { depth: true }) | ||
console.log(deepFiles) | ||
// recursive run with specified depth, | ||
// just pass a number as second argument | ||
const deepDirectoriesDepth2 = await fs.getFiles(process.cwd(), 2) | ||
console.log(deepDirectoriesDepth2) | ||
// recursive run with specified depth, | ||
const deepFilesDepth2 = await fs.getFiles(process.cwd(), { depth: 2 }) | ||
console.log(deepFilesDepth2) | ||
} | ||
@@ -184,6 +189,6 @@ run() | ||
#### 0.0.8 | ||
#### 0.0.8 | ||
update dependencies | ||
#### 0.0.9 - unreleased | ||
#### 0.0.9 | ||
* remove unused imports from getDirectories | ||
@@ -204,3 +209,3 @@ * getDirectories and getFiles now accept a number as second argument. | ||
##### 0.0.12 | ||
##### 0.0.12 | ||
export all functions from native fs | ||
@@ -218,3 +223,6 @@ | ||
##### 0.0.16 - unreleased | ||
##### 0.0.16 | ||
add deprecation warning for calls to fs.getDirectories, fs.getFilePath and fs.getFiles that do not use an options object | ||
##### 0.0.17 - unreleased | ||
... | ||
@@ -221,0 +229,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51368
352
238