node icon indicating copy to clipboard operation
node copied to clipboard

fs: pass correct path to `DirentFromStats` during `glob`

Open avivkeller opened this issue 1 year ago β€’ 14 comments

Fixes #55060

Passes the dirname as parentPath, rather than the full file path.

avivkeller avatar Sep 22 '24 23:09 avivkeller

Codecov Report

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

Project coverage is 88.39%. Comparing base (366e573) to head (4528fd6). Report is 1100 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55071      +/-   ##
==========================================
- Coverage   88.40%   88.39%   -0.02%     
==========================================
  Files         652      652              
  Lines      186565   186565              
  Branches    36038    36037       -1     
==========================================
- Hits       164935   164915      -20     
+ Misses      14914    14910       -4     
- Partials     6716     6740      +24     
Files with missing lines Coverage Ξ”
lib/internal/fs/glob.js 91.76% <100.00%> (ΓΈ)

... and 22 files with indirect coverage changes

πŸš€ New features to boost your workflow:
  • ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Sep 23 '24 01:09 codecov[bot]

CC @nodejs/fs

avivkeller avatar Sep 23 '24 11:09 avivkeller

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

nodejs-github-bot avatar Sep 24 '24 10:09 nodejs-github-bot

I need to account for \\ (vs /) on windows.

avivkeller avatar Sep 24 '24 12:09 avivkeller

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

nodejs-github-bot avatar Sep 26 '24 10:09 nodejs-github-bot

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

nodejs-github-bot avatar Sep 30 '24 15:09 nodejs-github-bot

Looks like there are relevant failures I may need to take a look at:

        TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
            at isAbsolute (node:path:462:5)
            at normalizePath (file:///C:/workspace/node-test-binary-windows-js-suites/node/test/parallel/test-fs-glob.mjs:342:34)
            at Array.map (<anonymous>)
            at TestContext.<anonymous> (file:///C:/workspace/node-test-binary-windows-js-suites/node/test/parallel/test-fs-glob.mjs:368:75)
            at Test.runInAsyncScope (node:async_hooks:211:14)
            at Test.run (node:internal/test_runner/test:930:25)
            at Suite.processPendingSubtests (node:internal/test_runner/test:629:18)
            at Test.postRun (node:internal/test_runner/test:1026:19)
            at Test.run (node:internal/test_runner/test:969:12)
            at async Suite.processPendingSubtests (node:internal/test_runner/test:629:7) {
          code: 'ERR_INVALID_ARG_TYPE'
        }

avivkeller avatar Sep 30 '24 15:09 avivkeller

Rebased to fix coverage issues, can someone start a CI?

avivkeller avatar Oct 01 '24 20:10 avivkeller

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

nodejs-github-bot avatar Oct 01 '24 21:10 nodejs-github-bot

Can this land?

avivkeller avatar Oct 08 '24 19:10 avivkeller

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

nodejs-github-bot avatar Oct 09 '24 07:10 nodejs-github-bot

~~Hey, could someone resume the CI? If this lands today, it can be included in v23.0.0, which would be nice~~

This probably won't make it in time for the release,

avivkeller avatar Oct 10 '24 14:10 avivkeller

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

nodejs-github-bot avatar Oct 12 '24 20:10 nodejs-github-bot

Hey, can someone restart the failed builds so this fix can land? Thanks!

avivkeller avatar Oct 17 '24 17:10 avivkeller

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

nodejs-github-bot avatar Oct 21 '24 08:10 nodejs-github-bot

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

nodejs-github-bot avatar Oct 22 '24 06:10 nodejs-github-bot

Landed in 7ae73b90d47ab534f79c88bd5557b8060c42b162

nodejs-github-bot avatar Oct 22 '24 11:10 nodejs-github-bot