Skip to content

Conversation

@Serchinastico
Copy link

👋 Hey, I wanted to see if we could update this library to Ink 6 (+ React 19) to unblock updating ink-ui (vadimdemedes/ink-ui#15).

React 19 introduced synchronous effect flushing, which changes when useEffect runs. In Ink's debug mode, writeToStderr() immediately writes to stdout with this.lastOutput (reference), but due to React 19's synchronous timing, this.lastOutput may be empty when the effect runs, causing an empty string to be written to stdout. This is a transient state that doesn't last more than a frame in real cases but one of the tests failed for this reason.

I opted for just filtering the empty stdout in the failing test, but let me know if you have other plans to fix this.

CC @sindresorhus

@sindresorhus
Copy link
Collaborator

sindresorhus commented Jun 4, 2025

I think this should be fixed properly rather than introducing some temporary API. Can you instead open an issue on Ink? You can mark the test here failing for now (test( => test.failing()

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

Successfully merging this pull request may close these issues.

2 participants