Skip to content

Commit 79d4e5e

Browse files
authoredJun 12, 2016
Update versions (#870)
- move jsdom to devDependencies - fix issues with benchmark upgrade - run benchmark on travis and test on node@6 - update benchmark jQuery to 3.0.0
1 parent e7d18af commit 79d4e5e

File tree

6 files changed

+7951
-8846
lines changed

6 files changed

+7951
-8846
lines changed
 

‎.travis.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ language: node_js
22
node_js:
33
- "stable"
44
- "unstable"
5-
- "4.2"
6-
- "4.1"
5+
- "6"
76
- "4"
87
- "0.12"
98
script: make travis-test
109
matrix:
1110
fast_finish: true
1211
allow_failures:
13-
- node_js: "unstable"
12+
- node_js: unstable
13+
include:
14+
- env: BENCHMARK=true
15+
script: "node benchmark/benchmark.js --regex '^(?!.*highmem)'"

‎benchmark/benchmark.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,25 @@ suites.add('manipulation - append', 'jquery.html', {
3333
$body.append(new Array(50).join('<div>'));
3434
}
3535
});
36-
suites.add('manipulation - prepend', 'jquery.html', {
36+
37+
// These tests run out of memory in jsdom
38+
suites.add('manipulation - prepend - highmem', 'jquery.html', {
3739
setup: function($) {
3840
return $('body');
3941
},
4042
test: function($, $body) {
4143
$body.prepend(new Array(50).join('<div>'));
4244
}
4345
});
44-
suites.add('manipulation - after', 'jquery.html', {
46+
suites.add('manipulation - after - highmem', 'jquery.html', {
4547
setup: function($) {
4648
return $('body');
4749
},
4850
test: function($, $body) {
4951
$body.after(new Array(50).join('<div>'));
5052
}
5153
});
52-
suites.add('manipulation - before', 'jquery.html', {
54+
suites.add('manipulation - before - highmem', 'jquery.html', {
5355
setup: function($) {
5456
return $('body');
5557
},

‎benchmark/jquery-2.0.3.js

-8,829
This file was deleted.

‎benchmark/jquery-3.0.0.slim.js

+7,932
Large diffs are not rendered by default.

‎benchmark/suite.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var jsdom = require('jsdom');
66
var cheerio = require('..');
77

88
var documentDir = path.join(__dirname, 'documents');
9-
var jQuerySrc = path.join(__dirname, 'jquery-2.0.3.js');
9+
var jQuerySrc = path.join(__dirname, 'jquery-3.0.0.slim.js');
1010
var filterRe = /./;
1111
var cheerioOnly = false;
1212

@@ -48,7 +48,7 @@ Suites.prototype.add = function(name, fileName, options) {
4848
console.log();
4949
return;
5050
}
51-
console.log('\tFastest: ' + this.filter('fastest').pluck('name') + '\n');
51+
console.log('\tFastest: ' + this.filter('fastest')[0].name + '\n');
5252
});
5353

5454
this._benchCheerio(suite, markup, options);

‎package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"css-select": "~1.2.0",
2929
"dom-serializer": "~0.1.0",
3030
"entities": "~1.1.1",
31-
"htmlparser2": "~3.8.1",
31+
"htmlparser2": "^3.9.1",
3232
"lodash.assignin": "^4.0.9",
3333
"lodash.bind": "^4.1.4",
3434
"lodash.defaults": "^4.0.1",
@@ -43,18 +43,16 @@
4343
"lodash.some": "^4.4.0"
4444
},
4545
"devDependencies": {
46-
"benchmark": "~1.0.0",
47-
"coveralls": "~2.10",
46+
"benchmark": "^2.1.0",
47+
"coveralls": "^2.11.9",
4848
"expect.js": "~0.3.1",
49-
"istanbul": "~0.2",
50-
"jshint": "~2.5.1",
51-
"mocha": "*",
49+
"istanbul": "^0.4.3",
50+
"jsdom": "^9.2.1",
51+
"jshint": "^2.9.2",
52+
"mocha": "^2.5.3",
5253
"xyz": "~0.5.0"
5354
},
5455
"scripts": {
5556
"test": "make test"
56-
},
57-
"optionalDependencies": {
58-
"jsdom": "^7.0.2"
5957
}
6058
}

0 commit comments

Comments
 (0)
Please sign in to comment.