Skip to content

Commit

Permalink
Aggressively mark packages as optional in evidence mode. See discussi…
Browse files Browse the repository at this point in the history
…on in #466

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Oct 18, 2023
1 parent 90ad0bc commit fb31a82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7108,6 +7108,10 @@ export const parsePackageJsonName = (name) => {
export const addEvidenceForImports = (pkgList, allImports) => {
const impPkgs = Object.keys(allImports);
for (const pkg of pkgList) {
if (impPkgs && impPkgs.length) {
// Assume that all packages are optional until we see an evidence
pkg.scope = "optional";
}
const { group, name } = pkg;
let aliases =
group && group.length
Expand Down

0 comments on commit fb31a82

Please sign in to comment.