Skip to content

Commit

Permalink
fix(deps): Upgrade connect 3.
Browse files Browse the repository at this point in the history
This means dropping support for node 0.8.

Fixes part of karma-runner#1410
  • Loading branch information
dignifiedquire committed May 29, 2015
1 parent a3049c3 commit 297f9cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ node_js:
- "iojs"
- "0.12"
- "0.10"
- "0.8"

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion lib/middleware/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var setNoCacheHeaders = function(response) {


var setHeavyCacheHeaders = function(response) {
response.setHeader('Cache-Control', ['public', 'max-age=31536000']);
response.setHeader('Cache-Control', 'public, max-age=31536000');
};


Expand Down
2 changes: 1 addition & 1 deletion lib/middleware/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var path = require('path');
var helper = require('../helper');
var log = require('../logger').create();
var constant = require('../constants');
var json = require('connect').json();
var json = require('body-parser').json();

// TODO(vojta): disable when single-run mode
var createRunnerMiddleware = function(emitter, fileList, capturedBrowsers, reporter, executor,
Expand Down
8 changes: 2 additions & 6 deletions lib/middleware/source_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

var querystring = require('querystring');
var common = require('./common');
var pause = require('connect').utils.pause;


var findByPath = function(files, path) {
Expand All @@ -28,10 +27,7 @@ var createSourceFilesMiddleware = function(filesPromise, serveFile,
.replace(/^\/absolute/, '')
.replace(/^\/base/, basePath);

// Need to pause the request because of proxying, see:
// https://groups.google.com/forum/#!topic/q-continuum/xr8znxc_K5E/discussion
// TODO(vojta): remove once we don't care about Node 0.8
var pausedRequest = pause(request);
request.pause();

return filesPromise.then(function(files) {
// TODO(vojta): change served to be a map rather then an array
Expand All @@ -51,7 +47,7 @@ var createSourceFilesMiddleware = function(filesPromise, serveFile,
next();
}

pausedRequest.resume();
request.resume();
});
};
};
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@
"Jeff Froom <jeff@jfroom.com>"
],
"dependencies": {
"body-parser": "^1.12.4",
"chokidar": "^1.0.1",
"colors": "^1.1.0",
"connect": "^2.29.2",
"connect": "^3.3.5",
"di": "^0.0.1",
"glob": "^5.0.6",
"graceful-fs": "^3.0.6",
Expand Down Expand Up @@ -227,7 +228,9 @@
"which": "^1.1.1"
},
"main": "./lib/index",
"bin": { "karma": "./bin/karma" },
"bin": {
"karma": "./bin/karma"
},
"engines": {
"node": ">=0.8 <=0.12 || >=1 <=2"
},
Expand Down

0 comments on commit 297f9cb

Please sign in to comment.