Given a file with buffer contents, identify all the imports it has and find their full paths. Common (already
CommonJS-compatible) modules are included too, not just modules needing conversion - see
module:common-exports.ModuleInfo's isCommon flag, used by module:common-exports.replaceImports to copy them into the vendor tree as-is rather than converting
them. They can't simply be left alone: the vendor output directory structure doesn't mirror the original
node_modules layout closely enough for Node's own module resolution to find them from their new location.
Given a file with buffer contents, identify all the imports it has and find their full paths. Common (already CommonJS-compatible) modules are included too, not just modules needing conversion - see module:common-exports.ModuleInfo's isCommon flag, used by module:common-exports.replaceImports to copy them into the vendor tree as-is rather than converting them. They can't simply be left alone: the vendor output directory structure doesn't mirror the original node_modules layout closely enough for Node's own module resolution to find them from their new location.