Skip to content

Commit

Permalink
Allow nodes to be in frontier even though they have already been adde…
Browse files Browse the repository at this point in the history
…d as a package. This allows all edge connections to be found.
  • Loading branch information
Tanner Nielsen committed May 13, 2020
1 parent 0e331e9 commit 8944a99
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
@@ -1 +1 @@
<!DOCTYPE html><html><head><title>CRAN Dependency Visualizer</title><link href="src.1c9610bf.css" rel="stylesheet"></head><body> <div id="app"></div> <script src="src.33726801.js"></script> </body></html>
<!DOCTYPE html><html><head><title>CRAN Dependency Visualizer</title><link href="src.1c9610bf.css" rel="stylesheet"></head><body> <div id="app"></div> <script src="src.49b2e239.js"></script> </body></html>
4 changes: 2 additions & 2 deletions docs/src.33726801.js → docs/src.49b2e239.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/src.33726801.js.map → docs/src.49b2e239.js.map

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions src/use-dependency-tree.ts
Expand Up @@ -39,10 +39,8 @@ export default (...packageNames: string[]) => {
const frontierInfos = await Promise.all([..._searchFrontier].map(pkg => getPackageInfo(pkg)));
frontierInfos.forEach(info => {
info.imports.forEach(dep => {
if (!_packages.has(dep)) {
_nextSearchFrontier = _nextSearchFrontier.add(dep);
_importsLinks = _importsLinks.add([info.name, dep]);
}
_nextSearchFrontier = _nextSearchFrontier.add(dep);
_importsLinks = _importsLinks.add([info.name, dep]);
});

// TODO: suggests
Expand Down

0 comments on commit 8944a99

Please sign in to comment.