dependency-tree 10.0.7 → 10.0.9
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/index.js +9 -9
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -96,9 +96,9 @@ module.exports._getDependencies = function(config = {}) {
|
|
|
96
96
|
|
|
97
97
|
const resolvedDependencies = [];
|
|
98
98
|
|
|
99
|
-
for (const
|
|
99
|
+
for (const dependency of dependencies) {
|
|
100
100
|
const result = cabinet({
|
|
101
|
-
partial:
|
|
101
|
+
partial: dependency,
|
|
102
102
|
filename: config.filename,
|
|
103
103
|
directory: config.directory,
|
|
104
104
|
ast: precinct.ast,
|
|
@@ -110,16 +110,16 @@ module.exports._getDependencies = function(config = {}) {
|
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
if (!result) {
|
|
113
|
-
debug(`skipping an empty filepath resolution for partial: ${
|
|
114
|
-
config.nonExistent.push(
|
|
113
|
+
debug(`skipping an empty filepath resolution for partial: ${dependency}`);
|
|
114
|
+
config.nonExistent.push(dependency);
|
|
115
115
|
continue;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
const exists = fs.existsSync(result);
|
|
119
119
|
|
|
120
120
|
if (!exists) {
|
|
121
|
-
config.nonExistent.push(
|
|
122
|
-
debug(`skipping non-empty but non-existent resolution: ${result} for partial: ${
|
|
121
|
+
config.nonExistent.push(dependency);
|
|
122
|
+
debug(`skipping non-empty but non-existent resolution: ${result} for partial: ${dependency}`);
|
|
123
123
|
continue;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -158,16 +158,16 @@ function traverse(config = {}) {
|
|
|
158
158
|
debug(`filtered number of dependencies: ${dependencies.length}`);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
for (const
|
|
161
|
+
for (const dependency of dependencies) {
|
|
162
162
|
const localConfig = config.clone();
|
|
163
|
-
localConfig.filename =
|
|
163
|
+
localConfig.filename = dependency;
|
|
164
164
|
|
|
165
165
|
if (localConfig.isListForm) {
|
|
166
166
|
for (const item of traverse(localConfig)) {
|
|
167
167
|
subTree.add(item);
|
|
168
168
|
}
|
|
169
169
|
} else {
|
|
170
|
-
subTree[
|
|
170
|
+
subTree[dependency] = traverse(localConfig);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dependency-tree",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.9",
|
|
4
4
|
"description": "Get the dependency tree of a module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"commander": "^10.0.1",
|
|
53
|
-
"filing-cabinet": "^4.1.
|
|
54
|
-
"precinct": "^11.0.
|
|
53
|
+
"filing-cabinet": "^4.1.6",
|
|
54
|
+
"precinct": "^11.0.5",
|
|
55
55
|
"typescript": "^5.0.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"mocha": "^10.2.0",
|
|
61
61
|
"mock-fs": "^5.2.0",
|
|
62
62
|
"resolve": "^1.22.3",
|
|
63
|
-
"sinon": "^15.0
|
|
63
|
+
"sinon": "^15.1.0",
|
|
64
64
|
"xo": "^0.54.2"
|
|
65
65
|
},
|
|
66
66
|
"xo": {
|