commit 6ec38a7 ↗ · oven-sh/bun · · committed Aug 2, 2026 · +530−121 · base 322f3abf9d37
Agent prompt
what a new run launched now would send
Bun ignores TypeScript `compilerOptions.useDefineForClassFields` from tsconfig.json. With `"useDefineForClassFields": false`, a class field initializer that reads a constructor parameter property throws at runtime because the field runs before the parameter property is assigned; the same program succeeds under tsc and esbuild.
Reproduction (tsconfig: `{"compilerOptions":{"useDefineForClassFields":false}}`):
ts
class Logger { createChildContext(n: string) { return new Logger(); } }
class PlayerManager { constructor(public log: Logger) {} }
export class GameServer {
private _playerManager = new PlayerManager(this._log.createChildContext("pm"));
constructor(private _log: Logger) {}
}
new GameServer(new Logger());
Before: `TypeError: undefined is not an object` at the field initializer. With tsc/esbuild and `useDefineForClassFields: false`, construction succeeds.
Honor `useDefineForClassFields` from tsconfig end-to-end (runtime transpile and `Bun.Transpiler`). When it is `false`, match TypeScript/esbuild [[Set]] semantics for instance fields (initializers as constructor assignments after parameter-property assignments / after `super(...)` when extending, including when a constructor must be synthesized). When it is `true` or unset, keep Bun’s existing native [[Define]] class-field behavior.
Work only inside this repository checkout. Make the code change the task
describes, keeping the diff focused — no drive-by refactors.
When you are done, leave your changes committed or in the working tree;
they are collected automatically.
Stay on this snapshot checkout (`task/ycb_bun_c6ec38a7b1f10`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan.
Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.
Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
Reference diff
The task commit's diff against its first parent — the judge's comparison target.