Skip to content

node:fs: report mkdir/readdir/rm boolean option type errors like node - #39328

Open
robobun wants to merge 1 commit into
mainfrom
farm/2d7a8080/fs-boolean-option-messages
Open

node:fs: report mkdir/readdir/rm boolean option type errors like node#39328
robobun wants to merge 1 commit into
mainfrom
farm/2d7a8080/fs-boolean-option-messages

node:fs: report mkdir/readdir/rm boolean options as "options.x" prope…

2a15b56
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 16, 2026 in 22m 4s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/node/node_fs.rs:3318-3325 rmdir force/recursive reorder regresses Node compat when both are bad

Annotations

Check warning on line 3325 in src/runtime/node/node_fs.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

rmdir force/recursive reorder regresses Node compat when both are bad

The `force`-before-`recursive` reorder is correct for `fs.rm` but this parser is shared with `fs.rmdir` (via `RmDir::from_js` → `from_js_impl(ctx, arguments, false)`), and Node's `validateRmdirOptions` does not validate `force` at all — so `fs.rmdirSync(d, { recursive: 'x', force: 'y' })` now names `options.force` where both Node and pre-PR Bun name `options.recursive`. Gating the `force` check on `strict_booleans` (which is exactly what Node's rmdir does) would keep the rm fix without this rmdi