Skip to content

Commit

Permalink
fix(node): glob search to include dot files
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Nov 14, 2023
1 parent 142807a commit 4822005
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sdks/node/src/domain/core/fs/cyan_fs_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export class CyanFileHelper {

readAsStream(g: CyanGlob): VirtualFileStream[] {
const globRoot = this.globDir(g);
const matched = glob.globSync(g.glob, { cwd: globRoot, ignore: g.exclude });
const matched = glob.globSync(g.glob, {
cwd: globRoot,
ignore: g.exclude,
dot: true,
});

return matched.map(
(x) =>
Expand All @@ -60,7 +64,7 @@ export class CyanFileHelper {
const globRoot = this.globDir(g);

return glob
.globSync(g.glob, { cwd: globRoot, ignore: g.exclude })
.globSync(g.glob, { cwd: globRoot, ignore: g.exclude, dot: true })
.map((x) => new VirtualFileReference(globRoot, this.writeDir, x));
}

Expand All @@ -72,7 +76,7 @@ export class CyanFileHelper {
const globRoot = this.globDir(copy);

const files = glob
.globSync(copy.glob, { cwd: globRoot, ignore: copy.exclude })
.globSync(copy.glob, { cwd: globRoot, ignore: copy.exclude, dot: true })
.map((x) => [path.join(globRoot, x), path.join(this.writeDir, x)]);

for (const [read, write] of files) {
Expand Down

0 comments on commit 4822005

Please sign in to comment.