diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/path/constants.ts | 2 | ||||
-rw-r--r-- | fs/path/mod.ts | 2 | ||||
-rw-r--r-- | fs/path/resolve_test.ts | 2 | ||||
-rw-r--r-- | fs/path/zero_length_strings_test.ts | 2 | ||||
-rw-r--r-- | fs/walk.ts | 13 | ||||
-rw-r--r-- | fs/walk_test.ts | 7 |
6 files changed, 9 insertions, 19 deletions
diff --git a/fs/path/constants.ts b/fs/path/constants.ts index ce121f9ac..cfba4ebd8 100644 --- a/fs/path/constants.ts +++ b/fs/path/constants.ts @@ -1,7 +1,7 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -import { platform } from "deno"; +const { platform } = Deno; // Alphabet chars. export const CHAR_UPPERCASE_A = 65; /* A */ diff --git a/fs/path/mod.ts b/fs/path/mod.ts index 7adb230d2..4ca630ed6 100644 --- a/fs/path/mod.ts +++ b/fs/path/mod.ts @@ -1,7 +1,7 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ -import { cwd, env } from "deno"; +const { cwd, env } = Deno; import { FormatInputPathObject, ParsedPath } from "./interface.ts"; import { isWindows, diff --git a/fs/path/resolve_test.ts b/fs/path/resolve_test.ts index 7c2b55249..2259dd025 100644 --- a/fs/path/resolve_test.ts +++ b/fs/path/resolve_test.ts @@ -1,9 +1,9 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ +const { cwd } = Deno; import { test, assertEqual } from "../../testing/mod.ts"; import * as path from "./mod.ts"; -import { cwd } from "deno"; const windowsTests = // arguments result diff --git a/fs/path/zero_length_strings_test.ts b/fs/path/zero_length_strings_test.ts index d069c781f..c769c9a79 100644 --- a/fs/path/zero_length_strings_test.ts +++ b/fs/path/zero_length_strings_test.ts @@ -1,9 +1,9 @@ // Copyright the Browserify authors. MIT License. // Ported from https://github.com/browserify/path-browserify/ +const { cwd } = Deno; import { test, assertEqual } from "../../testing/mod.ts"; import * as path from "./mod.ts"; -import { cwd } from "deno"; const pwd = cwd(); diff --git a/fs/walk.ts b/fs/walk.ts index 92e4ba593..10393ae0b 100644 --- a/fs/walk.ts +++ b/fs/walk.ts @@ -1,14 +1,5 @@ -import { - FileInfo, - cwd, - readDir, - readDirSync, - readlink, - readlinkSync, - stat, - statSync -} from "deno"; -import { relative } from "path.ts"; +const { readDir, readDirSync, readlink, readlinkSync, stat, statSync } = Deno; +import { FileInfo } from "deno"; export interface WalkOptions { maxDepth?: number; diff --git a/fs/walk_test.ts b/fs/walk_test.ts index 7f21a2fb4..d54273995 100644 --- a/fs/walk_test.ts +++ b/fs/walk_test.ts @@ -1,15 +1,14 @@ -import { +const { cwd, chdir, - FileInfo, makeTempDir, mkdir, open, platform, remove, symlink -} from "deno"; - +} = Deno; +import { FileInfo } from "deno"; import { walk, walkSync, WalkOptions } from "./walk.ts"; import { test, assert, TestFunction } from "../testing/mod.ts"; |