Skip to content
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

[eas-cli] diagnostics: add loader and progress information #2378

Merged
merged 2 commits into from
May 13, 2024

Conversation

Simek
Copy link
Contributor

@Simek Simek commented May 13, 2024

Why

Let's give users an information that something is happening when diagnostics take a while to gather data.

How

Add Ora spinner with simple process progress information + small formatting tweaks.

Test Plan

The changes have been tested locally.

Preview

Kapture.2024-05-13.at.13.29.27.mp4

Copy link

github-actions bot commented May 13, 2024

Size Change: +1.43 kB (0%)

Total Size: 51.3 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 51.3 MB +1.43 kB (0%)

compressed-size-action

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 53.55%. Comparing base (e1ebcc0) to head (48845a0).

Files Patch % Lines
packages/eas-cli/src/commands/diagnostics.ts 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2378      +/-   ##
==========================================
- Coverage   53.55%   53.55%   -0.00%     
==========================================
  Files         530      530              
  Lines       19513    19517       +4     
  Branches     4135     4135              
==========================================
+ Hits        10449    10451       +2     
- Misses       8332     8334       +2     
  Partials      732      732              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Simek
Copy link
Contributor Author

Simek commented May 13, 2024

/changelog-entry chore Add loader and progress information to diagnostics command

Copy link

✅ Thank you for adding the changelog entry!

Comment on lines +25 to 28
const spinner = ora().start(`Gathering diagnostic information...`);
const info = await envinfo.run(
{
System: ['OS', 'Shell'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should try / catch it and call spinner.failed when there is an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK envinfo always "succeedes" and only prints error messages instead of throwing on read failures.

Copy link
Member

@szdziedzic szdziedzic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@szdziedzic szdziedzic merged commit b2961a2 into main May 13, 2024
9 checks passed
@szdziedzic szdziedzic deleted the @simek/eas-cli-diagnostics-loader branch May 13, 2024 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants