Skip to content

Commit

Permalink
chore: update std submodule and its imports (denoland#17408)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua committed Jan 15, 2023
1 parent 8f321a8 commit 7683ba5
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 50 deletions.
2 changes: 1 addition & 1 deletion cli/tests/testdata/cat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { copy } from "../../../test_util/std/io/util.ts";
import { copy } from "../../../test_util/std/streams/copy.ts";
async function main() {
for (let i = 1; i < Deno.args.length; i++) {
const filename = Deno.args[i];
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/testdata/echo_server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { copy } from "../../../test_util/std/io/util.ts";
import { copy } from "../../../test_util/std/streams/copy.ts";
const addr = Deno.args[0] || "0.0.0.0:4544";
const [hostname, port] = addr.split(":");
const listener = Deno.listen({ hostname, port: Number(port) });
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/testdata/run/textproto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import type {
BufReader,
ReadLineResult,
} from "../../../../test_util/std/io/buffer.ts";
import { concat } from "../../../../test_util/std/bytes/mod.ts";
} from "../../../../test_util/std/io/buf_reader.ts";
import { concat } from "../../../../test_util/std/bytes/concat.ts";

// Constants created for DRY
const CHAR_SPACE: number = " ".charCodeAt(0);
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/testdata/run/tls_connecttls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
assert,
assertEquals,
} from "../../../../test_util/std/testing/asserts.ts";
import { BufReader, BufWriter } from "../../../../test_util/std/io/buffer.ts";
import { BufReader, BufWriter } from "../../../../test_util/std/io/mod.ts";
import { TextProtoReader } from "./textproto.ts";

const encoder = new TextEncoder();
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/testdata/test/ops_sanitizer_missing_details.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/denoland/deno/issues/13729
// https://github.com/denoland/deno/issues/13938
import { writeAll } from "../../../../test_util/std/io/util.ts";
import { writeAll } from "../../../../test_util/std/streams/write_all.ts";

Deno.test("test 1", { permissions: { write: true, read: true } }, async () => {
const tmpFile = await Deno.makeTempFile();
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/unit/blob_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals, assertStringIncludes } from "./test_util.ts";
import { concat } from "../../../test_util/std/bytes/mod.ts";
import { concat } from "../../../test_util/std/bytes/concat.ts";

Deno.test(function blobString() {
const b1 = new Blob(["Hello World"]);
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/unit/files_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
assertRejects,
assertThrows,
} from "./test_util.ts";
import { copy } from "../../../test_util/std/streams/conversion.ts";
import { copy } from "../../../test_util/std/streams/copy.ts";

Deno.test(function filesStdioFileDescriptors() {
assertEquals(Deno.stdin.rid, 0);
Expand Down
6 changes: 1 addition & 5 deletions cli/tests/unit/flash_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

// deno-lint-ignore-file

import {
Buffer,
BufReader,
BufWriter,
} from "../../../test_util/std/io/buffer.ts";
import { Buffer, BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import {
assert,
Expand Down
6 changes: 1 addition & 5 deletions cli/tests/unit/http_test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import {
Buffer,
BufReader,
BufWriter,
} from "../../../test_util/std/io/buffer.ts";
import { Buffer, BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";
import { serve, serveTls } from "../../../test_util/std/http/server.ts";
import {
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/unit/test_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export {
export { deferred } from "../../../test_util/std/async/deferred.ts";
export type { Deferred } from "../../../test_util/std/async/deferred.ts";
export { delay } from "../../../test_util/std/async/delay.ts";
export { readLines } from "../../../test_util/std/io/buffer.ts";
export { readLines } from "../../../test_util/std/io/read_lines.ts";
export { parse as parseArgs } from "../../../test_util/std/flags/mod.ts";

export function pathToAbsoluteFileUrl(path: string): URL {
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/unit/tls_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
Deferred,
deferred,
} from "./test_util.ts";
import { BufReader, BufWriter } from "../../../test_util/std/io/buffer.ts";
import { readAll } from "../../../test_util/std/streams/conversion.ts";
import { BufReader, BufWriter } from "../../../test_util/std/io/mod.ts";
import { readAll } from "../../../test_util/std/streams/read_all.ts";
import { TextProtoReader } from "../testdata/run/textproto.ts";

const encoder = new TextEncoder();
Expand Down
52 changes: 26 additions & 26 deletions cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1392,9 +1392,9 @@ declare namespace Deno {
* Implementations should not retain a reference to `p`.
*
* Use
* [`itereateReader`](https://deno.land/std/streams/conversion.ts?s=iterateReader)
* [`itereateReader`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReader)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts)
* to turn a `Reader` into an {@linkcode AsyncIterator}.
*/
read(p: Uint8Array): Promise<number | null>;
Expand Down Expand Up @@ -1426,9 +1426,9 @@ declare namespace Deno {
* Implementations should not retain a reference to `p`.
*
* Use
* [`itereateReaderSync`](https://deno.land/std/streams/conversion.ts?s=iterateReaderSync)
* [`itereateReaderSync`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReaderSync)
* from from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts)
* to turn a `ReaderSync` into an {@linkcode Iterator}.
*/
readSync(p: Uint8Array): number | null;
Expand Down Expand Up @@ -1527,8 +1527,8 @@ declare namespace Deno {
* the first error encountered while copying.
*
* @deprecated Use
* [`copy`](https://deno.land/std/streams/conversion.ts?s=copy) from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`copy`](https://deno.land/std/streams/copy.ts?s=copy) from
* [`std/streams/copy.ts`](https://deno.land/std/streams/copy.ts)
* instead. `Deno.copy` will be removed in the future.
*
* @category I/O
Expand All @@ -1547,9 +1547,9 @@ declare namespace Deno {
* Turns a Reader, `r`, into an async iterator.
*
* @deprecated Use
* [`iterateReader`](https://deno.land/std/streams/conversion.ts?s=iterateReader)
* [`iterateReader`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReader)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts)
* instead. `Deno.iter` will be removed in the future.
*
* @category I/O
Expand All @@ -1563,9 +1563,9 @@ declare namespace Deno {
* Turns a ReaderSync, `r`, into an iterator.
*
* @deprecated Use
* [`iterateReaderSync`](https://deno.land/std/streams/conversion.ts?s=iterateReaderSync)
* [`iterateReaderSync`](https://deno.land/std/streams/iterate_reader.ts?s=iterateReaderSync)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/iterate_reader.ts`](https://deno.land/std/streams/iterate_reader.ts)
* instead. `Deno.iterSync` will be removed in the future.
*
* @category I/O
Expand Down Expand Up @@ -1656,8 +1656,8 @@ declare namespace Deno {
*
* This function is one of the lowest level APIs and most users should not
* work with this directly, but rather use
* [`readAll()`](https://deno.land/std/streams/conversion.ts?s=readAll) from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`readAll()`](https://deno.land/std/streams/read_all.ts?s=readAll) from
* [`std/streams/read_all.ts`](https://deno.land/std/streams/read_all.ts)
* instead.
*
* **It is not guaranteed that the full buffer will be read in a single call.**
Expand Down Expand Up @@ -1686,9 +1686,9 @@ declare namespace Deno {
*
* This function is one of the lowest level APIs and most users should not
* work with this directly, but rather use
* [`readAllSync()`](https://deno.land/std/streams/conversion.ts?s=readAllSync)
* [`readAllSync()`](https://deno.land/std/streams/read_all.ts?s=readAllSync)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/read_all.ts`](https://deno.land/std/streams/read_all.ts)
* instead.
*
* **It is not guaranteed that the full buffer will be read in a single
Expand All @@ -1711,8 +1711,8 @@ declare namespace Deno {
*
* Resolves to the number of bytes written. This function is one of the lowest
* level APIs and most users should not work with this directly, but rather use
* [`writeAll()`](https://deno.land/std/streams/conversion.ts?s=writeAll) from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`writeAll()`](https://deno.land/std/streams/write_all.ts?s=writeAll) from
* [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts)
* instead.
*
* **It is not guaranteed that the full buffer will be written in a single
Expand All @@ -1736,9 +1736,9 @@ declare namespace Deno {
* Returns the number of bytes written. This function is one of the lowest
* level APIs and most users should not work with this directly, but rather
* use
* [`writeAllSync()`](https://deno.land/std/streams/conversion.ts?s=writeAllSync)
* [`writeAllSync()`](https://deno.land/std/streams/write_all.ts?s=writeAllSync)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts)
* instead.
*
* **It is not guaranteed that the full buffer will be written in a single
Expand Down Expand Up @@ -2509,8 +2509,8 @@ declare namespace Deno {
* Uint8Array`.
*
* @deprecated Use
* [`readAll`](https://deno.land/std/streams/conversion.ts?s=readAll) from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`readAll`](https://deno.land/std/streams/read_all.ts?s=readAll) from
* [`std/streams/read_all.ts`](https://deno.land/std/streams/read_all.ts)
* instead. `Deno.readAll` will be removed in the future.
*
* @category I/O
Expand All @@ -2522,9 +2522,9 @@ declare namespace Deno {
* as `Uint8Array`.
*
* @deprecated Use
* [`readAllSync`](https://deno.land/std/streams/conversion.ts?s=readAllSync)
* [`readAllSync`](https://deno.land/std/streams/read_all.ts?s=readAllSync)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/read_all.ts`](https://deno.land/std/streams/read_all.ts)
* instead. `Deno.readAllSync` will be removed in the future.
*
* @category I/O
Expand All @@ -2535,8 +2535,8 @@ declare namespace Deno {
* Write all the content of the array buffer (`arr`) to the writer (`w`).
*
* @deprecated Use
* [`writeAll`](https://deno.land/std/streams/conversion.ts?s=writeAll) from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`writeAll`](https://deno.land/std/streams/write_all.ts?s=writeAll) from
* [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts)
* instead. `Deno.writeAll` will be removed in the future.
*
* @category I/O
Expand All @@ -2548,9 +2548,9 @@ declare namespace Deno {
* writer (`w`).
*
* @deprecated Use
* [`writeAllSync`](https://deno.land/std/streams/conversion.ts?s=writeAllSync)
* [`writeAllSync`](https://deno.land/std/streams/write_all.ts?s=writeAllSync)
* from
* [`std/streams/conversion.ts`](https://deno.land/std/streams/conversion.ts)
* [`std/streams/write_all.ts`](https://deno.land/std/streams/write_all.ts)
* instead. `Deno.writeAllSync` will be removed in the future.
*
* @category I/O
Expand Down
2 changes: 1 addition & 1 deletion test_util/std
Submodule std updated from 10834c to 13d469
2 changes: 1 addition & 1 deletion tools/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from "../test_util/std/path/mod.ts";
export { dirname, fromFileUrl, join, resolve, toFileUrl };
export { existsSync, walk } from "../test_util/std/fs/mod.ts";
export { TextLineStream } from "../test_util/std/streams/delimiter.ts";
export { TextLineStream } from "../test_util/std/streams/text_line_stream.ts";
export { delay } from "../test_util/std/async/delay.ts";

export const ROOT_PATH = dirname(dirname(fromFileUrl(import.meta.url)));
Expand Down
2 changes: 1 addition & 1 deletion tools/wpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
} from "./wpt/utils.ts";
import { pooledMap } from "../test_util/std/async/pool.ts";
import { blue, bold, green, red, yellow } from "../test_util/std/fmt/colors.ts";
import { writeAll, writeAllSync } from "../test_util/std/streams/conversion.ts";
import { writeAll, writeAllSync } from "../test_util/std/streams/write_all.ts";
import { saveExpectation } from "./wpt/utils.ts";

const command = Deno.args[0];
Expand Down

0 comments on commit 7683ba5

Please sign in to comment.