From 858abbe745aa8188654120d4999ab983b014c197 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 2 Apr 2024 12:57:05 +1100 Subject: [PATCH] chore: update `std` submodule to 0.221.0 (#23112) --- tests/testdata/echo_server.ts | 2 +- tests/testdata/run/textproto.ts | 2 +- tests/unit/blob_test.ts | 2 +- tests/unit/buffer_test.ts | 2 +- tests/unit/files_test.ts | 2 +- tests/unit/tls_test.ts | 4 ++-- tests/unit_node/worker_threads_test.ts | 4 ++-- tests/util/std | 2 +- tests/wpt/wpt.ts | 2 +- tools/node_compat/setup.ts | 8 ++++---- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/testdata/echo_server.ts b/tests/testdata/echo_server.ts index cbf081c355..9352e06342 100644 --- a/tests/testdata/echo_server.ts +++ b/tests/testdata/echo_server.ts @@ -1,4 +1,4 @@ -import { copy } from "../../tests/util/std/streams/copy.ts"; +import { copy } from "../../tests/util/std/io/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/tests/testdata/run/textproto.ts b/tests/testdata/run/textproto.ts index 7297fc4462..f35ab67349 100644 --- a/tests/testdata/run/textproto.ts +++ b/tests/testdata/run/textproto.ts @@ -152,7 +152,7 @@ export class TextProtoReader { //TODO(SmashingQuasar): Kept skipSpace to preserve behavior but it should be looked into to check if it makes sense when this is used. if (r !== null && this.skipSpace(r.line) !== 0) { - line = concat(line, r.line); + line = concat([line, r.line]); } } while (r !== null && r.more); diff --git a/tests/unit/blob_test.ts b/tests/unit/blob_test.ts index 8be6b5d468..b05b5fb7c0 100644 --- a/tests/unit/blob_test.ts +++ b/tests/unit/blob_test.ts @@ -85,7 +85,7 @@ Deno.test(async function blobStream() { const read = async (): Promise => { const { done, value } = await reader.read(); if (!done && value) { - bytes = concat(bytes, value); + bytes = concat([bytes, value]); return read(); } }; diff --git a/tests/unit/buffer_test.ts b/tests/unit/buffer_test.ts index 06fbef3506..88c867c0a8 100644 --- a/tests/unit/buffer_test.ts +++ b/tests/unit/buffer_test.ts @@ -11,7 +11,7 @@ import { assertRejects, assertThrows, } from "./test_util.ts"; -import { writeAllSync } from "../util/std/streams/write_all.ts"; +import { writeAllSync } from "../util/std/io/write_all.ts"; const MAX_SIZE = 2 ** 32 - 2; // N controls how many iterations of certain checks are performed. diff --git a/tests/unit/files_test.ts b/tests/unit/files_test.ts index 0034a84722..b25b2fd5db 100644 --- a/tests/unit/files_test.ts +++ b/tests/unit/files_test.ts @@ -8,7 +8,7 @@ import { assertRejects, assertThrows, } from "./test_util.ts"; -import { copy } from "@std/streams/copy.ts"; +import { copy } from "@std/io/copy.ts"; // Note tests for Deno.FsFile.setRaw is in integration tests. diff --git a/tests/unit/tls_test.ts b/tests/unit/tls_test.ts index 1ac5e8d983..05fa904b26 100644 --- a/tests/unit/tls_test.ts +++ b/tests/unit/tls_test.ts @@ -8,8 +8,8 @@ import { assertThrows, } from "./test_util.ts"; import { BufReader, BufWriter } from "@std/io/mod.ts"; -import { readAll } from "@std/streams/read_all.ts"; -import { writeAll } from "@std/streams/write_all.ts"; +import { readAll } from "@std/io/read_all.ts"; +import { writeAll } from "@std/io/write_all.ts"; import { TextProtoReader } from "../testdata/run/textproto.ts"; const encoder = new TextEncoder(); diff --git a/tests/unit_node/worker_threads_test.ts b/tests/unit_node/worker_threads_test.ts index 66460940df..52c9cfffdc 100644 --- a/tests/unit_node/worker_threads_test.ts +++ b/tests/unit_node/worker_threads_test.ts @@ -7,7 +7,7 @@ import { assertThrows, fail, } from "@std/assert/mod.ts"; -import { fromFileUrl, relative, sep } from "@std/path/mod.ts"; +import { fromFileUrl, relative, SEPARATOR } from "@std/path/mod.ts"; import * as workerThreads from "node:worker_threads"; import { EventEmitter, once } from "node:events"; @@ -320,7 +320,7 @@ Deno.test({ name: "[node/worker_threads] Worker with relative path", async fn() { const worker = new workerThreads.Worker( - `.${sep}` + relative( + `.${SEPARATOR}` + relative( Deno.cwd(), fromFileUrl(new URL("./testdata/worker_threads.mjs", import.meta.url)), ), diff --git a/tests/util/std b/tests/util/std index e0ef24091e..7d419485c7 160000 --- a/tests/util/std +++ b/tests/util/std @@ -1 +1 @@ -Subproject commit e0ef24091e87f84d44d495d432d611625b281249 +Subproject commit 7d419485c74bcdc4a03857dd4d427d4442b058f3 diff --git a/tests/wpt/wpt.ts b/tests/wpt/wpt.ts index 351ee518cb..35a7c1e799 100755 --- a/tests/wpt/wpt.ts +++ b/tests/wpt/wpt.ts @@ -34,7 +34,7 @@ import { } from "./runner/utils.ts"; import { pooledMap } from "../util/std/async/pool.ts"; import { blue, bold, green, red, yellow } from "../util/std/fmt/colors.ts"; -import { writeAll, writeAllSync } from "../util/std/streams/write_all.ts"; +import { writeAll, writeAllSync } from "../util/std/io/write_all.ts"; import { saveExpectation } from "./runner/utils.ts"; class TestFilter { diff --git a/tools/node_compat/setup.ts b/tools/node_compat/setup.ts index 50dba393c7..1d685f5431 100755 --- a/tools/node_compat/setup.ts +++ b/tools/node_compat/setup.ts @@ -4,11 +4,11 @@ /** This copies the test files according to the config file `tests/node_compat/config.jsonc` */ import { walk } from "@std/fs/walk.ts"; -import { sep } from "@std/path/mod.ts"; +import { SEPARATOR } from "@std/path/constants.ts"; import { ensureFile } from "@std/fs/ensure_file.ts"; -import { writeAll } from "@std/streams/write_all.ts"; +import { writeAll } from "@std/io/write_all.ts"; import { withoutAll } from "@std/collections/without_all.ts"; -import { relative } from "@std/path/posix.ts"; +import { relative } from "@std/path/posix/relative.ts"; import { config, ignoreList } from "../../tests/node_compat/common.ts"; @@ -110,7 +110,7 @@ async function copyTests() { console.log("Copying test files..."); for await (const entry of walk(VENDORED_NODE_TEST, { skip: ignoreList })) { - const fragments = entry.path.split(sep); + const fragments = entry.path.split(SEPARATOR); // suite is the directory name after test/. For example, if the file is // "node_compat/node/test/fixtures/policy/main.mjs" // then suite is "fixtures/policy"