Skip to content

Commit fc926d2

Browse files
committed
chore: Upgrade to Deno 1.11.0 (#297)
1 parent 2f35c1f commit fc926d2

22 files changed

+321
-473
lines changed

Dockerfile

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
FROM denoland/deno:alpine-1.10.3
1+
FROM denoland/deno:alpine-1.11.0
22
WORKDIR /app
33

44
# Install wait utility
55
USER root
66
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.8.0/wait /wait
77
RUN chmod +x /wait
88

9-
# Cache external libraries
109
USER deno
11-
ADD . .
10+
11+
# Cache external libraries
1212
# Test deps caches all main dependencies as well
13+
COPY tests/test_deps.ts tests/test_deps.ts
14+
COPY deps.ts deps.ts
1315
RUN deno cache tests/test_deps.ts
1416

17+
ADD . .
18+
RUN deno cache mod.ts
19+
1520
# Code health checks
1621
RUN deno lint
1722
RUN deno fmt --check

client.ts

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// deno-lint-ignore-file camelcase
12
import { Connection } from "./connection/connection.ts";
23
import {
34
ConnectionOptions,
@@ -41,21 +42,21 @@ export abstract class QueryClient {
4142

4243
// TODO
4344
// Distinguish between terminated and aborted
44-
#assertOpenConnection = () => {
45+
#assertOpenConnection() {
4546
if (!this.connected) {
4647
throw new Error(
4748
"Connection to the database hasn't been initialized or has been terminated",
4849
);
4950
}
50-
};
51+
}
5152

52-
private executeQuery<T extends Array<unknown>>(
53-
query: Query<ResultType.ARRAY>,
53+
#executeQuery<T extends Array<unknown>>(
54+
_query: Query<ResultType.ARRAY>,
5455
): Promise<QueryArrayResult<T>>;
55-
private executeQuery<T>(
56-
query: Query<ResultType.OBJECT>,
56+
#executeQuery<T>(
57+
_query: Query<ResultType.OBJECT>,
5758
): Promise<QueryObjectResult<T>>;
58-
private executeQuery(
59+
#executeQuery(
5960
query: Query<ResultType>,
6061
): Promise<QueryResult> {
6162
return this.connection.query(query);
@@ -156,7 +157,7 @@ export abstract class QueryClient {
156157
options,
157158
this,
158159
// Bind context so function can be passed as is
159-
this.executeQuery.bind(this),
160+
this.#executeQuery.bind(this),
160161
(name: string | null) => {
161162
this.transaction = name;
162163
},
@@ -224,7 +225,6 @@ export abstract class QueryClient {
224225
...args: QueryArguments
225226
): Promise<QueryArrayResult<T>>;
226227
queryArray<T extends Array<unknown> = Array<unknown>>(
227-
// deno-lint-ignore camelcase
228228
query_template_or_config: TemplateStringsArray | string | QueryConfig,
229229
...args: QueryArguments
230230
): Promise<QueryArrayResult<T>> {
@@ -249,7 +249,7 @@ export abstract class QueryClient {
249249
query = new Query(query_template_or_config, ResultType.ARRAY);
250250
}
251251

252-
return this.executeQuery(query);
252+
return this.#executeQuery(query);
253253
}
254254

255255
/**
@@ -306,7 +306,6 @@ export abstract class QueryClient {
306306
queryObject<
307307
T = Record<string, unknown>,
308308
>(
309-
// deno-lint-ignore camelcase
310309
query_template_or_config:
311310
| string
312311
| QueryObjectConfig
@@ -337,7 +336,7 @@ export abstract class QueryClient {
337336
);
338337
}
339338

340-
return this.executeQuery<T>(query);
339+
return this.#executeQuery<T>(query);
341340
}
342341
}
343342

0 commit comments

Comments
 (0)