diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/fs/expand_glob.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/fs/expand_glob.ts')
-rw-r--r-- | std/fs/expand_glob.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts index 4b7b11885..949f58f92 100644 --- a/std/fs/expand_glob.ts +++ b/std/fs/expand_glob.ts @@ -15,8 +15,6 @@ import { walkSync, } from "./walk.ts"; import { assert } from "../_util/assert.ts"; -const { cwd } = Deno; -type FileInfo = Deno.FileInfo; const isWindows = Deno.build.os == "windows"; @@ -68,7 +66,7 @@ function comparePath(a: WalkEntry, b: WalkEntry): number { export async function* expandGlob( glob: string, { - root = cwd(), + root = Deno.cwd(), exclude = [], includeDirs = true, extended = false, @@ -78,7 +76,7 @@ export async function* expandGlob( const globOptions: GlobOptions = { extended, globstar }; const absRoot = isAbsolute(root) ? normalize(root) - : joinGlobs([cwd(), root], globOptions); + : joinGlobs([Deno.cwd(), root], globOptions); const resolveFromRoot = (path: string): string => isAbsolute(path) ? normalize(path) @@ -167,7 +165,7 @@ export async function* expandGlob( export function* expandGlobSync( glob: string, { - root = cwd(), + root = Deno.cwd(), exclude = [], includeDirs = true, extended = false, @@ -177,7 +175,7 @@ export function* expandGlobSync( const globOptions: GlobOptions = { extended, globstar }; const absRoot = isAbsolute(root) ? normalize(root) - : joinGlobs([cwd(), root], globOptions); + : joinGlobs([Deno.cwd(), root], globOptions); const resolveFromRoot = (path: string): string => isAbsolute(path) ? normalize(path) |