(options: ChangedFlags)
| 45 | }; |
| 46 | |
| 47 | const changed = async (options: ChangedFlags) => { |
| 48 | consola.info(colors.bold(colors.blue('Checking packages...'))); |
| 49 | // CLI flags take precedence over default config |
| 50 | const config = await mergeFlags(options); |
| 51 | const diff = await getChanged(config); |
| 52 | |
| 53 | if (diff.length > 0) { |
| 54 | consola.info(colors.bold(colors.blue('Packages changed:'))); |
| 55 | for (const item of diff) { |
| 56 | consola.info(item.name); |
| 57 | } |
| 58 | consola.info( |
| 59 | colors.bold(colors.magenta(`${diff.length} packages changed.`)), |
| 60 | ); |
| 61 | } else { |
| 62 | consola.info(colors.bold(colors.red('No packages changed.'))); |
| 63 | } |
| 64 | }; |
| 65 | |
| 66 | export { changed, getChanged }; |
no test coverage detected