npm / bun-pty
bun-pty
What changed in bun-pty 0.5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.
5 breaking2 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initbun-pty 0.512 changes
Breaking changes 5
When the child inherits process.env on Unix, the parent's COLUMNS and LINES are dropped.
When provided, env replaces the child's environment instead of being merged with the parent's; spread process.env to inherit variables.
If env has no PATH, bare program names are still found using the parent's PATH, which is not passed to the child.
On Unix, PWD is set from cwd when building the child's environment.
When the child inherits process.env on Unix, the parent's tmux and screen variables are dropped.
Behavior and default changes 2
Without env, the child receives the current process.env, so changes made at runtime reach it.
The name option is now optional, and env: process.env now type-checks.
Fixes and other changes 5
Importing bun-pty no longer throws when no native library file is found; the error is deferred to spawn(), while the load failure is still logged at import.
When the native library fails to load, spawn() now throws a clear error containing the library path and dlopen error instead of an undefined-property error.
Test files are no longer included in the npm package, so consumers receive a package without src/*.test.ts files.
On Windows, an empty env map keeps the parent's environment.
On Unix, TERM is set from the name option, then from TERM in the environment, then to xterm.