Bun版本更新
Bun v1.3.4:支持 URLPattern API
Bun v1.3.4 支持 URLPattern Web API,可以像正则一样声明式匹配 URL,bun:test 也加入了假定时器;HTTP 分块编码的块结束符现在按 RFC 9112 更严格地校验。
fetch() 的 proxy 选项可以向代理发送自定义请求头,开启 keepAlive 的 http.Agent 在某些情况下不复用连接的问题也已修复。
要点
- 支持 URLPattern Web API。
- bun:test 支持假定时器。
- 按 RFC 9112 更严格地校验块结束符。
- fetch() 可向代理发送自定义请求头。
- 修复 http.Agent 不复用连接的问题。
原文:Bun v1.3.4
Bun's test runner now supports fake timers, allowing you to control time in your tests without waiting for real time to pass.
收录于 。摘自官方更新日志的简短节选,著作权归原发布者所有。