MCPcopy Index your code
hub / github.com/ampproject/amphtml / getFilesChanged

Function getFilesChanged

build-system/common/utils.js:51–56  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

49 * @return {!Array<string>}
50 */
51function 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.

Callers 1

getFilesToCheckFunction · 0.85

Calls 3

gitDiffNameOnlyMainFunction · 0.85
syncMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected