Skip to content

doc: clarify fs.glob pattern arrays and add Array.fromAsync example - #62245

Open
kovan wants to merge 1 commit into
nodejs:mainfrom
kovan:glob-pattern-docs
Open

kovan wants to merge 1 commit into
nodejs:mainfrom
kovan:glob-pattern-docs

Conversation

@kovan

@kovan kovan commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Most of the original scope of this PR (pattern syntax reference, platform case sensitivity, cross-references from fs.glob() and fs.globSync()) has since landed as the "Glob patterns" section in #65392, so this is now reduced to what that section does not cover:

  • How an array of patterns is combined (a path is included if it matches any of them)
  • A pointer to path.matchesGlob() for matching a single path without traversing the file system
  • An example collecting results with Array.fromAsync()

Refs: #58981

🤖 Generated with Claude Code

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. fs Issues and PRs related to file-system APIs and the fs module. labels Mar 13, 2026
@SimonEast

Copy link
Copy Markdown

I was just searching the documentation for this kind of thing, and couldn't find it, so I would like to see this PR get added to the docs.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

@github-actions github-actions Bot added the stale Issues and PRs marked stale due to inactivity and scheduled for automatic closure. label Jul 31, 2026
@SimonEast

Copy link
Copy Markdown

Still relevant. This is a documentation-only change, and I would like to see this merged. Anything blocking?

@github-actions github-actions Bot removed the stale Issues and PRs marked stale due to inactivity and scheduled for automatic closure. label Aug 1, 2026
@jazelly

jazelly commented Nov 9, 2026

Copy link
Copy Markdown
Member

There are some conflicts on this PR. If that can be resolved then lgtm.

@kovan
kovan force-pushed the glob-pattern-docs branch from cce9707 to ca9d3de Compare November 29, 2026 13:52
@kovan kovan changed the title doc: document glob pattern syntax for fs.glob doc: clarify fs.glob pattern arrays and add Array.fromAsync example Nov 29, 2026
@kovan

kovan commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main. While doing so I found that #65392 had already added a full Glob patterns section covering most of what this PR did, so I dropped the duplicated parts. What remains is the note on pattern arrays, the path.matchesGlob() pointer and an Array.fromAsync() example. @jazelly could you take another look? Thanks @SimonEast for keeping this alive.

Most of the original change is now covered by the "Glob patterns"
section added in nodejs#65392. This
keeps the remaining parts: how an array of patterns is combined, a
pointer to path.matchesGlob() for matching without file system
traversal, and an example collecting results with Array.fromAsync().

Refs: nodejs#58981
Assisted-by: a frontier reasoning model
Signed-off-by: kovan <xaum.io@gmail.com>
@kovan
kovan force-pushed the glob-pattern-docs branch from ca9d3de to 4418a3c Compare November 29, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to Node.js documentation. fs Issues and PRs related to file-system APIs and the fs module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants