Run this in a node package, and it'll tell you which things in node_modules are bundledDependencies, or transitive dependencies of bundled dependencies.
To get the list of deps at the top level that are bundled (or transitive deps of a bundled dep) run this:
const bundled =// async version// async promise version// sync version, throws if there's an errorconst list =
That's basically all you need to know. If you care to dig into it,
you can also use the
classes to get fancy.
This library does not write anything to the filesystem, but it may
have undefined behavior if the structure of
while it's reading deps.
All symlinks are followed. This means that it can lead to surprising results if a symlinked bundled dependency has a missing dependency that is satisfied at the top level. Since package creation resolves symlinks as well, this is an edge case where package creation and development environment are not going to be aligned, and is best avoided.