Comparing version 12.0.1 to 12.0.2
15
index.js
import {readdir, stat, lstat} from "node:fs/promises"; | ||
import {readdirSync, statSync, lstatSync} from "node:fs"; | ||
import {sep} from "node:path"; | ||
import {sep, resolve} from "node:path"; | ||
import picomatch from "picomatch"; | ||
@@ -39,5 +39,14 @@ | ||
}; | ||
// resolve the path to an absolute one because picomatch can not deal properly | ||
// with relative paths that start with ./ or .\ | ||
// > (await import("picomatch")).default(["**.js"])("./foo.js") | ||
// false | ||
return { | ||
includeMatcher: include?.length ? picomatch(include, opts) : null, | ||
excludeMatcher: exclude?.length ? picomatch(exclude, opts) : null, | ||
includeMatcher: include?.length ? (path => { | ||
return picomatch(include, opts)(resolve(path)); | ||
}) : null, | ||
excludeMatcher: exclude?.length ? (path => { | ||
return picomatch(exclude, opts)(resolve(path)); | ||
}) : null, | ||
}; | ||
@@ -44,0 +53,0 @@ } |
{ | ||
"name": "rrdir", | ||
"version": "12.0.1", | ||
"version": "12.0.2", | ||
"description": "Recursive directory reader with a delightful API", | ||
@@ -18,7 +18,7 @@ "author": "silverwind <me@silverwind.io>", | ||
"devDependencies": { | ||
"eslint": "8.47.0", | ||
"eslint-config-silverwind": "74.1.2", | ||
"updates": "14.3.5", | ||
"versions": "11.0.2", | ||
"vitest": "0.34.2", | ||
"eslint": "8.50.0", | ||
"eslint-config-silverwind": "76.0.1", | ||
"updates": "15.0.2", | ||
"versions": "11.1.0", | ||
"vitest": "0.34.5", | ||
"vitest-config-silverwind": "3.0.0" | ||
@@ -25,0 +25,0 @@ }, |
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
10014
179