tomas/needle — Issue #1: Incompatible with node 0.4.x
Author: tvishwanadha
Created: 2012-01-17 05:58:19+00:00
State: open

Love the simplicity of needle, but it looks like needle doesn't really support 0.4.x. Since I'm hosting on heroku, I'm stuck with node 0.4.7.

The main issues are:

* [commit 36c797f1](https://github.com/tomas/needle/commit/36c797f105c5e53c70eedd7951c3b2eedf3d047a) requires a json file. [node 0.4.12] (http://nodejs.org/docs/v0.4.12/api/modules.html) can only import js files as modules. JSON import came with [node 0.6.x] (http://nodejs.org/docs/v0.6.0/api/modules.html). Not sure how to fix this short of just harcoding the version number and bumping it with each release.

* [commit d12105dd](https://github.com/tomas/needle/commit/d12105ddf3830da0a13fae86cd3d506cd36252b3) depends on the zlib module, which was also added in node 0.6.0. node-zlib exists and conflicts with the new 0.6.x module, but a better option might try/catching zlib and just saying zlib is only supported for 0.6.x.

* [commit 8642c3de](https://github.com/tomas/needle/commit/8642c3de7d4fa697f443fb0e14f314fd484ec2e0) doesn't quite fix paths for older node, since it drops the query string. As shown in the [0.6.x docs](http://nodejs.org/docs/v0.6.0/api/url.html), path = pathname + search

I'll fork and submit a pull request for the latter two, but I'm not sure about the best course of action to fix the first issue.