(files: Files)
| 30 | }); |
| 31 | |
| 32 | function workspace(files: Files): string { |
| 33 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ws-globs-')); |
| 34 | roots.push(root); |
| 35 | for (const [file, text] of Object.entries(files)) { |
| 36 | fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true }); |
| 37 | fs.writeFileSync(path.join(root, file), text); |
| 38 | } |
| 39 | return root; |
| 40 | } |
| 41 | |
| 42 | const pkg = (name: string) => JSON.stringify({ name }); |
| 43 | const pnpm = (...globs: string[]) => `packages:\n${globs.map((g) => ` - '${g}'`).join('\n')}\n`; |
no test coverage detected