nodejs-readable-stream and nodejs-string_decoder

Jamie Nguyen j at jamielinux.com
Mon Mar 31 16:26:10 UTC 2014


On 31/03/14 01:38, T.C. Hollingsworth wrote:
> For readable-stream, it's a bit trickier.  The old module split the
> different classes into seperate files.  The core module makes all the
> classes available in one file.  Additionaly the core module is called
> "stream", not "readable-stream".
> 
> If you're lucky (as I was with nodejs-lazystream for the most part),
> upstream will only use the module as a fallback, e.g.:
> 
> var readable = require('stream').Readable || require('readable-stream/readable')
> 
> In this case, you ought to be able to just '%nodejs_fixdep -r
> readable-stream' and things will just work.  If you're not so lucky,
> you will need to patch require() calls thusly:
> 
> - var readable = require('readable-stream/readable')
> + var readable = require('stream').Readable
> 
> and/or
> 
> - var writable = require('readable-stream/writable')
> + var writable = require('stream').Writable
> 
> and lather, rinse, repeat for any other classes.  Don't forget to
> '%nodejs_fixdep -r readable-stream' here also.

Just wanted to note that npm(readable-stream) comes in:
 - a 1.0.x branch which is the 'stream' module from Node 0.10 core
 - a 1.1.x branch which is the 'stream' module from Node 0.11 core

There are three modules so far that I've packaged that depend on
readable stream 1.1.x. Fortunately, IIRC all tests still passed after
patching them to use the 'stream' module from Node 0.10 core. I imagine
patching in this way might cause problems for some modules though?



Kind regards,

-- 
Jamie Nguyen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/nodejs/attachments/20140331/a39bf68c/attachment.sig>


More information about the nodejs mailing list