* Gets the list of files changed on the current branch that match the given * array of glob patterns using the given options. * * @param {!Array } globs * @param {!Object} options * @return {!Array }
(globs, options)
| 49 | * @return {!Array<string>} |
| 50 | */ |
| 51 | function getFilesChanged(globs, options) { |
| 52 | const allFiles = fastGlob.sync(globs, options).map(String); |
| 53 | return gitDiffNameOnlyMain().filter((changedFile) => { |
| 54 | return fs.existsSync(changedFile) && allFiles.includes(changedFile); |
| 55 | }); |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Logs the list of files that will be checked and returns the list. |
no test coverage detected