Hasty Briefsbeta

Bilingual

Bun v1.3.12

a day ago
  • #Bun Updates
  • #Browser Automation
  • #Performance Improvements
  • Bun introduces Bun.WebView, a headless browser automation tool supporting WebKit and Chrome backends, with native OS events ensuring human-like interactions.
  • Markdown files can now be rendered in the terminal directly using `bun ./file.md` or programmatically with `Bun.markdown.ansi()`.
  • Async stack traces are now available for native APIs, improving debugging capabilities.
  • In-process `Bun.cron()` scheduler allows recurring tasks within the application, with UTC-based scheduling and no overlapping executions.
  • Improvements to `Bun.udpSocket()` include ICMP error handling without socket closure and detection of truncated datagrams via a flags argument.
  • Unix Domain Socket behavior now matches Node.js, with correct EADDRINUSE errors on existing sockets and automatic cleanup after closing.
  • JavaScriptCore engine upgraded with over 1,650 commits, adding support for Explicit Resource Management (`using` and `await using`) and various performance enhancements.
  • Standalone executables on Linux now use an ELF section for embedded data, eliminating read permissions issues.
  • `URLPattern` is up to 2.3x faster, thanks to reduced GC allocations and no pollution of `RegExp.lastMatch`.
  • Optimizations to `Bun.stripANSI` and `Bun.stringWidth` using SIMD, resulting in significant performance improvements.
  • Fixed a thread-pool bug in `bun build`, speeding up bundling on low-core machines by up to 1.47×.
  • `Bun.Glob.scan()` performance improved, with up to 2× faster scans for patterns with boundaries and kernel-level filtering on Windows.
  • Cgroup-aware `availableParallelism` and `hardwareConcurrency` on Linux respect CPU limits in Docker and Kubernetes.
  • Keep-Alive for HTTPS Proxy CONNECT Tunnels reuses tunnels across requests, reducing latency and overhead.
  • `Bun.serve()` on Linux uses `TCP_DEFER_ACCEPT` to reduce connection latency by minimizing event loop wake-ups.
  • Multiple bugfixes across Node.js compatibility, Bun APIs, Web APIs, JavaScript bundler, `bun test`, Bun Shell, and Windows support.