Skip to content
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

[v12.x backport] doc: allow <code> in header elements #31108

Closed
wants to merge 55 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0b0cd8d
test: correct header length subtraction
Trott Nov 29, 2019
4e93f23
doc: update socket.bufferSize text
Trott Nov 30, 2019
827c53b
doc: update README.md to fix active/maint times
mhdawson Nov 28, 2019
50a54ce
doc: update signature algorithm in release doc
MylesBorins Nov 26, 2019
043163a
doc: revise REPL uncaught exception text
Trott Nov 30, 2019
2aa8654
test: fix test-benchmark-streams
Trott Dec 2, 2019
6c6ffdd
test: use arrow functions in async-hooks tests
GaryGSC Oct 26, 2019
6a35c38
doc: fix typographical error
Trott Nov 30, 2019
3b096c2
build,win: propagate error codes in vcbuild
joaocgreis Nov 30, 2019
197b616
test: add an indicator `isIBMi`
dmabupt Nov 29, 2019
f3c3b1d
test: add coverage for ERR_TLS_INVALID_PROTOCOL_VERSION
Trott Nov 30, 2019
a83ccf8
test: skip test-domain-error-types in debug mode temporariliy
Trott Nov 24, 2019
0054636
doc: allow <code> in header elements
Trott Dec 23, 2019
424266a
doc,dns: use code markup/markdown in headers
Trott Dec 23, 2019
ef4ecf4
doc: use code markup/markdown in headers in addons documentation
Trott Dec 23, 2019
a933028
doc,assert: use code markup/markdown in headers
Trott Dec 23, 2019
a2bea80
doc,async_hooks: use code markup/markdown in headers
Trott Dec 23, 2019
b4934ef
doc,buffer: use code markup/markdown in headers
Trott Dec 23, 2019
3e07682
doc,child_process: use code markup/markdown in headers
Trott Dec 23, 2019
700e28d
doc,cluster: use code markup/markdown in headers
Trott Dec 24, 2019
d92200a
doc,console: use code markup/markdown in headers
Trott Dec 24, 2019
af66dba
doc,crypto: use code markup/markdown in headers
Trott Dec 24, 2019
e00e4d2
doc: use code markup/markdown in headers in deprecations documentation
Trott Dec 24, 2019
17efccd
doc,dgram: use code markup/markdown in headers
Trott Dec 24, 2019
4eb5e60
doc,domain: use code markup/markdown in headers
Trott Dec 24, 2019
e74fa1e
doc,errors: use code markup/markdown in headers
Trott Dec 24, 2019
c763c70
doc,esm: use code markup/markdown in headers
Trott Dec 24, 2019
b1f2dd6
doc,events: use code markup/markdown in headers
Trott Dec 24, 2019
e91846c
doc,fs: use code markup/markdown in headers
Trott Dec 24, 2019
23f5045
doc: use code markup/markdown in headers in globals documentation
Trott Dec 24, 2019
3e95c86
doc,http: use code markup/markdown in headers
Trott Dec 24, 2019
f6084bc
doc,http2: use code markup/markdown in headers
Trott Dec 24, 2019
eb82113
doc,https: use code markup/markdown in headers
Trott Dec 24, 2019
3ac8493
doc,inspector: use code markup/markdown in headers
Trott Dec 24, 2019
e2a4293
doc,module: use code markup/markdown in headers
Trott Dec 24, 2019
7cce4bb
doc,net: use code markup/markdown in headers
Trott Dec 24, 2019
cc65a3c
doc,os: use code markup/markdown in headers
Trott Dec 24, 2019
7b73674
doc,path: use code markup/markdown in headers
Trott Dec 24, 2019
6885967
doc,perf_hooks: use code markup/markdown in headers
Trott Dec 24, 2019
a8f3310
doc,process: use code markup/markdown in headers
Trott Dec 24, 2019
0c253b9
doc,punycode: use code markup/markdown in headers
Trott Dec 24, 2019
003e188
doc,querystring: use code markup/markdown in headers
Trott Dec 24, 2019
b4b4da4
doc,readline: use code markup/markdown in headers
Trott Dec 24, 2019
728c984
doc,repl: use code markup/markdown in headers
Trott Dec 24, 2019
3a1772c
doc,stream: use code markup/markdown in headers
Trott Dec 24, 2019
13e067b
doc,string_decoder: use code markup/markdown in headers
Trott Dec 24, 2019
e3f26c4
doc,timers: use code markup/markdown in headers
Trott Dec 24, 2019
5a76e25
doc,tls: use code markup/markdown in headers
Trott Dec 24, 2019
3c2c8fa
doc,tty: use code markup/markdown in headers
Trott Dec 24, 2019
a0717c7
doc,url: use code markup/markdown in headers
Trott Dec 24, 2019
1bf0dd7
doc,zlib: use code markup/markdown in headers
Trott Dec 24, 2019
f7a70bb
doc,util: use code markup/markdown in headers
Trott Dec 24, 2019
de8f03a
doc,v8: use code markup/markdown in headers
Trott Dec 24, 2019
58132d5
doc,worker: use code markup/markdown in headers
Trott Dec 24, 2019
113cbef
doc,vm: use code markup/markdown in headers
Trott Dec 25, 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,worker: use code markup/markdown in headers
PR-URL: #31086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott committed Dec 27, 2019
commit 58132d5b11adbf37d24bc0d04924e50eb20e0c35
60 changes: 30 additions & 30 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ When implementing a worker pool, use the [`AsyncResource`][] API to inform
diagnostic tools (e.g. in order to provide asynchronous stack traces) about the
correlation between tasks and their outcomes.

## worker.isMainThread
## `worker.isMainThread`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -74,7 +74,7 @@ if (isMainThread) {
}
```

## worker.moveMessagePortToContext(port, contextifiedSandbox)
## `worker.moveMessagePortToContext(port, contextifiedSandbox)`
<!-- YAML
added: v11.13.0
-->
Expand All @@ -98,7 +98,7 @@ However, the created `MessagePort` will no longer inherit from
[`EventEmitter`][], and only [`port.onmessage()`][] can be used to receive
events using it.

## worker.parentPort
## `worker.parentPort`
<!-- YAML
added: v10.5.0
-->
Expand Down Expand Up @@ -129,7 +129,7 @@ if (isMainThread) {
}
```

## worker.receiveMessageOnPort(port)
## `worker.receiveMessageOnPort(port)`
<!-- YAML
added: v12.3.0
-->
Expand Down Expand Up @@ -157,7 +157,7 @@ console.log(receiveMessageOnPort(port2));
When this function is used, no `'message'` event will be emitted and the
`onmessage` listener will not be invoked.

## worker.SHARE_ENV
## `worker.SHARE_ENV`
<!-- YAML
added: v11.14.0
-->
Expand All @@ -176,7 +176,7 @@ new Worker('process.env.SET_IN_WORKER = "foo"', { eval: true, env: SHARE_ENV })
});
```

## worker.threadId
## `worker.threadId`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -187,7 +187,7 @@ An integer identifier for the current thread. On the corresponding worker object
(if there is any), it is available as [`worker.threadId`][].
This value is unique for each [`Worker`][] instance inside a single process.

## worker.workerData
## `worker.workerData`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -208,7 +208,7 @@ if (isMainThread) {
}
```

## Class: MessageChannel
## Class: `MessageChannel`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -228,7 +228,7 @@ port2.postMessage({ foo: 'bar' });
// Prints: received { foo: 'bar' } from the `port1.on('message')` listener
```

## Class: MessagePort
## Class: `MessagePort`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -243,7 +243,7 @@ structured data, memory regions and other `MessagePort`s between different
With the exception of `MessagePort`s being [`EventEmitter`][]s rather
than [`EventTarget`][]s, this implementation matches [browser `MessagePort`][]s.

### Event: 'close'
### Event: `'close'`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -265,7 +265,7 @@ port1.postMessage('foobar');
port1.close();
```

### Event: 'message'
### Event: `'message'`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -278,7 +278,7 @@ input of [`port.postMessage()`][].
Listeners on this event will receive a clone of the `value` parameter as passed
to `postMessage()` and no further arguments.

### port.close()
### `port.close()`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -290,7 +290,7 @@ This method can be called when no further communication will happen over this
The [`'close'` event][] will be emitted on both `MessagePort` instances that
are part of the channel.

### port.postMessage(value\[, transferList\])
### `port.postMessage(value[, transferList])`
<!-- YAML
added: v10.5.0
-->
Expand Down Expand Up @@ -371,7 +371,7 @@ posting without having side effects.
For more information on the serialization and deserialization mechanisms
behind this API, see the [serialization API of the `v8` module][v8.serdes].

### port.ref()
### `port.ref()`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -384,7 +384,7 @@ If listeners are attached or removed using `.on('message')`, the port will
be `ref()`ed and `unref()`ed automatically depending on whether
listeners for the event exist.

### port.start()
### `port.start()`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -399,7 +399,7 @@ Node.js also diverges in its handling of `.onmessage`. Setting it will
automatically call `.start()`, but unsetting it will let messages queue up
until a new handler is set or the port is discarded.

### port.unref()
### `port.unref()`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -412,7 +412,7 @@ If listeners are attached or removed using `.on('message')`, the port will
be `ref()`ed and `unref()`ed automatically depending on whether
listeners for the event exist.

## Class: Worker
## Class: `Worker`
<!-- YAML
added: v10.5.0
-->
Expand Down Expand Up @@ -487,7 +487,7 @@ if (isMainThread) {
}
```

### new Worker(filename\[, options\])
### `new Worker(filename[, options])`

* `filename` {string} The path to the Worker’s main script. Must be
either an absolute path or a relative path (i.e. relative to the
Expand Down Expand Up @@ -520,7 +520,7 @@ if (isMainThread) {
will be thrown if the object cannot be cloned (e.g. because it contains
`function`s).

### Event: 'error'
### Event: `'error'`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -530,7 +530,7 @@ added: v10.5.0
The `'error'` event is emitted if the worker thread throws an uncaught
exception. In that case, the worker will be terminated.

### Event: 'exit'
### Event: `'exit'`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -542,7 +542,7 @@ exited by calling [`process.exit()`][], the `exitCode` parameter will be the
passed exit code. If the worker was terminated, the `exitCode` parameter will
be `1`.

### Event: 'message'
### Event: `'message'`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -553,15 +553,15 @@ The `'message'` event is emitted when the worker thread has invoked
[`require('worker_threads').parentPort.postMessage()`][].
See the [`port.on('message')`][] event for more details.

### Event: 'online'
### Event: `'online'`
<!-- YAML
added: v10.5.0
-->

The `'online'` event is emitted when the worker thread has started executing
JavaScript code.

### worker.postMessage(value\[, transferList\])
### `worker.postMessage(value[, transferList])`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -573,7 +573,7 @@ Send a message to the worker that will be received via
[`require('worker_threads').parentPort.on('message')`][].
See [`port.postMessage()`][] for more details.

### worker.ref()
### `worker.ref()`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -583,7 +583,7 @@ Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker will
behavior). If the worker is `ref()`ed, calling `ref()` again will have
no effect.

### worker.stderr
### `worker.stderr`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -595,7 +595,7 @@ inside the worker thread. If `stderr: true` was not passed to the
[`Worker`][] constructor, then data will be piped to the parent thread's
[`process.stderr`][] stream.

### worker.stdin
### `worker.stdin`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -606,7 +606,7 @@ If `stdin: true` was passed to the [`Worker`][] constructor, this is a
writable stream. The data written to this stream will be made available in
the worker thread as [`process.stdin`][].

### worker.stdout
### `worker.stdout`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -618,7 +618,7 @@ inside the worker thread. If `stdout: true` was not passed to the
[`Worker`][] constructor, then data will be piped to the parent thread's
[`process.stdout`][] stream.

### worker.terminate()
### `worker.terminate()`
<!-- YAML
added: v10.5.0
changes:
Expand All @@ -636,7 +636,7 @@ Stop all JavaScript execution in the worker thread as soon as possible.
Returns a Promise for the exit code that is fulfilled when the
[`'exit'` event][] is emitted.

### worker.threadId
### `worker.threadId`
<!-- YAML
added: v10.5.0
-->
Expand All @@ -647,7 +647,7 @@ An integer identifier for the referenced thread. Inside the worker thread,
it is available as [`require('worker_threads').threadId`][].
This value is unique for each `Worker` instance inside a single process.

### worker.unref()
### `worker.unref()`
<!-- YAML
added: v10.5.0
-->
Expand Down