We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8ae487 commit d078690Copy full SHA for d078690
src/find-plus.mjs
@@ -61,6 +61,12 @@ const find = async(params = {}) => {
61
const files = await fs.readdir(dirPath, { withFileTypes : true })
62
for (const file of files) {
63
file.depth = currDepth
64
+
65
+ // node 19.x DirEnt's lack parent path
66
+ if (file.parentPath === undefined) {
67
+ file.parentPath = dirPath
68
+ }
69
70
const pass = !myTests.some((t) => !t(file, currDepth))
71
72
if (file.isDirectory() && (pass || noTraverseFailed === false)) {
0 commit comments