node icon indicating copy to clipboard operation
node copied to clipboard

fs: make mutating `options` in `readdir()` not affect results

Open LiviaMedeiros opened this issue 1 year ago • 2 comments

The callback version is implemented in sync way (see https://github.com/nodejs/node/issues/56006), so its test should pass without adjustments.

LiviaMedeiros avatar Nov 28 '24 17:11 LiviaMedeiros

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.00%. Comparing base (9c046ea) to head (aa7c1ef). Report is 52 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #56057   +/-   ##
=======================================
  Coverage   88.00%   88.00%           
=======================================
  Files         656      656           
  Lines      189131   189138    +7     
  Branches    36009    36001    -8     
=======================================
+ Hits       166439   166455   +16     
+ Misses      15853    15849    -4     
+ Partials     6839     6834    -5     
Files with missing lines Coverage Δ
lib/fs.js 93.27% <100.00%> (+<0.01%) :arrow_up:
lib/internal/fs/promises.js 97.56% <100.00%> (+<0.01%) :arrow_up:

... and 28 files with indirect coverage changes

codecov[bot] avatar Nov 28 '24 19:11 codecov[bot]

To be safe, Callback API test blocked until https://github.com/nodejs/node/pull/56041 lands (the test can be moved to that PR).

LiviaMedeiros avatar Nov 29 '24 06:11 LiviaMedeiros

Rebased on main on top of https://github.com/nodejs/node/commit/53356c37b759f54b7da0c66558dde7f5755894e2, now it patches both Callback and Promises APIs.

In callback version, copy is made only for recursive mode.

LiviaMedeiros avatar Dec 07 '24 10:12 LiviaMedeiros

Failed to start CI
   ⚠  Something was pushed to the Pull Request branch since the last approving review.
   ✘  Refusing to run CI on potentially unsafe PR
https://github.com/nodejs/node/actions/runs/12211995025

github-actions[bot] avatar Dec 07 '24 10:12 github-actions[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63920/

nodejs-github-bot avatar Dec 07 '24 10:12 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63940/

nodejs-github-bot avatar Dec 08 '24 19:12 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63958/

nodejs-github-bot avatar Dec 09 '24 15:12 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/64007/

nodejs-github-bot avatar Dec 11 '24 17:12 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/64027/

nodejs-github-bot avatar Dec 12 '24 18:12 nodejs-github-bot

Landed in 743eacc48f778345c6289f9d6cc581e631a0d19e...91099658a618732b2cf4a0bec334df26a9ebaaf4

nodejs-github-bot avatar Dec 12 '24 21:12 nodejs-github-bot