js-code-detector 0.0.15 → 0.0.16

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.
package/dist/cjs/index.js CHANGED
@@ -151,6 +151,9 @@ async function gitDiffDetect() {
151
151
  const mdFileName = `${(0, import_dayjs.default)().format("YYYYMDD_HHmm")}_${jsonName}`;
152
152
  (0, import_fs2.writeFileSync)((0, import_path.join)(process.cwd(), mdFileName), content, { encoding: "utf-8", flag: "w" });
153
153
  import_utils.logger.info("报告完成: " + mdFileName);
154
+ (0, import_utils.rimraf)((0, import_path.join)(process.cwd(), today), () => {
155
+ import_utils.logger.info("临时目录已删除");
156
+ });
154
157
  }
155
158
  // Annotate the CommonJS export names for ESM import in node:
156
159
  0 && (module.exports = {
@@ -106,7 +106,7 @@ function extractEffectItem(list) {
106
106
  function pushBlockReport(blockReportInfoItem, programNode, index) {
107
107
  if (blockReportInfoItem.kind === "Other") {
108
108
  ["added", "removed"].forEach((key) => {
109
- const tailElements = blockReportInfoItem[key].map((ele) => ele.split(":").at(-1)).filter(Boolean);
109
+ const tailElements = blockReportInfoItem[key].map((ele) => ele.split(":").at(-1)).filter((e) => e && e !== "undefined");
110
110
  blockReportInfoItem[key] = [...new Set(tailElements)];
111
111
  });
112
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-code-detector",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",