substack/node-browserify — pull request #581 by rvagg (2013-12-30 12:31:59+00:00)
Title: add 'readable-stream' builtin

I'm using, and also advocating, the use of `require('readable-stream')` and avoiding `require('stream')` completely because of the instability across Node versions compared to the stability of being able to pin to a specific version of readable-stream. For instance Streams3 in 0.11 introduces yet more edge cases that pop up when you're looking for `require('stream')` by default. User-land modules FTW; I just need to get readable-stream updated regularly on schedule with stable and unstable Node releases.

This PR makes `'readable-stream'` a synonym for `'stream'` so that browserify uses stream-browserify instead of readable-stream in all cases. This covers `require('readable-stream').Readable` and `require('readable-stream/readable')` variants.

Tests verify that both require variants actually work, that a `Readable` implementation actually works properly and that readable-stream is never included in a built but stream-browserify is.