Comparing version 0.9.0 to 0.9.1
if (global.GENTLY) require = GENTLY.hijack(require); | ||
var sys = require('./sys'), | ||
var util = require('util'), | ||
Stream = require('net').Stream, | ||
@@ -9,4 +9,3 @@ auth = require('./auth'), | ||
Query = require('./query'), | ||
EventEmitter = require('events').EventEmitter, | ||
netConstants = require('./net_constants'); | ||
EventEmitter = require('events').EventEmitter; | ||
@@ -43,3 +42,3 @@ function Client(properties) { | ||
}; | ||
sys.inherits(Client, EventEmitter); | ||
util.inherits(Client, EventEmitter); | ||
module.exports = Client; | ||
@@ -55,3 +54,4 @@ | ||
.on('error', function(err) { | ||
if (err.errno & (netConstants.ECONNREFUSED | netConstants.ENOTFOUND)) { | ||
var connectionError = err.code && err.code.match(/ECONNREFUSED|ENOTFOUND/); | ||
if (connectionError) { | ||
if (cb) { | ||
@@ -186,2 +186,6 @@ cb(err); | ||
if (typeof val === 'object') { | ||
val = val.toString(); | ||
} | ||
val = val.replace(/[\0\n\r\b\t\\\'\"\x1a]/g, function(s) { | ||
@@ -188,0 +192,0 @@ switch(s) { |
@@ -5,3 +5,3 @@ if (global.GENTLY) require = GENTLY.hijack(require); | ||
var sys = require('./sys'), | ||
var util = require('util'), | ||
Buffer = require('buffer').Buffer, | ||
@@ -24,3 +24,3 @@ EventEmitter = require('events').EventEmitter, | ||
}; | ||
sys.inherits(Parser, EventEmitter); | ||
util.inherits(Parser, EventEmitter); | ||
module.exports = Parser; | ||
@@ -27,0 +27,0 @@ |
if (global.GENTLY) require = GENTLY.hijack(require); | ||
var sys = require('./sys'), | ||
var util = require('util'), | ||
EventEmitter = require('events').EventEmitter, | ||
@@ -18,3 +18,3 @@ Parser = require('./parser'), | ||
}; | ||
sys.inherits(Query, EventEmitter); | ||
util.inherits(Query, EventEmitter); | ||
module.exports = Query; | ||
@@ -21,0 +21,0 @@ |
{ "name" : "mysql" | ||
, "version": "0.9.0" | ||
, "version": "0.9.1" | ||
, "devDependencies": {"gently": ">=0.8.0"} | ||
@@ -4,0 +4,0 @@ , "main" : "./lib/mysql" |
@@ -21,2 +21,3 @@ # node-mysql | ||
* Frank Grimm ([FrankGrimm](http://github.com/felixge/node-mysql/commits/master?author=FrankGrimm)) | ||
* Nick Payne ([makeusabrew](http://github.com/felixge/node-mysql/commits/master?author=makeusabrew)) | ||
@@ -53,5 +54,7 @@ ## Sponsors | ||
This module should run in any node version >= v0.1.102 (July 26, 2010). | ||
However, using a current version of node is encouraged. | ||
This module is compatible with node v0.4.x. | ||
If you need to work with an older node version, download v0.9.0. It supports | ||
node >= v0.1.102. | ||
## Design Goals | ||
@@ -261,4 +264,27 @@ | ||
## Changelog | ||
### v0.9.1 | ||
* Fix issue #49 / `client.escape()` throwing exceptions on objects. (Nick Payne) | ||
* Drop < v0.4.x compatibility. From now on you need node v0.4.x to use this module. | ||
[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) | ||
### Older releases | ||
These releases were done before starting to maintain the above Changelog: | ||
* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) | ||
* [v0.8.0](https://github.com/felixge/node-formidable/compare/v0.7.0...v0.9.0) | ||
* [v0.7.0](https://github.com/felixge/node-formidable/compare/v0.6.0...v0.9.0) | ||
* [v0.6.0](https://github.com/felixge/node-formidable/compare/v0.5.0...v0.9.0) | ||
* [v0.5.0](https://github.com/felixge/node-formidable/compare/v0.4.0...v0.9.0) | ||
* [v0.4.0](https://github.com/felixge/node-formidable/compare/v0.3.0...v0.9.0) | ||
* [v0.3.0](https://github.com/felixge/node-formidable/compare/v0.2.0...v0.9.0) | ||
* [v0.2.0](https://github.com/felixge/node-formidable/compare/v0.1.0...v0.9.0) | ||
* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) | ||
## License | ||
node-mysql is licensed under the MIT license. |
var path = require('path'); | ||
require.paths.unshift(path.dirname(__dirname)+'/lib'); | ||
var sys = require('mysql/sys'); | ||
var util = require('util'); | ||
@@ -22,3 +22,3 @@ var parent = module.parent.filename; | ||
global.p = function(val) { | ||
sys.error(sys.inspect(val)); | ||
util.error(util.inspect(val)); | ||
}; | ||
@@ -28,1 +28,8 @@ | ||
global.HIJACKED = GENTLY.hijacked; | ||
// Stupid new feature in node that complains about gently attaching too many | ||
// listeners to process 'exit'. This is a workaround until I can think of a | ||
// better way to deal with this. | ||
if (process.setMaxListeners) { | ||
process.setMaxListeners(Infinity); | ||
} |
@@ -6,4 +6,3 @@ require('../common'); | ||
QueryStub = GENTLY.stub('./query'), | ||
Parser = require('mysql/parser'), | ||
netConstants = require('mysql/net_constants'); | ||
Parser = require('mysql/parser'); | ||
@@ -123,3 +122,3 @@ for (var k in Parser) { | ||
var ERR = new Error('ouch'); | ||
ERR.errno = netConstants.ECONNREFUSED; | ||
ERR.code = 'ECONNREFUSED'; | ||
@@ -370,2 +369,4 @@ CB_DELEGATE = gently.expect(function connectCallback(err) { | ||
assert.equal(client.escape(5), '5'); | ||
assert.equal(client.escape({foo:'bar'}), "'[object Object]'"); | ||
assert.equal(client.escape([1,2,3]), "'1,2,3'"); | ||
@@ -372,0 +373,0 @@ assert.equal(client.escape('Super'), "'Super'"); |
require('../common'); | ||
var Client = require('mysql').Client, | ||
client = Client(TEST_CONFIG), | ||
gently = new Gently(), | ||
netConstants = require('mysql/net_constants'); | ||
ECONNREFUSED = netConstants.ECONNREFUSED, | ||
ENOTFOUND = netConstants.ENOTFOUND; | ||
gently = new Gently(); | ||
@@ -12,3 +9,3 @@ client.host = 'BADHOST'; | ||
client.connect(gently.expect(function connectCb(err, result) { | ||
assert.ok(err.errno & (ECONNREFUSED | ENOTFOUND)); | ||
assert.ok(err.code.match(/ECONNREFUSED|ENOTFOUND/)); | ||
})); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
288
19
2108813
3770