Skip to content

Commit 95e893b

Browse files
Merge pull request browserify#18 from ipfs/master
Upgrade to the latest
2 parents 49bcb75 + a15d5ca commit 95e893b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1768
-931
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
node_modules/
1+
node_modules
22
.DS_Store
3+
4+
*.log
5+
6+
test/tmp
7+
lib

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
.DS_Store
3+
4+
*.log
5+
6+
test/tmp
7+
test

.travis.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
sudo: false
12
language: node_js
23
node_js:
3-
- "0.10"
4+
- 6
5+
- 8
6+
7+
before_install:
8+
- "export DISPLAY=:99.0"
9+
- "sh -e /etc/init.d/xvfb start"
10+
11+
addons:
12+
firefox: "latest"
13+
14+
script:
15+
- npm run lint
16+
- npm test

LICENSE

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,52 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22+
23+
This project contains parts of Node.js.
24+
Node.js is licensed for use as follows:
25+
26+
"""
27+
Copyright Node.js contributors. All rights reserved.
28+
29+
Permission is hereby granted, free of charge, to any person obtaining a copy
30+
of this software and associated documentation files (the "Software"), to
31+
deal in the Software without restriction, including without limitation the
32+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
33+
sell copies of the Software, and to permit persons to whom the Software is
34+
furnished to do so, subject to the following conditions:
35+
36+
The above copyright notice and this permission notice shall be included in
37+
all copies or substantial portions of the Software.
38+
39+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
45+
IN THE SOFTWARE.
46+
"""
47+
48+
This license applies to parts of Node.js originating from the
49+
https://github.com/joyent/node repository:
50+
51+
"""
52+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
53+
Permission is hereby granted, free of charge, to any person obtaining a copy
54+
of this software and associated documentation files (the "Software"), to
55+
deal in the Software without restriction, including without limitation the
56+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
57+
sell copies of the Software, and to permit persons to whom the Software is
58+
furnished to do so, subject to the following conditions:
59+
60+
The above copyright notice and this permission notice shall be included in
61+
all copies or substantial portions of the Software.
62+
63+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
64+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
66+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
67+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
68+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
69+
IN THE SOFTWARE.
70+
"""

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
# browserify-zlib
22

3-
Emulates Node's [zlib](http://nodejs.org/api/zlib.html) module for [Browserify](http://browserify.org)
4-
using [pako](https://github.com/nodeca/pako). It uses the actual Node source code and passes the Node zlib tests
5-
by emulating the C++ binding that actually calls zlib.
3+
[![Travis CI](https://travis-ci.org/devongovett/browserify-zlib.svg?branch=master)](https://travis-ci.org/devongovett/browserify-zlib)
4+
[![Dependency Status](https://david-dm.org/devongovett/browserify-zlib.svg?style=flat-square)](https://david-dm.org/devongovett/browserify-zlib) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
65

7-
[![browser support](https://ci.testling.com/devongovett/browserify-zlib.png)
8-
](https://ci.testling.com/devongovett/browserify-zlib)
6+
## Description
97

10-
[![node tests](https://travis-ci.org/devongovett/browserify-zlib.svg)
11-
](https://travis-ci.org/devongovett/browserify-zlib)
8+
Emulates Node's [zlib](https://nodejs.org/api/zlib.html) module for the browser. Can be used as a drop in replacement with [Browserify](http://browserify.org) and [webpack](http://webpack.github.io/).
9+
10+
The heavy lifting is done using [pako](https://github.com/nodeca/pako). The code in this module is modeled closely after the code in the source of Node core to get as much compatability as possible.
11+
12+
## API
13+
14+
https://nodejs.org/api/zlib.html
1215

1316
## Not implemented
1417

1518
The following options/methods are not supported because pako does not support them yet.
1619

1720
* The `params` method
18-
* The `dictionary` option
1921

2022
## License
2123

karma.conf.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = function (karma) {
2+
karma.set({
3+
frameworks: ['mocha'],
4+
files: ['test/tmp/browserified.js'],
5+
reporters: ['mocha-own'],
6+
mochaOwnReporter: {
7+
reporter: 'spec'
8+
},
9+
browsers: process.env.TRAVIS ? ['Firefox', 'PhantomJS'] : ['Chrome', 'PhantomJS']
10+
})
11+
}

package.json

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,64 @@
11
{
22
"name": "browserify-zlib",
33
"version": "0.1.4",
4-
"description": "Full zlib module for browserify",
5-
"keywords": ["zlib", "browserify"],
6-
"main": "index.js",
4+
"description": "Full zlib module for the browser",
5+
"keywords": [
6+
"zlib",
7+
"browserify"
8+
],
9+
"main": "lib/index.js",
710
"directories": {
811
"test": "test"
912
},
1013
"dependencies": {
11-
"pako": "~0.2.0"
14+
"pako": "~1.0.5"
1215
},
1316
"devDependencies": {
14-
"tape": "^2.12.3",
15-
"brfs": "^1.0.1"
16-
},
17-
"testling": {
18-
"files": "test/*.js",
19-
"browsers": [
20-
"ie/6..latest",
21-
"chrome/22..latest",
22-
"firefox/16..latest",
23-
"safari/latest",
24-
"opera/11.0..latest",
25-
"iphone/6",
26-
"ipad/6",
27-
"android-browser/latest"
28-
]
17+
"assert": "^1.4.1",
18+
"babel-cli": "^6.24.1",
19+
"babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
20+
"babel-plugin-transform-es2015-block-scoping": "^6.24.1",
21+
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
22+
"babelify": "^7.3.0",
23+
"brfs": "^1.4.3",
24+
"browserify": "^14.4.0",
25+
"exec-glob": "^1.2.2",
26+
"glob": "^7.1.2",
27+
"karma": "^1.7.0",
28+
"karma-chrome-launcher": "^2.1.1",
29+
"karma-firefox-launcher": "^1.0.1",
30+
"karma-mocha": "^1.3.0",
31+
"karma-mocha-own-reporter": "^1.1.2",
32+
"karma-phantomjs-launcher": "^1.0.4",
33+
"mocha": "^3.4.2",
34+
"phantomjs-prebuilt": "^2.1.14",
35+
"standard": "^10.0.2",
36+
"watchify": "^3.9.0"
2937
},
3038
"scripts": {
31-
"test": "node_modules/tape/bin/tape test/*.js"
39+
"build": "babel src --out-dir lib",
40+
"lint": "standard \"*.js\" \"!(node_modules|lib)/!(*test-zlib*|index).js\"",
41+
"pretest": "npm run build",
42+
"test": "npm run test:node && npm run test:browser",
43+
"test:node": "node node_modules/exec-glob node \"test/test-*\"",
44+
"pretest:browser": "node test/build",
45+
"test:browser": "karma start --single-run=true karma.conf.js"
46+
},
47+
"babel": {
48+
"plugins": [
49+
"transform-es2015-arrow-functions",
50+
"transform-es2015-block-scoping",
51+
"transform-es2015-template-literals"
52+
]
3253
},
33-
"main": "src/index.js",
3454
"author": "Devon Govett <[email protected]>",
55+
"homepage": "https://github.com/devongovett/browserify-zlib",
3556
"license": "MIT",
3657
"repository": {
3758
"type": "git",
38-
"url": "git://github.com/devongovett/browserify-zlib.git"
59+
"url": "git+https://github.com/devongovett/browserify-zlib.git"
60+
},
61+
"bugs": {
62+
"url": "https://github.com/devongovett/browserify-zlib/issues"
3963
}
4064
}

0 commit comments

Comments
 (0)