-
Notifications
You must be signed in to change notification settings - Fork 16
feat(utils): replace @poppinss/cliui and @isaacs/cliui with custom ascii table formatting #1146
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
base: main
Are you sure you want to change the base?
Conversation
|
View your CI Pipeline Execution ↗ for commit d2091ed
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/create-cli
@code-pushup/core
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/coverage-plugin
@code-pushup/eslint-plugin
@code-pushup/js-packages-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
@code-pushup/models-transformers
commit: |
2c3ef70 to
dc6a11c
Compare
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit e305ee0 with previous commit 9293a18. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 2 groups improved, 👎 1 group regressed, 👍 5 audits improved, 👎 5 audits regressed, 13 audits changed without impacting score🗃️ Groups
20 other groups are unchanged. 🛡️ Audits
655 other audits are unchanged. |
b05fd45 to
310b314
Compare
310b314 to
d2091ed
Compare
| @@ -1,15 +1,15 @@ | |||
| import { bold, dim, green } from 'ansis'; | |||
| import ansis from 'ansis'; | |||
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.
Is there a benefit of using the default export vs { bold }?
| beforeAll(() => { | ||
| ui().switchMode('raw'); | ||
| }); | ||
|
|
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.
nice cleanup!!
| "ts-morph": "^24.0.0", | ||
| "tslib": "^2.6.2", | ||
| "vscode-material-icons": "^0.1.1", | ||
| "wrap-ansi": "^9.0.2", |
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.
slim dependencies. Nice!
| "rimraf": "^6.0.1", | ||
| "semver": "^7.6.3", | ||
| "simple-git": "^3.26.0", | ||
| "string-width": "^8.1.0", |
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.
very slim dependencies. Nice!
BioPhoton
left a comment
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.
Really good cleanup! Also nice impact on dependency reduction!
Part of #888
Completes the mission to replace all remaining usages of CLI UI packages
@poppinss/cliuiand@isaacs/cliui. Previous PRs (#1138, #1140) replaced all the basic logs, while this PR replaces the more complex table formatting.I've implemented a custom ASCII table formatter, which replaces 2 different 3rd party tables as well as a 3rd party sticker implementation. The results are more or less the same (see snapshots). For defining the structure, I reused our
Tabledata type from audit details.The custom table implementation still uses a couple of 3rd party packages -
string-widthandwrap-ansi- but these are useful low-level utilities that are already used by all these CLI UI packages anyway.