dependency-tree 10.0.1 → 10.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 (2) hide show
  1. package/index.d.ts +34 -0
  2. package/package.json +3 -2
package/index.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ declare namespace dependencyTree {
2
+ interface TreeInnerNode {
3
+ [parent: string]: TreeInnerNode | string;
4
+ }
5
+ type Tree = TreeInnerNode | string;
6
+
7
+ export interface Options {
8
+ filename: string;
9
+ directory: string;
10
+ visited?: Tree;
11
+ nonExistent?: string[];
12
+ isListForm?: boolean;
13
+ requireConfig?: string;
14
+ webpackConfig?: string;
15
+ nodeModulesConfig?: any;
16
+ detectiveConfig?: any;
17
+ tsConfig?: string | Record<string, any>;
18
+ noTypeDefinitions?: boolean;
19
+ filter?: (path: string) => boolean;
20
+ }
21
+
22
+ interface Config extends Options {
23
+ clone: () => Config;
24
+ }
25
+
26
+ function toList(options: Options): string[];
27
+ function _getDependencies(config: Config): string[];
28
+ }
29
+
30
+ declare function dependencyTree(
31
+ options: dependencyTree.Options
32
+ ): dependencyTree.Tree;
33
+
34
+ export = dependencyTree;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "dependency-tree",
3
- "version": "10.0.1",
3
+ "version": "10.0.3",
4
4
  "description": "Get the dependency tree of a module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "files": [
8
8
  "bin/cli.js",
9
9
  "lib/*.js",
10
+ "index.d.ts",
10
11
  "index.js"
11
12
  ],
12
13
  "bin": {
@@ -49,7 +50,7 @@
49
50
  },
50
51
  "dependencies": {
51
52
  "commander": "^10.0.1",
52
- "filing-cabinet": "^4.1.0",
53
+ "filing-cabinet": "^4.1.2",
53
54
  "precinct": "^11.0.0",
54
55
  "typescript": "^5.0.4"
55
56
  },