Skip to content

Commit 2701521

Browse files
author
Yuta Imaya
committed
Merge branch 'release/0.3.1'
2 parents 5132e07 + 9f365a1 commit 2701521

23 files changed

+120
-156
lines changed

‎.travis.yml

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1+
dist: trusty
2+
sudo: false
3+
14
before_install:
2-
- sudo apt-get install gconf2
3-
- export DISPLAY=:99.0
4-
- sh -e /etc/init.d/xvfb start
5-
- ./.travis/scripts/install_chrome.sh
65

76
before_script:
8-
- node_modules/.bin/buster-server &
9-
- sleep 5
10-
- .travis/firefox-start.sh http://localhost:1111/capture &
11-
- sleep 5
12-
- .travis/chrome-start.sh http://localhost:1111/capture &
13-
- sleep 5
14-
- phantomjs node_modules/buster/script/phantom.js http://localhost:1111/capture &
15-
- sleep 5
7+
- export DISPLAY=:99.0
8+
- sh -e /etc/init.d/xvfb start
169

1710
script:
18-
- "npm test"
11+
- npm test
1912

2013
language: node_js
2114

2215
node_js:
23-
- 0.8
16+
- "8.0.0"
17+
18+
addons:
19+
firefox: latest
20+
chrome: stable

‎.travis/chrome-start.sh

-20
This file was deleted.

‎.travis/firefox-start.sh

-18
This file was deleted.

‎.travis/scripts/install_chrome.sh

-11
This file was deleted.

‎ChangeLog.md

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
# Change Log
33

44

5+
## 0.3.1: 2017/07/07
6+
7+
https://github.com/imaya/zlib.js/compare/0.3.0...0.3.1
8+
9+
### etc
10+
11+
- Distribution files reduction in npm package
12+
- code cleanup
13+
14+
15+
-------------------------------------------------------------------------------
16+
17+
518
## 0.3.0: 2017/06/01
619

720
https://github.com/imaya/zlib.js/compare/0.2.0...0.3.0
@@ -21,6 +34,9 @@ https://github.com/imaya/zlib.js/compare/0.2.0...0.3.0
2134
- Testing framework: Migate to Karma and mocha from BusterJS
2235

2336

37+
-------------------------------------------------------------------------------
38+
39+
2440
## 0.1.9, 0.2.0: 2014/02/21
2541

2642
https://github.com/imaya/zlib.js/compare/0.1.8...0.2.0

‎README.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ $ grunt [target]
254254
#### Build target
255255

256256
target | generate file | implementation
257-
---------------|-----------------------|-------------in
257+
---------------|-----------------------|-------------
258258
deps | deps.js | (dependency: deps.js)
259259
deflate | deflate.min.js | ZLIB Deflate
260260
inflate | inflate.min.js | ZLIB Inflate

‎bin/unzip.dev.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bin/zip.dev.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bin/zlib.pretty.dev.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎karma.conf.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@ module.exports = function(config) {
4545

4646

4747
// test files
48-
/*
49-
'test/browser/code-path-test.js',
50-
'test/browser/raw-inflate-test.js',
51-
'test/browser/inflate-test.js'
52-
*/
5348
'test/browser/*-test.js'
54-
//'test/browser/main.js'
5549
],
5650

5751

@@ -91,7 +85,7 @@ module.exports = function(config) {
9185

9286
// start these browsers
9387
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
94-
browsers: ['Chrome'],
88+
browsers: ['Chrome', 'Firefox'],
9589

9690

9791
// Continuous Integration mode

‎package.json

+17-8
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
},
66
"name": "zlibjs",
77
"description": "zlib, gzip and zip implementation in JavaScript",
8-
"version": "0.3.0",
8+
"version": "0.3.1",
99
"license": "MIT",
1010
"main": "./bin/node-zlib.js",
1111
"homepage": "https://github.com/imaya/zlib.js",
1212
"repository": {
1313
"type": "git",
1414
"url": "git://github.com/imaya/zlib.js.git"
1515
},
16-
"dependencies": {
17-
},
16+
"dependencies": {},
1817
"devDependencies": {
1918
"babel-preset-env": "^1.5.1",
2019
"babel-preset-power-assert": "^1.0.0",
@@ -23,15 +22,25 @@
2322
"grunt-closure-tools": "^0.9.9",
2423
"grunt-contrib-concat": "^1.0.1",
2524
"karma": "^1.3.0",
26-
"karma-chrome-launcher": "^2.0.0",
25+
"karma-chrome-launcher": "^2.2.0",
2726
"karma-espower-preprocessor": "^1.1.0",
28-
"karma-mocha": "^1.2.0",
29-
"karma-mocha-reporter": "^2.2.0",
30-
"karma-power-assert": "0.0.4",
27+
"karma-firefox-launcher": "^1.0.1",
28+
"karma-mocha": "^1.3.0",
29+
"karma-mocha-reporter": "^2.2.3",
30+
"karma-power-assert": "^1.0.0",
3131
"karma-sinon": "^1.0.5",
3232
"mocha": "^3.1.0",
33-
"power-assert": "^1.4.1"
33+
"power-assert": "^1.4.4",
34+
"sinon": "^2.3.2"
3435
},
36+
"files": [
37+
"README.md",
38+
"README.en.md",
39+
"ChangeLog.md",
40+
"LICENSE",
41+
"bin",
42+
"package.json"
43+
],
3544
"optionalDependencies": {},
3645
"engines": {
3746
"node": "*"

‎test/browser/base.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function compressionAndDecompressionTest(testData, compressionType) {
1515

1616
// assertion
1717
assert(inflate.length, testData.length);
18-
assert.deepEqual(inflate, testData);
18+
assertArray(inflate, testData);
1919
}
2020

2121
// inflate test
@@ -46,12 +46,12 @@ function compressionAndDecompressionByStreamTest(testData, compressionType) {
4646

4747
// assertion
4848
assert(inflate.length === testData.length);
49-
assert.deepEqual(inflate, testData);
49+
assertArray(inflate, testData);
5050
}
5151

5252
function decompressionTest(compressed, plain) {
5353
var inflated = new Zlib.Inflate(compressed).decompress();
5454

5555
assert(inflated.length === plain.length);
56-
assert.deepEqual(inflated, plain);
56+
assertArray(inflated, plain);
5757
}

‎test/browser/code-path-test.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ describe("code path", function () {
44
var fixed;
55
var dynamic;
66

7+
this.timeout(60000);
8+
79
before(function() {
810
Zlib = ZlibPretty;
911
});
@@ -25,7 +27,7 @@ describe("code path", function () {
2527
var compressed = new ZlibPretty.Deflate(data).compress();
2628
var decompressed = new ZlibPretty.Inflate(compressed).decompress();
2729

28-
assert.deepEqual(data, Array.prototype.slice.call(decompressed));
30+
assertArray(data, Array.prototype.slice.call(decompressed));
2931
});
3032

3133
it("uncompressed random data", function () {

‎test/browser/gunzip-test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
describe('gunzip', function() {
2+
this.timeout(60000);
3+
24
before(function() {
35
Zlib = {
46
Gzip: ZlibGzip.Gzip,
@@ -17,7 +19,7 @@ describe('gunzip', function() {
1719
var inflated = inflator.decompress();
1820

1921
assert(inflated.length === plain.length);
20-
assert.deepEqual(inflated, plain);
22+
assertArray(inflated, plain);
2123
});
2224

2325
it("decompress pre-compressed data with filename", function() {
@@ -32,7 +34,7 @@ describe('gunzip', function() {
3234
var inflated = inflator.decompress();
3335

3436
assert(inflated.length === plain.length);
35-
assert.deepEqual(inflated, plain);
37+
assertArray(inflated, plain);
3638
assert((inflator.getMembers())[0].getName() === 'hoge.txt');
3739
});
3840
});

‎test/browser/gzip-test.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
describe("gzip", function() {
22
var size = 76543;
3+
var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined');
4+
5+
this.timeout(60000);
36

47
before(function() {
58
Zlib = {
@@ -18,7 +21,7 @@ describe("gzip", function() {
1821
var inflated = inflator.decompress();
1922

2023
assert(inflated.length === testData.length);
21-
assert.deepEqual(inflated, testData);
24+
assertArray(inflated, testData);
2225
});
2326

2427
it("compress with filename", function () {
@@ -40,12 +43,12 @@ describe("gzip", function() {
4043
var inflated = inflator.decompress();
4144

4245
assert(inflated.length === testData.length);
43-
assert.deepEqual(inflated, testData);
46+
assertArray(inflated, testData);
4447
assert((inflator.getMembers())[0].getName() === 'foobar.filename');
4548
});
4649

4750
it("compress with filename (seed: 1346432776267)", function () {
48-
var testData = makeRandomSequentialData(testData, 1346432776267);
51+
var testData = makeRandomSequentialData(size, USE_TYPEDARRAY, 1346432776267);
4952
var deflator = new Zlib.Gzip(
5053
testData,
5154
{
@@ -63,7 +66,7 @@ describe("gzip", function() {
6366
var inflated = inflator.decompress();
6467

6568
assert(inflated.length === testData.length);
66-
assert.deepEqual(inflated, testData);
69+
assertArray(inflated, testData);
6770
assert((inflator.getMembers())[0].getName() === 'foobar.filename');
6871
});
6972
});

‎test/browser/inflate-test.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ describe("Zlib.Inflate", function() {
2626
'/8//5//z//n//H/+P/+f/8//5//z//n//H/+P/+f/8//5//z//n//H/+P/+f/8//5//z' +
2727
'//n//H/+P/+f/8//5//z//n//H/+3+P/Ba1OJPE=';
2828

29+
this.timeout(60000);
30+
2931
before(function() {
3032
Zlib = ZlibOriginal;
3133
});
@@ -51,7 +53,7 @@ describe("Zlib.Inflate", function() {
5153
var inflated = inflator.decompress();
5254

5355
assert(inflated.length === size);
54-
assert.deepEqual(inflated, plain);
56+
assertArray(inflated, plain);
5557
});
5658

5759
it("pre-deflated data with inflate bufferSize option", function() {
@@ -76,7 +78,7 @@ describe("Zlib.Inflate", function() {
7678

7779
assert(inflated.length === size);
7880
assert(inflated.buffer.byteLength === 123456);
79-
assert.deepEqual(inflated, plain);
81+
assertArray(inflated, plain);
8082
});
8183

8284
it("pre-deflated data with inflate bufferType option", function() {
@@ -105,7 +107,7 @@ describe("Zlib.Inflate", function() {
105107

106108
assert(inflated.length === size);
107109
assert(inflated.buffer.byteLength === 123456);
108-
assert.deepEqual(inflated, plain);
110+
assertArray(inflated, plain);
109111
});
110112

111113
it("pre-deflated data with inflate resize option", function() {
@@ -134,7 +136,7 @@ describe("Zlib.Inflate", function() {
134136

135137
assert(inflated.length === size);
136138
assert(inflated.buffer.byteLength === 123456);
137-
assert.deepEqual(inflated, plain);
139+
assertArray(inflated, plain);
138140
});
139141

140142
it("issue#35 wrong inflate 1", function() {

‎test/browser/raw-inflate-test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
var size = 76543;
44
var testData;
55

6+
this.timeout(60000);
7+
68
before(function() {
79
Zlib = {
810
RawInflate: ZlibRawInflate.RawInflate,
@@ -64,7 +66,7 @@
6466
var compressed = new Zlib.RawDeflate(data).compress();
6567
var decompressed = new Zlib.RawInflate(compressed).decompress();
6668

67-
assert.deepEqual(data, Array.prototype.slice.call(decompressed));
69+
assertArray(data, Array.prototype.slice.call(decompressed));
6870
});
6971
});
7072
//});
@@ -90,5 +92,5 @@ function rawInflateTest(testData, compressionType, inflateOption) {
9092

9193
// assertion
9294
assert(inflate.length === testData.length);
93-
assert.deepEqual(inflate, testData);
95+
assertArray(inflate, testData);
9496
}

0 commit comments

Comments
 (0)