Skip to content

Commit

Permalink
feat: limit issue path count
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidobo committed Jul 27, 2023
1 parent b5f97b7 commit da8247f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/issues/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const getDisplayPaths = (paths) => paths.map((path) => path.map(({name}) => name

const getFindings = ({packageGraph, packageName, range, allPathsAffected = true}) => {
const allPaths = getPathsForPackage(packageGraph, packageName, range);
// Paths can grow exponentially in complex dependency graphs
// Only keep a maximum of 50 paths in the report
allPaths.splice(50);
const affects = allPathsAffected
? getAllPackagesFromPaths(allPaths)
: getTargetPackagesFromPaths(allPaths);
Expand Down

0 comments on commit da8247f

Please sign in to comment.