Skip to content

Commit

Permalink
chore(upgrade): deno/std0.130.0 (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Mar 16, 2022
1 parent cf487de commit 336f0a1
Show file tree
Hide file tree
Showing 46 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion ansi/colors.ts
@@ -1,4 +1,4 @@
import * as stdColors from "https://deno.land/std@0.113.0/fmt/colors.ts";
import * as stdColors from "https://deno.land/std@0.130.0/fmt/colors.ts";

type ExcludedColorMethods = "setColorEnabled" | "getColorEnabled";
type PropertyNames = keyof typeof stdColors;
Expand Down
2 changes: 1 addition & 1 deletion ansi/deps.ts
@@ -1,3 +1,3 @@
export {
encode as encodeBase64,
} from "https://deno.land/std@0.113.0/encoding/base64.ts";
} from "https://deno.land/std@0.130.0/encoding/base64.ts";
2 changes: 1 addition & 1 deletion command/deps.ts
Expand Up @@ -10,4 +10,4 @@ export {
red,
setColorEnabled,
yellow,
} from "https://deno.land/std@0.113.0/fmt/colors.ts";
} from "https://deno.land/std@0.130.0/fmt/colors.ts";
6 changes: 3 additions & 3 deletions command/test/command/alias_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

Deno.test("command - alias - command with alias 1", async () => {
Expand Down Expand Up @@ -29,7 +29,7 @@ Deno.test("command - alias - command with alias 2", async () => {
});

Deno.test("command - alias - duplicate command alias name 1", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await new Command()
.throwErrors()
Expand All @@ -42,7 +42,7 @@ Deno.test("command - alias - duplicate command alias name 1", async () => {
});

Deno.test("command - alias - duplicate command alias name 2", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await new Command()
.throwErrors()
Expand Down
4 changes: 2 additions & 2 deletions command/test/command/allow_empty_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

Deno.test("flags allowEmpty enabled", async () => {
Expand Down Expand Up @@ -31,7 +31,7 @@ Deno.test("flags allowEmpty disabled", async () => {
.option("-f, --flag [value:boolean]", "description ...")
.action(() => {});

await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse([]);
},
Expand Down
10 changes: 5 additions & 5 deletions command/test/command/arguments_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import type { ITypeInfo } from "../../../flags/types.ts";
import { Command } from "../../command.ts";

Expand Down Expand Up @@ -34,7 +34,7 @@ Deno.test("command - arguments - with integer value", async () => {
});

Deno.test("invalid number command argument type", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd().parse(["abc", "xyz", "true", "red"]);
},
Expand All @@ -44,7 +44,7 @@ Deno.test("invalid number command argument type", async () => {
});

Deno.test("missing command arguments", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd().parse();
},
Expand All @@ -54,7 +54,7 @@ Deno.test("missing command arguments", async () => {
});

Deno.test("invalid boolean command argument type", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd().parse(["abc", "123", "xyz", "red"]);
},
Expand All @@ -64,7 +64,7 @@ Deno.test("invalid boolean command argument type", async () => {
});

Deno.test("invalid custom command argument type", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd().parse(["abc", "123", "true", "xyz"]);
},
Expand Down
6 changes: 3 additions & 3 deletions command/test/command/dotted_options_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

function cmd(): Command {
Expand Down Expand Up @@ -52,15 +52,15 @@ Deno.test("command: dotted aliases", async () => {
});

Deno.test("command: dotted aliases", () => {
assertThrowsAsync(
assertRejects(
() => cmd().parse(["--audio-bitrate", "300"]),
Error,
`Option "--bitrate.audio" depends on option "--bitrate.video".`,
);
});

Deno.test("command: dotted option with invalid value", () => {
assertThrowsAsync(
assertRejects(
() => cmd().parse(["--bitrate.audio", "300", "--bitrate.video", "900k"]),
Error,
`Option "--bitrate.video" must be of type "number", but got "900k".`,
Expand Down
12 changes: 6 additions & 6 deletions command/test/command/env_var_test.ts
@@ -1,6 +1,6 @@
// deno-fmt-ignore-file

import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";
import type { IEnvVar } from "../../types.ts";

Expand Down Expand Up @@ -92,7 +92,7 @@ function clearEnv() {
}

Deno.test("[command] - env var - missing required env var", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await new Command()
.throwErrors()
Expand Down Expand Up @@ -149,7 +149,7 @@ Deno.test("[command] - env var - override env vars with option", async () => {
Deno.test("[command] - env var - expect option to throw if value is not a boolean", async () => {
setupEnv();
Deno.env.set("global", "foo");
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse([]);
},
Expand All @@ -162,7 +162,7 @@ Deno.test("[command] - env var - expect option to throw if value is not a boolea
Deno.test("[command] - env var - expect option to throw if value is not a number", async () => {
setupEnv();
Deno.env.set("global_required", "foo");
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse([]);
},
Expand All @@ -175,7 +175,7 @@ Deno.test("[command] - env var - expect option to throw if value is not a number
Deno.test("[command] - env var - expect global option to throw if value is not a boolean", async () => {
setupEnv();
Deno.env.set("global", "foo");
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse(["bar"]);
},
Expand All @@ -188,7 +188,7 @@ Deno.test("[command] - env var - expect global option to throw if value is not a
Deno.test("[command] - env var - expect global option to throw if value is not a number", async () => {
setupEnv();
Deno.env.set("global_required", "foo");
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse(["bar"]);
},
Expand Down
4 changes: 2 additions & 2 deletions command/test/command/stop_early_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

Deno.test("command stopEarly disable", async () => {
Expand Down Expand Up @@ -65,7 +65,7 @@ Deno.test("command stopEarly unknown option", async () => {
.option("-S, --script-arg2 [value:boolean]", "description ...")
.action(() => {});

await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse([
"-f",
Expand Down
12 changes: 6 additions & 6 deletions command/test/command/sub_command_test.ts
@@ -1,7 +1,7 @@
import {
assertEquals,
assertRejects,
assertThrows,
assertThrowsAsync,
} from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

Expand Down Expand Up @@ -83,7 +83,7 @@ Deno.test("command - sub command - nested child command with arguments", async (
});

Deno.test("command - sub command - sub-command with missing argument", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse(["sub-command", "input-path"]);
},
Expand All @@ -93,7 +93,7 @@ Deno.test("command - sub command - sub-command with missing argument", async ()
});

Deno.test("command - sub command - sub-command 2 with missing argument", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse(["sub-command2", "input-path"]);
},
Expand All @@ -103,7 +103,7 @@ Deno.test("command - sub command - sub-command 2 with missing argument", async (
});

Deno.test("command - sub command - nested sub-command with missing argument", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse(["sub-command2", "sub-command3", "input-path"]);
},
Expand All @@ -113,7 +113,7 @@ Deno.test("command - sub command - nested sub-command with missing argument", as
});

Deno.test("command - sub command - command with empty name", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await new Command()
.command("")
Expand All @@ -132,7 +132,7 @@ Deno.test("command - sub command - override child command", async () => {
});

Deno.test("command - sub command - duplicate command name", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await new Command()
.command("foo")
Expand Down
4 changes: 2 additions & 2 deletions command/test/command/version_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

Deno.test("command - version - version string", () => {
Expand Down Expand Up @@ -60,7 +60,7 @@ Deno.test("command - version - version option", async () => {
await cmd.parse(["-x"]);
assertEquals(called, 1);

await assertThrowsAsync(
await assertRejects(
() => cmd.parse(["foo", "-x"]),
Error,
`Unknown option "-x". Did you mean option "-h"?`,
Expand Down
10 changes: 5 additions & 5 deletions command/test/option/aliases_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

const cmd = new Command()
Expand Down Expand Up @@ -35,7 +35,7 @@ Deno.test("command optionAliases flags", async () => {
});

Deno.test("command optionAliases fInvalidValie", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-f", "value"]);
},
Expand All @@ -45,7 +45,7 @@ Deno.test("command optionAliases fInvalidValie", async () => {
});

Deno.test("command optionAliases flInvalidValue", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["--fl", "value"]);
},
Expand All @@ -55,7 +55,7 @@ Deno.test("command optionAliases flInvalidValue", async () => {
});

Deno.test("command optionAliases flagInvalidValue", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["--flag", "value"]);
},
Expand All @@ -65,7 +65,7 @@ Deno.test("command optionAliases flagInvalidValue", async () => {
});

Deno.test("command optionAliases flagsInvalidValue", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["--flags", "value"]);
},
Expand Down
6 changes: 3 additions & 3 deletions command/test/option/conflicts_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

const cmd = new Command()
Expand Down Expand Up @@ -26,7 +26,7 @@ const cmd = new Command()
.action(() => {});

Deno.test("command optionConflicts noArguments", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse([]);
},
Expand Down Expand Up @@ -55,7 +55,7 @@ Deno.test("command optionConflicts videoAudioImageType", async () => {
});

Deno.test("command optionConflicts videoAudioImageType", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-v", "value", "-a", "value"]);
},
Expand Down
4 changes: 2 additions & 2 deletions command/test/option/depends_test.ts
@@ -1,4 +1,4 @@
import { assertEquals, assertThrowsAsync } from "../../../dev_deps.ts";
import { assertEquals, assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

function command(): Command {
Expand Down Expand Up @@ -45,7 +45,7 @@ Deno.test("command depends option with default value: should accept --flag1 --fl
});

Deno.test("command depends option with default value: should not accept --flag2 test", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await command().parse(["--flag2", "test"]);
},
Expand Down
12 changes: 6 additions & 6 deletions command/test/option/duplicate_test.ts
@@ -1,4 +1,4 @@
import { assertThrowsAsync } from "../../../dev_deps.ts";
import { assertRejects } from "../../../dev_deps.ts";
import { Command } from "../../command.ts";

const cmd = new Command()
Expand All @@ -8,7 +8,7 @@ const cmd = new Command()
.action(() => {});

Deno.test("command optionDuplicate flag", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-f", "-f", "unknown"]);
},
Expand All @@ -18,7 +18,7 @@ Deno.test("command optionDuplicate flag", async () => {
});

Deno.test("command optionDuplicate flagLong", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-f", "--flag"]);
},
Expand All @@ -28,7 +28,7 @@ Deno.test("command optionDuplicate flagLong", async () => {
});

Deno.test("command optionDuplicate flagTrueLongFalse", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-f", "true", "--flag", "false"]);
},
Expand All @@ -38,7 +38,7 @@ Deno.test("command optionDuplicate flagTrueLongFalse", async () => {
});

Deno.test("command optionDuplicate flagTrueNoFlag", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-f", "true", "--no-flag"]);
},
Expand All @@ -48,7 +48,7 @@ Deno.test("command optionDuplicate flagTrueNoFlag", async () => {
});

Deno.test("command optionDuplicate flagTrueNoFlagTrue", async () => {
await assertThrowsAsync(
await assertRejects(
async () => {
await cmd.parse(["-f", "true", "--no-flag", "true"]);
},
Expand Down

0 comments on commit 336f0a1

Please sign in to comment.