summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-09-26 21:06:59 -0400
committerGitHub <noreply@github.com>2019-09-26 21:06:59 -0400
commitaf18093498c3fca103bd47305e447ddeda40d9a2 (patch)
tree7ea1a53788aea8eaea3342661e569976f7cf8892
parentaa21e7bc81909630bec6e3e527e89f3673b75a3c (diff)
Bump v0.19.0 (denoland/deno_std#613)
Original: https://github.com/denoland/deno_std/commit/5d0dd5878e82ab7577356096469a7e280efe8442
-rw-r--r--azure-pipelines.yml2
-rw-r--r--http/racing_server_test.ts2
-rw-r--r--http/server.ts4
-rw-r--r--http/server_test.ts2
-rw-r--r--ws/mod.ts2
5 files changed, 7 insertions, 5 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index a5ba283e8..a72892228 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 6d1ed0277..a6534861e 100644
--- a/http/racing_server_test.ts
+++ b/http/racing_server_test.ts
@@ -50,7 +50,7 @@ World 4
test(async function serverPipelineRace(): Promise<void> {
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 2b5fffc81..d9bba525a 100644
--- a/http/server.ts
+++ b/http/server.ts
@@ -386,7 +386,9 @@ export class Server implements AsyncIterable<ServerRequest> {
}
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 692293e80..314e5232e 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 ce2b90e3a..316e19abd 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 {