rev-dep 1.0.6 → 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/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) {
|