Skip to content

Commit

Permalink
don't use same object reference in shallow dep info
Browse files Browse the repository at this point in the history
this causes us to create an invalid parent node that does not parse as a
valid request in the API, due to the shared grandparent node being
modified: https://github.com/scarf-sh/scarf-js/blob/8bade0e1b1ed705305e016f480beac36abef4cc0/report.js#L118-L128
  • Loading branch information
justinwoo committed Aug 16, 2023
1 parent 8bade0e commit 9e5efee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions report.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ async function getDependencyInfo (packageJSONOverride) {
}
const shallowDepInfo = {
scarf: { name: '@scarf/scarf', version: scarfPackageJSON.version },
parent: rootInfoToReport,
rootPackage: rootInfoToReport,
parent: {...rootInfoToReport},
rootPackage: {...rootInfoToReport},
anyInChainDisabled: false,
skippedTraversal: true
}
Expand Down

0 comments on commit 9e5efee

Please sign in to comment.