create-yeow 0.2.32 → 0.2.34
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/package.json
CHANGED
|
Binary file
|
|
@@ -216,6 +216,13 @@ async function printFormattedError(err) {
|
|
|
216
216
|
for (let i = start; i < end; i++) {
|
|
217
217
|
const prefix = i === orig.line - 1 ? c.R + ' →' : ' ';
|
|
218
218
|
out += ` ${prefix} ${c.D}${String(i + 1).padStart(4)}|${c.r} ${lines[i]}\n`;
|
|
219
|
+
if (i === orig.line - 1 && orig.column > 0) {
|
|
220
|
+
// Show caret on a separate line below, at the column position
|
|
221
|
+
const indent = ' ' + String(i + 1).padStart(4) + '| ';
|
|
222
|
+
const col = Math.max(0, orig.column);
|
|
223
|
+
const caret = ' '.repeat(col) + c.R + '^' + c.r;
|
|
224
|
+
out += ` ${c.R} →${c.r} ${indent}${caret}\n`;
|
|
225
|
+
}
|
|
219
226
|
}
|
|
220
227
|
}
|
|
221
228
|
}
|