Skip to content

Commit

Permalink
remove deprecation warnings & deprecate lib
Browse files Browse the repository at this point in the history
  • Loading branch information
brianc committed Mar 17, 2013
1 parent cee5f1d commit 1d65417
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 48 deletions.
2 changes: 0 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ var Connection = require(__dirname + '/connection');
var CopyFromStream = require(__dirname + '/copystream').CopyFromStream;
var CopyToStream = require(__dirname + '/copystream').CopyToStream;

var deprecate = require('deprecate');

var Client = function(config) {
EventEmitter.call(this);

Expand Down
9 changes: 0 additions & 9 deletions lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,3 @@ module.exports = {
//pool log function / boolean
poolLog: false
};

var deprecate = require('deprecate');
//getter/setter to disable deprecation warnings
module.exports.__defineGetter__("hideDeprecationWarnings", function() {
return deprecate.silent;
});
module.exports.__defineSetter__("hideDeprecationWarnings", function(val) {
deprecate.silence = val;
});
25 changes: 0 additions & 25 deletions lib/deprecate.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ var EventEmitter = require('events').EventEmitter;
var defaults = require(__dirname + '/defaults');
var genericPool = require('generic-pool');

var deprecate = require('deprecate');

var pools = {
//dictionary of all key:pool pairs
all: {},
Expand Down
8 changes: 0 additions & 8 deletions lib/types/binaryParsers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var deprecate = require('deprecate');

var parseBits = function(data, bits, offset, invert, callback) {
offset = offset || 0;
invert = invert || false;
Expand Down Expand Up @@ -47,12 +45,6 @@ var parseBits = function(data, bits, offset, invert, callback) {
};

var parseFloatFromBits = function(data, precisionBits, exponentBits) {
deprecate('parsing and returning floats from PostgreSQL server is deprecated',
'JavaScript has a hard time with floats and there is precision loss which can cause',
'unexpected, hard to trace, potentially bad bugs in your program',
'for more information see the following:',
'https://github.com/brianc/node-postgres/pull/271',
'in node-postgres v1.0.0 all floats & decimals will be returned as strings');
var bias = Math.pow(2, exponentBits - 1) - 1;
var sign = parseBits(data, 1);
var exponent = parseBits(data, exponentBits, 1);
Expand Down
2 changes: 0 additions & 2 deletions lib/types/textParsers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var deprecate = require('deprecate');

var arrayParser = require(__dirname + "/arrayParser.js");

//parses PostgreSQL server formatted date strings into javascript date objects
Expand Down

0 comments on commit 1d65417

Please sign in to comment.