-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
nodejs: 16.20.2
webpack: 5.102.1
webpackbar: 7.0.0
Reproduction
sorry, it's private repo of the company
Describe the bug
As shown in the screenshot below, the weex named progress bar always gets pushed down by an empty line on every update
I fix the eraseLines function as below and everything works. I wonder whether my fix is correct
diff --git a/node_modules/webpackbar/dist/shared/webpackbar.e03748fc.cjs b/node_modules/webpackbar/dist/shared/webpackbar.e03748fc.cjs
index 4a2a28f..f2422d9 100644
--- a/node_modules/webpackbar/dist/shared/webpackbar.e03748fc.cjs
+++ b/node_modules/webpackbar/dist/shared/webpackbar.e03748fc.cjs
@@ -776,7 +776,7 @@ function ellipsisLeft(str, n) {
function eraseLines(count) {
let clear = "";
for (let i = 0; i < count; i++) {
- clear += `\x1B[2K` + (i < count - 1 ? `\x1B[1A` : "");
+ clear += `\x1B[2K` + (i < count ? `\x1B[1A` : "");
}
if (count)
clear += `\x1B[G`;
Additional context
No response
Logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working