summaryrefslogtreecommitdiff
path: root/std/fs/expand_glob.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-03-29 04:03:49 +1100
committerGitHub <noreply@github.com>2020-03-28 13:03:49 -0400
commitbced52505f32d6cca4f944bb610a8a26767908a8 (patch)
treeda49a5df4b7bd6f8306248069228cd6bd0db1303 /std/fs/expand_glob.ts
parent1397b8e0e7c85762e19d88fde103342bfa563360 (diff)
Update to Prettier 2 and use ES Private Fields (#4498)
Diffstat (limited to 'std/fs/expand_glob.ts')
-rw-r--r--std/fs/expand_glob.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts
index c6653eda1..10a8c2c52 100644
--- a/std/fs/expand_glob.ts
+++ b/std/fs/expand_glob.ts
@@ -6,7 +6,7 @@ import {
isGlob,
isWindows,
joinGlobs,
- normalize
+ normalize,
} from "../path/mod.ts";
import { WalkInfo, walk, walkSync } from "./walk.ts";
import { assert } from "../testing/asserts.ts";
@@ -38,7 +38,7 @@ function split(path: string): SplitPath {
segments,
isAbsolute: isAbsolute_,
hasTrailingSep: !!path.match(new RegExp(`${s}$`)),
- winRoot: isWindows && isAbsolute_ ? segments.shift() : undefined
+ winRoot: isWindows && isAbsolute_ ? segments.shift() : undefined,
};
}
@@ -59,7 +59,7 @@ export async function* expandGlob(
exclude = [],
includeDirs = true,
extended = false,
- globstar = false
+ globstar = false,
}: ExpandGlobOptions = {}
): AsyncIterableIterator<WalkInfo> {
const globOptions: GlobOptions = { extended, globstar };
@@ -110,7 +110,7 @@ export async function* expandGlob(
} else if (globSegment == "**") {
return yield* walk(walkInfo.filename, {
includeFiles: false,
- skip: excludePatterns
+ skip: excludePatterns,
});
}
yield* walk(walkInfo.filename, {
@@ -119,9 +119,9 @@ export async function* expandGlob(
globToRegExp(
joinGlobs([walkInfo.filename, globSegment], globOptions),
globOptions
- )
+ ),
],
- skip: excludePatterns
+ skip: excludePatterns,
});
}
@@ -138,7 +138,7 @@ export async function* expandGlob(
currentMatches = [...nextMatchMap].sort().map(
([filename, info]): WalkInfo => ({
filename,
- info
+ info,
})
);
}
@@ -163,7 +163,7 @@ export function* expandGlobSync(
exclude = [],
includeDirs = true,
extended = false,
- globstar = false
+ globstar = false,
}: ExpandGlobOptions = {}
): IterableIterator<WalkInfo> {
const globOptions: GlobOptions = { extended, globstar };
@@ -214,7 +214,7 @@ export function* expandGlobSync(
} else if (globSegment == "**") {
return yield* walkSync(walkInfo.filename, {
includeFiles: false,
- skip: excludePatterns
+ skip: excludePatterns,
});
}
yield* walkSync(walkInfo.filename, {
@@ -223,9 +223,9 @@ export function* expandGlobSync(
globToRegExp(
joinGlobs([walkInfo.filename, globSegment], globOptions),
globOptions
- )
+ ),
],
- skip: excludePatterns
+ skip: excludePatterns,
});
}
@@ -242,7 +242,7 @@ export function* expandGlobSync(
currentMatches = [...nextMatchMap].sort().map(
([filename, info]): WalkInfo => ({
filename,
- info
+ info,
})
);
}