Skip to content

Commit a7331da

Browse files
nschonnitargos
authored andcommitted
doc: indent ordered list child content
Markdownlint flags this with MD029 rule. Markdown renders will usually use list continuation number if it can. Explicitly adding it to the list item child scope makes it clearer. PR-URL: #29332 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 32bb58b commit a7331da

File tree

3 files changed

+153
-151
lines changed

3 files changed

+153
-151
lines changed

doc/api/dns.md

+44-42
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,54 @@
66
77
The `dns` module contains functions belonging to two different categories:
88

9-
1) Functions that use the underlying operating system facilities to perform
10-
name resolution, and that do not necessarily perform any network communication.
11-
This category contains only one function: [`dns.lookup()`][]. **Developers
12-
looking to perform name resolution in the same way that other applications on
13-
the same operating system behave should use [`dns.lookup()`][].**
9+
1. Functions that use the underlying operating system facilities to perform
10+
name resolution, and that do not necessarily perform any network
11+
communication.
12+
This category contains only one function: [`dns.lookup()`][]. **Developers
13+
looking to perform name resolution in the same way that other applications
14+
on the same operating system behave should use [`dns.lookup()`][].**
1415

15-
For example, looking up `iana.org`.
16+
For example, looking up `iana.org`.
1617

17-
```js
18-
const dns = require('dns');
19-
20-
dns.lookup('iana.org', (err, address, family) => {
21-
console.log('address: %j family: IPv%s', address, family);
22-
});
23-
// address: "192.0.43.8" family: IPv4
24-
```
25-
26-
2) Functions that connect to an actual DNS server to perform name resolution,
27-
and that _always_ use the network to perform DNS queries. This category
28-
contains all functions in the `dns` module _except_ [`dns.lookup()`][]. These
29-
functions do not use the same set of configuration files used by
30-
[`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by
31-
developers who do not want to use the underlying operating system's facilities
32-
for name resolution, and instead want to _always_ perform DNS queries.
18+
```js
19+
const dns = require('dns');
3320

34-
Below is an example that resolves `'archive.org'` then reverse resolves the IP
35-
addresses that are returned.
36-
37-
```js
38-
const dns = require('dns');
39-
40-
dns.resolve4('archive.org', (err, addresses) => {
41-
if (err) throw err;
42-
43-
console.log(`addresses: ${JSON.stringify(addresses)}`);
44-
45-
addresses.forEach((a) => {
46-
dns.reverse(a, (err, hostnames) => {
47-
if (err) {
48-
throw err;
49-
}
50-
console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
21+
dns.lookup('iana.org', (err, address, family) => {
22+
console.log('address: %j family: IPv%s', address, family);
5123
});
52-
});
53-
});
54-
```
24+
// address: "192.0.43.8" family: IPv4
25+
```
26+
27+
2. Functions that connect to an actual DNS server to perform name resolution,
28+
and that _always_ use the network to perform DNS queries. This category
29+
contains all functions in the `dns` module _except_ [`dns.lookup()`][].
30+
These functions do not use the same set of configuration files used by
31+
[`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by
32+
developers who do not want to use the underlying operating system's
33+
facilities for name resolution, and instead want to _always_ perform DNS
34+
queries.
35+
36+
Below is an example that resolves `'archive.org'` then reverse resolves the
37+
IP addresses that are returned.
38+
39+
```js
40+
const dns = require('dns');
41+
42+
dns.resolve4('archive.org', (err, addresses) => {
43+
if (err) throw err;
44+
45+
console.log(`addresses: ${JSON.stringify(addresses)}`);
46+
47+
addresses.forEach((a) => {
48+
dns.reverse(a, (err, hostnames) => {
49+
if (err) {
50+
throw err;
51+
}
52+
console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
53+
});
54+
});
55+
});
56+
```
5557
5658
There are subtle consequences in choosing one over the other, please consult
5759
the [Implementation considerations section][] for more information.

doc/guides/backporting-to-release-lines.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,34 @@ replace that with the staging branch for the targeted release line.
3535
2. Make sure that the local staging branch is up to date with the remote
3636
3. Create a new branch off of the staging branch
3737

38-
```shell
39-
# Assuming your fork of Node.js is checked out in $NODE_DIR,
40-
# the origin remote points to your fork, and the upstream remote points
41-
# to git://github.com/nodejs/node
42-
cd $NODE_DIR
43-
# If v8.x-staging is checked out `pull` should be used instead of `fetch`
44-
git fetch upstream v8.x-staging:v8.x-staging -f
45-
# Assume we want to backport PR #10157
46-
git checkout -b backport-10157-to-v8.x v8.x-staging
47-
# Ensure there are no test artifacts from previous builds
48-
# Note that this command deletes all files and directories
49-
# not under revision control below the ./test directory.
50-
# It is optional and should be used with caution.
51-
git clean -xfd ./test/
52-
```
38+
```shell
39+
# Assuming your fork of Node.js is checked out in $NODE_DIR,
40+
# the origin remote points to your fork, and the upstream remote points
41+
# to git://github.com/nodejs/node
42+
cd $NODE_DIR
43+
# If v8.x-staging is checked out `pull` should be used instead of `fetch`
44+
git fetch upstream v8.x-staging:v8.x-staging -f
45+
# Assume we want to backport PR #10157
46+
git checkout -b backport-10157-to-v8.x v8.x-staging
47+
# Ensure there are no test artifacts from previous builds
48+
# Note that this command deletes all files and directories
49+
# not under revision control below the ./test directory.
50+
# It is optional and should be used with caution.
51+
git clean -xfd ./test/
52+
```
5353

5454
4. After creating the branch, apply the changes to the branch. The cherry-pick
5555
will likely fail due to conflicts. In that case, you will see something
5656
like this:
5757

58-
```shell
59-
# Say the $SHA is 773cdc31ef
60-
$ git cherry-pick $SHA # Use your commit hash
61-
error: could not apply 773cdc3... <commit title>
62-
hint: after resolving the conflicts, mark the corrected paths
63-
hint: with 'git add <paths>' or 'git rm <paths>'
64-
hint: and commit the result with 'git commit'
65-
```
58+
```shell
59+
# Say the $SHA is 773cdc31ef
60+
$ git cherry-pick $SHA # Use your commit hash
61+
error: could not apply 773cdc3... <commit title>
62+
hint: after resolving the conflicts, mark the corrected paths
63+
hint: with 'git add <paths>' or 'git rm <paths>'
64+
hint: and commit the result with 'git commit'
65+
```
6666

6767
5. Make the required changes to remove the conflicts, add the files to the index
6868
using `git add`, and then commit the changes. That can be done with

doc/guides/updating-root-certs.md

+86-86
Original file line numberDiff line numberDiff line change
@@ -20,106 +20,106 @@ the nodejs/node repository.
2020

2121
1. Find NSS metadata for update.
2222

23-
The latest released NSS version, release date, Firefox version, and Firefox
24-
release date can be found in the [NSS release schedule][].
23+
The latest released NSS version, release date, Firefox version, and Firefox
24+
release date can be found in the [NSS release schedule][].
2525

26-
The tag to fetch `certdata.txt` from is found by looking for the release
27-
version in the [tag list][].
26+
The tag to fetch `certdata.txt` from is found by looking for the release
27+
version in the [tag list][].
2828

2929
2. Update `certdata.txt` from the NSS release tag.
3030

31-
Update the tag in the commands below, and run:
31+
Update the tag in the commands below, and run:
3232

33-
```shell
34-
cd tools/
35-
./mk-ca-bundle.pl -v 2>_before
36-
curl -O https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
37-
```
33+
```shell
34+
cd tools/
35+
./mk-ca-bundle.pl -v 2>_before
36+
curl -O https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
37+
```
3838

39-
The `_before` file will be used later. Verify that running `mk-ca-bundle` made
40-
no changes to `src/node_root_certs.h`. If it did, something went wrong with the
41-
previous update. Seek help!
39+
The `_before` file will be used later. Verify that running `mk-ca-bundle`
40+
made no changes to `src/node_root_certs.h`. If it did, something went wrong
41+
with the previous update. Seek help!
4242

43-
Update metadata in the message below, and commit `certdata.txt`:
43+
Update metadata in the message below, and commit `certdata.txt`:
4444

45-
```text
46-
tools: update certdata.txt
45+
```text
46+
tools: update certdata.txt
4747
48-
This is the certdata.txt[0] from NSS 3.41, released on 2018-12-03.
48+
This is the certdata.txt[0] from NSS 3.41, released on 2018-12-03.
4949
50-
This is the version of NSS that will ship in Firefox 65 on
51-
2018-12-11.
50+
This is the version of NSS that will ship in Firefox 65 on
51+
2018-12-11.
5252
53-
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
54-
```
53+
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
54+
```
5555

5656
3. Update `node_root_certs.h` from `certdata.txt`.
5757

58-
Run the command below:
59-
60-
```shell
61-
./mk-ca-bundle.pl -v 2>_after
62-
```
63-
64-
Confirm that `../src/node_root_certs.h` was updated.
65-
66-
Determine what changes were made by diffing the before and after files:
67-
68-
```shell
69-
% diff _before _after
70-
11d10
71-
< Parsing: Visa eCommerce Root
72-
106d104
73-
< Parsing: TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
74-
113,117d110
75-
< Parsing: Certplus Root CA G1
76-
< Parsing: Certplus Root CA G2
77-
< Parsing: OpenTrust Root CA G1
78-
< Parsing: OpenTrust Root CA G2
79-
< Parsing: OpenTrust Root CA G3
80-
134c127,136
81-
< Done (133 CA certs processed, 20 skipped).
82-
---
83-
> Parsing: GlobalSign Root CA - R6
84-
> Parsing: OISTE WISeKey Global Root GC CA
85-
> Parsing: GTS Root R1
86-
> Parsing: GTS Root R2
87-
> Parsing: GTS Root R3
88-
> Parsing: GTS Root R4
89-
> Parsing: UCA Global G2 Root
90-
> Parsing: UCA Extended Validation Root
91-
> Parsing: Certigna Root CA
92-
> Done (135 CA certs processed, 16 skipped).
93-
```
94-
95-
Use the diff to update the message below, and commit `src/node_root_certs.h`:
96-
97-
```text
98-
crypto: update root certificates
99-
100-
Update the list of root certificates in src/node_root_certs.h with
101-
tools/mk-ca-bundle.pl.
102-
103-
Certificates added:
104-
- GlobalSign Root CA - R6
105-
- OISTE WISeKey Global Root GC CA
106-
- GTS Root R1
107-
- GTS Root R2
108-
- GTS Root R3
109-
- GTS Root R4
110-
- UCA Global G2 Root
111-
- UCA Extended Validation Root
112-
- Certigna Root CA
113-
114-
Certificates removed:
115-
- Visa eCommerce Root
116-
- TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
117-
- Certplus Root CA G1
118-
- Certplus Root CA G2
119-
- OpenTrust Root CA G1
120-
- OpenTrust Root CA G2
121-
- OpenTrust Root CA G3
122-
```
58+
Run the command below:
59+
60+
```shell
61+
./mk-ca-bundle.pl -v 2>_after
62+
```
63+
64+
Confirm that `../src/node_root_certs.h` was updated.
65+
66+
Determine what changes were made by diffing the before and after files:
67+
68+
```shell
69+
% diff _before _after
70+
11d10
71+
< Parsing: Visa eCommerce Root
72+
106d104
73+
< Parsing: TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
74+
113,117d110
75+
< Parsing: Certplus Root CA G1
76+
< Parsing: Certplus Root CA G2
77+
< Parsing: OpenTrust Root CA G1
78+
< Parsing: OpenTrust Root CA G2
79+
< Parsing: OpenTrust Root CA G3
80+
134c127,136
81+
< Done (133 CA certs processed, 20 skipped).
82+
---
83+
> Parsing: GlobalSign Root CA - R6
84+
> Parsing: OISTE WISeKey Global Root GC CA
85+
> Parsing: GTS Root R1
86+
> Parsing: GTS Root R2
87+
> Parsing: GTS Root R3
88+
> Parsing: GTS Root R4
89+
> Parsing: UCA Global G2 Root
90+
> Parsing: UCA Extended Validation Root
91+
> Parsing: Certigna Root CA
92+
> Done (135 CA certs processed, 16 skipped).
93+
```
94+
95+
Use the diff to update the message below, and commit `src/node_root_certs.h`:
96+
97+
```text
98+
crypto: update root certificates
99+
100+
Update the list of root certificates in src/node_root_certs.h with
101+
tools/mk-ca-bundle.pl.
102+
103+
Certificates added:
104+
- GlobalSign Root CA - R6
105+
- OISTE WISeKey Global Root GC CA
106+
- GTS Root R1
107+
- GTS Root R2
108+
- GTS Root R3
109+
- GTS Root R4
110+
- UCA Global G2 Root
111+
- UCA Extended Validation Root
112+
- Certigna Root CA
113+
114+
Certificates removed:
115+
- Visa eCommerce Root
116+
- TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
117+
- Certplus Root CA G1
118+
- Certplus Root CA G2
119+
- OpenTrust Root CA G1
120+
- OpenTrust Root CA G2
121+
- OpenTrust Root CA G3
122+
```
123123

124124
[NSS release schedule]: https://wiki.mozilla.org/NSS:Release_Versions
125125
[tag list]: https://hg.mozilla.org/projects/nss/tags

0 commit comments

Comments
 (0)