()
| 11 | const packageJsonPath = _path.join(cwd, "package.json") |
| 12 | |
| 13 | const workspaceVersions = () => { |
| 14 | const versions = new Map() |
| 15 | for (const dirent of _fs.readdirSync(_path.join(rootDir, "packages"), { withFileTypes: true })) { |
| 16 | if (!dirent.isDirectory()) continue |
| 17 | |
| 18 | const path = _path.join(rootDir, "packages", dirent.name, "package.json") |
| 19 | if (!_fs.existsSync(path)) continue |
| 20 | |
| 21 | const packageJson = JSON.parse(_fs.readFileSync(path, "utf8")) |
| 22 | versions.set(packageJson.name, packageJson.version) |
| 23 | } |
| 24 | return versions |
| 25 | } |
| 26 | |
| 27 | const copyFile = (from, to) => { |
| 28 | _fs.mkdirSync(_path.dirname(to), { recursive: true }) |
no test coverage detected
searching dependent graphs…