fix: remove support for deprecated pg.js package

BREAKING CHANGE: pg.js is long dead and no longer supported.

Use [pg](https://www.npmjs.com/package/pg) instead.
This commit is contained in:
Mikkel Hoegh 2018-12-05 00:01:39 +01:00
parent 91bdbbd3d7
commit 6fc07b4a63
No known key found for this signature in database
GPG Key ID: DBFA78BE64344352
2 changed files with 2 additions and 12 deletions

View File

@ -1,6 +1,6 @@
'use strict'
const Result = require('./pg').Result
const prepare = require('./pg').prepareValue
const Result = require('pg/lib/result.js')
const prepare = require('pg/lib/utils.js').prepareValue
const EventEmitter = require('events').EventEmitter
const util = require('util')

10
pg.js
View File

@ -1,10 +0,0 @@
// support both pg & pg.js
// this will eventually go away when i break native bindings
// out into their own module
try {
module.exports.Result = require('pg/lib/result.js')
module.exports.prepareValue = require('pg/lib/utils.js').prepareValue
} catch (e) {
module.exports.Result = require('pg.js/lib/result.js')
module.exports.prepareValue = require('pg.js/lib/utils.js').prepareValue
}