1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

chore: update std submodule and its imports (#17408)

This commit is contained in:
Asher Gomez 2023-01-16 07:09:26 +11:00 committed by GitHub
parent 8f321a8a39
commit 7683ba5e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 42 additions and 50 deletions

View file

@ -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];

View file

@ -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) });

View file

@ -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);

View file

@ -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();

View file

@ -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();

View file

@ -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"]);

View file

@ -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);

View file

@ -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,

View file

@ -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 {

View file

@ -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 {

View file

@ -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();

View file

@ -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

@ -1 +1 @@
Subproject commit 10834cd64f7ed268c8151ea5b5d3aa4b4f3c036c
Subproject commit 13d469a1918fc44d2952c450418303cab34f0ffc

View file

@ -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)));

View file

@ -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];