rrdir 12.0.2 → 12.0.3

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 (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +3 -8
  3. package/package.json +7 -18
package/README.md CHANGED
@@ -39,8 +39,8 @@ The directory to read, either absolute or relative. Pass a `Buffer` to switch th
39
39
 
40
40
  - `stats` *boolean*: Whether to include `entry.stats`. Will reduce performance. Default: `false`.
41
41
  - `followSymlinks` *boolean*: Whether to follow symlinks for both recursion and `stat` calls. Default: `false`.
42
- - `exclude` *Array*: Path globs to exclude, e.g. `["**/*.js"]`. Default: `undefined`.
43
- - `include` *Array*: Path globs to include, e.g. `["**/*.map"]`. Default: `undefined`.
42
+ - `exclude` *Array*: Path globs to exclude, e.g. `["**.js"]`. Default: `undefined`.
43
+ - `include` *Array*: Path globs to include, e.g. `["**.map"]`. Default: `undefined`.
44
44
  - `strict` *boolean*: Whether to throw immediately when reading an entry fails. Default: `false`.
45
45
  - `insensitive` *boolean*: Whether `include` and `exclude` match case-insensitively. Default: `false`.
46
46
 
package/index.js CHANGED
@@ -39,15 +39,10 @@ function makeMatchers({include, exclude, insensitive}) {
39
39
 
40
40
  // resolve the path to an absolute one because picomatch can not deal properly
41
41
  // with relative paths that start with ./ or .\
42
- // > (await import("picomatch")).default(["**.js"])("./foo.js")
43
- // false
42
+ // https://github.com/micromatch/picomatch/issues/121
44
43
  return {
45
- includeMatcher: include?.length ? (path => {
46
- return picomatch(include, opts)(resolve(path));
47
- }) : null,
48
- excludeMatcher: exclude?.length ? (path => {
49
- return picomatch(exclude, opts)(resolve(path));
50
- }) : null,
44
+ includeMatcher: include?.length ? path => picomatch(include, opts)(resolve(path)) : null,
45
+ excludeMatcher: exclude?.length ? path => picomatch(exclude, opts)(resolve(path)) : null,
51
46
  };
52
47
  }
53
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrdir",
3
- "version": "12.0.2",
3
+ "version": "12.0.3",
4
4
  "description": "Recursive directory reader with a delightful API",
5
5
  "author": "silverwind <me@silverwind.io>",
6
6
  "repository": "silverwind/rrdir",
@@ -12,27 +12,16 @@
12
12
  "node": ">=18"
13
13
  },
14
14
  "files": [
15
- "index.js"
15
+ "./index.js"
16
16
  ],
17
17
  "devDependencies": {
18
- "eslint": "8.50.0",
19
- "eslint-config-silverwind": "76.0.1",
20
- "updates": "15.0.2",
21
- "versions": "11.1.0",
22
- "vitest": "0.34.5",
18
+ "eslint": "8.52.0",
19
+ "eslint-config-silverwind": "79.0.4",
20
+ "updates": "15.0.3",
21
+ "versions": "12.0.0",
22
+ "vitest": "0.34.6",
23
23
  "vitest-config-silverwind": "3.0.0"
24
24
  },
25
- "keywords": [
26
- "recursive readdir",
27
- "readdir",
28
- "recursive",
29
- "walk",
30
- "walkdir",
31
- "directory",
32
- "crawl",
33
- "crawler",
34
- "scandir"
35
- ],
36
25
  "dependencies": {
37
26
  "picomatch": "2.3.1"
38
27
  }