Skip to content

Commit

Permalink
Merge branch 'main' into jsr-and-modern-code
Browse files Browse the repository at this point in the history
  • Loading branch information
williamhorning authored Sep 24, 2024
2 parents d9b334b + c627326 commit 677fdf0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# deno-postgres

![Build Status](https://img.shields.io/github/workflow/status/denodrivers/postgres/ci?label=Build&logo=github&style=flat-square)
![Build Status](https://img.shields.io/github/actions/workflow/status/denodrivers/postgres/ci.yml?branch=main&label=Build&logo=github&style=flat-square)
[![Discord server](https://img.shields.io/discord/768918486575480863?color=blue&label=Ask%20for%20help%20here&logo=discord&style=flat-square)](https://discord.gg/HEdTCvZUSf)
[![Manual](https://img.shields.io/github/v/release/denodrivers/postgres?color=orange&label=Manual&logo=deno&style=flat-square)](https://deno-postgres.com)
[![Documentation](https://img.shields.io/github/v/release/denodrivers/postgres?color=yellow&label=Documentation&logo=deno&style=flat-square)](https://doc.deno.land/https/deno.land/x/postgres/mod.ts)
Expand Down Expand Up @@ -86,8 +86,8 @@ result assertions.

To run the tests, run the following commands:

1. `docker-compose build tests`
2. `docker-compose run tests`
1. `docker compose build tests`
2. `docker compose run tests`

The build step will check linting and formatting as well and report it to the
command line
Expand Down
5 changes: 4 additions & 1 deletion connection/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ export class Connection {
// https://www.postgresql.org/docs/14/protocol-flow.html#id-1.10.5.7.11
if (accepts_tls) {
try {
// TODO: handle connection type without castinggaa
// https://github.com/denoland/deno/issues/10200
await this.#openTlsConnection(this.#conn as Deno.TcpConn, {
hostname,
caCerts: caCertificates,
Expand Down Expand Up @@ -401,7 +403,8 @@ export class Connection {
if (e instanceof Deno.errors.InvalidData && tls_enabled) {
if (tls_enforced) {
throw new Error(
"The certificate used to secure the TLS connection is invalid.",
"The certificate used to secure the TLS connection is invalid: " +
e.message,
);
} else {
console.error(
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.8'

x-database-env:
&database-env
POSTGRES_DB: "postgres"
Expand Down
3 changes: 2 additions & 1 deletion query/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export type CommandType =
| "SELECT"
| "MOVE"
| "FETCH"
| "COPY";
| "COPY"
| "CREATE";

/** Type of a query result */
export enum ResultType {
Expand Down
4 changes: 2 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ From within the project directory, run:
deno test --allow-read --allow-net --allow-env

# run in docker container
docker-compose build --no-cache
docker-compose run tests
docker compose build --no-cache
docker compose run tests
```

## Docker Configuration
Expand Down

0 comments on commit 677fdf0

Please sign in to comment.