Skip to content

Commit

Permalink
Merge branch 'release/0.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuta Imaya committed Jul 6, 2017
2 parents 5132e07 + 9f365a1 commit 2701521
Show file tree
Hide file tree
Showing 23 changed files with 120 additions and 156 deletions.
25 changes: 11 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
dist: trusty
sudo: false

before_install:
- sudo apt-get install gconf2
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- ./.travis/scripts/install_chrome.sh

before_script:
- node_modules/.bin/buster-server &
- sleep 5
- .travis/firefox-start.sh http://localhost:1111/capture &
- sleep 5
- .travis/chrome-start.sh http://localhost:1111/capture &
- sleep 5
- phantomjs node_modules/buster/script/phantom.js http://localhost:1111/capture &
- sleep 5
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

script:
- "npm test"
- npm test

language: node_js

node_js:
- 0.8
- "8.0.0"

addons:
firefox: latest
chrome: stable
20 changes: 0 additions & 20 deletions .travis/chrome-start.sh

This file was deleted.

18 changes: 0 additions & 18 deletions .travis/firefox-start.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .travis/scripts/install_chrome.sh

This file was deleted.

16 changes: 16 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
# Change Log


## 0.3.1: 2017/07/07

https://github.com/imaya/zlib.js/compare/0.3.0...0.3.1

### etc

- Distribution files reduction in npm package
- code cleanup


-------------------------------------------------------------------------------


## 0.3.0: 2017/06/01

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


-------------------------------------------------------------------------------


## 0.1.9, 0.2.0: 2014/02/21

https://github.com/imaya/zlib.js/compare/0.1.8...0.2.0
Expand Down
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ $ grunt [target]
#### Build target

target | generate file | implementation
---------------|-----------------------|-------------in
---------------|-----------------------|-------------
deps | deps.js | (dependency: deps.js)
deflate | deflate.min.js | ZLIB Deflate
inflate | inflate.min.js | ZLIB Inflate
Expand Down
2 changes: 1 addition & 1 deletion bin/unzip.dev.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/zip.dev.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/zlib.pretty.dev.js

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ module.exports = function(config) {


// test files
/*
'test/browser/code-path-test.js',
'test/browser/raw-inflate-test.js',
'test/browser/inflate-test.js'
*/
'test/browser/*-test.js'
//'test/browser/main.js'
],


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

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
browsers: ['Chrome', 'Firefox'],


// Continuous Integration mode
Expand Down
25 changes: 17 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
},
"name": "zlibjs",
"description": "zlib, gzip and zip implementation in JavaScript",
"version": "0.3.0",
"version": "0.3.1",
"license": "MIT",
"main": "./bin/node-zlib.js",
"homepage": "https://github.com/imaya/zlib.js",
"repository": {
"type": "git",
"url": "git://github.com/imaya/zlib.js.git"
},
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"babel-preset-env": "^1.5.1",
"babel-preset-power-assert": "^1.0.0",
Expand All @@ -23,15 +22,25 @@
"grunt-closure-tools": "^0.9.9",
"grunt-contrib-concat": "^1.0.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-espower-preprocessor": "^1.1.0",
"karma-mocha": "^1.2.0",
"karma-mocha-reporter": "^2.2.0",
"karma-power-assert": "0.0.4",
"karma-firefox-launcher": "^1.0.1",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-power-assert": "^1.0.0",
"karma-sinon": "^1.0.5",
"mocha": "^3.1.0",
"power-assert": "^1.4.1"
"power-assert": "^1.4.4",
"sinon": "^2.3.2"
},
"files": [
"README.md",
"README.en.md",
"ChangeLog.md",
"LICENSE",
"bin",
"package.json"
],
"optionalDependencies": {},
"engines": {
"node": "*"
Expand Down
6 changes: 3 additions & 3 deletions test/browser/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function compressionAndDecompressionTest(testData, compressionType) {

// assertion
assert(inflate.length, testData.length);
assert.deepEqual(inflate, testData);
assertArray(inflate, testData);
}

// inflate test
Expand Down Expand Up @@ -46,12 +46,12 @@ function compressionAndDecompressionByStreamTest(testData, compressionType) {

// assertion
assert(inflate.length === testData.length);
assert.deepEqual(inflate, testData);
assertArray(inflate, testData);
}

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

assert(inflated.length === plain.length);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
}
4 changes: 3 additions & 1 deletion test/browser/code-path-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ describe("code path", function () {
var fixed;
var dynamic;

this.timeout(60000);

before(function() {
Zlib = ZlibPretty;
});
Expand All @@ -25,7 +27,7 @@ describe("code path", function () {
var compressed = new ZlibPretty.Deflate(data).compress();
var decompressed = new ZlibPretty.Inflate(compressed).decompress();

assert.deepEqual(data, Array.prototype.slice.call(decompressed));
assertArray(data, Array.prototype.slice.call(decompressed));
});

it("uncompressed random data", function () {
Expand Down
6 changes: 4 additions & 2 deletions test/browser/gunzip-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
describe('gunzip', function() {
this.timeout(60000);

before(function() {
Zlib = {
Gzip: ZlibGzip.Gzip,
Expand All @@ -17,7 +19,7 @@ describe('gunzip', function() {
var inflated = inflator.decompress();

assert(inflated.length === plain.length);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
});

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

assert(inflated.length === plain.length);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
assert((inflator.getMembers())[0].getName() === 'hoge.txt');
});
});
Expand Down
11 changes: 7 additions & 4 deletions test/browser/gzip-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
describe("gzip", function() {
var size = 76543;
var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined');

this.timeout(60000);

before(function() {
Zlib = {
Expand All @@ -18,7 +21,7 @@ describe("gzip", function() {
var inflated = inflator.decompress();

assert(inflated.length === testData.length);
assert.deepEqual(inflated, testData);
assertArray(inflated, testData);
});

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

assert(inflated.length === testData.length);
assert.deepEqual(inflated, testData);
assertArray(inflated, testData);
assert((inflator.getMembers())[0].getName() === 'foobar.filename');
});

it("compress with filename (seed: 1346432776267)", function () {
var testData = makeRandomSequentialData(testData, 1346432776267);
var testData = makeRandomSequentialData(size, USE_TYPEDARRAY, 1346432776267);
var deflator = new Zlib.Gzip(
testData,
{
Expand All @@ -63,7 +66,7 @@ describe("gzip", function() {
var inflated = inflator.decompress();

assert(inflated.length === testData.length);
assert.deepEqual(inflated, testData);
assertArray(inflated, testData);
assert((inflator.getMembers())[0].getName() === 'foobar.filename');
});
});
10 changes: 6 additions & 4 deletions test/browser/inflate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ describe("Zlib.Inflate", function() {
'/8//5//z//n//H/+P/+f/8//5//z//n//H/+P/+f/8//5//z//n//H/+P/+f/8//5//z' +
'//n//H/+P/+f/8//5//z//n//H/+3+P/Ba1OJPE=';

this.timeout(60000);

before(function() {
Zlib = ZlibOriginal;
});
Expand All @@ -51,7 +53,7 @@ describe("Zlib.Inflate", function() {
var inflated = inflator.decompress();

assert(inflated.length === size);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
});

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

assert(inflated.length === size);
assert(inflated.buffer.byteLength === 123456);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
});

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

assert(inflated.length === size);
assert(inflated.buffer.byteLength === 123456);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
});

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

assert(inflated.length === size);
assert(inflated.buffer.byteLength === 123456);
assert.deepEqual(inflated, plain);
assertArray(inflated, plain);
});

it("issue#35 wrong inflate 1", function() {
Expand Down
6 changes: 4 additions & 2 deletions test/browser/raw-inflate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var size = 76543;
var testData;

this.timeout(60000);

before(function() {
Zlib = {
RawInflate: ZlibRawInflate.RawInflate,
Expand Down Expand Up @@ -64,7 +66,7 @@
var compressed = new Zlib.RawDeflate(data).compress();
var decompressed = new Zlib.RawInflate(compressed).decompress();

assert.deepEqual(data, Array.prototype.slice.call(decompressed));
assertArray(data, Array.prototype.slice.call(decompressed));
});
});
//});
Expand All @@ -90,5 +92,5 @@ function rawInflateTest(testData, compressionType, inflateOption) {

// assertion
assert(inflate.length === testData.length);
assert.deepEqual(inflate, testData);
assertArray(inflate, testData);
}
Loading

0 comments on commit 2701521

Please sign in to comment.