Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Description
During pnpm install, when SSH passphrase prompts or other external process output writes to the terminal, remnants of that output bleed into the progress line.
Reproduction
Run pnpm install in a project that resolves packages from a git+ssh dependency (or any scenario that triggers an SSH passphrase prompt):
Progress: resolved 36, reused 36, downloaded 0, added 0sa':
The sa': at the end is a leftover fragment from Enter passphrase for key '/Users/.../.ssh/id_rsa': — the progress reporter overwrites the line but doesn't erase characters past the end of the new content.
Describe the Bug
Root cause
The logUpdate function in cli/default-reporter/src/index.ts uses ansi-diff to compute differential terminal updates. ansi-diff writes only the changed characters but does not emit an "erase to end of line" escape (\x1b[K), so when an external process writes a longer line to the terminal between updates, the tail of that longer line remains visible.
Expected Behavior
The progress line should display cleanly without leftover characters from other terminal output.
Which Node.js version are you using?
26
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Description
During
pnpm install, when SSH passphrase prompts or other external process output writes to the terminal, remnants of that output bleed into the progress line.Reproduction
Run
pnpm installin a project that resolves packages from a git+ssh dependency (or any scenario that triggers an SSH passphrase prompt):Progress: resolved 36, reused 36, downloaded 0, added 0sa':
The
sa':at the end is a leftover fragment fromEnter passphrase for key '/Users/.../.ssh/id_rsa':— the progress reporter overwrites the line but doesn't erase characters past the end of the new content.Describe the Bug
Root cause
The
logUpdatefunction incli/default-reporter/src/index.tsusesansi-diffto compute differential terminal updates.ansi-diffwrites only the changed characters but does not emit an "erase to end of line" escape (\x1b[K), so when an external process writes a longer line to the terminal between updates, the tail of that longer line remains visible.Expected Behavior
The progress line should display cleanly without leftover characters from other terminal output.
Which Node.js version are you using?
26
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response