Add Deno terminal support - #6715
Conversation
🦋 Changeset detectedLatest commit: 334815f The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughAdds a Deno-specific terminal module backed by ChangesDeno terminal support
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant DenoTerminalFixture
participant DenoTerminal
participant NodeTerminal
participant Stdin
DenoTerminalFixture->>DenoTerminal: Request terminal input
DenoTerminal->>NodeTerminal: Create scoped reader
NodeTerminal->>Stdin: Read input and monitor EOF
Stdin-->>NodeTerminal: Data or end event
NodeTerminal-->>DenoTerminalFixture: Input value or QuitError
Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/platform-deno/test/DenoTerminal.test.ts`:
- Around line 76-78: Update the readInput test around the terminal.readInput
fixture to use a readiness handshake: wait for the fixture to emit READY after
acquiring readInput, then send the keypresses, and keep stdin open until the
result is emitted. Replace the spawnSync-based input flow so the test exercises
delayed input on an open pipe and can detect premature Deno exit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a8190701-4869-46be-922e-aa9a2785a2ea
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
.changeset/eff-142-deno-terminal.mdpackages/platform-deno/package.jsonpackages/platform-deno/src/DenoTerminal.tspackages/platform-deno/src/index.tspackages/platform-deno/test/DenoTerminal.test.tspackages/platform-deno/test/fixtures/deno-terminal.tspackages/platform-deno/tsconfig.jsonpackages/platform-node-shared/src/NodeTerminal.ts
Bundle Size Analysis
|
Summary
DenoTerminalbacked by the shared Node terminal implementationNodeTerminal.readInputalive until stdin ends under DenoDenoStdiointeroperability coverageTesting
pnpm lintpnpm checkdeno check .deno task test --run test/DenoTerminal.test.tspnpm vitest run --root packages/platform-node-shared test/NodeTerminal.test.tsbun run vitest run --root packages/platform-node-shared test/NodeTerminal.test.tsCloses EFF-142
Summary by CodeRabbit
New Features
Bug Fixes