[ ] All tests passed. If this feature is not already covered by the tests, I added new tests.
[ ] I used npm run format for formatting the code before submitting the pull request.
Prior to this PR, there was an issue with the way Yarn calculated the impact graph. The problem intruduced from using the 'yarn list' output. The 'yarn list' output did not accurately represent the project's dependencies as it removed duplicate leaves and flattened the tree structure.
In order to resolve this issue, this PR changes the following:
Instead of constructing the entire dependency tree, we now compute only a partial tree. This partial tree specifically represents the paths from the project's root to the vulnerable dependencies only. This modification eliminates the need to calculate the entire tree, which not only reduces memory consumption but also aligns with our goal of displaying only paths to vulnerable dependencies.
Rather than relying on yarn list, we have switched to using yarn why which provides the correct path to a specific dependency. This involves gathering all vulnerable dependencies and utilizing 'yarn why' to map out the path of each dependency from the root.
[ ] I used
npm run format
for formatting the code before submitting the pull request.Prior to this PR, there was an issue with the way Yarn calculated the impact graph. The problem intruduced from using the 'yarn list' output. The 'yarn list' output did not accurately represent the project's dependencies as it removed duplicate leaves and flattened the tree structure.
In order to resolve this issue, this PR changes the following:
Instead of constructing the entire dependency tree, we now compute only a partial tree. This partial tree specifically represents the paths from the project's root to the vulnerable dependencies only. This modification eliminates the need to calculate the entire tree, which not only reduces memory consumption but also aligns with our goal of displaying only paths to vulnerable dependencies.
Rather than relying on
yarn list
, we have switched to usingyarn why
which provides the correct path to a specific dependency. This involves gathering all vulnerable dependencies and utilizing 'yarn why' to map out the path of each dependency from the root.