Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
manifestFormat?: ManifestFormat,
tempDir?: string,
}
) {
const dir = opts?.tempDir ?? path.join(tempDir(test), 'project')
makeDir.sync(dir)
switch (opts?.manifestFormat ?? 'JSON') {
case 'JSON':
writePkg.sync(dir, { name: 'project', version: '0.0.0', ...manifest } as any) // tslint:disable-line
break
case 'JSON5':
writeJson5File(path.join(dir, 'package.json5'), { name: 'project', version: '0.0.0', ...manifest } as any) // tslint:disable-line
break
case 'YAML':
writeYamlFile(path.join(dir, 'package.yaml'), { name: 'project', version: '0.0.0', ...manifest } as any) // tslint:disable-line
break
}
process.chdir(dir)
return assertProject(test, dir)
}