Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Node.js v8 (#5) #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- "8"
- "6"
- "4"
- "0.10"
Binary file modified data/geoip-country.dat
Binary file not shown.
Binary file modified data/geoip-country6.dat
Binary file not shown.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geoip-ultralight",
"version": "0.1.5",
"version": "0.1.6",
"description": "Super lightweight GeoIP implementation with country data",
"keywords": [
"geo",
Expand Down Expand Up @@ -34,12 +34,12 @@
"updatedb-debug": "node scripts/updatedb.js debug"
},
"dependencies": {
"async": "~0.1.22",
"colors": "0.6.0-1",
"iconv-lite": "~0.2.11",
"async": "~2.5.0",
"colors": "1.1.2",
"iconv-lite": "~0.4.18",
"lazy": "~1.0.11",
"rimraf": "~2.0.2",
"unzip": "~0.0.4"
"rimraf": "~2.6.1",
"unzipper": "~0.8.9"
},
"config": {
"update": true
Expand Down
6 changes: 3 additions & 3 deletions scripts/updatedb.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var colors = require('colors');
var iconv = require('iconv-lite');
var lazy = require('lazy');
var rimraf = require('rimraf').sync;
var unzip = require('unzip');
var unzipper = require('unzipper');
var utils = require('../lib/utils');

var dataPath = path.join(__dirname, '..', 'data');
Expand Down Expand Up @@ -144,13 +144,13 @@ function extract(tmpFile, tmpFileName, cb) {
} else {
process.stdout.write('Extracting ' + tmpFileName + ' ...');

var unzipStream = unzip.Extract({
var unzipStream = unzipper.Extract({
path: path.dirname(tmpFile)
});

var pipeSteam = fs.createReadStream(tmpFile).pipe(unzipStream);

pipeSteam.on('end', function() {
pipeSteam.on('close', function() {
console.log(' DONE'.green);

cb();
Expand Down