NodeSecure / scanner

⚡️ A package API to run a static analysis of your module's dependencies. This is the CLI engine!
MIT License
28 stars 14 forks source link

[Tree-walker] Optimize remote strategy #258

Closed fraxken closed 2 months ago

fraxken commented 3 months ago

The remote strategy require resolveDependencyVersion method that will use packument to be able to resolve the latest version of the packing matching the SemVer range provided (in the package.json payload).

This is quite a lot of HTTP requests and a lot of resource wasted. We probably need to rethink how we should resolve the tree do reduce the quantity of requests required to fetch everything.

fraxken commented 3 months ago

Probably need to dig in NPM packages, like: https://github.com/npm/npm-pick-manifest