From 79d30b502105f329aeaf8ab85c539c9c331a5a82 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 23 Apr 2020 11:01:52 -0700 Subject: [PATCH 01/16] docs: change ```txt code blocks to ```text --- doc/api/errors.md | 2 +- doc/api/http.md | 2 +- doc/api/http2.md | 4 ++-- doc/api/modules.md | 4 ++-- doc/api/tls.md | 2 +- doc/api/tracing.md | 6 +++--- doc/api/url.md | 4 ++-- doc/api/util.md | 6 +++--- doc/guides/building-node-with-ninja.md | 2 +- doc/guides/contributing/pull-requests.md | 2 +- doc/guides/releases.md | 8 ++++---- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index ccd4b3b52a0455..ebe00255dd5de9 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -285,7 +285,7 @@ console.error(err.message); The `error.stack` property is a string describing the point in the code at which the `Error` was instantiated. -```txt +```text Error: Things keep happening! at /home/gbusey/file.js:525:2 at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21) diff --git a/doc/api/http.md b/doc/api/http.md index a683eebdab5d26..50d96fd1f5332b 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1974,7 +1974,7 @@ added: v0.1.90 Request URL string. This contains only the URL that is present in the actual HTTP request. If the request is: -```txt +```text GET /status?name=ryan HTTP/1.1\r\n Accept: text/plain\r\n \r\n diff --git a/doc/api/http2.md b/doc/api/http2.md index ceda983559d1ed..8836306979bd55 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2983,7 +2983,7 @@ added: v8.4.0 Request URL string. This contains only the URL that is present in the actual HTTP request. If the request is: -```txt +```text GET /status?name=ryan HTTP/1.1\r\n Accept: text/plain\r\n \r\n @@ -2999,7 +2999,7 @@ Then `request.url` will be: To parse the url into its parts `require('url').parse(request.url)` can be used: -```txt +```text $ node > require('url').parse('/status?name=ryan') Url { diff --git a/doc/api/modules.md b/doc/api/modules.md index aec88a936ba716..ba21c638cb52d6 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -149,7 +149,7 @@ the `require.resolve()` function. Putting together all of the above, here is the high-level algorithm in pseudocode of what `require()` does: -```txt +```text require(X) from module at path Y 1. If X is a core module, a. return the core module @@ -409,7 +409,7 @@ example, then `require('./some-library')` would attempt to load: If these attempts fail, then Node.js will report the entire module as missing with the default error: -```txt +```text Error: Cannot find module 'some-library' ``` diff --git a/doc/api/tls.md b/doc/api/tls.md index 55dbf3b8d42b18..2c2bf774bc2247 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -272,7 +272,7 @@ Reused, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256 Node.js is built with a default suite of enabled and disabled TLS ciphers. Currently, the default cipher suite is: -```txt +```text TLS_AES_256_GCM_SHA384: TLS_CHACHA20_POLY1305_SHA256: TLS_AES_128_GCM_SHA256: diff --git a/doc/api/tracing.md b/doc/api/tracing.md index 596f624be54246..52c3257a354fa4 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -36,7 +36,7 @@ The available categories are: By default the `node`, `node.async_hooks`, and `v8` categories are enabled. -```txt +```text node --trace-event-categories v8,node,node.async_hooks server.js ``` @@ -45,7 +45,7 @@ flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag *may* still be used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. -```txt +```text node --trace-events-enabled // is equivalent to @@ -74,7 +74,7 @@ The logging file is by default called `node_trace.${rotation}.log`, where be specified with `--trace-event-file-pattern` that accepts a template string that supports `${rotation}` and `${pid}`: -```txt +```text node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js ``` diff --git a/doc/api/url.md b/doc/api/url.md index 49f56509fe41e9..d3f893f602b00c 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -29,7 +29,7 @@ properties of a WHATWG `URL` object. WHATWG URL's `origin` property includes `protocol` and `host`, but not `username` or `password`. -```txt +```text ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ href │ ├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤ @@ -1263,7 +1263,7 @@ located within the structure of the URL. Within the Legacy API, spaces (`' '`) and the following characters will be automatically escaped in the properties of URL objects: -```txt +```text < > " ` \r \n \t { } | \ ^ ' ``` diff --git a/doc/api/util.md b/doc/api/util.md index 02453e75c34075..6938316f8df774 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -42,7 +42,7 @@ callbackFunction((err, ret) => { Will print: -```txt +```text hello world ``` @@ -93,7 +93,7 @@ debuglog('hello from foo [%d]', 123); If this program is run with `NODE_DEBUG=foo` in the environment, then it will output something like: -```txt +```text FOO 3245: hello from foo [123] ``` @@ -112,7 +112,7 @@ debuglog('hi there, it\'s foo-bar [%d]', 2333); if it is run with `NODE_DEBUG=foo*` in the environment, then it will output something like: -```txt +```text FOO-BAR 3257: hi there, it's foo-bar [2333] ``` diff --git a/doc/guides/building-node-with-ninja.md b/doc/guides/building-node-with-ninja.md index b4b36f76c6acb2..5c27854ebb9969 100644 --- a/doc/guides/building-node-with-ninja.md +++ b/doc/guides/building-node-with-ninja.md @@ -15,7 +15,7 @@ the project's root. When running `make`, you will see output similar to the following if the build has succeeded: -```txt +```text ninja: Entering directory `out/Release` [4/4] LINK node, POSTBUILDS ``` diff --git a/doc/guides/contributing/pull-requests.md b/doc/guides/contributing/pull-requests.md index a37929726612d1..f7c76f3324edf9 100644 --- a/doc/guides/contributing/pull-requests.md +++ b/doc/guides/contributing/pull-requests.md @@ -178,7 +178,7 @@ situation would trigger the breaking change and what is the exact change. Sample complete commit message: -```txt +```text subsystem: explain the commit in one line The body of the commit message should be one or more paragraphs, explaining diff --git a/doc/guides/releases.md b/doc/guides/releases.md index 2068a46dc111e4..3a9acdb8f5888a 100644 --- a/doc/guides/releases.md +++ b/doc/guides/releases.md @@ -342,7 +342,7 @@ The `CHANGELOG.md`, `doc/changelogs/CHANGELOG_Vx.md`, `src/node_version.h`, and `REPLACEME` changes should be the final commit that will be tagged for the release. When committing these to git, use the following message format: -```txt +```text YYYY-MM-DD, Version x.y.z (Release Type) Notable changes: @@ -355,7 +355,7 @@ For security releases, begin the commit message with the phrase [distribution indexer](https://github.com/nodejs/nodejs-dist-indexer) to identify it as such: -```txt +```text YYYY-MM-DD, Version x.y.z (Release Type) This is a security release. @@ -491,7 +491,7 @@ $ git secure-tag -sm "YYYY-MM-DD Node.js vx.y.z ( From 439d081fac40f582ee25531551f5d917a747407e Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 23 Apr 2020 11:02:18 -0700 Subject: [PATCH 02/16] docs: change ```fundamental code block to ```text --- doc/api/fs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 4e11fd32a04cb8..1d6c9655bcbac6 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3467,7 +3467,7 @@ is recommended. For example, given the following directory structure: -```fundamental +```text - txtDir -- file.txt - app.js From 403494bfba4f8f4c0fce17a3cd1ff8eb6c73ec68 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 23 Apr 2020 11:02:56 -0700 Subject: [PATCH 03/16] docs: change ```raw code block to ```text --- doc/api/report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/report.md b/doc/api/report.md index 6fa8d92a9bf4b4..18f3baf5987a3f 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -503,7 +503,7 @@ containing `libuv` handle information and an OS platform information section showing CPU and memory usage and system limits. An example report can be triggered using the Node.js REPL: -```raw +```text $ node > process.report.writeReport(); Writing Node.js report to file: report.20181126.091102.8480.0.001.json From 2fdcd07821088b647bd6cc92732365ee269e2d26 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 23 Apr 2020 14:40:27 -0700 Subject: [PATCH 04/16] docs: update ```text (formerly ```raw) code block to ```console --- doc/api/report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/report.md b/doc/api/report.md index 18f3baf5987a3f..e852e8414a54ac 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -503,7 +503,7 @@ containing `libuv` handle information and an OS platform information section showing CPU and memory usage and system limits. An example report can be triggered using the Node.js REPL: -```text +```console $ node > process.report.writeReport(); Writing Node.js report to file: report.20181126.091102.8480.0.001.json From d2bb8c881b02f587b56b5be34fcf906b52029e4b Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Fri, 24 Apr 2020 08:49:34 -0700 Subject: [PATCH 05/16] Update doc/api/http2.md --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 8836306979bd55..1833b98b89d065 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2999,7 +2999,7 @@ Then `request.url` will be: To parse the url into its parts `require('url').parse(request.url)` can be used: -```text +```console $ node > require('url').parse('/status?name=ryan') Url { From 300c21c94dea42af976a05e5f4e3c354bb94828b Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:23:56 -0700 Subject: [PATCH 06/16] Update doc/guides/building-node-with-ninja.md Co-authored-by: Derek Lewis --- doc/guides/building-node-with-ninja.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/building-node-with-ninja.md b/doc/guides/building-node-with-ninja.md index 5c27854ebb9969..1b95b6886792da 100644 --- a/doc/guides/building-node-with-ninja.md +++ b/doc/guides/building-node-with-ninja.md @@ -15,7 +15,7 @@ the project's root. When running `make`, you will see output similar to the following if the build has succeeded: -```text +```console ninja: Entering directory `out/Release` [4/4] LINK node, POSTBUILDS ``` From 4077339202a3a4dbfec502c0d293b0a4b092f065 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:24:04 -0700 Subject: [PATCH 07/16] Update doc/api/util.md Co-authored-by: Derek Lewis --- doc/api/util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.md b/doc/api/util.md index 6938316f8df774..5f42d9625b54db 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -93,7 +93,7 @@ debuglog('hello from foo [%d]', 123); If this program is run with `NODE_DEBUG=foo` in the environment, then it will output something like: -```text +```console FOO 3245: hello from foo [123] ``` From c7c91ad85b97779f9705bf7eb2c25d682326852d Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:24:13 -0700 Subject: [PATCH 08/16] Update doc/api/errors.md Co-authored-by: Derek Lewis --- doc/api/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index ebe00255dd5de9..e355d02cc7adb9 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -285,7 +285,7 @@ console.error(err.message); The `error.stack` property is a string describing the point in the code at which the `Error` was instantiated. -```text +```console Error: Things keep happening! at /home/gbusey/file.js:525:2 at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21) From 568bbf9daf0e98ddc167d5fa705f2be7063a17a8 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:24:27 -0700 Subject: [PATCH 09/16] Update doc/api/http2.md Co-authored-by: Derek Lewis --- doc/api/http2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http2.md b/doc/api/http2.md index 1833b98b89d065..e3f477abb66980 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2983,7 +2983,7 @@ added: v8.4.0 Request URL string. This contains only the URL that is present in the actual HTTP request. If the request is: -```text +```http GET /status?name=ryan HTTP/1.1\r\n Accept: text/plain\r\n \r\n From 995e428fb1303592126675aa4cca8feb9500b309 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:24:48 -0700 Subject: [PATCH 10/16] Update doc/api/http.md Co-authored-by: Derek Lewis --- doc/api/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/http.md b/doc/api/http.md index 50d96fd1f5332b..aeb18e1e24821f 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -1974,7 +1974,7 @@ added: v0.1.90 Request URL string. This contains only the URL that is present in the actual HTTP request. If the request is: -```text +```http GET /status?name=ryan HTTP/1.1\r\n Accept: text/plain\r\n \r\n From 2ace33443bf4712d5e6d6a9d4b47b9a77fd6fc15 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:24:56 -0700 Subject: [PATCH 11/16] Update doc/api/modules.md Co-authored-by: Derek Lewis --- doc/api/modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index ba21c638cb52d6..fb034e9bc76c44 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -409,7 +409,7 @@ example, then `require('./some-library')` would attempt to load: If these attempts fail, then Node.js will report the entire module as missing with the default error: -```text +```console Error: Cannot find module 'some-library' ``` From ed4162c893ee46eda4ca1f749a57228fb9b06bc1 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 16:25:23 -0700 Subject: [PATCH 12/16] Update doc/api/util.md Co-authored-by: Derek Lewis --- doc/api/util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/util.md b/doc/api/util.md index 5f42d9625b54db..a3f3fb225a058b 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -112,7 +112,7 @@ debuglog('hi there, it\'s foo-bar [%d]', 2333); if it is run with `NODE_DEBUG=foo*` in the environment, then it will output something like: -```text +```console FOO-BAR 3257: hi there, it's foo-bar [2333] ``` From 27c59e9f0b8d175f1a3ca0d69af99d6a4163cd7d Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 22:56:22 -0700 Subject: [PATCH 13/16] Update doc/api/tracing.md Co-authored-by: Derek Lewis --- doc/api/tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/tracing.md b/doc/api/tracing.md index 52c3257a354fa4..159a9309c4ebd0 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -36,7 +36,7 @@ The available categories are: By default the `node`, `node.async_hooks`, and `v8` categories are enabled. -```text +```bash node --trace-event-categories v8,node,node.async_hooks server.js ``` From 292c84102672615a2ae4f21a5da03882486b0db7 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 22:56:30 -0700 Subject: [PATCH 14/16] Update doc/api/tracing.md Co-authored-by: Derek Lewis --- doc/api/tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/tracing.md b/doc/api/tracing.md index 159a9309c4ebd0..6ee846b1f9edd1 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -74,7 +74,7 @@ The logging file is by default called `node_trace.${rotation}.log`, where be specified with `--trace-event-file-pattern` that accepts a template string that supports `${rotation}` and `${pid}`: -```text +```bash node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js ``` From 9e2c40ce5e563f8e83006403f35f5bcb5ad7fc25 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 26 May 2020 22:56:37 -0700 Subject: [PATCH 15/16] Update doc/api/tracing.md Co-authored-by: Derek Lewis --- doc/api/tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/tracing.md b/doc/api/tracing.md index 6ee846b1f9edd1..b369c56edd5b83 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -45,7 +45,7 @@ flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag *may* still be used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. -```text +```bash node --trace-events-enabled // is equivalent to From 317cf7029af3b3b251bc737598a8831f95eacea1 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 27 May 2020 15:32:00 -0700 Subject: [PATCH 16/16] Update doc/api/tracing.md Co-authored-by: Derek Lewis --- doc/api/tracing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/tracing.md b/doc/api/tracing.md index b369c56edd5b83..4a684be4b190e9 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -48,7 +48,7 @@ flag to enable trace events. This requirement has been removed. However, the ```bash node --trace-events-enabled -// is equivalent to +# is equivalent to node --trace-event-categories v8,node,node.async_hooks ```