-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): reduce flicker in spinner render function #4835
Conversation
const writeData = new Uint8Array(LINE_CLEAR.length + frame.length); | ||
writeData.set(LINE_CLEAR); | ||
writeData.set(frame, LINE_CLEAR.length); | ||
Deno.stdout.writeSync(writeData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative using concat()
:
const writeData = new Uint8Array(LINE_CLEAR.length + frame.length); | |
writeData.set(LINE_CLEAR); | |
writeData.set(frame, LINE_CLEAR.length); | |
Deno.stdout.writeSync(writeData); | |
Deno.stdout.writeSync(concat([LINE_CLEAR, frame])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed that this was in a separate package. I'm not sure it's worth causing another package load to occur when importing this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Asher Gomez <[email protected]>
This reverts commit 2930525.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4835 +/- ##
==========================================
- Coverage 91.97% 91.97% -0.01%
==========================================
Files 486 487 +1
Lines 41459 41542 +83
Branches 5360 5365 +5
==========================================
+ Hits 38131 38207 +76
- Misses 3270 3277 +7
Partials 58 58 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's no big deal omitting concat()
for just two Uint8Array
s. LGTM.
No description provided.