(packageName: string, version: string)
| 123 | |
| 124 | /** Writes a `package.json` for the given package name. */ |
| 125 | export async function writePackageJson(packageName: string, version: string) { |
| 126 | const packageOutDir = path.join(testTmpDir, 'dist', packageName); |
| 127 | const packageJsonPath = path.join(packageOutDir, 'package.json'); |
| 128 | |
| 129 | await fs.promises.mkdir(packageOutDir, {recursive: true}); |
| 130 | await fs.promises.writeFile(packageJsonPath, JSON.stringify({version})); |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Template string function that converts a changelog pattern to a regular |
no test coverage detected