From af18093498c3fca103bd47305e447ddeda40d9a2 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 26 Sep 2019 21:06:59 -0400 Subject: [PATCH] Bump v0.19.0 (denoland/deno_std#613) Original: https://github.com/denoland/deno_std/commit/5d0dd5878e82ab7577356096469a7e280efe8442 --- azure-pipelines.yml | 2 +- http/racing_server_test.ts | 2 +- http/server.ts | 4 +++- http/server_test.ts | 2 +- ws/mod.ts | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a5ba283e8a..a72892228b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ variables: - DENO_VERSION: "v0.18.0" + DENO_VERSION: "v0.19.0" TS_VERSION: "3.4.5" # TODO Try to get eslint to run under Deno, like prettier diff --git a/http/racing_server_test.ts b/http/racing_server_test.ts index 6d1ed02773..a6534861e7 100644 --- a/http/racing_server_test.ts +++ b/http/racing_server_test.ts @@ -50,7 +50,7 @@ World 4 test(async function serverPipelineRace(): Promise { await startServer(); - const conn = await dial("tcp", "127.0.0.1:4501"); + const conn = await dial({ port: 4501 }); const r = new TextProtoReader(new BufReader(conn)); await conn.write(new TextEncoder().encode(input)); const outLines = output.split("\n"); diff --git a/http/server.ts b/http/server.ts index 2b5fffc814..d9bba525af 100644 --- a/http/server.ts +++ b/http/server.ts @@ -386,7 +386,9 @@ export class Server implements AsyncIterable { } export function serve(addr: string): Server { - const listener = listen("tcp", addr); + // TODO(ry) Update serve to also take { hostname, port }. + const [hostname, port] = addr.split(":"); + const listener = listen({ hostname, port: Number(port) }); return new Server(listener); } diff --git a/http/server_test.ts b/http/server_test.ts index 692293e802..314e5232e3 100644 --- a/http/server_test.ts +++ b/http/server_test.ts @@ -512,7 +512,7 @@ test({ await delay(100); // Reqeusts to the server and immediately closes the connection - const conn = await Deno.dial("tcp", "127.0.0.1:4502"); + const conn = await Deno.dial({ port: 4502 }); await conn.write(new TextEncoder().encode("GET / HTTP/1.0\n\n")); conn.close(); diff --git a/ws/mod.ts b/ws/mod.ts index ce2b90e3ab..316e19abdf 100644 --- a/ws/mod.ts +++ b/ws/mod.ts @@ -488,7 +488,7 @@ export async function connectWebSocket( throw new Error("currently https/wss is not supported"); } } - const conn = await Deno.dial("tcp", `${hostname}:${port}`); + const conn = await Deno.dial({ hostname, port: Number(port) }); const bufWriter = new BufWriter(conn); const bufReader = new BufReader(conn); try {