Adopt latest stdin-discarder version#251
Merged
sindresorhus merged 1 commit intosindresorhus:mainfrom Feb 4, 2026
Merged
Conversation
github-merge-queue bot
pushed a commit
to NangoHQ/nango
that referenced
this pull request
Feb 4, 2026
## Issue `nango compile` hangs indefinitely when run via pre-commit hooks due to an upstream bug in ora's `stdin-discarder` dependency (#5207). This is blocking a customer's CI/CD workflow. ## Root cause The bug was fixed in `stdin-discarder@0.3.1`, but `ora@9.1.0` (latest) still depends on `stdin-discarder@^0.2.2` and hasn't released a patched version yet. ## Fix Added a `createSpinner()` wrapper that returns a no-op spinner when running in non-interactive environments (CI, pre-commit hooks, piped output, or when `--no-interactive` flag is passed). The real ora spinner is only used when both `interactive=true` AND `process.stdout.isTTY` is true. This workaround should be removed once `ora` releases a patched version I have opened a PR to actually bump the `stdin-discarder` version on the `ora` repo (sindresorhus/ora#251) Closes #5207 <!-- Summary by @propel-code-bot --> --- **Add resilient spinner wrapper and propagate non-interactive handling across CLI** Introduces a centralized `Spinner` utility that wraps `ora`, falls back to text-based logging when either stdin/stdout is non-TTY, and is wired through compile, dev, deploy, migrations, init, clone, and test generation flows. Global CLI options now auto-disable interactivity in CI environments (`isCI` or `--no-interactive`), ensuring commands invoked from hooks or piped executions no longer hang, while also updating `ora` to `9.2.0` and related dependencies (e.g., `stdin-discarder@0.3.1`). <details> <summary><strong>Key Changes</strong></summary> • Created `packages/cli/lib/utils/spinner.ts` implementing a Proxy-based `Spinner` class that mirrors the `Ora` interface and prints textual status when `process.stdin` or `stdout` is non-TTY. • Replaced direct `ora` usage across CLI commands (`compile`, `dev`, `deploy`, zero-yaml migrations, init, clone, tests, etc.) with the new `Spinner`, adding `interactive` parameters where needed. • Updated `packages/cli/lib/index.ts` global option handling to default to interactive mode, automatically disable it under CI, and pass the flag through to all commands. • Bumped `ora` to `9.2.0` in `packages/cli/package.json` and lockfile, pulling in the fixed `stdin-discarder@0.3.1` plus new transitive dependencies. </details> <details> <summary><strong>Affected Areas</strong></summary> • packages/cli/lib/utils/spinner.ts • packages/cli/lib/zeroYaml/* (compile, dev, deploy, migrations, init, check) • packages/cli/lib/services/{clone,test}.service.ts • packages/cli/lib/index.ts • packages/cli/package.json & package-lock.json </details> --- *This summary was automatically generated by @propel-code-bot*
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.
To fix
oraprocess hanging when stdin stays open, sindresorhus/stdin-discarder@f917ce9 was implemented. This solves #248 , but thestdin-discarderversion that has the fix was never adopted here.Adopting the fixed version