diff --git a/lib/native/index.js b/lib/native/index.js index bb29d6f..1e1d446 100644 --- a/lib/native/index.js +++ b/lib/native/index.js @@ -6,16 +6,7 @@ var CopyFromStream = require(__dirname + '/../copystream').CopyFromStream; var CopyToStream = require(__dirname + '/../copystream').CopyToStream; var JsClient = require(__dirname + '/../client'); // used to import JS escape functions -var binding; - -//TODO remove on v1.0.0 -try { - //v0.5.x - binding = require(__dirname + '/../../build/Release/binding.node'); -} catch(e) { - //v0.4.x - binding = require(__dirname + '/../../build/default/binding'); -} +var binding = require('bindings')('binding.node'); var Connection = binding.Connection; var NativeQuery = require(__dirname + '/query'); diff --git a/package.json b/package.json index 1fc65fb..fa20344 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,14 @@ "author": "Brian Carlson ", "main": "./lib", "dependencies": { - "generic-pool": "2.1.1", + "bindings": "^1.2.1", "buffer-writer": "1.0.0", - "pgpass": "0.0.3", + "generic-pool": "2.1.1", "nan": "~1.3.0", "packet-reader": "0.2.0", "pg-connection-string": "0.1.2", - "pg-types": "1.4.0" + "pg-types": "1.4.0", + "pgpass": "0.0.3" }, "devDependencies": { "jshint": "2.5.2",