Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const pack = async (code, shims = [], packDeps = true) => {
if (utils.isArchivePath(code)) {
return path.resolve(code)
}
let exclude = []
if (!packDeps) {
exclude = ['node_modules/**']
}
const outputFilePath = path.join(
tmpdir(),
`${Math.random()
.toString(36)
.substring(6)}.zip`
)