fs: pass correct path to `DirentFromStats` during `glob`
Fixes #55060
Passes the dirname as parentPath, rather than the full file path.
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%> (ΓΈ) |
π 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.
CC @nodejs/fs
CI: https://ci.nodejs.org/job/node-test-pull-request/62723/
I need to account for \\ (vs /) on windows.
CI: https://ci.nodejs.org/job/node-test-pull-request/62783/
CI: https://ci.nodejs.org/job/node-test-pull-request/62859/
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'
}
Rebased to fix coverage issues, can someone start a CI?
CI: https://ci.nodejs.org/job/node-test-pull-request/62883/
Can this land?
CI: https://ci.nodejs.org/job/node-test-pull-request/63002/
~~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,
CI: https://ci.nodejs.org/job/node-test-pull-request/63067/
Hey, can someone restart the failed builds so this fix can land? Thanks!
CI: https://ci.nodejs.org/job/node-test-pull-request/63227/
CI: https://ci.nodejs.org/job/node-test-pull-request/63245/
Landed in 7ae73b90d47ab534f79c88bd5557b8060c42b162