fs: expose glob and globSync#51912
Conversation
|
this capability was originally added to core for the use of the test runner, and we did not expose it since some dependencies don't use primordials. |
|
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
| } | ||
|
|
||
|
|
||
| async* glob() { |
There was a problem hiding this comment.
this is pretty much the same implementation as globSync except using yield instead if this.#results.push
There was a problem hiding this comment.
The implementations can be unified probably if you yield where you await and then do sync/async I/O depending on the path not sure if it's worth it
|
CC @nodejs/fs |
|
/cc @nodejs/fs |
|
cc @nodejs/primordials |
|
@jonschlinkert It might be worth creating a new issue since this one is closed |
@jonschlinkert @styfle See: #53547. |
Refs: nodejs#51912 PR-URL: nodejs#54644 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Refs: nodejs#51912 PR-URL: nodejs#54644 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Fixes #40731
This PR introduces
fs.globandfsPromises.glob.