(argv)
| 29 | } |
| 30 | |
| 31 | function parseArgs(argv) { |
| 32 | const options = { remote: 'origin' }; |
| 33 | for (const arg of argv) { |
| 34 | if (arg === '--no-remote') { |
| 35 | options.remote = null; |
| 36 | } else if (arg.startsWith('--remote=')) { |
| 37 | options.remote = arg.slice('--remote='.length); |
| 38 | } else { |
| 39 | throw new Error(`Unknown argument: ${arg}`); |
| 40 | } |
| 41 | } |
| 42 | return options; |
| 43 | } |
| 44 | |
| 45 | function getPublishablePackages() { |
| 46 | return JSON.parse(run('pnpm', ['-r', 'ls', '--depth', '-1', '--json'])) |