0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00
Commit Graph

212 Commits

Author SHA1 Message Date
Beth Griggs
d42456020b
2019-04-11, Version 11.14.0 (Current)
Notable changes:

- child_process: doc deprecate ChildProcess.\_channel (cjihrig)
  [#26982](https://github.com/nodejs/node/pull/26982)
- deps: update nghttp2 to 1.37.0 (gengjiawen)
  [#26990](https://github.com/nodejs/node/pull/26990)
- dns:
  - make dns.promises enumerable (cjihrig)
    [#26592](https://github.com/nodejs/node/pull/26592)
  - remove dns.promises experimental warning (cjihrig)
    [#26592](https://github.com/nodejs/node/pull/26592)
- fs: remove experimental warning for fs.promises (Anna Henningsen)
  [#26581] (https://github.com/nodejs/node/pull/26581)
- stream: make Symbol.asyncIterator support stable (Matteo Collina)
  [#26989](https://github.com/nodejs/node/pull/26989)
- worker: use copy of process.env (Anna Henningsen)
  [#26544](https://github.com/nodejs/node/pull/26544)

PR-URL: https://github.com/nodejs/node/pull/27163
2019-04-11 17:56:55 +01:00
Matteo Collina
1d8298a5b6 stream: make Symbol.asyncIterator support stable
PR-URL: https://github.com/nodejs/node/pull/26989
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-04-03 09:15:59 +02:00
Luigi Pinca
98b5ba840e doc: document the 'pause' and 'resume' events
PR-URL: https://github.com/nodejs/node/pull/26999
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-03 07:00:26 +02:00
Ruben Bridgewater
b08a867d60
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-27 17:20:06 +01:00
Sergey Zelenov
78162ad570 doc: document error event is optionally emitted after .destroy()
`error` event on each kind of stream is optionally emitted when
`.destroy()` method is called. It depends on `._destroy()`
implementation. In default implementation this event will no be
fired unless `error` parameter has been provided.

It was already mentioned for `writable.destroy([error])`, so I
just copied same sentence for the other streams.

PR-URL: https://github.com/nodejs/node/pull/26589
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-19 21:33:52 +02:00
Ruben Bridgewater
f8763bb077
benchmark,doc,lib,test: capitalize comments
PR-URL: https://github.com/nodejs/node/pull/26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-03-10 00:44:40 +01:00
Ruben Bridgewater
9edce1e12a
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments.

PR-URL: https://github.com/nodejs/node/pull/26223
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-28 18:31:10 +01:00
Sam Roberts
69a8e34003 doc: clarify effect of stream.destroy() on write()
PR-URL: https://github.com/nodejs/node/pull/25973
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-02-14 04:50:57 +01:00
Daniel George Holz
fac11b05b7 doc: reword stream docs to clarify that decodeStrings encodes strings
I was implementing a Writable stream and misunderstood `decodeStrings`
to mean 'will decode `Buffer`s into `string`s before calling `_write`'.
This change adds a little more detail to the description of
`decodeStrings` to clarify its effect on a Writable stream & what gets
passed to `_write`.

Changing the name of the option to `encodeStrings` would make it much
easier to understand, but the name was chosen in 2012 and the option
used in many projects (22k mentions of 'decodeStringsr in JS projects in
GitHub). Deprecating the old name & rolling out a replacement is beyond
my capabilities as a first-time contributor.

PR-URL: https://github.com/nodejs/node/pull/25468
Fixes: https://github.com/nodejs/node/issues/25464
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-01-20 22:58:38 +02:00
Matteo Collina
2f1ae9eebb doc: revert incorrect change on readable._read
https://github.com/nodejs/node/pull/17979 introduced a change in the
doc that was not correct about _read always being called asynchronously.
This does not hold true when it is in flowing mode.

See: https://github.com/nodejs/node/pull/17979
Fixes: https://github.com/nodejs/node/issues/24919

PR-URL: https://github.com/nodejs/node/pull/25442
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-01-15 09:44:45 +05:30
Matteo Collina
18d3aebb06 doc: document that stream.on('close') was changed in Node 10
See: https://github.com/nodejs/node/issues/25373
See: https://github.com/nodejs/node/pull/18438

PR-URL: https://github.com/nodejs/node/pull/25413
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-01-12 11:43:07 +01:00
Matteo Collina
2d2f82c413 doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: https://github.com/nodejs/node/issues/20503
PR-URL: https://github.com/nodejs/node/pull/25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-10 11:19:38 +01:00
Sam Roberts
c2d8a54474 doc: wrap and punctuate YAML description text
stream.md was the only YAML in doc/api that was using `>` for line
continuation, and only used it for a few descriptions, most used the
same wrapping style the rest of the documentation does.

Also added punctuation and capitialization to a few description
sentences.

Fixes: https://github.com/nodejs/node/pull/25413#discussion_r246451003

PR-URL: https://github.com/nodejs/node/pull/25419
Fixes: https://github.com/nodejs/node/issues/25413
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-09 10:03:31 -08:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments
above 50 characters.

PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 17:14:35 +01:00
cjihrig
707b0a8534 tools: enable no-useless-constructor lint rule
This commit enables ESLint's no-useless-constructor rule. Note
that the documentation examples that only include constructor
calls were left in tact.

PR-URL: https://github.com/nodejs/node/pull/25055
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-16 20:30:50 -08:00
Ruben Bridgewater
1f85ea979c
tools: capitalize sentences
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.

PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-12-10 17:07:18 +01:00
Ruben Bridgewater
bcef949c93
2018-12-07, Version 11.4.0 (Current)
Notable Changes:

* console,util:
  * `console` functions now handle symbols as defined in the spec.
    https://github.com/nodejs/node/pull/23708
  * The inspection `depth` default is now back at 2.
    https://github.com/nodejs/node/pull/24326
* dgram,net:
  * Added ipv6Only option for `net` and `dgram`.
    https://github.com/nodejs/node/pull/23798
* http:
  * Chosing between the http parser is now possible per runtime flag.
    https://github.com/nodejs/node/pull/24739
* readline:
  * The `readline` module now supports async iterators.
    https://github.com/nodejs/node/pull/23916
* repl:
  * The multiline history feature is removed.
    https://github.com/nodejs/node/pull/24804
* tls:
  * Added min/max protocol version options.
    https://github.com/nodejs/node/pull/24405
  * The X.509 public key info now includes the RSA bit size and the
    elliptic curve. https://github.com/nodejs/node/pull/24358
* url:
  * `pathToFileURL()` now supports LF, CR and TAB.
    https://github.com/nodejs/node/pull/23720
* Windows:
  * Tools are not installed using Boxstarter anymore.
    https://github.com/nodejs/node/pull/24677
  * The install-tools scripts or now included in the dist.
    https://github.com/nodejs/node/pull/24233
* Added new collaborator:
  * [antsmartian](https://github.com/antsmartian) - Anto Aravinth.
    https://github.com/nodejs/node/pull/24655

PR-URL: https://github.com/nodejs/node/pull/24854
2018-12-07 18:50:20 +01:00
Sam Roberts
64cea5a1ac doc: sort bottom-of-file markdown links
Reapply https://github.com/nodejs/node/pull/12726

It would be nice to have the sort check applied as part of doc testing,
but this change doesn't implement that.

PR-URL: https://github.com/nodejs/node/pull/24679
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-28 13:09:31 -08:00
Dexter Leng
16a2b5c7a6 doc: add readable and writable property to Readable and Writable
PR-URL: https://github.com/nodejs/node/pull/23933
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-11-21 10:49:47 -08:00
Ruben Bridgewater
406d9caab5
2018-11-15, Version 11.2.0 (Current)
Notable changes:

* deps:
  * A new experimental HTTP parser (`llhttp`) is now supported.
    https://github.com/nodejs/node/pull/24059
* timers:
  * Fixed an issue that could cause setTimeout to stop working as
    expected. https://github.com/nodejs/node/pull/24322
* Windows
  * A crashing process will now show the names of stack frames if the
    node.pdb file is available.
    https://github.com/nodejs/node/pull/23822
  * Continued effort to improve the installer's new stage that installs
    native build tools.
    https://github.com/nodejs/node/pull/23987,
    https://github.com/nodejs/node/pull/24348
  * child_process:
    * On Windows the `windowsHide` option default was restored to
      `false`. This means `detached` child processes and GUI apps will
      once again start in a new window.
      https://github.com/nodejs/node/pull/24034
* Added new collaborators:
  * [oyyd](https://github.com/oyyd) - Ouyang Yadong.
    https://github.com/nodejs/node/pull/24300
  * [psmarshall](https://github.com/psmarshall) - Peter Marshall.
    https://github.com/nodejs/node/pull/24170
  * [shisama](https://github.com/shisama) - Masashi Hirano.
    https://github.com/nodejs/node/pull/24136

PR-URL: https://github.com/nodejs/node/pull/24350
2018-11-15 22:16:09 +01:00
Grant Carthew
85f7af77ee doc: fix code examples in stream.md
* Replace `console.error()` with `console.log()`.
* Fix case and punctuation in logged output.

PR-URL: https://github.com/nodejs/node/pull/24112
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-11-10 14:00:17 +02:00
Rich Trott
54e29221c3 doc: fix minor text issues in stream.md
Implement several minor grammar, punctuation, and style fixes in
stream.md.

PR-URL: https://github.com/nodejs/node/pull/24116
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-05 22:26:44 -08:00
Mathias Buus
f24b070cb7 stream: add auto-destroy mode
PR-URL: https://github.com/nodejs/node/pull/22795
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2018-10-30 15:17:40 +01:00
Rich Trott
c9d9ddcbc9 doc: fix minor typo in streams.md
It appears that a `to` was left out in one sentence of the streams.md
doc. Add it.

PR-URL: https://github.com/nodejs/node/pull/23306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 20:25:32 -07:00
Rich Trott
afb4914bf2 doc: standardize versions in stream module doc
Refer to Node.js versions without a prepended `v`. This was standardized
on previously to avoid confusion between Node.js 8 and the V8 JavaScript
engine. (`Node.js 8` is clear. `v8` or even `Node.js v8`, not so much.)

PR-URL: https://github.com/nodejs/node/pull/23306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-08 20:25:30 -07:00
Anna Henningsen
6e43dfb6e3
doc: improve stream.Writable ctor encoding option docs
- Document `defaultEncoding`. This was previously undocumented.
- Clarify `decodeStrings`. In particular, the previous description was
  talking about decoding, which matches the unfortunate option name,
  but what actually happens is usually refererred to as encoding
  a string into a binary form.

PR-URL: https://github.com/nodejs/node/pull/23246
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-05 17:18:06 -07:00
Sintendo
70ab3108e2
doc: fix casing in stream.md
PR-URL: https://github.com/nodejs/node/pull/23166
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-29 20:18:58 -04:00
Chris White
4f70ecc9ed doc: clarify Readable paused/flowing!==object mode
- Clarify that a `Readable` stream's reading mode (paused vs. flowing)
  is independent of its object mode (object vs. non-object).  I am
  relatively new to Node streams, and was briefly confused while
  reading the docs by the two uses of the word "mode".

- Copyediting: add missing apostrophes; minor grammatical changes

PR-URL: https://github.com/nodejs/node/pull/22619
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-03 17:57:41 +03:00
Vse Mozhet Byt
1a25f9639a doc: remove redundant 'Example:' and similar notes
Some nits were also fixed in passing.

PR-URL: https://github.com/nodejs/node/pull/22537
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-29 16:53:03 +03:00
Matteo Collina
98cf84f2c9 stream: restore flow if there are 'data' handlers after once('readable')
Fixes: https://github.com/nodejs/node/issues/21398
See: https://github.com/nodejs/node/pull/21696

PR-URL: https://github.com/nodejs/node/pull/22209
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com>
2018-08-21 22:36:13 -07:00
Ruben Bridgewater
36468ca928
lib: require a callback for end-of-stream
Make the callback mandatory as mostly done in all other Node.js
callback APIs so users explicitly have to decide what to do in error
cases.

This also documents the options for `Stream.finished()`.

When originally implemented it was missed that Stream.finished() has
an optional options object.

PR-URL: https://github.com/nodejs/node/pull/21058
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mathias Buus <mathiasbuus@gmail.com>
2018-08-22 01:00:27 +02:00
Andreas Girgensohn
44d04a8c01 doc: clarify documentation of pipes and zlib objects
Document how pipes can be chained in readable.pipe().
Document that zlib.Zlib inherits from stream.Transform.

PR-URL: https://github.com/nodejs/node/pull/22354
Fixes: https://github.com/nodejs/node/issues/22341
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-18 11:21:51 +03:00
Sam Ruby
6a99e3e21c doc: make markdown input compliant
PR-URL: https://github.com/nodejs/node/pull/21780
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-16 00:04:56 +03:00
Sam Ruby
40c85ff063 doc: declare all parameter types
PR-URL: https://github.com/nodejs/node/pull/21782
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-07-15 23:57:35 +03:00
Thomas Watson
c01601e1fe
doc: unify spelling of backpressure
PR-URL: https://github.com/nodejs/node/pull/21630
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-04 10:17:45 +02:00
Joseph Gordon
dcad7c93fb doc: switch the order of Writable and Readable
This change places the links to Writable stream and Readble stream
in the order these sections appear when scrolling down the screen.

PR-URL: https://github.com/nodejs/node/pull/21333
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-15 22:59:06 +03:00
Aliaksei Tuzik
00e479fed4 doc: fix type in stream doc
Extend return type of `read()` method with `any` which is a
valid return type for readable streams in object mode.

PR-URL: https://github.com/nodejs/node/pull/21178
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-06-09 13:53:18 +03:00
Ruben Bridgewater
32c51f10d3
stream: make the pipeline callback mandatory
Right now when not adding a callback to the pipeline it could cause
an uncaught exception if there is an error. Instead, just make the
callback mandatory as mostly done in all other Node.js callback APIs
so users explicitly have to decide what to do in such situations.

PR-URL: https://github.com/nodejs/node/pull/21054
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-08 01:24:39 +02:00
Rich Trott
85fe134026 doc: remove spaces around slashes
Remove spaces around slash characters in documentation. This change
sometimes rewords the content where the slash construction may not be
what is called for.

PR-URL: https://github.com/nodejs/node/pull/21140
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-06 21:23:00 -07:00
Vse Mozhet Byt
7588ceaf35 doc: add more missing backticks
Also, fix some other nits in passing
(formatting, punctuation, typos, redundancy, obsoleteness).

PR-URL: https://github.com/nodejs/node/pull/20438
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-03 02:12:07 +03:00
Vse Mozhet Byt
392d80a617 doc: add missing periods or colons
Some other formatting nits were fixed
and some superfluous descriptions were simplified in passing.

PR-URL: https://github.com/nodejs/node/pull/20401
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02 06:17:08 +03:00
Vse Mozhet Byt
a3bd06a5e6 doc: remove redundant empty lines
PR-URL: https://github.com/nodejs/node/pull/20398
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-29 17:48:43 +03:00
James M Snell
0cca27b3ff 2018-04-24, Version 10.0.0 (Current)
* Assert
  * Calling `assert.fail()` with more than one argument is deprecated. #70dcacd710
  * Calling `assert.ok()` with no arguments will now throw. #3cd7977a42
  * Calling `assert.ifError()` will now throw with any argument other than `undefined` or `null`. Previously the method would throw with any truthy value. #e65a6e81ef
  * The `assert.rejects()` and `assert.doesNotReject()` methods have been added for working with async functions. #599337f43e
* Async_hooks
  * Older experimental async_hooks APIs have been removed. #1cc6b993b9
* Buffer
  * Uses of `new Buffer()` and `Buffer()` outside of the `node_modules` directory will now emit a runtime deprecation warning. #9d4ab90117
  * `Buffer.isEncoding()` now returns `undefined` for falsy values, including an empty string. #452eed956e
  * `Buffer.fill()` will throw if an attempt is made to fill with an empty `Buffer`. #1e802539b2
* Child Process
  * Undefined properties of env are ignored. #38ee25e2e2, #85739b6c5b
* Console
  * The `console.table()` method has been added. #97ace04492
* Crypto
  * The `crypto.createCipher()` and `crypto.createDecipher()` methods have been deprecated. Please use `crypto.createCipheriv()` and `crypto.createDecipheriv()` instead. #81f88e30dd
  * The `decipher.finaltol()` method has been deprecated. #19f3927d92
  * The `crypto.DEFAULT_ENCODING` property has been deprecated. #6035beea93
  * The `ECDH.convertKey()` method has been added. #f2e02883e7
  * The `crypto.fips` property has been deprecated. #6e7992e8b8
* Dependencies
  * V8 has been updated to 6.6. #9daebb48d6
  * OpenSSL has been updated to 1.1.0h. #66cb29e646
* EventEmitter
  * The `EventEmitter.prototype.off()` method has been added as an alias for `EventEmitter.prototype.removeListener()`. #3bb6f07d52
* File System
  * The `fs.promises` API provides experimental promisified versions of the `fs` functions. #329fc78e49
  * Invalid path errors are now thrown synchronously. #d8f73385e2
  * The `fs.readFile()` method now partitions reads to avoid thread pool exhaustion. #67a4ce1c6e
* HTTP
  * Processing of HTTP Status codes `100`, `102-199` has been improved. #baf8495078
  * Multi-byte characters in URL paths are now forbidden. #b961d9fd83
* N-API
  * The n-api is no longer experimental. #cd7d7b15c1
* Net
  * The `'close'` event will be emitted after `'end'`. #9b7a6914a7
* Perf_hooks
  * The `PerformanceObserver` class is now an `AsyncResource` and can be monitored using `async_hooks`. #009e41826f
  * Trace events are now emitted for performance events. #9e509b622b
  * The `performance` API has been simplified. #2ec6995555
  * Performance milestone marks will be emitted as trace events. #96cb4fb795
* Process
  * Using non-string values for `process.env` is deprecated. #5826fe4e79
  * The `process.assert()` method is deprecated. #703e37cf3f
* REPL
  * REPL now experimentally supports top-level await when using the `--experimental-repl-await` flag. #eeab7bc068
  * The previously deprecated "magic mode" has been removed. #4893f70d12
  * The previously deprecated `NODE_REPL_HISTORY_FILE` environment variable has been removed. #60c9ad7979
  * Proxy objects are shown as Proxy objects when inspected. #90a43906ab
* Streams
  * The `'readable'` event is now always deferred with nextTick. #1e0f3315c7
  * A new `pipeline()` method has been provided for building end-to-data stream pipelines. #a5cf3feaf1
  * Experimental support for async for-await has been added to `stream.Readable`. #61b4d60c5d
* Timers
  * The `enroll()` and `unenroll()` methods have been deprecated. #68783ae0b8
* TLS
  * The `tls.convertNONProtocols()` method has been deprecated. #9204a0db6e
  * Support for NPN (next protocol negotiation) has been dropped. #5bfbe5ceae
  * The `ecdhCurve` default is now `'auto'`. #af78840b19
* Trace Events
  * A new `trace_events` top-level module allows trace event categories to be enabled/disabld at runtime. #da5d818a54
* URL
  * The WHATWG URL API is now a global. #312414662b
* Util
  * `util.types.is[…]` type checks have been added. #b20af8088a
  * Support for bigint formatting has been added to `util.inspect()`. #39dc947409
2018-04-24 12:02:31 -07:00
Mathias Buus
f64bebf205 stream: add pipeline and finished
PR-URL: https://github.com/nodejs/node/pull/19828
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-16 16:02:12 +02:00
Vse Mozhet Byt
ff4ca647d4 doc: unify format of iterables
Also, make signatures easier for copy-paste testing.

PR-URL: https://github.com/nodejs/node/pull/20036
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-15 11:36:07 +03:00
Anatoli Papirovski
4082bdf199
doc: remove _writableState reference
PR-URL: https://github.com/nodejs/node/pull/20004
Fixes: https://github.com/nodejs/node/issues/6799
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-13 20:52:49 +02:00
Vse Mozhet Byt
9c8857d946 doc: add quotes for event names + fix similar nits
PR-URL: https://github.com/nodejs/node/pull/19915
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-11 21:42:38 -07:00
Vse Mozhet Byt
df5d41bf93 doc: add and unify even more return values
PR-URL: https://github.com/nodejs/node/pull/19955
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-12 03:18:01 +03:00
Ryusei Yamaguchi
87880466b1
doc: fix about decodeStrings property of stream.Writable
This fixes negation ommitted in a former commit.
It also simplifies the text in general.

PR-URL: https://github.com/nodejs/node/pull/19752
Refs: 80ea0c5a64
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-10 00:59:16 +02:00
Vse Mozhet Byt
dff214153f doc: specify definite Array types
Replace `{Array}` with `{type[]}`.

PR-URL: https://github.com/nodejs/node/pull/19895
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-09 17:04:48 +03:00
Matteo Collina
cf5f9867ff stream: 'readable' have precedence over flowing
In Streams3 the 'readable' event/.read() method had a lower precedence
than the `'data'` event that made them impossible to use them together.
This make `.resume()` a no-op if there is a listener for the
`'readable'` event, making the stream non-flowing if there is a
`'data'`  listener.

Fixes: https://github.com/nodejs/node/issues/18058

PR-URL: https://github.com/nodejs/node/pull/18994
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-04-06 13:50:15 +02:00
Vse Mozhet Byt
de0053cc32 doc: fix various nits
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md.
* Space infix operators.
* Unify quotes in inline code spans (use only single quotes).
* Unify `* Returns:` (eliminate deviations).
* Dedupe spaces.

PR-URL: https://github.com/nodejs/node/pull/19743
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-04 13:45:39 +03:00
Vse Mozhet Byt
237cbe10fb doc,tools: formalize, unify, codify default values
PR-URL: https://github.com/nodejs/node/pull/19737
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-04 12:30:36 +03:00
Vse Mozhet Byt
3662934b5a doc: fix paragraph order in stream.md
Place `writable.destroy()`, `readable.destroy()`,
and `readable.read()` in the proper ABC order.

PR-URL: https://github.com/nodejs/node/pull/19501
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-03-21 04:53:00 +02:00
Ivan Filenko
45c86e33e1 doc: add note to readable stream async iterator
PR-URL: https://github.com/nodejs/node/pull/19331
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-18 18:59:22 -07:00
Ivan Filenko
a2c0fcc0d8 doc: add returned values and options to stream.md
PR-URL: https://github.com/nodejs/node/pull/19361
Refs: https://github.com/nodejs/node/issues/11135
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2018-03-15 04:31:04 +02:00
Rich Trott
003e5b3404
doc: make caveat in stream.md more concise
PR-URL: https://github.com/nodejs/node/pull/19251
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-11 04:05:49 +01:00
Rich Trott
0f05173f49 doc: remove warning against readable/readable.read
Remove suggestion to avoid `readable` event and `readabe.read()` method.
No explanation was provided for this suggestion.

PR-URL: https://github.com/nodejs/node/pull/19193
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chen Gang <gangc.cxy@foxmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-03-08 22:40:19 -08:00
Rich Trott
cb5f9a6d87 doc: make suggestion more direct in stream.md
PR-URL: https://github.com/nodejs/node/pull/19124
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-06 22:30:09 -08:00
Matteo Collina
1a5ec837ca doc: fix max length on stream.md
See: https://github.com/nodejs/node/pull/18438

PR-URL: https://github.com/nodejs/node/pull/19169
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-03-06 14:52:19 +01:00
Mathias Buus
5e3f51648e stream: updated streams error handling
This improves error handling for streams in a few ways.

1. It ensures that no user defined methods (_read, _write, ...) are run
after .destroy has been called.
2. It introduces an explicit error to tell the user if they are write to
write, etc to the stream after it has been destroyed.
3. It makes streams always emit close as the last thing after they have
been destroyed
4. Changes the default _destroy to not gracefully end streams.

It also updates net, http2, zlib and fs to the new error handling.

PR-URL: https://github.com/nodejs/node/pull/18438
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-03-06 13:31:56 +01:00
George Sapkin
1d19fd393c doc: Readable unpipe on Writable error event
PR-URL: https://github.com/nodejs/node/pull/18080
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-02 15:57:51 +01:00
陈刚
8b518edf11 doc: readable.push(undefined) in non-object mode
`readable.push()` supports `undefined` in non-object mode, but it was
not previously documented.

PR-URL: https://github.com/nodejs/node/pull/18283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-02-26 10:23:45 +01:00
estrada9166
a29089d7c8
doc: add new documentation lint rule
Add 80 characters limit to docs.
Change docs to fit 80 characters per row.

PR-URL: https://github.com/nodejs/node/pull/18726
Fixes: https://github.com/nodejs/node/issues/18703
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-02-23 16:26:29 +00:00
Rich Trott
9cb96ac828 doc: remove extraneous "for example" text
No need to announce obvious example code as being example code. Remove
unneeded "for example" text as one small way to try to keep the docs
more concise..

PR-URL: https://github.com/nodejs/node/pull/18890
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-23 02:53:21 +02:00
Ruben Bridgewater
d6fc7e3af4
doc: enable eslint prefer-template rule
PR-URL: https://github.com/nodejs/node/pull/18831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-22 14:56:17 +00:00
Matteo Collina
f6721c20df stream: writable.end should return this.
PR-URL: https://github.com/nodejs/node/pull/18780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-19 08:59:12 +01:00
Ivan Filenko
755d805bf4 doc: add fs declarations to stream doc js examples
PR-URL: https://github.com/nodejs/node/pull/18804
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-02-16 23:34:32 +02:00
James M Snell
d3569b623c
doc: remove **Note:** tags
Remove the various **Note:** prefixes throughout the docs.

PR-URL: https://github.com/nodejs/node/pull/18592
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-02-08 11:57:14 -05:00
陈刚
3ca79350d9
doc: improve stream documentation
PR-URL: https://github.com/nodejs/node/pull/18375
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-01 11:49:18 +01:00
Vse Mozhet Byt
fd3a0cfb7c doc: linkify missing types
Also, alphabetize all types in type-parser.js
and fix some nits in type formats.

PR-URL: https://github.com/nodejs/node/pull/18444
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-02-01 02:52:31 +02:00
Roman Reiss
82b0783519
src,doc,test: Fix common misspellings
PR-URL: https://github.com/nodejs/node/pull/18151
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-16 23:44:27 +01:00
Matteo Collina
61b4d60c5d stream: added experimental support for for-await
Adds support for Symbol.asyncIterator into the Readable class.
The stream is destroyed when the loop terminates with break or throw.

Fixes: https://github.com/nodejs/node/issues/15709

PR-URL: https://github.com/nodejs/node/pull/17755
Fixes: https://github.com/nodejs/node/issues/15709
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-01-11 12:34:41 +01:00
Myles Borins
e688175c50
2019-01-10 Version 9.4.0 (Current)
Notable change:

* async_hooks:
  - deprecate AsyncHooks Sensitive API and runInAsyncIdScope. Neither
    API were documented. (Andreas Madsen)
    https://github.com/nodejs/node/pull/16972
* deps:
  - update nghttp2 to 1.29.0 (James M Snell)
    https://github.com/nodejs/node/pull/17908
  - upgrade npm to 5.6.0 (Kat Marchán)
    https://github.com/nodejs/node/pull/17535
  - cherry-pick 50f7455 from upstream V8 (Michaël Zasso)
    https://github.com/nodejs/node/pull/16591
* events:
  - remove reaches into _events internals (Anatoli Papirovski)
    https://github.com/nodejs/node/pull/17440
* http:
  - add rawPacket in err of `clientError` event (XadillaX)
    https://github.com/nodejs/node/pull/17672
* http2:
  - implement maxSessionMemory (James M Snell)
    https://github.com/nodejs/node/pull/17967
  - add initial support for originSet (James M Snell)
    https://github.com/nodejs/node/pull/17935
  - add altsvc support (James M Snell)
    https://github.com/nodejs/node/pull/17917
  - perf_hooks integration (James M Snell)
    https://github.com/nodejs/node/pull/17906
  - Refactoring and cleanup of Http2Session and Http2Stream destroy
    (James M Snell) https://github.com/nodejs/node/pull/17406
* net:
  - remove Socket.prototype.write (Anna Henningsen)
    https://github.com/nodejs/node/pull/17644
  - remove Socket.prototype.listen (Ruben Bridgewater)
    https://github.com/nodejs/node/pull/13735
* repl:
  - show lexically scoped vars in tab completion (Michaël Zasso)
    https://github.com/nodejs/node/pull/16591
* stream:
  - rm {writeable/readable}State.length (Calvin Metcalf)
    https://github.com/nodejs/node/pull/12857
  - add flow and buffer properties to streams (Calvin Metcalf)
    https://github.com/nodejs/node/pull/12855
* util:
  - allow wildcards in NODE_DEBUG variable (Tyler)
    https://github.com/nodejs/node/pull/17609
* zlib:
  - add ArrayBuffer support (Jem Bezooyen)
    https://github.com/nodejs/node/pull/16042
* Addedew collaborator**
  - [starkwang](https://github.com/starkwang) Weijia Wang
* Addedew TSC member**
  - [danbev](https://github.com/danbev) Daniel Bevenius

PR-URL: https://github.com/nodejs/node/pull/18069
2018-01-10 10:24:22 -05:00
Matteo Collina
1e0f3315c7 stream: always defer 'readable' with nextTick
Emit 'readable' always in the next tick, resulting in a single
call to _read() per microtick. This removes the need for the
user to implement buffering if they wanted to call this.push()
multiple times in an asynchronous fashion, as this.push() triggers
this._read() call.

PR-URL: https://github.com/nodejs/node/pull/17979
Fixes: https://github.com/nodejs/node/issues/3203
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-01-10 10:48:03 +01:00
Rich Trott
26607b825e doc: edit for concision
This removes some wordy phrases (notably "it is important to note
that").

PR-URL: https://github.com/nodejs/node/pull/17891
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-01-03 17:18:30 -08:00
Calvin Metcalf
36ffa21af2 stream: rm {writeable/readable}State.length
As part of the readableState/writableState mega issue #445, this
removes all of the references to .length on those properties and
replaces them with a readableLength and writableLength getter.

See: https://github.com/nodejs/node/issues/445
PR-URL: https://github.com/nodejs/node/pull/12857
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-18 14:41:43 +01:00
Calvin Metcalf
e20af3371b stream: add flow and buffer properties to streams
This adds computed properties to readable and writable streams to
allow access to the readable buffer, the writable buffer, and flow
state without accessing the readable or writable state.

These are the only uses of readable and writable state in the docs
so adding these work arounds allows them to be removed from the docs.

This also updates net, http_client and http_server to use the new
methods instead of manipulating readable and writable state directly.

See: https://github.com/nodejs/node/issues/445
PR-URL: https://github.com/nodejs/node/pull/12855
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-15 23:05:45 +01:00
Myles Borins
a893e79a69
2017-12-12 Version 9.3.0 (Current)
Notable changes:

* async\_hooks:
  - add trace events to async_hooks (Andreas Madsen)
    https://github.com/nodejs/node/pull/15538
  - add provider types for net server (Andreas Madsen)
    https://github.com/nodejs/node/pull/17157
* console:
  - console.debug can now be used outside of the inspector
    (Benjamin Zaslavsky) https://github.com/nodejs/node/pull/17033
* deps:
  - upgrade libuv to 1.18.0 (cjihrig)
    https://github.com/nodejs/node/pull/17282
  - patch V8 to 6.2.414.46 (Myles Borins)
    https://github.com/nodejs/node/pull/17206
* module:
  - module.builtinModules will return a list of built in modules
    (Jon Moss) https://github.com/nodejs/node/pull/16386
* n-api:
  - add helper for addons to get the event loop (Anna Henningsen)
    https://github.com/nodejs/node/pull/17109
* process:
  - process.setUncaughtExceptionCaptureCallback can now be used to
    customize behavior for `--abort-on-uncaught-exception`
    (Anna Henningsen) https://github.com/nodejs/node/pull/17159
  - A signal handler is now able to receive the signal code that
    triggered the handler. (Robert Rossmann)
    https://github.com/nodejs/node/pull/15606
* src:
  - embedders can now use Node::CreatePlatform to create an instance of
    NodePlatform (Cheng Zhao)
    https://github.com/nodejs/node/pull/16981
* stream:
  - writable.writableHighWaterMark and readable.readableHighWaterMark
    will return the values the stream object was instantiated with
    (Calvin Metcalf) https://github.com/nodejs/node/pull/12860
* **Added new collaborators**
  * [maclover7](https://github.com/maclover7) Jon Moss
  * [guybedford](https://github.com/guybedford) Guy Bedford
  * [hashseed](https://github.com/hashseed) Yang Guo

PR-URL: https://github.com/nodejs/node/pull/17631
2017-12-12 15:59:29 -05:00
Matthew Leon
5ebcb7fcaf doc: fix typo in stream.md
PR-URL: https://github.com/nodejs/node/pull/17357
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-11-28 16:13:33 -05:00
Leko
76dbde19a7 doc: replace string with template string
PR-URL: https://github.com/nodejs/node/pull/17316
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-26 09:23:16 -08:00
Calvin Metcalf
157df5a47c stream: remove usage of *State.highWaterMark
Replaced _readableState.highWaterMark with a .readableHighWaterMark
getter and _writableState.highWaterMark with a .writableHighWaterMark
getter.
The getters are non-enumerable because they break some prototype
manipulation that happen in the ecosystem.

Ref: https://github.com/nodejs/node/issues/445.

PR-URL: https://github.com/nodejs/node/pull/12860
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-11-15 14:30:39 +01:00
Sakthipriyan Vairamani (thefourtheye)
8eef52ed56 doc: make stream.Readable consistent
Rest of the document uses `stream.Readable` or `stream.Writable`. This
patch makes the usage consistent in the parameter description.

PR-URL: https://github.com/nodejs/node/pull/16786
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-06 04:02:09 -08:00
dicearr
e509db8c56 doc: howto decode buffers extending from Writable
Improved stream documentation with an example of how to decode buffers
to strings within a custom Writable.

Fixes: https://github.com/nodejs/node/issues/15369
PR-URL: https://github.com/nodejs/node/pull/16403
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-31 19:43:04 +01:00
Daijiro Wachi
986be03a4c doc: fix doc styles
CONTRIBUTING.md
  + L857: Unused definition
  + L861: Unused definition
  + L863: Unused definition

doc/api/assert.md
  + L719: Unused definition

doc/api/async_hooks.md
  + L460: Missing code-language flag

doc/api/child_process.md
  + L1362: Unused definition

doc/api/dns.md
  + L674: Unused definition

doc/api/esm.md
  + L178: Missing code-language flag

doc/api/http.md
  + L1868: Unused definition
  + L1887: Unused definition
  + L1888: Unused definition
  + L1889: Unused definition
  + L1916: Unused definition
  + L1917: Unused definition

doc/api/https.md
  + L260: Unused definition

doc/api/os.md
  + L1226: Unused definition

doc/api/process.md
  + L1888: Unused definition

doc/api/stream.md
  + L2227: Definitions with the same identifier

doc/guides/writing-and-running-benchmarks.md
  + L1: Missing newline character at end of file

Refs: https://github.com/nodejs/node/pull/12756
PR-URL: https://github.com/nodejs/node/pull/16385
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-24 18:04:18 +02:00
Luigi Pinca
13951065a8 doc: improve {readable,writable}._destroy() docs
PR-URL: https://github.com/nodejs/node/pull/16313
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-10-21 07:33:58 +05:30
Gibson Fahnestock
1175c9dca3
doc: standardize function param/object prop style
PR-URL: https://github.com/nodejs/node/pull/13769
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-28 02:26:56 -03:00
Michaël Zasso
99a779947c
doc: add missing doc for readable._destroy
PR-URL: https://github.com/nodejs/node/pull/15316
Fixes: https://github.com/nodejs/node/issues/15291
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-13 17:04:10 -03:00
Vse Mozhet Byt
da057dbf8f doc: fix some internal links
PR-URL: https://github.com/nodejs/node/pull/15293
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-09-12 17:03:30 +03:00
Jessica Quynh Tran
89f207499a
doc: document bytes to chars after setEncoding
This commit documents and edge-case behavior in readable streams.
It is expected that non-object streams are measured in bytes
against the highWaterMark. However, it was discovered in issue
thereafter begin to measure the buffer's length in characters.

PR-URL: https://github.com/nodejs/node/pull/13442
Refs: https://github.com/nodejs/node/issues/6798
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-07 23:22:12 -03:00
Chris Young
cacce304cb doc: add links to alternative versions of doc
Each page of the API documentation should have links to other versions
of the same page. This will make it easier to switch between the current
"live" release at nodejs.org and LTS versions.

PR-URL: https://github.com/nodejs/node/pull/10958
Fixes: https://github.com/nodejs/node/issues/10726
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-08-28 11:17:08 +02:00
Jan Schär
8987ae843e doc,stream: remove wrong remark on readable.read
The returned chunk is *never* longer than `size`.

PR-URL: https://github.com/nodejs/node/pull/15014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-08-25 13:26:36 -07:00
James M Snell
1524458c54 doc: remove you and fixup note in stream.md
PR-URL: https://github.com/nodejs/node/pull/14938
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-08-21 11:17:50 -07:00
George Sapkin
4cff2cc20f doc: remove redundant only from doc/api/stream.md
PR-URL: https://github.com/nodejs/node/pull/14858
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-08-20 11:05:13 +02:00
Anna Henningsen
1fe0741e50 2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](https://github.com/nodejs/node/pull/14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](https://github.com/nodejs/node/pull/8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](https://github.com/nodejs/node/pull/14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](https://github.com/nodejs/node/pull/14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](https://github.com/nodejs/node/pull/14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](https://github.com/nodejs/node/pull/14558)

PR-URL: https://github.com/nodejs/node/pull/14811
2017-08-15 15:05:22 -05:00
Anna Henningsen
7e0c2ea92b
doc: add missing changes: metadata for streams
Ref: https://github.com/nodejs/node/pull/14636
PR-URL: https://github.com/nodejs/node/pull/14810
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-08-13 22:20:44 +02:00
Guy Margalit
c3c045aea0 stream: support readable/writableHWM for Duplex
This commits adds support for readableHighWaterMark and
writableHighWaterMark in Duplex stream, so that they can be set without
accessing the internal state.

Fixes: https://github.com/nodejs/node/issues/14555
PR-URL: https://github.com/nodejs/node/pull/14636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-08-08 11:18:25 +02:00
Marc Hernández Cabot
4d5ae3022c
doc: fix typo in stream.md
PR-URL: https://github.com/nodejs/node/pull/14364
Fixes: https://github.com/nodejs/node/issues/14362
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-07-21 10:48:38 +08:00
Matteo Collina
0e5283b7ed doc,stream: _transform happens one at a time
Add a note to the stream docs specifying that at most a single
call to _transform can happen, and the provided callback()
should be used to process another chunk.

Fixes: https://github.com/nodejs/node/issues/3208
PR-URL: https://github.com/nodejs/node/pull/14321
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-07-19 10:36:10 +02:00
Rich Trott
199ad1d73f doc: correct stream Duplex allowHalfOpen doc
If allowHalfOpen is set to false, the stream will automatically end the
writable side when the readable side ends, but not the other way around.

PR-URL: https://github.com/nodejs/node/pull/14127
Fixes: https://github.com/nodejs/node/issues/4044
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-07-10 13:49:35 -07:00