fix(fs): complete Node 26 parity - #6857
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Changesrmdir API parity
Promise watch initialization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/perry-codegen/src/expr/calls/fs.rs`:
- Around line 72-84: Add an explicit missing-argument error for rmdir in both
crates/perry-codegen/src/expr/calls/fs.rs:72-84 and
crates/perry-codegen/src/lower_call/namespace_call.rs:213-226, before lowering
or constructing the call. Update the rmdir guards so zero arguments produce the
existing runtime argument error, while calls with a path preserve the current
js_fs_promises_rmdir lowering behavior.
In `@crates/perry-runtime/src/fs/mod.rs`:
- Around line 1620-1623: Update validate_rmdir_options so the options object is
rooted before calling options_field_value, or make that property lookup
allocation-free. Ensure any object pointer used after the lookup is reloaded
from the root after potential allocation, preserving the existing
missing-recursive-field behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: dbacd9cc-bab4-4bd8-b91a-1e2abf22271d
📒 Files selected for processing (8)
crates/perry-codegen/src/expr/calls/fs.rscrates/perry-codegen/src/lower_call/namespace_call.rscrates/perry-codegen/src/runtime_decls/strings.rscrates/perry-runtime/src/fs/callbacks.rscrates/perry-runtime/src/fs/dir_glob_watch/watch.rscrates/perry-runtime/src/fs/mod.rscrates/perry-runtime/src/node_submodules/fs_promises.rstest-parity/node-suite/fs/rmdir/recursive-options.ts
💤 Files with no reviewable changes (1)
- crates/perry-runtime/src/fs/dir_glob_watch/watch.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test-parity/node-suite/fs/rmdir/recursive-options.ts`:
- Around line 40-42: Clean up the existing ROOT directory after the preceding
recursive rmdir rejection checks and before calling fs.mkdirSync(ROOT) for the
empty-options case. Preserve the requirement that recursive rmdir calls reject
without deleting ROOT, and ensure the fs.rmdirSync(ROOT, {}) assertion can
execute.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6bd5f8e1-3990-416e-9f18-2818fdaf970f
📒 Files selected for processing (4)
crates/perry-codegen/src/expr/calls/fs.rscrates/perry-codegen/src/lower_call/namespace_call.rscrates/perry-runtime/src/fs/dirent.rstest-parity/node-suite/fs/rmdir/recursive-options.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/perry-codegen/src/lower_call/namespace_call.rs
Summary
Complete Node.js 26.5.0 parity for
node:fs.Changes
fs.promises.watchcreation baseline.rmdirerrors across sync, callback, and promise APIs.fs.promises.rmdirthrough its runtime implementation.Related issue
Closes #6782
Test plan
cargo test -p perry-codegen./run_parity_tests.sh --suite node-suite --module fscargo test -p perry-runtime(three existing-suite failures require separate review)Checklist
CLAUDE.md, orCHANGELOG.md.CONTRIBUTING.mdand agree to the Code of Conduct.Summary by CodeRabbit
fs.promises.rmdirdirectory removal.fs.rmdir/fs.promises.rmdirnow validateoptionsup front and reject the unsupportedrecursiveoption with a clearERR_INVALID_ARG_VALUEerror.rmdirnow follows the expected result/error behavior.rmdirparity tests to assert correct error behavior (including missing-path and empty-options cases) across sync, callback, and promise APIs.