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

v6.1.1 hangs when stdin is discarded #211

Closed
timdp opened this issue Jun 27, 2022 · 3 comments
Closed

v6.1.1 hangs when stdin is discarded #211

timdp opened this issue Jun 27, 2022 · 3 comments

Comments

@timdp
Copy link

timdp commented Jun 27, 2022

With v6.1.1, this no longer exits:

import ora from 'ora'
const spinner = ora('test').start()
setTimeout(() => spinner.succeed(), 1000)

Changing the arg to { text: 'test', discardStdin: false } fixes it, which makes sense, as #210 introduced a change to the code that handles stdin.

I'm observing this on Node v14, v16, and v18.

@sindresorhus
Copy link
Owner

// @clavin

@clavin
Copy link
Contributor

clavin commented Jun 27, 2022

Yup, can repro this. This is one unfortunate way to learn that node will avoid exiting when you call resume on stdin. Apologies for breaking this! 🙇

I'm investigating if there's a possible solution for the original issue using another stream as a proxy; alternatively, I might have to contribute upstream to node to make this sort of functionality possible if it is not already (or learn why it isn't).

For right now it would be best to just revert #210. Unfortunately that might also mean #209 still is an open issue.

@sindresorhus
Copy link
Owner

pmmmwh pushed a commit to pmmmwh/staledeps that referenced this issue Jun 28, 2022
pmmmwh pushed a commit to pmmmwh/staledeps that referenced this issue Jun 28, 2022
kodiakhq bot pushed a commit to cloudquery/setup-cloudquery that referenced this issue Jul 3, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [ora](https://togithub.com/sindresorhus/ora) | dependencies | patch | [`^6.0.0` -> `6.1.2`](https://renovatebot.com/diffs/npm/ora/6.1.0/6.1.2) |

---

### Release Notes

<details>
<summary>sindresorhus/ora</summary>

### [`v6.1.2`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.2)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.1...v6.1.2)

-   Revert "Fix preserving stdin's pause state ([#&#8203;210](https://togithub.com/sindresorhus/ora/issues/210))"  [`f4e03ea`](https://togithub.com/sindresorhus/ora/commit/f4e03ea)
    -   Reason: [sindresorhus/ora#211

### [`v6.1.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.0...v6.1.1)

-   Fix preserving stdin's pause state ([#&#8203;210](https://togithub.com/sindresorhus/ora/issues/210))  [`77ccc1e`](https://togithub.com/sindresorhus/ora/commit/77ccc1e)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
kodiakhq bot pushed a commit to X-oss-byte/Canary-nextjs that referenced this issue Oct 8, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ora](https://togithub.com/sindresorhus/ora) | [`4.1.1` -> `7.0.1`](https://renovatebot.com/diffs/npm/ora/4.1.1/7.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/ora/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ora/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ora/4.1.1/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ora/4.1.1/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>sindresorhus/ora (ora)</summary>

### [`v7.0.1`](https://togithub.com/sindresorhus/ora/releases/tag/v7.0.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v7.0.0...v7.0.1)

-   Fix missing dependency ([#&#8203;228](https://togithub.com/sindresorhus/ora/issues/228))  [`1dc1ece`](https://togithub.com/sindresorhus/ora/commit/1dc1ece)

### [`v7.0.0`](https://togithub.com/sindresorhus/ora/releases/tag/v7.0.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.3.1...v7.0.0)

##### Breaking

-   Require Node.js 16  [`0e96acd`](https://togithub.com/sindresorhus/ora/commit/0e96acd)

### [`v6.3.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.3.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.3.0...v6.3.1)

-   Fix Node.js 12 compatibility  [`4b1c2be`](https://togithub.com/sindresorhus/ora/commit/4b1c2be)

### [`v6.3.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.3.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.2.0...v6.3.0)

-   Add [`suffixText`](https://togithub.com/sindresorhus/ora#suffixtext) option ([#&#8203;223](https://togithub.com/sindresorhus/ora/issues/223))  [`2378eaf`](https://togithub.com/sindresorhus/ora/commit/2378eaf)

### [`v6.2.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.2.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.2...v6.2.0)

-   Add `spinners` export to be able to access all available spinners ([#&#8203;222](https://togithub.com/sindresorhus/ora/issues/222))  [`f2ac111`](https://togithub.com/sindresorhus/ora/commit/f2ac111)

### [`v6.1.2`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.2)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.1...v6.1.2)

-   Revert "Fix preserving stdin's pause state ([#&#8203;210](https://togithub.com/sindresorhus/ora/issues/210))"  [`f4e03ea`](https://togithub.com/sindresorhus/ora/commit/f4e03ea)
    -   Reason: [sindresorhus/ora#211

### [`v6.1.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.0...v6.1.1)

-   Fix preserving stdin's pause state ([#&#8203;210](https://togithub.com/sindresorhus/ora/issues/210))  [`77ccc1e`](https://togithub.com/sindresorhus/ora/commit/77ccc1e)

### [`v6.1.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.0.1...v6.1.0)

-   Expose the spinner `interval` as a getter  [`447812b`](https://togithub.com/sindresorhus/ora/commit/447812b)
-   Internal refactoring. If you use any undocumented properties, this may break for you.

### [`v6.0.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.0.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.0.0...v6.0.1)

-   Upgrade dependencies  [`26ba606`](https://togithub.com/sindresorhus/ora/commit/26ba606)

### [`v6.0.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.0.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.4.1...v6.0.0)

##### Breaking

-   Require Node.js 12.20  [`ede1a54`](https://togithub.com/sindresorhus/ora/commit/ede1a54)
-   This package is now pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
-   `ora.promise` is now a named import called `oraPromise` ([#&#8203;181](https://togithub.com/sindresorhus/ora/issues/181))  [`9c01990`](https://togithub.com/sindresorhus/ora/commit/9c01990)
    -   `import {oraPromise} from 'ora';`
-   `oraPromise` now returns the given promise instead of `this` ([#&#8203;181](https://togithub.com/sindresorhus/ora/issues/181))  [`9c01990`](https://togithub.com/sindresorhus/ora/commit/9c01990)
    -   This lets you await it directly, which is more useful than chaining.

##### Improvements

-   Improve performance of the `.clear()` method ([#&#8203;182](https://togithub.com/sindresorhus/ora/issues/182))  [`d51c971`](https://togithub.com/sindresorhus/ora/commit/d51c971)

### [`v5.4.1`](https://togithub.com/sindresorhus/ora/releases/tag/v5.4.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.4.0...v5.4.1)

-   Fix: Don't allow `default` as a spinner ([#&#8203;175](https://togithub.com/sindresorhus/ora/issues/175))  [`659f839`](https://togithub.com/sindresorhus/ora/commit/659f839)

### [`v5.4.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.4.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.3.0...v5.4.0)

-   Improve detection for terminals supporting Unicode  [`c884e0d`](https://togithub.com/sindresorhus/ora/commit/c884e0d)

### [`v5.3.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.3.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.2.0...v5.3.0)

-   Use nice spinner on VSCode's terminal and Windows Terminal ([#&#8203;167](https://togithub.com/sindresorhus/ora/issues/167))  [`af52bbd`](https://togithub.com/sindresorhus/ora/commit/af52bbd)

### [`v5.2.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.2.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.1.0...v5.2.0)

-   Use `bl` package instead of `mute-stream` ([#&#8203;163](https://togithub.com/sindresorhus/ora/issues/163))  [`56de27f`](https://togithub.com/sindresorhus/ora/commit/56de27f)

### [`v5.1.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.1.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.0.0...v5.1.0)

-   Add [`isSilent`](https://togithub.com/sindresorhus/ora#issilent) option ([#&#8203;155](https://togithub.com/sindresorhus/ora/issues/155))  [`1bd812a`](https://togithub.com/sindresorhus/ora/commit/1bd812a)
-   Allow setting `prefixText` dynamically ([#&#8203;154](https://togithub.com/sindresorhus/ora/issues/154))  [`561bc85`](https://togithub.com/sindresorhus/ora/commit/561bc85)

### [`v5.0.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.0.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/376bdaabc9e80ada6dd14dac28ecb3dd5b14f4dc...v5.0.0)

##### Breaking

-   Require Node.js 10  [`87010c5`](https://togithub.com/sindresorhus/ora/commit/87010c5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Canary-nextjs).
kodiakhq bot pushed a commit to X-oss-byte/Nextjs that referenced this issue Oct 14, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ora](https://togithub.com/sindresorhus/ora) | [`4.1.1` -> `7.0.1`](https://renovatebot.com/diffs/npm/ora/4.1.1/7.0.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/ora/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/ora/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/ora/4.1.1/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/ora/4.1.1/7.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sindresorhus/ora (ora)</summary>

### [`v7.0.1`](https://togithub.com/sindresorhus/ora/releases/tag/v7.0.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v7.0.0...v7.0.1)

-   Fix missing dependency ([#&#8203;228](https://togithub.com/sindresorhus/ora/issues/228))  [`1dc1ece`](https://togithub.com/sindresorhus/ora/commit/1dc1ece)

### [`v7.0.0`](https://togithub.com/sindresorhus/ora/releases/tag/v7.0.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.3.1...v7.0.0)

##### Breaking

-   Require Node.js 16  [`0e96acd`](https://togithub.com/sindresorhus/ora/commit/0e96acd)

### [`v6.3.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.3.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.3.0...v6.3.1)

-   Fix Node.js 12 compatibility  [`4b1c2be`](https://togithub.com/sindresorhus/ora/commit/4b1c2be)

### [`v6.3.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.3.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.2.0...v6.3.0)

-   Add [`suffixText`](https://togithub.com/sindresorhus/ora#suffixtext) option ([#&#8203;223](https://togithub.com/sindresorhus/ora/issues/223))  [`2378eaf`](https://togithub.com/sindresorhus/ora/commit/2378eaf)

### [`v6.2.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.2.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.2...v6.2.0)

-   Add `spinners` export to be able to access all available spinners ([#&#8203;222](https://togithub.com/sindresorhus/ora/issues/222))  [`f2ac111`](https://togithub.com/sindresorhus/ora/commit/f2ac111)

### [`v6.1.2`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.2)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.1...v6.1.2)

-   Revert "Fix preserving stdin's pause state ([#&#8203;210](https://togithub.com/sindresorhus/ora/issues/210))"  [`f4e03ea`](https://togithub.com/sindresorhus/ora/commit/f4e03ea)
    -   Reason: [sindresorhus/ora#211

### [`v6.1.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.1.0...v6.1.1)

-   Fix preserving stdin's pause state ([#&#8203;210](https://togithub.com/sindresorhus/ora/issues/210))  [`77ccc1e`](https://togithub.com/sindresorhus/ora/commit/77ccc1e)

### [`v6.1.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.1.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.0.1...v6.1.0)

-   Expose the spinner `interval` as a getter  [`447812b`](https://togithub.com/sindresorhus/ora/commit/447812b)
-   Internal refactoring. If you use any undocumented properties, this may break for you.

### [`v6.0.1`](https://togithub.com/sindresorhus/ora/releases/tag/v6.0.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v6.0.0...v6.0.1)

-   Upgrade dependencies  [`26ba606`](https://togithub.com/sindresorhus/ora/commit/26ba606)

### [`v6.0.0`](https://togithub.com/sindresorhus/ora/releases/tag/v6.0.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.4.1...v6.0.0)

##### Breaking

-   Require Node.js 12.20  [`ede1a54`](https://togithub.com/sindresorhus/ora/commit/ede1a54)
-   This package is now pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
-   `ora.promise` is now a named import called `oraPromise` ([#&#8203;181](https://togithub.com/sindresorhus/ora/issues/181))  [`9c01990`](https://togithub.com/sindresorhus/ora/commit/9c01990)
    -   `import {oraPromise} from 'ora';`
-   `oraPromise` now returns the given promise instead of `this` ([#&#8203;181](https://togithub.com/sindresorhus/ora/issues/181))  [`9c01990`](https://togithub.com/sindresorhus/ora/commit/9c01990)
    -   This lets you await it directly, which is more useful than chaining.

##### Improvements

-   Improve performance of the `.clear()` method ([#&#8203;182](https://togithub.com/sindresorhus/ora/issues/182))  [`d51c971`](https://togithub.com/sindresorhus/ora/commit/d51c971)

### [`v5.4.1`](https://togithub.com/sindresorhus/ora/releases/tag/v5.4.1)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.4.0...v5.4.1)

-   Fix: Don't allow `default` as a spinner ([#&#8203;175](https://togithub.com/sindresorhus/ora/issues/175))  [`659f839`](https://togithub.com/sindresorhus/ora/commit/659f839)

### [`v5.4.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.4.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.3.0...v5.4.0)

-   Improve detection for terminals supporting Unicode  [`c884e0d`](https://togithub.com/sindresorhus/ora/commit/c884e0d)

### [`v5.3.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.3.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.2.0...v5.3.0)

-   Use nice spinner on VSCode's terminal and Windows Terminal ([#&#8203;167](https://togithub.com/sindresorhus/ora/issues/167))  [`af52bbd`](https://togithub.com/sindresorhus/ora/commit/af52bbd)

### [`v5.2.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.2.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.1.0...v5.2.0)

-   Use `bl` package instead of `mute-stream` ([#&#8203;163](https://togithub.com/sindresorhus/ora/issues/163))  [`56de27f`](https://togithub.com/sindresorhus/ora/commit/56de27f)

### [`v5.1.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.1.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/v5.0.0...v5.1.0)

-   Add [`isSilent`](https://togithub.com/sindresorhus/ora#issilent) option ([#&#8203;155](https://togithub.com/sindresorhus/ora/issues/155))  [`1bd812a`](https://togithub.com/sindresorhus/ora/commit/1bd812a)
-   Allow setting `prefixText` dynamically ([#&#8203;154](https://togithub.com/sindresorhus/ora/issues/154))  [`561bc85`](https://togithub.com/sindresorhus/ora/commit/561bc85)

### [`v5.0.0`](https://togithub.com/sindresorhus/ora/releases/tag/v5.0.0)

[Compare Source](https://togithub.com/sindresorhus/ora/compare/376bdaabc9e80ada6dd14dac28ecb3dd5b14f4dc...v5.0.0)

##### Breaking

-   Require Node.js 10  [`87010c5`](https://togithub.com/sindresorhus/ora/commit/87010c5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants