(base)
| 140 | } |
| 141 | |
| 142 | function getChangedFiles(base) { |
| 143 | if (!base || /^0+$/.test(base)) { |
| 144 | return [] |
| 145 | } |
| 146 | |
| 147 | try { |
| 148 | run(`git`, [`rev-parse`, `--verify`, `${base}^{commit}`]) |
| 149 | return run(`git`, [`diff`, `--name-only`, base, `--`, `.`]) |
| 150 | .split(`\n`) |
| 151 | .map((file) => file.trim()) |
| 152 | .filter(Boolean) |
| 153 | } catch { |
| 154 | return [] |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | function shouldRunAllWorkspaces(base, files) { |
| 159 | if (!base || /^0+$/.test(base) || files.length === 0) { |
no test coverage detected