MCPcopy
hub / github.com/streamich/git-cz / getChangedPackages

Function getChangedPackages

lib/util/lerna.js:71–85  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

69};
70
71const getChangedPackages = (state) => {
72 const unique = {};
73 const changedFiles = getChangedFiles();
74 const regex = new RegExp('^' + getPackageDirectories(state) + '\/([^/]+)\/', 'is');
75
76 for (const filename of changedFiles) {
77 const matches = filename.match(regex);
78
79 if (matches) {
80 unique[matches[1]] = 1;
81 }
82 }
83
84 return Object.keys(unique);
85};
86
87module.exports = {
88 getAllPackages,

Callers 1

lerna.jsFile · 0.85

Calls 2

getChangedFilesFunction · 0.85
getPackageDirectoriesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…