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): handle run mode correctly (fix #719) #717
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,34 +35,30 @@ cli | |
|
||
cli | ||
.command('run [...filters]') | ||
.action(run) | ||
.action((cliFilters: string[], argv: UserConfig) => run(cliFilters, { ...argv, run: true, watch: false })) | ||
|
||
cli | ||
.command('related [...filters]') | ||
.action(runRelated) | ||
|
||
cli | ||
.command('watch [...filters]') | ||
.action(dev) | ||
.action(run) | ||
|
||
cli | ||
.command('dev [...filters]') | ||
.action(dev) | ||
.action(run) | ||
|
||
cli | ||
.command('[...filters]') | ||
.action(dev) | ||
.action(run) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep the original naming? I found them a bit confusing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we don't really need the |
||
|
||
cli.parse() | ||
|
||
async function runRelated(relatedFiles: string[] | string, argv: UserConfig) { | ||
argv.related = relatedFiles | ||
argv.passWithNoTests ??= true | ||
await dev([], argv) | ||
} | ||
|
||
async function dev(cliFilters: string[], argv: UserConfig) { | ||
await run(cliFilters, argv) | ||
await run([], argv) | ||
} | ||
|
||
async function run(cliFilters: string[], options: UserConfig) { | ||
|
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.
The fix should be make watch default to false and handles it in CLI, /cc @sheremet-va
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.
Should be fixed