Skip to content

Commit

Permalink
chore(upgrade): deno/std v0.116.0 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar authored Dec 3, 2021
1 parent 0474d80 commit 835f343
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
11 changes: 7 additions & 4 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export { blue, bold, red } from "https://deno.land/[email protected]/fmt/colors.ts";
export { deferred } from "https://deno.land/[email protected]/async/deferred.ts";
export { copy, iter } from "https://deno.land/[email protected]/io/util.ts";
export type { Deferred } from "https://deno.land/[email protected]/async/deferred.ts";
export { blue, bold, red } from "https://deno.land/[email protected]/fmt/colors.ts";
export { deferred } from "https://deno.land/[email protected]/async/deferred.ts";
export {
copy,
iterateReader,
} from "https://deno.land/[email protected]/streams/mod.ts";
export type { Deferred } from "https://deno.land/[email protected]/async/deferred.ts";
14 changes: 7 additions & 7 deletions dev_deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ export {
assertEquals,
AssertionError,
assertNotEquals,
assertRejects,
assertThrows,
assertThrowsAsync,
} from "https://deno.land/[email protected]/testing/asserts.ts";
} from "https://deno.land/[email protected]/testing/asserts.ts";

export { exists } from "https://deno.land/std@0.103.0/fs/exists.ts";
export { exists } from "https://deno.land/std@0.116.0/fs/exists.ts";

export { ensureDir } from "https://deno.land/std@0.103.0/fs/ensure_dir.ts";
export { ensureDir } from "https://deno.land/std@0.116.0/fs/ensure_dir.ts";

export {
dirname,
fromFileUrl,
} from "https://deno.land/std@0.103.0/path/mod.ts";
} from "https://deno.land/std@0.116.0/path/mod.ts";

export {
MuxAsyncIterator,
} from "https://deno.land/std@0.103.0/async/mux_async_iterator.ts";
} from "https://deno.land/std@0.116.0/async/mux_async_iterator.ts";

export { stripColor } from "https://deno.land/std@0.103.0/fmt/colors.ts";
export { stripColor } from "https://deno.land/std@0.116.0/fmt/colors.ts";
4 changes: 2 additions & 2 deletions encoding_process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { FFmpegCommand } from "./ffmpeg_command.ts";
import { ffprobe } from "./ffprobe.ts";
import type { MediaInfo, MediaStream, VideoStream } from "./media_info.ts";
import { Deferred, deferred, iter } from "./deps.ts";
import { Deferred, deferred, iterateReader } from "./deps.ts";

export type EncodingStatus = Deno.ProcessStatus;

Expand Down Expand Up @@ -221,7 +221,7 @@ export class EncodingProcess {
) as VideoStream;
const totalFrames = Number(videoStream.nb_frames);

for await (const chunk of iter(this.process.stdout)) {
for await (const chunk of iterateReader(this.process.stdout)) {
const progressInfo: ProgressInfo = parseProgressOutput(chunk);
const frames = Number(progressInfo.frame);
const progress: number = Math.trunc(100 / (totalFrames / frames));
Expand Down
10 changes: 5 additions & 5 deletions errors_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assertExpectError, assertInstanceOf } from "./_assertions.ts";
import {
assertRejects,
assertThrows,
assertThrowsAsync,
dirname,
fromFileUrl,
} from "./dev_deps.ts";
Expand Down Expand Up @@ -29,7 +29,7 @@ const inputPath = `${rootDir}/fixtures/sample.mp4`;
Deno.test({
name: "ffprobe binary not found error",
async fn() {
await assertThrowsAsync(
await assertRejects(
() => ffprobe(inputPath, { binary: "fffprobe" }),
FFprobeBinaryNotFound,
);
Expand All @@ -39,7 +39,7 @@ Deno.test({
Deno.test({
name: "ffprobe binary permission denied error",
async fn() {
await assertThrowsAsync(
await assertRejects(
() => ffprobe(inputPath, { binary: rootDir }),
FFprobeBinaryPermissionDenied,
);
Expand All @@ -49,7 +49,7 @@ Deno.test({
Deno.test({
name: "ffprobe command failed error",
async fn() {
await assertThrowsAsync(
await assertRejects(
() => ffprobe(inputPath, { args: ["--abc"] }),
FFprobeCommandFailed,
);
Expand Down Expand Up @@ -108,7 +108,7 @@ Deno.test({
encoding.binary = "ffprobe";
const process = new EncodingProcess(encoding);

await assertThrowsAsync(
await assertRejects(
() => process.status(),
EncodingProcessNotStarted,
);
Expand Down

0 comments on commit 835f343

Please sign in to comment.