Skip to content

Commit e5c619a

Browse files
authored
Merge pull request #175 from deno-postgres/1.4.0
Update to 1.4.0 and workaround TS1371
2 parents f19e520 + e313969 commit e5c619a

File tree

10 files changed

+17
-14
lines changed

10 files changed

+17
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install deno
2828
uses: denolib/setup-deno@master
2929
with:
30-
deno-version: 1.2.2
30+
deno-version: 1.4.0
3131

3232
- name: Check formatting
3333
run: deno fmt --check

array_parser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,22 @@
2020
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2121
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
// THE SOFTWARE.
23+
24+
// deno-lint-ignore ban-types
2325
export function parseArray(source: string, transform: Function | undefined) {
2426
return new ArrayParser(source, transform).parse();
2527
}
2628

2729
class ArrayParser {
2830
source: string;
31+
// deno-lint-ignore ban-types
2932
transform: Function;
3033
position = 0;
3134
entries: Array<unknown> = [];
3235
recorded: Array<unknown> = [];
3336
dimension = 0;
3437

38+
// deno-lint-ignore ban-types
3539
constructor(source: string, transform: Function | undefined) {
3640
this.source = source;
3741
this.transform = transform || identity;

connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { hashMd5Password, readUInt32BE } from "./utils.ts";
3232
import { PacketReader } from "./packet_reader.ts";
3333
import { QueryConfig, QueryResult, Query } from "./query.ts";
3434
import { parseError } from "./error.ts";
35-
import { ConnectionParams } from "./connection_params.ts";
35+
import type { ConnectionParams } from "./connection_params.ts";
3636
import { DeferredStack } from "./deferred.ts";
3737

3838
export enum Format {

decode.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ function decodeByteaHex(byteaStr: string): Uint8Array {
150150
function decodeByteaEscape(byteaStr: string): Uint8Array {
151151
let bytes = [];
152152
let i = 0;
153+
let k = 0;
153154
while (i < byteaStr.length) {
154155
if (byteaStr[i] !== "\\") {
155156
bytes.push(byteaStr.charCodeAt(i));
@@ -166,7 +167,7 @@ function decodeByteaEscape(byteaStr: string): Uint8Array {
166167
) {
167168
backslashes++;
168169
}
169-
for (var k = 0; k < Math.floor(backslashes / 2); ++k) {
170+
for (k = 0; k < Math.floor(backslashes / 2); ++k) {
170171
bytes.push(BACKSLASH_BYTE_VALUE);
171172
}
172173
i += Math.floor(backslashes / 2) * 2;

deps.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
export {
22
BufReader,
33
BufWriter,
4-
} from "https://deno.land/std@0.67.0/io/bufio.ts";
4+
} from "https://deno.land/std@0.69.0/io/bufio.ts";
55
export { copyBytes } from "https://deno.land/[email protected]/bytes/mod.ts";
6-
export {
7-
Deferred,
8-
deferred,
9-
} from "https://deno.land/[email protected]/async/deferred.ts";
6+
export { deferred } from "https://deno.land/[email protected]/async/deferred.ts";
7+
export type { Deferred } from "https://deno.land/[email protected]/async/deferred.ts";
108
export { createHash } from "https://deno.land/[email protected]/hash/mod.ts";

error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message } from "./connection.ts";
1+
import type { Message } from "./connection.ts";
22

33
export interface ErrorFields {
44
severity: string;

query.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { RowDescription, Column, Format } from "./connection.ts";
2-
import { Connection } from "./connection.ts";
1+
import type { RowDescription } from "./connection.ts";
2+
import type { Connection } from "./connection.ts";
33
import { encode, EncodedArg } from "./encode.ts";
44

55
import { decode } from "./decode.ts";

tests/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ConnectionParams } from "../connection_params.ts";
1+
import type { ConnectionParams } from "../connection_params.ts";
22

33
export const DEFAULT_SETUP = [
44
"DROP TABLE IF EXISTS ids;",

tests/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client } from "../client.ts";
1+
import type { Client } from "../client.ts";
22

33
export function getTestClient(
44
client: Client,

tests/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Client } from "../mod.ts";
22
import { assertEquals } from "../test_deps.ts";
33
import { DEFAULT_SETUP, TEST_CONNECTION_PARAMS } from "./constants.ts";
44
import { getTestClient } from "./helpers.ts";
5-
import { QueryResult } from "../query.ts";
5+
import type { QueryResult } from "../query.ts";
66

77
const CLIENT = new Client(TEST_CONNECTION_PARAMS);
88

0 commit comments

Comments
 (0)