@corbat-tech/coco 2.20.1 → 2.21.1
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/cli/index.js +13 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21121,9 +21121,7 @@ function renderFileBlock(file, opts) {
|
|
|
21121
21121
|
content = wordHighlights.get(delIdx).styledAdd;
|
|
21122
21122
|
} else {
|
|
21123
21123
|
content = line.content;
|
|
21124
|
-
|
|
21125
|
-
if (lang) {
|
|
21126
|
-
content = highlightLine(content, lang);
|
|
21124
|
+
if (lang) content = highlightLine(content, lang);
|
|
21127
21125
|
}
|
|
21128
21126
|
const lineStr = `${lineNo}${prefix} ${content}`;
|
|
21129
21127
|
console.log(bgAddLine(lineStr));
|
|
@@ -21134,9 +21132,7 @@ function renderFileBlock(file, opts) {
|
|
|
21134
21132
|
content = wordHighlights.get(li).styledDelete;
|
|
21135
21133
|
} else {
|
|
21136
21134
|
content = line.content;
|
|
21137
|
-
|
|
21138
|
-
if (lang) {
|
|
21139
|
-
content = highlightLine(content, lang);
|
|
21135
|
+
if (lang) content = highlightLine(content, lang);
|
|
21140
21136
|
}
|
|
21141
21137
|
const lineStr = `${lineNo}${prefix} ${content}`;
|
|
21142
21138
|
console.log(bgDeleteLine(lineStr));
|
|
@@ -21150,12 +21146,12 @@ function renderFileBlock(file, opts) {
|
|
|
21150
21146
|
}
|
|
21151
21147
|
}
|
|
21152
21148
|
}
|
|
21153
|
-
console.log();
|
|
21154
21149
|
}
|
|
21155
21150
|
function formatLineNo(line, show) {
|
|
21156
21151
|
if (!show) return "";
|
|
21157
|
-
const
|
|
21158
|
-
|
|
21152
|
+
const oldStr = line.oldLineNo !== void 0 ? String(line.oldLineNo) : "";
|
|
21153
|
+
const newStr = line.newLineNo !== void 0 ? String(line.newLineNo) : "";
|
|
21154
|
+
return chalk5.dim(`${oldStr.padStart(4)} | ${newStr.padStart(4)} `);
|
|
21159
21155
|
}
|
|
21160
21156
|
function getChangedLines(diff) {
|
|
21161
21157
|
const result = /* @__PURE__ */ new Map();
|