Bun版本更新
Bun v1.3.5:新增 Bun.Terminal 伪终端 API
Bun v1.3.5 新增 Bun.Terminal 伪终端 API,可以运行 shell、vim、htop 等需要真实 TTY 的交互程序,同时修复了一个安全问题:非 npm 来源的包可借同名冒充默认信任依赖列表,现在 file:、link:、git: 和 github: 依赖必须在 trustedDependencies 中显式配置才能运行生命周期脚本。
打包器支持经 bun:bundle 引入的编译期功能开关,可在构建时删掉对应代码;Bun.stringWidth 对 Unicode、ANSI 转义和 emoji 的宽度计算也更准确。
要点
- 新增 Bun.Terminal 伪终端 API。
- 修复默认信任依赖可被同名包冒充的问题。
- 打包器支持编译期功能开关。
- Bun.stringWidth 宽度计算更准确。
- S3 上传支持 Content-Disposition。
原文:Bun v1.3.5
Bun now has a built-in API for creating and managing pseudo-terminals, enabling interactive terminal applications like shells, vim , htop , and any program that expects to run in a real TTY.
收录于 。摘自官方更新日志的简短节选,著作权归原发布者所有。