js-code-detector 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -100,10 +100,13 @@ async function generateGitDiffReport(arg) {
|
|
|
100
100
|
const usingFileNoPrefix = Object.keys(tree);
|
|
101
101
|
const usingFilePaths = usingFileNoPrefix.map((item) => (0, import_utils.winPath)((0, import_path.join)(absPathPrefix, item)));
|
|
102
102
|
const groupGitDiffLines = gitDiffDetail.filter((item) => usingFileNoPrefix.includes(item.filePath));
|
|
103
|
+
const changedFilePaths = groupGitDiffLines.map((item) => item.filePath);
|
|
103
104
|
const time = (0, import_dayjs.default)().format("YYYYMDD_HHmm");
|
|
104
105
|
try {
|
|
105
106
|
const dependenceJson = (0, import_createDependenceMap.createDependenceMap)(usingFilePaths, parsedAlias, absPathPrefix);
|
|
106
107
|
(0, import_fs.writeFileSync)((0, import_path.join)(targetDirPath, "..", "..", `${time}_dependence_map.json`), JSON.stringify(dependenceJson, null, 2), { encoding: "utf-8", flag: "w" });
|
|
108
|
+
const partialDependenceJson = Object.fromEntries(changedFilePaths.map((p) => [p, dependenceJson[p]]));
|
|
109
|
+
(0, import_fs.writeFileSync)((0, import_path.join)(targetDirPath, "..", "..", `${time}_partial_dependence_map.json`), JSON.stringify(partialDependenceJson, null, 2), { encoding: "utf-8", flag: "w" });
|
|
107
110
|
} catch (e) {
|
|
108
111
|
console.warn("dependenceJson 生成失败", e);
|
|
109
112
|
}
|