-
-
Notifications
You must be signed in to change notification settings - Fork 236
Merge io stream back in #135
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
Changes from all commits
037632d
b62c123
a477a21
d0d888f
db08732
29bdc24
b5ba0c4
966c1b0
fdfea14
10329d5
13e27b1
6899c04
15092fa
2ad65d0
39f1ab9
53ff397
487cec8
a9e114c
1c158a7
91173c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| language: node_js | ||
| node_js: | ||
| - "0.8" | ||
| - "0.10" | ||
| - "0.11" | ||
| - "0.12" | ||
| - "iojs" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,28 +98,69 @@ const headRegexp = /(^module.exports = \w+;?)/m | |
| + 'if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {\n' | ||
| + ' return emitter.listeners(type).length;\n' | ||
| + '};\n/*</replacement>*/\n' | ||
| ] | ||
|
|
||
| , constReplacement = [ | ||
| /const/g | ||
| , 'var' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this replaces all the uses of const with var for compatibility reasons |
||
| ] | ||
|
|
||
| , bufferIsEncodingReplacement = [ | ||
| /Buffer.isEncoding\((\w+)\)/ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. replaces a single instance of Buffer.isEncoding with a manual check due to older versions of node not having the method |
||
| , '([\'hex\', \'utf8\', \'utf-8\', \'ascii\', \'binary\', \'base64\',\n' | ||
| + '\'ucs2\', \'ucs-2\',\'utf16le\', \'utf-16le\', \'raw\']\n' | ||
| + '.indexOf(($1 + \'\').toLowerCase()) > -1)' | ||
| ] | ||
|
|
||
| , requireStreamReplacement = [ | ||
| /var Stream = require\('stream'\);/ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great pains are made to make sure In other words since you can't |
||
| , '\n\n/*<replacement>*/\n' | ||
| + 'var Stream;\n (function (){try{\n' | ||
| + 'Stream = require(\'st\' + \'ream\');\n' | ||
| + '}catch(_){Stream = require(\'events\').EventEmitter;}}())' | ||
| + '\n/*</replacement>*/\n' | ||
| ] | ||
|
|
||
| , isBufferReplacement = [ | ||
| /(\w+) instanceof Buffer/ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. buffer instanceof Buffer doesn't work in the browser, so replaced with Buffer.isBuffer |
||
| , 'Buffer.isBuffer($1)' | ||
| ] | ||
|
|
||
| , processNextTickImport = [ | ||
| headRegexp | ||
| , '$1\n\n/*<replacement>*/\nvar processNextTick = require(\'process-nextick-args\');\n/*</replacement>*/\n' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these next 2 changes deal with process.nextTick which was updated to accept arguments |
||
| ] | ||
|
|
||
| , processNextTickReplacement = [ | ||
| /process.nextTick\(/g | ||
| , 'processNextTick(' | ||
| ] | ||
|
|
||
| module.exports['_stream_duplex.js'] = [ | ||
| requireReplacement | ||
| constReplacement | ||
| , requireReplacement | ||
| , instanceofReplacement | ||
| , utilReplacement | ||
| , stringDecoderReplacement | ||
| , altForEachImplReplacement | ||
| , altForEachUseReplacement | ||
| , objectKeysReplacement | ||
| , objectKeysDefine | ||
| , processNextTickImport | ||
| , processNextTickReplacement | ||
| ] | ||
|
|
||
| module.exports['_stream_passthrough.js'] = [ | ||
| requireReplacement | ||
| constReplacement | ||
| , requireReplacement | ||
| , instanceofReplacement | ||
| , utilReplacement | ||
| , stringDecoderReplacement | ||
| ] | ||
|
|
||
| module.exports['_stream_readable.js'] = [ | ||
| addDuplexRequire | ||
| constReplacement | ||
| , addDuplexRequire | ||
| , requireReplacement | ||
| , instanceofReplacement | ||
| , bufferReplacement | ||
|
|
@@ -134,20 +175,25 @@ module.exports['_stream_readable.js'] = [ | |
| , debugLogReplacement | ||
| , utilReplacement | ||
| , stringDecoderReplacement | ||
| , debugLogReplacement | ||
| , eventEmittterReplacement | ||
| , requireStreamReplacement | ||
| , isBufferReplacement | ||
| , processNextTickImport | ||
| , processNextTickReplacement | ||
|
|
||
| ] | ||
|
|
||
| module.exports['_stream_transform.js'] = [ | ||
| requireReplacement | ||
| constReplacement | ||
| , requireReplacement | ||
| , instanceofReplacement | ||
| , utilReplacement | ||
| , stringDecoderReplacement | ||
| ] | ||
|
|
||
| module.exports['_stream_writable.js'] = [ | ||
| addDuplexRequire | ||
| constReplacement | ||
| , addDuplexRequire | ||
| , requireReplacement | ||
| , instanceofReplacement | ||
| , bufferReplacement | ||
|
|
@@ -156,5 +202,10 @@ module.exports['_stream_writable.js'] = [ | |
| , debugLogReplacement | ||
| , deprecateReplacement | ||
| , objectDefinePropertyReplacement | ||
| , bufferIsEncodingReplacement | ||
| , [ /^var assert = require\('assert'\);$/m, '' ] | ||
| , requireStreamReplacement | ||
| , isBufferReplacement | ||
| , processNextTickImport | ||
| , processNextTickReplacement | ||
| ] | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dcousens the changes to this file is the meat of the update, most of the other changes are consequences of this