From 252213dab7ab582038f271c98673962b4c3bc6b2 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 8 May 2026 11:12:50 -0700 Subject: [PATCH] fs: add dot option to glob Adds an opt-in `dot` boolean option to fs.glob, fs.globSync, and fsPromises.glob. When true, `*` and `**` patterns match basenames that begin with `.`, and the walker descends into directories whose names begin with `.`. Defaults to false to preserve current behavior. Signed-off-by: Michael Smith --- doc/api/fs.md | 21 ++++++ lib/internal/fs/glob.js | 16 +++-- test/parallel/test-fs-glob.mjs | 124 +++++++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+), 5 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index c5e908aaa39f6c..f0b9c3e7db8741 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1354,6 +1354,9 @@ behavior is similar to `cp dir1/ dir2/`.