Skip to content

Commit

Permalink
postgres - updating ESM fix on Pool from pg (#1138)
Browse files Browse the repository at this point in the history
* postgres - updating ESM fix on Pool from pg

* version bump to v2.0.3
  • Loading branch information
jaredwray authored Sep 27, 2024
1 parent 1179006 commit 207a1c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/postgres/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keyv/postgres",
"version": "2.0.2",
"version": "2.0.3",
"description": "PostgreSQL storage adapter for Keyv",
"type": "module",
"main": "dist/index.cjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/postgres/src/pool.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Pool, type PoolConfig} from 'pg';
import pg, {type Pool, type PoolConfig} from 'pg';

let postgresPool: Pool | undefined;
let globalUri: string | undefined;
Expand All @@ -9,7 +9,7 @@ export const pool = (uri: string, options: PoolConfig = {}) => {
globalUri = uri;
}

postgresPool ??= new Pool({connectionString: uri, ...options});
postgresPool ??= new pg.Pool({connectionString: uri, ...options});
return postgresPool;
};

Expand Down

0 comments on commit 207a1c8

Please sign in to comment.