diff options
-rw-r--r-- | cli/tests/testdata/cat.ts | 2 | ||||
-rw-r--r-- | cli/tests/testdata/echo_server.ts | 2 | ||||
-rw-r--r-- | cli/tests/testdata/run/textproto.ts | 4 | ||||
-rw-r--r-- | cli/tests/testdata/run/tls_connecttls.js | 2 | ||||
-rw-r--r-- | cli/tests/testdata/test/ops_sanitizer_missing_details.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit/blob_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit/files_test.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit/flash_test.ts | 6 | ||||
-rw-r--r-- | cli/tests/unit/http_test.ts | 6 | ||||
-rw-r--r-- | cli/tests/unit/test_util.ts | 2 | ||||
-rw-r--r-- | cli/tests/unit/tls_test.ts | 4 | ||||
-rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 52 | ||||
m--------- | test_util/std | 0 | ||||
-rw-r--r-- | tools/util.js | 2 | ||||
-rwxr-xr-x | tools/wpt.ts | 2 |
15 files changed, 41 insertions, 49 deletions
diff --git a/cli/tests/testdata/cat.ts b/cli/tests/testdata/cat.ts index 6d8f150e3..c2a500b3e 100644 --- a/cli/tests/testdata/cat.ts +++ b/cli/tests/testdata/cat.ts @@ -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]; diff --git a/cli/tests/testdata/echo_server.ts b/cli/tests/testdata/echo_server.ts index b23867cdd..658b07374 100644 --- a/cli/tests/testdata/echo_server.ts +++ b/cli/tests/testdata/echo_server.ts @@ -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) }); diff --git a/cli/tests/testdata/run/textproto.ts b/cli/tests/testdata/run/textproto.ts index 7ddb79717..62c4f5979 100644 --- a/cli/tests/testdata/run/textproto.ts +++ b/cli/tests/testdata/run/textproto.ts @@ -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); diff --git a/cli/tests/testdata/run/tls_connecttls.js b/cli/tests/testdata/run/tls_connecttls.js index aea60151a..7c03856cb 100644 --- a/cli/tests/testdata/run/tls_connecttls.js +++ b/cli/tests/testdata/run/tls_connecttls.js @@ -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(); diff --git a/cli/tests/testdata/test/ops_sanitizer_missing_details.ts b/cli/tests/testdata/test/ops_sanitizer_missing_details.ts index 406773129..e3b07d77a 100644 --- a/cli/tests/testdata/test/ops_sanitizer_missing_details.ts +++ b/cli/tests/testdata/test/ops_sanitizer_missing_details.ts @@ -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(); diff --git a/cli/tests/unit/blob_test.ts b/cli/tests/unit/blob_test.ts index 8a91a76dd..4c81c2cbc 100644 --- a/cli/tests/unit/blob_test.ts +++ b/cli/tests/unit/blob_test.ts @@ -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"]); diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts index c45f7072f..c30ef2a71 100644 --- a/cli/tests/unit/files_test.ts +++ b/cli/tests/unit/files_test.ts @@ -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); diff --git a/cli/tests/unit/flash_test.ts b/cli/tests/unit/flash_test.ts index 706b9f72b..98249385b 100644 --- a/cli/tests/unit/flash_test.ts +++ b/cli/tests/unit/flash_test.ts @@ -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, diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index 3c6c86a69..331570a84 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/tests/unit/http_test.ts @@ -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 { diff --git a/cli/tests/unit/test_util.ts b/cli/tests/unit/test_util.ts index 09102d330..dc7f698c5 100644 --- a/cli/tests/unit/test_util.ts +++ b/cli/tests/unit/test_util.ts @@ -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 { diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts index 393e57dfa..b7cde1020 100644 --- a/cli/tests/unit/tls_test.ts +++ b/cli/tests/unit/tls_test.ts @@ -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(); diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 3ddd0263b..b3f2adc99 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -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>; @@ -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; @@ -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 @@ -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 @@ -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 @@ -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.** @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/test_util/std b/test_util/std -Subproject 10834cd64f7ed268c8151ea5b5d3aa4b4f3c036 +Subproject 13d469a1918fc44d2952c450418303cab34f0ff diff --git a/tools/util.js b/tools/util.js index ce3ea65d4..a8121b308 100644 --- a/tools/util.js +++ b/tools/util.js @@ -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))); diff --git a/tools/wpt.ts b/tools/wpt.ts index b8e9a88c0..338c89464 100755 --- a/tools/wpt.ts +++ b/tools/wpt.ts @@ -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]; |