summaryrefslogtreecommitdiff
path: root/std/fs
diff options
context:
space:
mode:
Diffstat (limited to 'std/fs')
-rw-r--r--std/fs/README.md6
-rw-r--r--std/fs/copy_test.ts14
-rw-r--r--std/fs/empty_dir_test.ts24
-rw-r--r--std/fs/ensure_link_test.ts2
-rw-r--r--std/fs/ensure_symlink_test.ts2
-rw-r--r--std/fs/eol.ts2
-rw-r--r--std/fs/eol_test.ts10
-rw-r--r--std/fs/exists_test.ts38
-rw-r--r--std/fs/expand_glob.ts24
-rw-r--r--std/fs/expand_glob_test.ts18
-rw-r--r--std/fs/move_test.ts10
-rw-r--r--std/fs/read_json_test.ts2
l---------std/fs/testdata/0-link1
l---------std/fs/testdata/0-link.ts1
-rw-r--r--std/fs/testdata/empty_dir.ts6
-rw-r--r--std/fs/testdata/exists_sync.ts8
-rw-r--r--std/fs/utils_test.ts8
-rw-r--r--std/fs/walk.ts8
-rw-r--r--std/fs/write_json_test.ts6
19 files changed, 94 insertions, 96 deletions
diff --git a/std/fs/README.md b/std/fs/README.md
index 56c190ccc..8c69faa76 100644
--- a/std/fs/README.md
+++ b/std/fs/README.md
@@ -52,7 +52,7 @@ created.
```ts
import {
ensureSymlink,
- ensureSymlinkSync
+ ensureSymlinkSync,
} from "https://deno.land/std/fs/mod.ts";
ensureSymlink(
@@ -110,7 +110,7 @@ import { globToRegExp } from "https://deno.land/std/fs/mod.ts";
globToRegExp("foo/**/*.json", {
flags: "g",
extended: true,
- globstar: true
+ globstar: true,
}); // returns the regex to find all .json files in the folder foo
```
@@ -212,7 +212,7 @@ Write the string to file.
```ts
import {
writeFileStr,
- writeFileStrSync
+ writeFileStrSync,
} from "https://deno.land/std/fs/mod.ts";
writeFileStr("./target.dat", "file content"); // returns a promise
diff --git a/std/fs/copy_test.ts b/std/fs/copy_test.ts
index 9ba5f2b21..0fbc90579 100644
--- a/std/fs/copy_test.ts
+++ b/std/fs/copy_test.ts
@@ -3,7 +3,7 @@ import {
assertEquals,
assertThrows,
assertThrowsAsync,
- assert
+ assert,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { copy, copySync } from "./copy.ts";
@@ -22,11 +22,11 @@ function testCopy(name: string, cb: (tempDir: string) => Promise<void>): void {
name,
async fn(): Promise<void> {
const tempDir = await Deno.makeTempDir({
- prefix: "deno_std_copy_async_test_"
+ prefix: "deno_std_copy_async_test_",
});
await cb(tempDir);
await Deno.remove(tempDir, { recursive: true });
- }
+ },
});
}
@@ -35,11 +35,11 @@ function testCopySync(name: string, cb: (tempDir: string) => void): void {
name,
fn: (): void => {
const tempDir = Deno.makeTempDirSync({
- prefix: "deno_std_copy_sync_test_"
+ prefix: "deno_std_copy_sync_test_",
});
cb(tempDir);
Deno.removeSync(tempDir, { recursive: true });
- }
+ },
});
}
@@ -149,7 +149,7 @@ testCopy(
// Copy with overwrite and preserve timestamps options.
await copy(srcFile, destFile, {
overwrite: true,
- preserveTimestamps: true
+ preserveTimestamps: true,
});
const destStatInfo = await Deno.stat(destFile);
@@ -333,7 +333,7 @@ testCopySync(
// Copy with overwrite and preserve timestamps options.
copySync(srcFile, destFile, {
overwrite: true,
- preserveTimestamps: true
+ preserveTimestamps: true,
});
const destStatInfo = Deno.statSync(destFile);
diff --git a/std/fs/empty_dir_test.ts b/std/fs/empty_dir_test.ts
index 7015516ab..f30f434df 100644
--- a/std/fs/empty_dir_test.ts
+++ b/std/fs/empty_dir_test.ts
@@ -4,7 +4,7 @@ import {
assertEquals,
assertStrContains,
assertThrows,
- assertThrowsAsync
+ assertThrowsAsync,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { emptyDir, emptyDirSync } from "./empty_dir.ts";
@@ -137,59 +137,59 @@ const scenes: Scenes[] = [
read: false,
write: false,
async: true,
- output: "run again with the --allow-read flag"
+ output: "run again with the --allow-read flag",
},
{
read: false,
write: false,
async: false,
- output: "run again with the --allow-read flag"
+ output: "run again with the --allow-read flag",
},
// 2
{
read: true,
write: false,
async: true,
- output: "run again with the --allow-write flag"
+ output: "run again with the --allow-write flag",
},
{
read: true,
write: false,
async: false,
- output: "run again with the --allow-write flag"
+ output: "run again with the --allow-write flag",
},
// 3
{
read: false,
write: true,
async: true,
- output: "run again with the --allow-read flag"
+ output: "run again with the --allow-read flag",
},
{
read: false,
write: true,
async: false,
- output: "run again with the --allow-read flag"
+ output: "run again with the --allow-read flag",
},
// 4
{
read: true,
write: true,
async: true,
- output: "success"
+ output: "success",
},
{
read: true,
write: true,
async: false,
- output: "success"
- }
+ output: "success",
+ },
];
for (const s of scenes) {
let title = `test ${s.async ? "emptyDir" : "emptyDirSync"}`;
title += `("testdata/testfolder") ${s.read ? "with" : "without"}`;
title += ` --allow-read & ${s.write ? "with" : "without"} --allow-write`;
- Deno.test(`[fs] emptyDirPermission ${title}`, async function(): Promise<
+ Deno.test(`[fs] emptyDirPermission ${title}`, async function (): Promise<
void
> {
const testfolder = path.join(testdataDir, "testfolder");
@@ -221,7 +221,7 @@ for (const s of scenes) {
const p = Deno.run({
stdout: "piped",
cwd: testdataDir,
- cmd: args
+ cmd: args,
});
assert(p.stdout);
diff --git a/std/fs/ensure_link_test.ts b/std/fs/ensure_link_test.ts
index 7549814a2..3c7720dc0 100644
--- a/std/fs/ensure_link_test.ts
+++ b/std/fs/ensure_link_test.ts
@@ -3,7 +3,7 @@
import {
assertEquals,
assertThrows,
- assertThrowsAsync
+ assertThrowsAsync,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { ensureLink, ensureLinkSync } from "./ensure_link.ts";
diff --git a/std/fs/ensure_symlink_test.ts b/std/fs/ensure_symlink_test.ts
index f0dc4fbe4..5188dc035 100644
--- a/std/fs/ensure_symlink_test.ts
+++ b/std/fs/ensure_symlink_test.ts
@@ -3,7 +3,7 @@
import {
assertEquals,
assertThrows,
- assertThrowsAsync
+ assertThrowsAsync,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts";
diff --git a/std/fs/eol.ts b/std/fs/eol.ts
index d4bb8032c..2f15be269 100644
--- a/std/fs/eol.ts
+++ b/std/fs/eol.ts
@@ -3,7 +3,7 @@
/** EndOfLine character enum */
export enum EOL {
LF = "\n",
- CRLF = "\r\n"
+ CRLF = "\r\n",
}
const regDetect = /(?:\r?\n)/g;
diff --git a/std/fs/eol_test.ts b/std/fs/eol_test.ts
index aa2dcf395..35b3e0d9a 100644
--- a/std/fs/eol_test.ts
+++ b/std/fs/eol_test.ts
@@ -12,21 +12,21 @@ Deno.test({
name: "[EOL] Detect CR LF",
fn(): void {
assertEquals(detect(CRLFinput), EOL.CRLF);
- }
+ },
});
Deno.test({
name: "[EOL] Detect LF",
fn(): void {
assertEquals(detect(LFinput), EOL.LF);
- }
+ },
});
Deno.test({
name: "[EOL] Detect No New Line",
fn(): void {
assertEquals(detect(NoNLinput), null);
- }
+ },
});
Deno.test({
@@ -34,7 +34,7 @@ Deno.test({
fn(): void {
assertEquals(detect(Mixedinput), EOL.CRLF);
assertEquals(detect(Mixedinput2), EOL.CRLF);
- }
+ },
});
Deno.test({
@@ -50,5 +50,5 @@ Deno.test({
assertEquals(format(Mixedinput, EOL.LF), LFinput);
assertEquals(format(Mixedinput2, EOL.CRLF), CRLFinput);
assertEquals(format(Mixedinput2, EOL.LF), LFinput);
- }
+ },
});
diff --git a/std/fs/exists_test.ts b/std/fs/exists_test.ts
index 1f296538c..04c58d8d6 100644
--- a/std/fs/exists_test.ts
+++ b/std/fs/exists_test.ts
@@ -5,7 +5,7 @@ import { exists, existsSync } from "./exists.ts";
const testdataDir = path.resolve("fs", "testdata");
-Deno.test("[fs] existsFile", async function(): Promise<void> {
+Deno.test("[fs] existsFile", async function (): Promise<void> {
assertEquals(
await exists(path.join(testdataDir, "not_exist_file.ts")),
false
@@ -13,12 +13,12 @@ Deno.test("[fs] existsFile", async function(): Promise<void> {
assertEquals(await existsSync(path.join(testdataDir, "0.ts")), true);
});
-Deno.test("[fs] existsFileSync", function(): void {
+Deno.test("[fs] existsFileSync", function (): void {
assertEquals(existsSync(path.join(testdataDir, "not_exist_file.ts")), false);
assertEquals(existsSync(path.join(testdataDir, "0.ts")), true);
});
-Deno.test("[fs] existsDirectory", async function(): Promise<void> {
+Deno.test("[fs] existsDirectory", async function (): Promise<void> {
assertEquals(
await exists(path.join(testdataDir, "not_exist_directory")),
false
@@ -26,7 +26,7 @@ Deno.test("[fs] existsDirectory", async function(): Promise<void> {
assertEquals(existsSync(testdataDir), true);
});
-Deno.test("[fs] existsDirectorySync", function(): void {
+Deno.test("[fs] existsDirectorySync", function (): void {
assertEquals(
existsSync(path.join(testdataDir, "not_exist_directory")),
false
@@ -34,16 +34,16 @@ Deno.test("[fs] existsDirectorySync", function(): void {
assertEquals(existsSync(testdataDir), true);
});
-Deno.test("[fs] existsLinkSync", function(): void {
+Deno.test("[fs] existsLinkSync", function (): void {
// TODO(axetroy): generate link file use Deno api instead of set a link file
// in repository
- assertEquals(existsSync(path.join(testdataDir, "0-link.ts")), true);
+ assertEquals(existsSync(path.join(testdataDir, "0-link")), true);
});
-Deno.test("[fs] existsLink", async function(): Promise<void> {
+Deno.test("[fs] existsLink", async function (): Promise<void> {
// TODO(axetroy): generate link file use Deno api instead of set a link file
// in repository
- assertEquals(await exists(path.join(testdataDir, "0-link.ts")), true);
+ assertEquals(await exists(path.join(testdataDir, "0-link")), true);
});
interface Scenes {
@@ -59,59 +59,59 @@ const scenes: Scenes[] = [
read: false,
async: true,
output: "run again with the --allow-read flag",
- file: "0.ts"
+ file: "0.ts",
},
{
read: false,
async: false,
output: "run again with the --allow-read flag",
- file: "0.ts"
+ file: "0.ts",
},
// 2
{
read: true,
async: true,
output: "exist",
- file: "0.ts"
+ file: "0.ts",
},
{
read: true,
async: false,
output: "exist",
- file: "0.ts"
+ file: "0.ts",
},
// 3
{
read: false,
async: true,
output: "run again with the --allow-read flag",
- file: "no_exist_file_for_test.ts"
+ file: "no_exist_file_for_test.ts",
},
{
read: false,
async: false,
output: "run again with the --allow-read flag",
- file: "no_exist_file_for_test.ts"
+ file: "no_exist_file_for_test.ts",
},
// 4
{
read: true,
async: true,
output: "not exist",
- file: "no_exist_file_for_test.ts"
+ file: "no_exist_file_for_test.ts",
},
{
read: true,
async: false,
output: "not exist",
- file: "no_exist_file_for_test.ts"
- }
+ file: "no_exist_file_for_test.ts",
+ },
];
for (const s of scenes) {
let title = `test ${s.async ? "exists" : "existsSync"}("testdata/${s.file}")`;
title += ` ${s.read ? "with" : "without"} --allow-read`;
- Deno.test(`[fs] existsPermission ${title}`, async function(): Promise<void> {
+ Deno.test(`[fs] existsPermission ${title}`, async function (): Promise<void> {
const args = [Deno.execPath(), "run"];
if (s.read) {
@@ -124,7 +124,7 @@ for (const s of scenes) {
const p = Deno.run({
stdout: "piped",
cwd: testdataDir,
- cmd: args
+ cmd: args,
});
const output = await p.output();
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,
})
);
}
diff --git a/std/fs/expand_glob_test.ts b/std/fs/expand_glob_test.ts
index adc94c1e9..6be9c518f 100644
--- a/std/fs/expand_glob_test.ts
+++ b/std/fs/expand_glob_test.ts
@@ -6,12 +6,12 @@ import {
join,
joinGlobs,
normalize,
- relative
+ relative,
} from "../path/mod.ts";
import {
ExpandGlobOptions,
expandGlob,
- expandGlobSync
+ expandGlobSync,
} from "./expand_glob.ts";
async function expandGlobArray(
@@ -48,7 +48,7 @@ const EG_OPTIONS: ExpandGlobOptions = {
root: urlToFilePath(new URL(join("testdata", "glob"), import.meta.url)),
includeDirs: true,
extended: false,
- globstar: false
+ globstar: false,
};
Deno.test(async function expandGlobWildcard(): Promise<void> {
@@ -57,7 +57,7 @@ Deno.test(async function expandGlobWildcard(): Promise<void> {
"abc",
"abcdef",
"abcdefghi",
- "subdir"
+ "subdir",
]);
});
@@ -72,7 +72,7 @@ Deno.test(async function expandGlobParent(): Promise<void> {
"abc",
"abcdef",
"abcdefghi",
- "subdir"
+ "subdir",
]);
});
@@ -80,16 +80,16 @@ Deno.test(async function expandGlobExt(): Promise<void> {
const options = { ...EG_OPTIONS, extended: true };
assertEquals(await expandGlobArray("abc?(def|ghi)", options), [
"abc",
- "abcdef"
+ "abcdef",
]);
assertEquals(await expandGlobArray("abc*(def|ghi)", options), [
"abc",
"abcdef",
- "abcdefghi"
+ "abcdefghi",
]);
assertEquals(await expandGlobArray("abc+(def|ghi)", options), [
"abcdef",
- "abcdefghi"
+ "abcdefghi",
]);
assertEquals(await expandGlobArray("abc@(def|ghi)", options), ["abcdef"]);
assertEquals(await expandGlobArray("abc{def,ghi}", options), ["abcdef"]);
@@ -123,7 +123,7 @@ Deno.test(async function expandGlobPermError(): Promise<void> {
cmd: [execPath(), exampleUrl.toString()],
stdin: "null",
stdout: "piped",
- stderr: "piped"
+ stderr: "piped",
});
assertEquals(await p.status(), { code: 1, success: false });
assertEquals(decode(await p.output()), "");
diff --git a/std/fs/move_test.ts b/std/fs/move_test.ts
index b835e6dfa..999b67cf0 100644
--- a/std/fs/move_test.ts
+++ b/std/fs/move_test.ts
@@ -2,7 +2,7 @@
import {
assertEquals,
assertThrows,
- assertThrowsAsync
+ assertThrowsAsync,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { move, moveSync } from "./move.ts";
@@ -68,7 +68,7 @@ Deno.test(async function moveFileIfDestExists(): Promise<void> {
// write file content
await Promise.all([
Deno.writeFile(srcFile, srcContent),
- Deno.writeFile(destFile, destContent)
+ Deno.writeFile(destFile, destContent),
]);
// make sure the test file have been created
@@ -100,7 +100,7 @@ Deno.test(async function moveFileIfDestExists(): Promise<void> {
// clean up
await Promise.all([
Deno.remove(srcDir, { recursive: true }),
- Deno.remove(destDir, { recursive: true })
+ Deno.remove(destDir, { recursive: true }),
]);
});
@@ -141,13 +141,13 @@ Deno.test(async function moveIfSrcAndDestDirectoryExistsAndOverwrite(): Promise<
await Promise.all([
Deno.mkdir(srcDir, { recursive: true }),
- Deno.mkdir(destDir, { recursive: true })
+ Deno.mkdir(destDir, { recursive: true }),
]);
assertEquals(await exists(srcDir), true);
assertEquals(await exists(destDir), true);
await Promise.all([
Deno.writeFile(srcFile, srcContent),
- Deno.writeFile(destFile, destContent)
+ Deno.writeFile(destFile, destContent),
]);
await move(srcDir, destDir, { overwrite: true });
diff --git a/std/fs/read_json_test.ts b/std/fs/read_json_test.ts
index c394963b0..bdb5edbe5 100644
--- a/std/fs/read_json_test.ts
+++ b/std/fs/read_json_test.ts
@@ -2,7 +2,7 @@
import {
assertEquals,
assertThrowsAsync,
- assertThrows
+ assertThrows,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { readJson, readJsonSync } from "./read_json.ts";
diff --git a/std/fs/testdata/0-link b/std/fs/testdata/0-link
new file mode 120000
index 000000000..937f1e899
--- /dev/null
+++ b/std/fs/testdata/0-link
@@ -0,0 +1 @@
+0.ts \ No newline at end of file
diff --git a/std/fs/testdata/0-link.ts b/std/fs/testdata/0-link.ts
deleted file mode 120000
index 24c6b8053..000000000
--- a/std/fs/testdata/0-link.ts
+++ /dev/null
@@ -1 +0,0 @@
-./fs/testdata/0.ts \ No newline at end of file
diff --git a/std/fs/testdata/empty_dir.ts b/std/fs/testdata/empty_dir.ts
index aa9cf60a1..f8fcc1ceb 100644
--- a/std/fs/testdata/empty_dir.ts
+++ b/std/fs/testdata/empty_dir.ts
@@ -2,8 +2,8 @@ import { emptyDir } from "../empty_dir.ts";
emptyDir(Deno.args[0])
.then(() => {
- Deno.stdout.write(new TextEncoder().encode("success"))
+ Deno.stdout.write(new TextEncoder().encode("success"));
})
.catch((err) => {
- Deno.stdout.write(new TextEncoder().encode(err.message))
- }) \ No newline at end of file
+ Deno.stdout.write(new TextEncoder().encode(err.message));
+ });
diff --git a/std/fs/testdata/exists_sync.ts b/std/fs/testdata/exists_sync.ts
index 27dee268b..8cc51e9f8 100644
--- a/std/fs/testdata/exists_sync.ts
+++ b/std/fs/testdata/exists_sync.ts
@@ -1,10 +1,8 @@
import { existsSync } from "../exists.ts";
try {
- const isExist = existsSync(Deno.args[0])
- Deno.stdout.write(new TextEncoder().encode(isExist ? 'exist' :'not exist'))
+ const isExist = existsSync(Deno.args[0]);
+ Deno.stdout.write(new TextEncoder().encode(isExist ? "exist" : "not exist"));
} catch (err) {
- Deno.stdout.write(new TextEncoder().encode(err.message))
+ Deno.stdout.write(new TextEncoder().encode(err.message));
}
-
-
diff --git a/std/fs/utils_test.ts b/std/fs/utils_test.ts
index 93f4664e7..95686d824 100644
--- a/std/fs/utils_test.ts
+++ b/std/fs/utils_test.ts
@@ -17,10 +17,10 @@ Deno.test(function _isSubdir(): void {
["first", "first/second", true, path.posix.sep],
["../first", "../first/second", true, path.posix.sep],
["c:\\first", "c:\\first", false, path.win32.sep],
- ["c:\\first", "c:\\first\\second", true, path.win32.sep]
+ ["c:\\first", "c:\\first\\second", true, path.win32.sep],
];
- pairs.forEach(function(p): void {
+ pairs.forEach(function (p): void {
const src = p[0] as string;
const dest = p[1] as string;
const expected = p[2] as boolean;
@@ -36,10 +36,10 @@ Deno.test(function _isSubdir(): void {
Deno.test(function _getFileInfoType(): void {
const pairs = [
[path.join(testdataDir, "file_type_1"), "file"],
- [path.join(testdataDir, "file_type_dir_1"), "dir"]
+ [path.join(testdataDir, "file_type_dir_1"), "dir"],
];
- pairs.forEach(function(p): void {
+ pairs.forEach(function (p): void {
const filePath = p[0] as string;
const type = p[1] as PathType;
switch (type) {
diff --git a/std/fs/walk.ts b/std/fs/walk.ts
index fbd14740b..3f178c0c5 100644
--- a/std/fs/walk.ts
+++ b/std/fs/walk.ts
@@ -67,7 +67,7 @@ export async function* walk(
followSymlinks = false,
exts = undefined,
match = undefined,
- skip = undefined
+ skip = undefined,
}: WalkOptions = {}
): AsyncIterableIterator<WalkInfo> {
if (maxDepth < 0) {
@@ -105,7 +105,7 @@ export async function* walk(
followSymlinks,
exts,
match,
- skip
+ skip,
});
}
}
@@ -121,7 +121,7 @@ export function* walkSync(
followSymlinks = false,
exts = undefined,
match = undefined,
- skip = undefined
+ skip = undefined,
}: WalkOptions = {}
): IterableIterator<WalkInfo> {
if (maxDepth < 0) {
@@ -158,7 +158,7 @@ export function* walkSync(
followSymlinks,
exts,
match,
- skip
+ skip,
});
}
}
diff --git a/std/fs/write_json_test.ts b/std/fs/write_json_test.ts
index 09fa05d60..335d35bfe 100644
--- a/std/fs/write_json_test.ts
+++ b/std/fs/write_json_test.ts
@@ -2,7 +2,7 @@
import {
assertEquals,
assertThrowsAsync,
- assertThrows
+ assertThrows,
} from "../testing/asserts.ts";
import * as path from "../path/mod.ts";
import { writeJson, writeJsonSync } from "./write_json.ts";
@@ -108,7 +108,7 @@ Deno.test(async function writeJsonWithReplacer(): Promise<void> {
existsJsonFile,
{ a: "1", b: "2", c: "3" },
{
- replacer: ["a"]
+ replacer: ["a"],
}
);
throw new Error("should write success");
@@ -226,7 +226,7 @@ Deno.test(function writeJsonWithReplacer(): void {
existsJsonFile,
{ a: "1", b: "2", c: "3" },
{
- replacer: ["a"]
+ replacer: ["a"],
}
);
throw new Error("should write success");