Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
993c0db
test: make sure test function resolves in test-worker-debug
addaleax Jun 10, 2019
e517b03
process: hide NodeEnvironmentFlagsSet's `add` function
BridgeAR Jun 13, 2019
d0de204
http2: refactor ping + settings object lifetime management
addaleax Jun 10, 2019
2cf37f5
Revert "build: remove mips support"
mutao-loongson May 30, 2019
cfb5ca3
build: enable openssl support for mips64el
mutao-loongson May 31, 2019
17efd93
doc: remove instructions to post CI links
Trott Jun 16, 2019
990feaf
crypto: fix crash when calling digest after piping
tniessen Jun 16, 2019
d949ead
test: check custom inspection truncation in assert
Trott Jun 14, 2019
168c127
doc: tidy AssertionError text
Trott Jun 16, 2019
040b9db
src: save exec path when initializing Environment
joyeecheung Jun 16, 2019
c491e4d
src: fall back to env->exec_path() for default profile directory
joyeecheung Jun 16, 2019
d95d610
meta: update LICENSE
Trott Jun 17, 2019
3a2e67b
test: do not spawn rmdir in test-statwatcher
joaocgreis Jun 18, 2019
b6a7052
lib: refactor unhandled rejection deprecation warning emission
joyeecheung Jun 17, 2019
5b92eb4
src: refactor uncaught exception handling
joyeecheung Jun 15, 2019
72f52a3
test: add Worker + uncaughtException + process.exit() test
addaleax Jun 17, 2019
359e20f
doc: clarify when http emits aborted event
ronag Jun 17, 2019
424d91a
test: add logging to statwatcher test
Trott Jun 17, 2019
dd53e6a
tools: update babel-eslint to 10.0.2
ZYSzys Jun 17, 2019
c44db7f
test: fix flaky test-worker-debug
addaleax Jun 19, 2019
0856a4d
doc: add gengjiawen to collaborators
gengjiawen Jun 20, 2019
c14e4d5
test: use .code for error in setgid
Jun 14, 2019
2053dd0
worker: only unref port for stdin if we ref’ed it before
addaleax Jun 10, 2019
337aef0
test: normalize location test-worker-process-cwd.js runs tests
ssample812 Jun 17, 2019
db65594
benchmark: refactor buffer benchmarks
BridgeAR Mar 4, 2019
c4a357d
report: add report versioning
cjihrig Jun 7, 2019
1f2b8c8
doc: revise strict mode text in assert
Trott Jun 19, 2019
57ac661
doc: document PerformanceNodeTiming.environment field
Jun 18, 2019
0044fd2
src: add error codes to errors thrown in node_i18n.cc
yanivfriedensohn Jun 14, 2019
4d12cef
build: link libatomic on mac and linux
devsnek Jun 14, 2019
53297e6
n-api: make func argument of napi_create_threadsafe_function optional
legendecas May 21, 2019
8346596
test: permit test-graph.signal to work without test runner
Trott Jun 19, 2019
b448db3
test: remove test-ttywrap.writestream.js
Trott Jun 20, 2019
51742b8
doc: revise assert legacy mode text
Trott Jun 20, 2019
6063ceb
doc: format ECMA-262 with a hyphen
cjihrig Jun 20, 2019
632fc1f
doc: make multipleResolves docs less opinionated
cjihrig Jun 20, 2019
dd5e07f
child_process: attach child in promisification
cjihrig Jun 20, 2019
a213eb7
doc: remove obsolete external link
cjihrig Jun 20, 2019
c9226f5
doc: drop 'Note that' in addons docs
cjihrig Jun 20, 2019
64f8530
doc: fix typo in process.disconnect() docs
cjihrig Jun 20, 2019
e607055
bootstrap: --frozen-intrinsics override problem workaround
guybedford Jun 16, 2019
3d6ae65
doc: remote "note that" from BUILDING.md
Trott Jun 20, 2019
71cf558
doc: remove "note that" from CPP_STYLE_GUIDE.md
Trott Jun 20, 2019
79f23b5
doc: remove "note that" from releases.md
Trott Jun 20, 2019
3daced7
doc: remove "make that" from onboarding.md
Trott Jun 20, 2019
1591309
doc: remove "note that" from writing-tests.md
Trott Jun 20, 2019
ffba80b
doc: remove "note that" from writing-and-running-benchmarks.md
Trott Jun 20, 2019
9461ef8
doc: remove "note that" from using-symbols.md
Trott Jun 20, 2019
a67afc8
doc: remove "note that" from maintaining-the-build-files.md
Trott Jun 20, 2019
9ac3a55
doc: remove "note that" from maintaining-V8.md
Trott Jun 20, 2019
651ab3f
doc: remove "note that" from pull-requests.md
Trott Jun 20, 2019
6d94620
doc: remove "note that" from zlib.md
Trott Jun 20, 2019
c3c86b6
doc: remove "note that" from util.md
Trott Jun 20, 2019
5e979bf
doc: remove "note that" from url.md
Trott Jun 20, 2019
204c9d8
doc: remove "note that" from tty.md
Trott Jun 20, 2019
7bd2cae
doc: remove "note that" from tls.md
Trott Jun 20, 2019
eba2e3c
doc: remove "note that" from stream.md
Trott Jun 20, 2019
b0a6da7
doc: remove "note that" from process.md
Trott Jun 20, 2019
f299c44
doc: remove "note that" from net.md
Trott Jun 20, 2019
f4c6f7a
doc: remove "note that" from modules.md
Trott Jun 20, 2019
f0a857f
doc: remove "note that" from http2.md
Trott Jun 20, 2019
3174bc1
doc: remove "note that" from http.md
Trott Jun 20, 2019
d65c90b
doc: remove "note that" from fs.md
Trott Jun 20, 2019
520ef83
doc: remove "note that" from events.md
Trott Jun 20, 2019
7595486
doc: remove "note that" from errors.md
Trott Jun 20, 2019
f3b4449
doc: remove "note that" from domain.md
Trott Jun 20, 2019
33d9cf5
doc: remove "note that" from dns.md
Trott Jun 20, 2019
c41dbf5
doc: remove "note that" from dgram.md
Trott Jun 20, 2019
898b69c
doc: remove "note that" from crypto.md
Trott Jun 20, 2019
af05ad1
doc: remove "note that" from console.md
Trott Jun 20, 2019
cb89b3b
doc: remove "note that" from cluster.md
Trott Jun 20, 2019
658c758
doc: remove "note that" from cli.md
Trott Jun 20, 2019
9ca7c86
doc: remove "note that" from buffer.md
Trott Jun 20, 2019
d384911
doc: remove "note that" from async_hooks.md
Trott Jun 20, 2019
d759e0f
doc: remove "note that" from assert.md
Trott Jun 20, 2019
ed8cee6
n-api: add error message for date expected
Jun 19, 2019
def96ae
crypto: move _scrypt call out of handleError funct
danbev Jun 20, 2019
47b230a
crypto: move _randomBytes call out of handleError funct
danbev Jun 20, 2019
558e9cf
crypto: move _pbkdf2 call out of handleError funct
danbev Jun 20, 2019
f21ddb2
crypto: move _impl call out of handleError funct
danbev Jun 20, 2019
5047006
test: use regex for OpenSSL function name
danbev Jun 19, 2019
818f084
doc: add example code for fs.existsSync()
nicolasrestrepo Jun 21, 2019
4762399
doc: add example for Buffer.isEncoding()
Meyito Jun 21, 2019
d25d40e
doc: fix sentence about Http2Stream destruction
cjihrig Jun 21, 2019
758a003
test: fix assertion argument order in test-buffer-failed-alloc-type
RamirezAlex Jun 21, 2019
0e6196c
doc: add missing word in frameError event docs
cjihrig Jun 22, 2019
91d5a4d
doc,n-api: fix metadata for napi_create_threadsafe_function
richardlau Jun 24, 2019
16926a8
test: duplicated buffer in test-stream2-writable.js
duvanmonsa Jun 22, 2019
e161744
test: move non-pummel crypto DH tests to parallel
Trott Jun 22, 2019
9f508e3
test: split pummel crypto dh test into two separate tests
Trott Jun 22, 2019
69f17f1
test: make test-dh-regr more efficient where possible
Trott Jun 22, 2019
b6d0cbc
doc: add example code for worker.isDead() to cluster.md
jessecogollo Jun 21, 2019
3d693c5
doc: cleanup pendingSettingsAck docs
cjihrig Jun 22, 2019
e3dd4d5
doc: fix nits regarding stream utilities
vsemozhetbyt Jun 22, 2019
4973f21
test: fix order of assertion arguments in test-event-emitter-num-args
luisgallon Jun 21, 2019
e6c7ebe
vm: increase code coverage of source_text_module.js
kball Jun 21, 2019
4bca4a5
test: change order of arguments
MistyBlunch Jun 21, 2019
ecf4494
test: tls switch arguments order for the assertion
ltciro Jun 21, 2019
3bc62b9
test: switch assertion order
yomarguti Jun 21, 2019
e55d0ef
doc: remove N-API version for Experimental APIs
mhdawson Jun 20, 2019
1650bcf
stream: add writableFinished
zero1five Jun 1, 2019
d8942f8
http2: use writableFinished instead of _writableState
zero1five Jun 2, 2019
619eb93
tools: fix typo in cache_builder.cc
danbev Jun 25, 2019
5367d02
doc: replace version with REPLACEME
cjihrig Jun 26, 2019
b822545
test: switch the param order in the assertion
raveneyex Jun 21, 2019
e63990e
test: eliminate duplicate statements
khriztianmoreno Jun 21, 2019
d88c697
test: refactoring test, reordering arguments
d4vsanchez Jun 21, 2019
cd78c5e
test: fixing broken test
MelinaMejia95 Jun 21, 2019
8ad880f
net: replace _writableState.finished with writableFinished
Trott Jun 25, 2019
03e3ccd
tools: update remark-preset-lint-node to 1.7.0
Trott Jun 23, 2019
3c047b3
doc: clarify response.finished
ronag Jun 24, 2019
b744bd9
tools: update eslint
BridgeAR Jun 11, 2019
0fd6524
process: split routines used to enhance fatal exception stack traces
joyeecheung Jun 19, 2019
96e8b98
doc: clean up isDead() example
cjihrig Jun 25, 2019
0d2d116
doc: add links to 12.5.0 changelog notable changes
devsnek Jun 27, 2019
3fea2e4
doc: update readline asyncIterator docs
cjihrig Jun 25, 2019
14f6cee
doc: reformat for-await-of
cjihrig Jun 27, 2019
79b1bf5
test: use assert() in N-API async test
addaleax Jun 25, 2019
60cf911
tools: fix typo in js2c.py
danbev Jun 25, 2019
3d014e1
tools: remove out-of-date code-cache-path comment
danbev Jun 25, 2019
21d2bdd
tools: remove unused using declarations
danbev Jun 25, 2019
dce4947
test: do not use fixed port in async-hooks/test-httparser-reuse
addaleax Jun 20, 2019
d8d4f9b
http2: propagate session destroy code to streams
cjihrig Jun 26, 2019
82b80e0
test: reset validity dates of expired certs
sam-github Jun 28, 2019
4367732
deps: upgrade to libuv 1.30.0
cjihrig Jun 27, 2019
b808484
tools: change editorconfig's 'ignore' to 'unset'
silverwind Jun 26, 2019
c9a96ae
esm: ensure cwd-relative imports for module --eval
guybedford Jun 22, 2019
624fd17
src: fix small memory leak
devnexen Jun 27, 2019
19f9281
process: expose uv_rusage on process.resourcesUsage()
vmarchaud Jun 2, 2019
0111c61
doc: fix swapedOut typo
cjihrig Jul 1, 2019
fd4d1e2
http2: remove square brackets from parsed hostname
lpinca Jun 24, 2019
004d26d
test: add tests to assert.ok and improve coverage
estrada9166 Jun 21, 2019
937afcc
test: add test to doesNotThrow; validate if actual with regex
estrada9166 Jun 24, 2019
5f9ee9f
lib: fix stack overflow check to not break on primitives
kball Jun 21, 2019
035b613
src: don't abort on EIO when restoring tty
bnoordhuis Jul 1, 2019
eee66c5
doc: merge bootstrap/README.md into BUILDING.md
rvagg Jun 28, 2019
d38b985
tools: fix v8 testing with devtoolset on ppcle
sam-github Jun 27, 2019
40ae2a6
tools: move python code out of jenkins shell
sam-github Jun 27, 2019
1b4a7fb
tools: update unified-args to 7.0.0 for md-lint CLI
Trott Jun 26, 2019
3f6f968
test: skip tests related to CI failures on AIX
sam-github Jun 28, 2019
8a64b70
test: fix flaky test-vm-timeout-escape-nexttick
Trott Jun 27, 2019
cd71aad
build: expose napi_build_version variable
NickNaso May 23, 2019
3a493b8
deps: upgrade to libuv 1.30.1
cjihrig Jul 2, 2019
e71a0f4
2019-07-03, Version 12.6.0 (Current)
targos Jul 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: fix nits regarding stream utilities
* Unify headings.
* Conform method mentions with the style guide.
* Fix links.

PR-URL: #28385
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
vsemozhetbyt authored and targos committed Jul 2, 2019
commit e3dd4d5225639cfd9abfe953acb7ce7e68233bd3
21 changes: 11 additions & 10 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ There are four fundamental stream types within Node.js:
* [`Transform`][] - `Duplex` streams that can modify or transform the data as it
is written and read (for example, [`zlib.createDeflate()`][]).

Additionally, this module includes the utility functions [pipeline][],
[finished][] and [Readable.from][].
Additionally, this module includes the utility functions
[`stream.pipeline()`][], [`stream.finished()`][] and
[`stream.Readable.from()`][].

### Object Mode

Expand Down Expand Up @@ -1496,7 +1497,7 @@ async function run() {
run().catch(console.error);
```

### Readable.from(iterable, [options])
### stream.Readable.from(iterable, [options])

* `iterable` {Iterable} Object implementing the `Symbol.asyncIterator` or
`Symbol.iterator` iterable protocol.
Expand Down Expand Up @@ -2458,7 +2459,7 @@ and async iterators are provided below.
#### Creating Readable Streams with Async Generators

We can construct a Node.js Readable Stream from an asynchronous generator
using the `Readable.from` utility method:
using the `Readable.from()` utility method:

```js
const { Readable } = require('stream');
Expand Down Expand Up @@ -2499,10 +2500,10 @@ const writeable = fs.createWriteStream('./file');
```

In the above, errors on the write stream would be caught and thrown by the two
`once` listeners, since `once` will also handle `'error'` events.
`once()` listeners, since `once()` will also handle `'error'` events.

Alternatively the readable stream could be wrapped with `Readable.from` and
then piped via `.pipe`:
Alternatively the readable stream could be wrapped with `Readable.from()` and
then piped via `.pipe()`:

```js
const { once } = require('events');
Expand Down Expand Up @@ -2642,8 +2643,11 @@ contain multi-byte characters.
[`process.stdin`]: process.html#process_process_stdin
[`process.stdout`]: process.html#process_process_stdout
[`readable.push('')`]: #stream_readable_push
[`stream.Readable.from()`]: #stream_stream_readable_from_iterable_options
[`stream.cork()`]: #stream_writable_cork
[`stream.finished()`]: #stream_stream_finished_stream_options_callback
[`stream.pipe()`]: #stream_readable_pipe_destination_options
[`stream.pipeline()`]: #stream_stream_pipeline_streams_callback
[`stream.uncork()`]: #stream_writable_uncork
[`stream.unpipe()`]: #stream_readable_unpipe_destination
[`stream.wrap()`]: #stream_readable_wrap_stream
Expand All @@ -2655,18 +2659,15 @@ contain multi-byte characters.
[Compatibility]: #stream_compatibility_with_older_node_js_versions
[HTTP requests, on the client]: http.html#http_class_http_clientrequest
[HTTP responses, on the server]: http.html#http_class_http_serverresponse
[Readable.from]: #readable.from
[TCP sockets]: net.html#net_class_net_socket
[child process stdin]: child_process.html#child_process_subprocess_stdin
[child process stdout and stderr]: child_process.html#child_process_subprocess_stdout
[crypto]: crypto.html
[finished]: #stream_stream_finished_stream_options_callback
[fs read streams]: fs.html#fs_class_fs_readstream
[fs write streams]: fs.html#fs_class_fs_writestream
[http-incoming-message]: http.html#http_class_http_incomingmessage
[hwm-gotcha]: #stream_highwatermark_discrepancy_after_calling_readable_setencoding
[object-mode]: #stream_object_mode
[pipeline]: #stream_stream_pipeline_streams_callback
[readable-_destroy]: #stream_readable_destroy_err_callback
[readable-destroy]: #stream_readable_destroy_error
[stream-_final]: #stream_writable_final_callback
Expand Down