(dir: string, content: Record<string, unknown>)
| 10 | } |
| 11 | |
| 12 | function writePackageJson(dir: string, content: Record<string, unknown>): void { |
| 13 | fs.mkdirSync(dir, { recursive: true }); |
| 14 | fs.writeFileSync(path.join(dir, 'package.json'), `${JSON.stringify(content, null, 2)}\n`); |
| 15 | } |
| 16 | |
| 17 | function readPackageJson(dir: string): Record<string, any> { |
| 18 | return JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf-8')); |
no outgoing calls
no test coverage detected