From 6589f61421d3e127bae40b6274c84cf61e53782a Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 17 Dec 2016 17:26:39 +0100 Subject: [PATCH] Remove support for 0.10 --- .travis.yml | 1 - appveyor.yml | 3 +-- index.js | 15 +++------------ package.json | 2 +- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index eefd235406..057ea2c9ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ addons: packages: - g++-4.8 node_js: - - "0.10" - "0.12" - "4" - "6" diff --git a/appveyor.yml b/appveyor.yml index 9e79508e4c..3991b4e1d8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,10 +3,9 @@ # Test against these versions of Node.js. environment: matrix: - - nodejs_version: "0.10" - nodejs_version: "0.12" - nodejs_version: "4" - - nodejs_version: "6" + - nodejs_version: "7" pull_requests: do_not_increment_build_number: true diff --git a/index.js b/index.js index 361a6d70f8..79b53cbae9 100644 --- a/index.js +++ b/index.js @@ -19,11 +19,6 @@ var SUBSCRIBE_COMMANDS = { punsubscribe: true }; -// Newer Node.js versions > 0.10 return the EventEmitter right away and using .EventEmitter was deprecated -if (typeof EventEmitter !== 'function') { - EventEmitter = EventEmitter.EventEmitter; -} - function noop () {} function handle_detect_buffers_reply (reply, command, buffer_args) { @@ -419,9 +414,7 @@ RedisClient.prototype.on_ready = function () { this.cork = function () { self.pipeline = true; - if (self.stream.cork) { - self.stream.cork(); - } + self.stream.cork(); }; this.uncork = function () { if (self.fire_strings) { @@ -431,10 +424,8 @@ RedisClient.prototype.on_ready = function () { } self.pipeline = false; self.fire_strings = true; - if (self.stream.uncork) { - // TODO: Consider using next tick here. See https://github.com/NodeRedis/node_redis/issues/1033 - self.stream.uncork(); - } + // TODO: Consider using next tick here. See https://github.com/NodeRedis/node_redis/issues/1033 + self.stream.uncork(); }; // Restore modal commands from previous connection. The order of the commands is important diff --git a/package.json b/package.json index 280a2d9af7..3c1a58de60 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "redis-parser": "^2.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.12.0" }, "devDependencies": { "bluebird": "^3.0.2",