Skip to content

Commit

Permalink
Drop support for Node.js below 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Oct 14, 2017
1 parent 0c68537 commit 56f12db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "0.8"
- "0.10"
- "0.12"
- "1.8"
Expand All @@ -19,7 +18,6 @@ before_install:
# Skip updating shrinkwrap / lock
- "npm config set shrinkwrap false"
# Setup Node.js version-specific dependencies
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint eslint-plugin-markdown"
# Update Node.js modules
- "test ! -d node_modules || npm prune"
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2.x
===

* Drop support for Node.js below 0.10

1.3.2 / 2017-09-24
==================

Expand Down
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ var setPrototypeOf = require('setprototypeof')

var slice = Array.prototype.slice

/* istanbul ignore next */
var defer = typeof setImmediate === 'function'
? setImmediate
: function(fn){ process.nextTick(fn.bind.apply(fn, arguments)) }

/**
* Expose `Router`.
*/
Expand Down Expand Up @@ -208,13 +203,13 @@ Router.prototype.handle = function handle(req, res, callback) {

// signal to exit router
if (layerError === 'router') {
defer(done, null)
setImmediate(done, null)
return
}

// no more matching layers
if (idx >= stack.length) {
defer(done, layerError)
setImmediate(done, layerError)
return
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"index.js"
],
"engines": {
"node": ">= 0.8"
"node": ">= 0.10"
},
"scripts": {
"lint": "eslint --plugin markdown --ext js,md .",
Expand Down

0 comments on commit 56f12db

Please sign in to comment.