Files
bun.sh/docs/api/globals.md
robobun 8d2953c097 docs: add v1.2.18 features documentation (#23088)
## Summary
- Added documentation for all new features from Bun v1.2.18 release
- Updates are minimal and concise with high information density
- Includes relevant code examples where helpful

## Updates made

### New features documented:
- ReadableStream convenience methods (`.text()`, `.json()`, `.bytes()`,
`.blob()`)
- WebSocket client permessage-deflate compression support
- NODE_PATH environment variable support for bundler
- bun test exits with code 1 when no tests match filter
- Math.sumPrecise for high-precision floating-point summation

### Version updates:
- Node.js compatibility version updated to v24.3.0
- SQLite version updated to 3.50.2

### Behavior changes:
- fs.glob now matches directories by default (not just files)

## Test plan
- [x] Verified all features are from the v1.2.18 release notes
- [x] Checked documentation follows existing patterns
- [x] Code examples are concise and accurate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-09-29 23:23:40 -07:00

6.8 KiB

Bun implements the following globals.

{% table %}

  • Global
  • Source
  • Notes



  • alert
  • Web
  • Intended for command-line tools



  • Bun
  • Bun
  • Subject to change as additional APIs are added


  • confirm
  • Web
  • Intended for command-line tools





  • BuildMessage
  • Bun
  •  
























  • prompt
  • Web
  • Intended for command-line tools








  • ResolveMessage
  • Bun
  •  


















{% /table %}