mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
fix(fs): change globstar default to true for expandGlob and expandGlobSync (#3115)
This commit is contained in:
parent
13d469a191
commit
b55fb2e311
@ -80,7 +80,7 @@ export async function* expandGlob(
|
||||
exclude = [],
|
||||
includeDirs = true,
|
||||
extended = true,
|
||||
globstar = false,
|
||||
globstar = true,
|
||||
caseInsensitive,
|
||||
}: ExpandGlobOptions = {},
|
||||
): AsyncIterableIterator<WalkEntry> {
|
||||
@ -199,7 +199,7 @@ export function* expandGlobSync(
|
||||
exclude = [],
|
||||
includeDirs = true,
|
||||
extended = true,
|
||||
globstar = false,
|
||||
globstar = true,
|
||||
caseInsensitive,
|
||||
}: ExpandGlobOptions = {},
|
||||
): IterableIterator<WalkEntry> {
|
||||
|
@ -46,7 +46,6 @@ const EG_OPTIONS: ExpandGlobOptions = {
|
||||
root: fromFileUrl(new URL(join("testdata", "glob"), import.meta.url)),
|
||||
includeDirs: true,
|
||||
extended: false,
|
||||
globstar: false,
|
||||
};
|
||||
|
||||
Deno.test("expandGlobWildcard", async function () {
|
||||
@ -97,9 +96,9 @@ Deno.test("expandGlobExt", async function () {
|
||||
});
|
||||
|
||||
Deno.test("expandGlobGlobstar", async function () {
|
||||
const options = { ...EG_OPTIONS, globstar: true };
|
||||
const options = { ...EG_OPTIONS };
|
||||
assertEquals(
|
||||
await expandGlobArray(joinGlobs(["**", "abc"], options), options),
|
||||
await expandGlobArray("**/abc", options),
|
||||
["abc", join("subdir", "abc")],
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user