update to node v06 compatible deps

This commit is contained in:
Dane Springmeyer
2011-11-18 17:45:01 -08:00
parent fca703f63e
commit 970330575d
2 changed files with 9 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ var _ = require('underscore'),
fs = require('fs'),
Step = require('step'),
crypto = require('crypto'),
zlib = require('zlib'),
_zlib = require('_zlib'),
path = require('path'),
url = require('url'),
qs = require('querystring'),
@@ -216,7 +216,7 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
if (err) return callback(err);
try {
var grid = zlib.inflate(
var grid = _zlib.inflate(
!Buffer.isBuffer(row.grid)
? new Buffer(row.grid, 'binary')
: row.grid
@@ -227,7 +227,7 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
}, {});
var result = _(JSON.parse(grid)).extend({ data: data });
} catch (err) {
return callback(new Error('Grid is invalid'));
return callback(new Error('Grid is invalid:' + err.message));
}
callback(null, result);
@@ -565,7 +565,7 @@ MBTiles.prototype.putGrid = function(z, x, y, data, callback) {
var id = crypto.createHash('md5').update(json).digest('hex');
if (!this._gridCache[id]) {
// This corresponds to the grid_utfgrid table.
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8'));
this._gridCache[id] = _zlib.deflate(new Buffer(json, 'utf8'));
// This corresponds to the grid_key table.
this._keyCache[id] = Object.keys(data.data || {});

View File

@@ -30,11 +30,14 @@
],
"dependencies": {
"optimist": "0.2.x",
"sqlite3": "~2.0.17",
"sqlite3": "~2.1.1",
"step": "0.0.x",
"sphericalmercator": "1.0.x",
"underscore": "1.1.x",
"zlib": "1.0.x"
"zlib": "https://github.com/springmeyer/node-zlib/tarball/master"
},
"devDependencies": {
"expresso": "~0.9.0"
},
"engines": {
"node": ">= 0.4.0"