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

Use Listr directly for the task runner #27260

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Use Listr directly for the task runner #27260

merged 1 commit into from
Jun 26, 2024

Conversation

mxdvl
Copy link
Contributor

@mxdvl mxdvl commented Jun 25, 2024

What is the value of this and can you measure success?

Peel off layers of abstraction and benefit from the library’s types.

Follow-up on #27247

What does this change?

@mxdvl mxdvl requested a review from a team as a code owner June 25, 2024 14:12
@mxdvl mxdvl changed the title Mxdvl/listr directly Use Listr directly for the task runner Jun 25, 2024
@mxdvl mxdvl force-pushed the mxdvl/listr-directly branch 4 times, most recently from 3360a7e to f001572 Compare June 25, 2024 14:48
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this file is actually unused anywhere… so worth removing as a follow-up

Base automatically changed from mxdvl/esm to main June 25, 2024 15:07
rather than a custom wrapper, we can use
the Listr API directly to peel off layers
of abstraction, reduce custom code, and
benefit from the library’s types.
task: () => compile('atoms/*.scss'),
},
],
{ concurrent: !!ctx.verbose ? false : true },
Copy link
Contributor

Choose a reason for hiding this comment

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

Whats the reason to switch concurrency here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously, when concurrent was true, listrify would read this value and convert it to true or false based on a series of check. This makes it more explicit at the point of creation.

Comment on lines +93 to +97
new Listr(taskModules, {
collapse: true,
renderer: IS_VERBOSE ? VerboseRenderer : 'default',
concurrent: VERBOSE ? false : true,
})
Copy link
Contributor

Choose a reason for hiding this comment

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

😍 This is great! Removes a lot of complexity!

@mxdvl mxdvl added this to the Health milestone Jun 26, 2024
@mxdvl mxdvl merged commit 983a8ba into main Jun 26, 2024
6 checks passed
@mxdvl mxdvl deleted the mxdvl/listr-directly branch June 26, 2024 09:38
@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD, ADMIN-PROD (merged by @mxdvl 14 minutes and 10 seconds ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants