From edc733dde3b8505ab5104f7eb16c5fcd19b00eb0 Mon Sep 17 00:00:00 2001 From: Andy White Date: Mon, 16 May 2016 16:54:43 -0600 Subject: [PATCH] Possible fix for pg issue in node 6.x - There is a change in `Buffer` in node 6 that causes an issue with authentication in the `pg`/`pg.js` modules. - See https://github.com/brianc/node-postgres/issues/1018 - Which references: https://github.com/brianc/node-postgres/issues/1000 - This commit changes the pg library dependency to the version that contains the fix for this issue. --- lib/create-common-client.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/create-common-client.js b/lib/create-common-client.js index 328a21d..5a7d530 100644 --- a/lib/create-common-client.js +++ b/lib/create-common-client.js @@ -68,7 +68,7 @@ module.exports = function (config) { } else if (config.driver === 'pg' || config.driver === 'pg.js') { - commonClient.dbDriver = require('pg.js'); + commonClient.dbDriver = require('pg'); // for backward compatibility, allows to specify port within host if (config.port) { diff --git a/package.json b/package.json index 3c16bf7..39a6c52 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "mssql": "2.x.x", "mysql": "2.x.x", "newline": "0.0.3", - "pg.js": "4.x.x" + "pg": "^4.5.5" }, "repository": { "type": "git",