Repository navigation
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
commit: |
serhalp
force-pushed
the
serhalp/feat/clack
branch
from
November 16, 2026 12:39
10ec7e1 to
83dc8ae
Compare
Add a bunch of missing coverage for interactive prompts, in preparation for swapping the underlying implementation.
`completion:install` prepended the compinit line from inside an un-awaited `fs.readFile` callback, so it logged success before anything was written, and a failed read would have written `undefined` into ~/.zshrc.
The netlify.toml append wasn't awaited, so a write failure escaped the surrounding try/catch and we logged that the route was registered regardless.
It subtracted two objects, which is always `NaN`, which `sort` treats as `0` anyway. The comment justifying it was about Node 10.
A failed install skipped the handler that prints manual install instructions.
The latter doesn't exist.
Leaving the name blank is supposed to get you a random one, but `sites:create` passed the blank answer back into the prompt helper, which treated it as missing and asked again.
`database init` asked whether to overwrite an existing drizzle.config.ts or db/schema.ts even with `--yes` or without a TTY, where nothing can answer. Now `--yes` overwrites, and a non-interactive run leaves the file alone and says so.
`recipes <typo>` prompted "Did you mean …?" even when nothing could answer, so in CI it sat there for the full 10s timeout, then exited 0. It now prints the suggestion to stderr and exits 2 without a TTY, and exits 2 when the suggestion is declined, like the top-level did-you-mean.
Every prompt now goes through a small wrapper around @clack/prompts in `src/utils/prompts`. It handles the stuff each call site used to handle (or not) on its own: - Ctrl+C or Esc prints "Cancelled." and exits 130, after running any shutdown work a command already registered (e.g. `netlify dev`'s database) - piped stdin works: a line feed submits, and stdin is released afterwards so the process can exit - confirms take a `timeout` after which they count as declined (the did-you-mean prompts use this) - `defaultValue` doubles as the placeholder, and it's what gets validated when the input is left empty - autocomplete filters on what's displayed (label and hint), not on the stringified value Importing @clack/prompts anywhere else is now a lint error. The prompts look and behave a bit differently, on purpose: confirms submit on `y`/`n` without Enter, select options show details as hints instead of `name - url` labels, and `env:list` prints revealed values below the table instead of redrawing it in place. Also drops @inquirer/prompts, fuzzy, log-update and ansi-escapes, and pins `TERM` in tests so snapshots don't depend on the terminal they were recorded in.
A prompt reading from a stdin that had already closed (`</dev/null`, a script whose pipe ended, an agent) waited forever. It now says which prompt went unanswered and exits 4, the "needs-input" code `--help` already advertises. An answer that arrives in the same final chunk as the end of input still counts.
serhalp
force-pushed
the
serhalp/feat/clack
branch
from
November 20, 2026 22:16
83dc8ae to
895bc13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wippy wip wip
$from download error message--git-remote-url, not--gitRemoteUrl