Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
af360ac
doc: make minor edits for consistency
Trott Sep 27, 2020
91b820e
esm: use "node:" namespace for builtins
guybedford Sep 28, 2020
e4a4f81
fs: use Promise.resolve from primordials
targos Sep 27, 2020
998b24e
doc: align to function signature
anlexN Aug 26, 2020
4d29fb5
tools: add pythonenv to .gitignore
targos Sep 28, 2020
79e3e50
doc: update example ICU URL
watilde Sep 27, 2020
4aed176
src: document required else block at src/node_platform.cc
juanarbol Aug 24, 2020
a4e5a3a
tools: exclude gyp from markdown link checker
targos Sep 30, 2020
7dc6b2f
build: add support for section ordering
Jan 6, 2020
f23a0e2
module: refine module type mismatch error cases
guybedford Sep 30, 2020
ce789f1
doc: use .md extension for internal links
aduh95 Sep 14, 2020
5a730b5
doc: sort md references in ASCII order
aduh95 Sep 17, 2020
166f14a
tools: check links in api docs
aduh95 Sep 22, 2020
05e08bd
console: add Symbol.toStringTag property
Leko Sep 28, 2020
d642788
doc: unhide resolver spec
guybedford Sep 26, 2020
86f2f83
doc: implement fancier rendering for keys
Trott Sep 28, 2020
95c62a1
doc: copyedit esm.md
Trott Sep 29, 2020
f36476d
build: fix CQ after latest ncu release
mmarchini Oct 2, 2020
35b62ef
doc: importable node protocol URLs
bmeck Sep 30, 2020
a11ddee
doc: update contact information for richardlau
richardlau Oct 1, 2020
2302206
meta: add startup team in CODEOWNERS
joyeecheung Sep 29, 2020
368a3ae
doc: update contact information for @BethGriggs
BethGriggs Oct 1, 2020
4dbb3a9
doc: copyedit packages.md
Trott Sep 30, 2020
6e9e5c3
tools,doc: fix broken link in module.html
Trott Oct 1, 2020
5a85d4f
src: make MakeCallback() check can_call_into_js before getting method
addaleax Sep 30, 2020
1f15e34
crypto: set env values in KeyObject Deserialize method
ThakurKarthik Sep 28, 2020
862b75d
doc: added details around console.timeEnd changes
yashLadha Sep 3, 2020
fcbdb06
fs: remove experimental from rmdir recursive
Oct 1, 2020
a01154e
crypto: fix KeyObject garbage collection
addaleax Oct 3, 2020
7bbf8ee
src: remove invalid ToLocalChecked in EmitBeforeExit
addaleax Oct 3, 2020
38a5715
doc: avoid using deprecated connection property
lpinca Oct 1, 2020
541ce17
doc: add entry to console.timeEnd() changes array
lpinca Oct 1, 2020
e40876a
doc: specify how to detect EOF
lpinca Oct 1, 2020
85062b3
deps: update llhttp to 2.1.3
indutny Sep 30, 2020
3f95440
doc: fix conditional exports flag removal version
aduh95 Sep 30, 2020
f29451d
fs: simplify realpathSync
himself65 Sep 29, 2020
190d46b
tools: update gyp to 0.2.0
ryzokuken Apr 7, 2020
7361a3f
tools: update gyp-next to v0.2.1
ryzokuken May 17, 2020
3e75907
tools: update gyp-next to v0.3.0
ryzokuken Jun 15, 2020
ad8fce6
tools: update gyp to v0.4.0
ryzokuken Jul 15, 2020
5f1d792
tools: update gyp to v0.5.0
ryzokuken Sep 30, 2020
62ddc77
meta: add nodejs/streams to CODEOWNERS
mcollina Sep 29, 2020
1313c8c
doc: update sxa's email address to Red Hat from IBM
Oct 1, 2020
f499302
tools: fix typo in error message
aduh95 Sep 29, 2020
885840b
doc: adopt MDN style for kbd elements
Trott Oct 2, 2020
91ef862
doc: mention adding YAML for APIs in PR contributing guide
lundibundi Oct 2, 2020
5c879a9
module: fix builtin reexport tracing
guybedford Oct 4, 2020
f08577c
doc: update AUTHORS list
addaleax Sep 21, 2020
fbb9dd9
src: fix aliased buffer import warning in env.h
yashLadha Oct 1, 2020
53e27b3
doc,esm: add history support info
aduh95 Sep 28, 2020
0ac5fa7
module: update to cjs-module-lexer@0.4.0
guybedford Oct 4, 2020
6585b16
doc: improve eventLoopUtilization documentation
puzpuzpuz Oct 3, 2020
5790c40
tools: add missing uv_setup_argv() calls
addaleax Oct 4, 2020
e09f7f0
src: limit GetProcessTitle() result to 1MB
addaleax Oct 4, 2020
541be52
fs: do not throw exception after creating FSReqCallback
addaleax Oct 3, 2020
27cd99b
test: improve test coverage for eventtarget
juanarbol Jun 5, 2020
8e3a81e
http2,tls: store WriteWrap using BaseObjectPtr
addaleax Oct 3, 2020
392c881
src: use env->ThrowUVException in pipe_wrap
jasnell Oct 4, 2020
3f62f99
src: more idiomatic error pattern in node_wasi
jasnell Oct 4, 2020
a995dd7
doc: revise introductory child_process text
Trott Sep 25, 2020
552ebaf
test: update wpt tests for encoding
watilde Sep 24, 2020
7c5f319
2020-10-07, Version 14.13.1 (Current)
danielleadams Oct 6, 2020
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
Next Next commit
doc: make minor edits for consistency
* We use _noop_ and _no-op_ in different docs. Use _no-op_ everywhere.
* When referring to functions, add _()_ to indicate that.
* Remove backticks from non-code _destroyed_.

PR-URL: #35377
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and danielleadams committed Oct 6, 2020
commit af360ace37e0f963847a7b4b1d384254f0b9215a
2 changes: 1 addition & 1 deletion doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ of asynchronous operations.
* Returns: {AsyncHook} A reference to `asyncHook`.

Enable the callbacks for a given `AsyncHook` instance. If no callbacks are
provided enabling is a noop.
provided, enabling is a no-op.

The `AsyncHook` instance is disabled by default. If the `AsyncHook` instance
should be enabled immediately after creation, the following pattern can be used.
Expand Down
125 changes: 116 additions & 9 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ added: v8.0.0
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/29197
description: Work as noop when called on an already `destroyed` stream.
description: Work as a no-op on a stream that has already been destroyed.
-->

* `error` {Error} Optional, an error to emit with `'error'` event.
Expand All @@ -397,8 +397,8 @@ This is a destructive and immediate way to destroy a stream. Previous calls to
Use `end()` instead of destroy if data should flush before close, or wait for
the `'drain'` event before destroying the stream.

Once `destroy()` has been called any further calls will be a noop and no
further errors except from `_destroy` may be emitted as `'error'`.
Once `destroy()` has been called any further calls will be a no-op and no
further errors except from `_destroy()` may be emitted as `'error'`.

Implementors should not override this method,
but instead implement [`writable._destroy()`][writable-_destroy].
Expand Down Expand Up @@ -968,7 +968,7 @@ added: v8.0.0
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/29197
description: Work as noop when called on an already `destroyed` stream.
description: Work as a no-op on a stream that has already been destroyed.
-->

* `error` {Error} Error which will be passed as payload in `'error'` event
Expand All @@ -979,8 +979,8 @@ event (unless `emitClose` is set to `false`). After this call, the readable
stream will release any internal resources and subsequent calls to `push()`
will be ignored.

Once `destroy()` has been called any further calls will be a noop and no
further errors except from `_destroy` may be emitted as `'error'`.
Once `destroy()` has been called any further calls will be a no-op and no
further errors except from `_destroy()` may be emitted as `'error'`.

Implementors should not override this method, but instead implement
[`readable._destroy()`][readable-_destroy].
Expand Down Expand Up @@ -1536,7 +1536,7 @@ added: v8.0.0
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/29197
description: Work as noop when called on an already `destroyed` stream.
description: Work as a no-op on a stream that has already been destroyed.
-->

* `error` {Error}
Expand All @@ -1549,8 +1549,8 @@ Implementors should not override this method, but instead implement
The default implementation of `_destroy()` for `Transform` also emit `'close'`
unless `emitClose` is set in false.

Once `destroy()` has been called any further calls will be a noop and no
further errors except from `_destroy` may be emitted as `'error'`.
Once `destroy()` has been called, any further calls will be a no-op and no
further errors except from `_destroy()` may be emitted as `'error'`.

### `stream.finished(stream[, options], callback)`
<!-- YAML
Expand Down Expand Up @@ -1953,6 +1953,56 @@ const myWritable = new Writable({
});
```

#### `writable._construct(callback)`
<!-- YAML
added: REPLACEME
-->

* `callback` {Function} Call this function (optionally with an error
argument) when the stream has finished initializing.

The `_construct()` method MUST NOT be called directly. It may be implemented
by child classes, and if so, will be called by the internal `Writable`
class methods only.

This optional function will be called in a tick after the stream constructor
has returned, delaying any `_write()`, `_final()` and `_destroy()` calls until
`callback` is called. This is useful to initialize state or asynchronously
initialize resources before the stream can be used.

```js
const { Writable } = require('stream');
const fs = require('fs');

class WriteStream extends Writable {
constructor(filename) {
super();
this.filename = filename;
this.fd = fd;
}
_construct(callback) {
fs.open(this.filename, (fd, err) => {
if (err) {
callback(err);
} else {
this.fd = fd;
callback();
}
});
}
_write(chunk, encoding, callback) {
fs.write(this.fd, chunk, callback);
}
_destroy(err, callback) {
if (this.fd) {
fs.close(this.fd, (er) => callback(er || err));
} else {
callback(err);
}
}
}
```

#### `writable._write(chunk, encoding, callback)`
<!-- YAML
changes:
Expand Down Expand Up @@ -2219,6 +2269,63 @@ const myReadable = new Readable({
});
```

#### `readable._construct(callback)`
<!-- YAML
added: REPLACEME
-->

* `callback` {Function} Call this function (optionally with an error
argument) when the stream has finished initializing.

The `_construct()` method MUST NOT be called directly. It may be implemented
by child classes, and if so, will be called by the internal `Readable`
class methods only.

This optional function will be scheduled in the next tick by the stream
constructor, delaying any `_read()` and `_destroy()` calls until `callback` is
called. This is useful to initialize state or asynchronously initialize
resources before the stream can be used.

```js
const { Readable } = require('stream');
const fs = require('fs');

class ReadStream extends Readable {
constructor(filename) {
super();
this.filename = filename;
this.fd = null;
}
_construct(callback) {
fs.open(this.filename, (fd, err) => {
if (err) {
callback(err);
} else {
this.fd = fd;
callback();
}
});
}
_read(n) {
const buf = Buffer.alloc(n);
fs.read(this.fd, buf, 0, n, null, (err, bytesRead) => {
if (err) {
this.destroy(err);
} else {
this.push(bytesRead > 0 ? buf.slice(0, bytesRead) : null);
}
});
}
_destroy(err, callback) {
if (this.fd) {
fs.close(this.fd, (er) => callback(er || err));
} else {
callback(err);
}
}
}
```

#### `readable._read(size)`
<!-- YAML
added: v0.9.4
Expand Down