directory-tree 3.4.0 → 3.5.1
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/.github/workflows/node.js.yml +2 -1
- package/README.md +0 -2
- package/bin/index.js +0 -0
- package/index.d.ts +5 -9
- package/package.json +6 -3
- package/.idea/encodings.xml +0 -4
- package/.idea/modules.xml +0 -8
- package/.idea/node-directory-tree.iml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.travis.yml +0 -3
package/README.md
CHANGED
package/bin/index.js
CHANGED
|
File without changes
|
package/index.d.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Stats } from "fs";
|
|
2
2
|
|
|
3
|
-
interface IObj {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
3
|
declare function directoryTree<
|
|
8
|
-
TCustomFile extends
|
|
9
|
-
TCustomDir extends
|
|
10
|
-
TCustomResult extends
|
|
4
|
+
TCustomFile extends Record<string, any> = Record<string, any>,
|
|
5
|
+
TCustomDir extends Record<string, any> = Record<string, any>,
|
|
6
|
+
TCustomResult extends Record<string, any> = TCustomFile & TCustomDir
|
|
11
7
|
>(
|
|
12
8
|
path: string,
|
|
13
9
|
options?: directoryTree.DirectoryTreeOptions,
|
|
@@ -18,7 +14,7 @@ declare function directoryTree<
|
|
|
18
14
|
export as namespace directoryTree;
|
|
19
15
|
|
|
20
16
|
declare namespace directoryTree {
|
|
21
|
-
export interface DirectoryTree<C extends
|
|
17
|
+
export interface DirectoryTree<C extends Record<string, any> = Record<string, any>> {
|
|
22
18
|
path: string;
|
|
23
19
|
name: string;
|
|
24
20
|
size: number;
|
|
@@ -38,7 +34,7 @@ declare namespace directoryTree {
|
|
|
38
34
|
depth?: number;
|
|
39
35
|
}
|
|
40
36
|
|
|
41
|
-
export type DirectoryTreeCallback<TCustom extends
|
|
37
|
+
export type DirectoryTreeCallback<TCustom extends Record<string, any> = Record<string, any>> = (
|
|
42
38
|
item: DirectoryTree<TCustom>,
|
|
43
39
|
path: string,
|
|
44
40
|
stats: Stats
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "directory-tree",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Convert a directory tree to a JS object.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,14 +22,17 @@
|
|
|
22
22
|
"command-line-usage": "^6.1.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
+
"@types/node": "^18.11.17",
|
|
25
26
|
"chai": "^2.3.0",
|
|
26
|
-
"mocha": "^
|
|
27
|
+
"mocha": "^10.2.0",
|
|
28
|
+
"typescript": "^4.9.4"
|
|
27
29
|
},
|
|
28
30
|
"bin": "bin/index.js",
|
|
29
31
|
"engines": {
|
|
30
32
|
"node": ">=10.0"
|
|
31
33
|
},
|
|
32
34
|
"scripts": {
|
|
33
|
-
"test": "mocha"
|
|
35
|
+
"test": "mocha",
|
|
36
|
+
"test-ts": "./node_modules/.bin/tsc index.d.ts"
|
|
34
37
|
}
|
|
35
38
|
}
|
package/.idea/encodings.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/node-directory-tree.iml" filepath="$PROJECT_DIR$/.idea/node-directory-tree.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$" />
|
|
5
|
-
<orderEntry type="inheritedJdk" />
|
|
6
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
|
-
</component>
|
|
8
|
-
</module>
|
package/.idea/vcs.xml
DELETED
package/.travis.yml
DELETED