mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
docs: add v1.2.17 features to documentation (#23089)
## Summary Updates documentation to include features released in Bun v1.2.17 that were missing from the docs: - ✅ HTML imports ahead-of-time bundling (already documented) - ✅ columnTypes & declaredTypes in bun:sqlite (already documented, just not visible in diff as it was recent) - ✅ bun info command (already documented) - ✅ Node.js compatibility improvements (partially documented, added missing details) - ✅ --unhandled-rejections flag (added) - ✅ CLAUDE.md generation in bun init (added) ## Changes - Document `--unhandled-rejections` CLI flag for configuring promise rejection handling - Document `CLAUDE.md` file generation in `bun init` when Claude CLI is detected - Update Node.js compatibility notes with recent improvements: - `child_process.fork()` execArgv support - Zstandard compression in `node:zlib` - Optional options parameter in `fs.glob` - `tls.getCACertificates()` implementation ## Test plan Documentation changes only - no code changes to test. 🤖 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>
This commit is contained in:
@@ -663,6 +663,8 @@ class Statement<Params, ReturnType> {
|
||||
toString(): string; // serialize to SQL
|
||||
|
||||
columnNames: string[]; // the column names of the result set
|
||||
columnTypes: string[]; // types based on actual values in first row (call .get()/.all() first)
|
||||
declaredTypes: (string | null)[]; // types from CREATE TABLE schema (call .get()/.all() first)
|
||||
paramsCount: number; // the number of parameters expected by the statement
|
||||
native: any; // the native object representing the statement
|
||||
|
||||
|
||||
@@ -32,7 +32,10 @@ It creates:
|
||||
- a `tsconfig.json` file or a `jsconfig.json` file, depending if the entry point is a TypeScript file or not
|
||||
- an entry point which defaults to `index.ts` unless any of `index.{tsx, jsx, js, mts, mjs}` exist or the `package.json` specifies a `module` or `main` field
|
||||
- a `README.md` file
|
||||
- a `.cursor/rules/*.mdc` file to guide [Cursor AI](https://cursor.sh) to use Bun instead of Node.js/npm when Cursor is detected
|
||||
|
||||
AI Agent rules (disable with `$BUN_AGENT_RULE_DISABLED=1`):
|
||||
- a `CLAUDE.md` file when Claude CLI is detected (disable with `CLAUDE_CODE_AGENT_RULE_DISABLED` env var)
|
||||
- a `.cursor/rules/*.mdc` file to guide [Cursor AI](https://cursor.sh) to use Bun instead of Node.js and npm when Cursor is detected
|
||||
|
||||
If you pass `-y` or `--yes`, it will assume you want to continue without asking questions.
|
||||
|
||||
|
||||
@@ -247,4 +247,15 @@ When there is a package.json script and a file with the same name, `bun run` pri
|
||||
3. Binaries from project packages, eg `bun add eslint && bun run eslint`
|
||||
4. (`bun run` only) System commands, eg `bun run ls`
|
||||
|
||||
### `--unhandled-rejections`
|
||||
|
||||
Configure how unhandled promise rejections are handled:
|
||||
|
||||
```bash
|
||||
$ bun --unhandled-rejections=throw script.js # Throw exception (terminate immediately)
|
||||
$ bun --unhandled-rejections=strict script.js # Throw exception (emit rejectionHandled if handled later)
|
||||
$ bun --unhandled-rejections=warn script.js # Print warning to stderr (default in Node.js)
|
||||
$ bun --unhandled-rejections=none script.js # Silently ignore
|
||||
```
|
||||
|
||||
{% bunCLIUsage command="run" /%}
|
||||
|
||||
Reference in New Issue
Block a user