rev-dep 1.0.4 → 1.0.7
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/README.md +5 -1
- package/bin.js +0 -0
- package/dist/cli/docs/template.d.ts +1 -1
- package/dist/cli/resolve/formatResults.js +1 -1
- package/dist/lib/resolve.js +7 -0
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
</h3>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
|
|
6
|
+
File dependency debugging tool for TypeScript projects
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
<img alt="rev-dep version" src="https://img.shields.io/npm/v/rev-dep"> <img alt="rev-dep license" src="https://img.shields.io/npm/l/rev-dep"> <img alt="rev-dep PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square">
|
|
12
12
|
|
|
13
|
+
## Pardon 🤫
|
|
14
|
+
|
|
15
|
+
Since you landed here, you might be also interested in my other project - supercharged multiline code search and replace tool - [codeque.co](https://codeque.co) 🥳
|
|
16
|
+
|
|
13
17
|
## About 📣
|
|
14
18
|
|
|
15
19
|
The tool was created help with daily dev struggles by answering these questions:
|
package/bin.js
CHANGED
|
File without changes
|
|
@@ -33,7 +33,7 @@ function formatResults({ results, filePath, entryPoints, compactSummary }) {
|
|
|
33
33
|
let formatted = '';
|
|
34
34
|
const hasAnyResults = results.some((paths) => paths.length > 0);
|
|
35
35
|
if (!hasAnyResults) {
|
|
36
|
-
formatted = join('No results found for', filePath, 'in'
|
|
36
|
+
formatted = join('No results found for', filePath, 'in the following entry points list:\n' + entryPoints.join('\n'));
|
|
37
37
|
return formatted;
|
|
38
38
|
}
|
|
39
39
|
if (compactSummary) {
|
package/dist/lib/resolve.js
CHANGED
|
@@ -11,6 +11,13 @@ const resolvePathsToRoot = (node, all = false, resolvedPaths = [[]]) => {
|
|
|
11
11
|
...resolvedPath
|
|
12
12
|
]);
|
|
13
13
|
if (node.parents.length === 0) {
|
|
14
|
+
/*
|
|
15
|
+
* If there is only one path, and has length of 1, it's file self reference
|
|
16
|
+
* It's invalid result, so we return empty paths in that case
|
|
17
|
+
*/
|
|
18
|
+
if (newPaths.length === 1 && newPaths[0].length === 1) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
14
21
|
return newPaths;
|
|
15
22
|
}
|
|
16
23
|
if (all) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rev-dep",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Dependency debugging tool for JavaScript and TypeScript projects",
|
|
5
5
|
"main": "dist/module.js",
|
|
6
6
|
"bin": "bin.js",
|
|
@@ -69,9 +69,17 @@
|
|
|
69
69
|
"entry points",
|
|
70
70
|
"dependency resolution",
|
|
71
71
|
"reverse dependency resolution",
|
|
72
|
-
"dependency tree",
|
|
73
72
|
"import path",
|
|
74
73
|
"resolution path",
|
|
75
|
-
"dependency optimization"
|
|
74
|
+
"dependency optimization",
|
|
75
|
+
"dependency analysis",
|
|
76
|
+
"bundle",
|
|
77
|
+
"dependency tree",
|
|
78
|
+
"imports",
|
|
79
|
+
"dependencies checking",
|
|
80
|
+
"imports debugging",
|
|
81
|
+
"imports analysis",
|
|
82
|
+
"imports search",
|
|
83
|
+
"file dependencies"
|
|
76
84
|
]
|
|
77
85
|
}
|