snyk / nodejs-lockfile-parser

Generate a Snyk dependency tree from package-lock.json or yarn.lock file
Other
56 stars 28 forks source link

add fields `resolved` and `integrity` to deptree and depgraph #199

Open milahu opened 11 months ago

milahu commented 11 months ago

What this does

add fields resolved and integrity to deptree and depgraph

continue #112 by @abdulhannanali

commit 9dd67454159b3008957c0fb812c8ecd67998a4f2 is based on https://github.com/snyk/nodejs-lockfile-parser/commit/60853a7c8c8b194a13b3e3f41980839c820b530b

i have added the new fields as node.info.labels.resolved and node.info.labels.integrity, because @snyk/dep-graph allows to add custom string values to node.info.labels

Notes for the reviewer

probably this will not be merged, because snyk does not use resolved and integrity values of lockfiles

to me, the resolved and integrity values are useful to build a custom npm package installer. for example usage, see https://github.com/milahu/pnpm-install-only/commit/4278992fd32302becee5433e8b9cc5a32acb70c9, where i have both a tree-walker and a graph-walker

merged in https://github.com/milahu/nodejs-lockfile-parser