(root: string)
| 23 | // npm: https://docs.npmjs.com/cli/v7/using-npm/workspaces#installing-workspaces |
| 24 | // yarn: https://classic.yarnpkg.com/en/docs/workspaces/#toc-how-to-use-it |
| 25 | function hasWorkspacePackageJSON(root: string): boolean { |
| 26 | const path = join(root, 'package.json') |
| 27 | if (!isFileReadable(path)) { |
| 28 | return false |
| 29 | } |
| 30 | try { |
| 31 | const content = JSON.parse(fs.readFileSync(path, 'utf-8')) || {} |
| 32 | return !!content.workspaces |
| 33 | } catch { |
| 34 | return false |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | // https://docs.deno.com/runtime/fundamentals/workspaces/ |
| 39 | function hasWorkspaceDenoJSON(root: string): boolean { |
no test coverage detected