diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index ca23a4fa322f94..f3232574545d63 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -334,7 +334,7 @@ changes: Type: End-of-Life Calling an asynchronous function without a callback throws a `TypeError` -in Node.js 10.0.0 onwards. (See https://github.com/nodejs/node/pull/12562.) +in Node.js 10.0.0 onwards. (See .) ### DEP0014: fs.read legacy String interface @@ -1717,7 +1717,7 @@ changes: Type: End-of-Life The AsyncHooks Sensitive API was never documented and had various minor issues. -(See https://github.com/nodejs/node/issues/15572.) Use the `AsyncResource` +(See .) Use the `AsyncResource` API instead. @@ -1737,8 +1737,8 @@ changes: Type: End-of-Life `runInAsyncIdScope` doesn't emit the `'before'` or `'after'` event and can thus -cause a lot of issues. See https://github.com/nodejs/node/issues/14328 for more -details. +cause a lot of issues. See for +more details. ### DEP0089: require('assert') @@ -1897,7 +1897,7 @@ to unrecoverable errors. Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much safer, and more convenient, alternative. See -https://github.com/nodejs/node/pull/18513 for more details. + for more details. ### DEP0099: async context-unaware node::MakeCallback C++ APIs diff --git a/doc/api/repl.md b/doc/api/repl.md index 98c3f66839da83..d010265327e5fa 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -453,7 +453,7 @@ Returns `true` if `keyword` is a valid keyword, otherwise `false`. added: v0.1.91 changes: - version: v10.0.0 - pr-url: https://github.com/nodejs/node/pull/v10.0.0 + pr-url: https://github.com/nodejs/node/pull/19187 description: The `REPL_MAGIC_MODE` `replMode` was removed. - version: v5.8.0 pr-url: https://github.com/nodejs/node/pull/5388 @@ -619,10 +619,10 @@ possible to connect to a long-running Node.js process without restarting it. For an example of running a "full-featured" (`terminal`) REPL over a `net.Server` and `net.Socket` instance, see: -[https://gist.github.com/TooTallNate/2209310](https://gist.github.com/TooTallNate/2209310). +. For an example of running a REPL instance over [curl(1)][], see: -[https://gist.github.com/TooTallNate/2053342](https://gist.github.com/TooTallNate/2053342). +. [`'uncaughtException'`]: process.html#process_event_uncaughtexception [`--experimental-repl-await`]: cli.html#cli_experimental_repl_await diff --git a/doc/api/tls.md b/doc/api/tls.md index 0cba4653e7766f..d8fe8b173af332 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -566,7 +566,7 @@ field which always contains the value `'TLSv1/SSLv3'`. For example: `{ name: 'AES256-SHA', version: 'TLSv1/SSLv3' }`. See `SSL_CIPHER_get_name()` in -https://www.openssl.org/docs/man1.1.0/ssl/SSL_CIPHER_get_name.html for more + for more information. ### tlsSocket.getEphemeralKeyInfo() @@ -683,7 +683,7 @@ Example responses include: * `TLSv1.2` * `unknown` -See https://www.openssl.org/docs/man1.1.0/ssl/SSL_get_version.html for more +See for more information. ### tlsSocket.getSession() diff --git a/doc/api/url.md b/doc/api/url.md index 33b99398eeeb28..d6f41a33f503cf 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -26,31 +26,31 @@ backwards compatibility with existing applications. New application code should use the WHATWG API. A comparison between the WHATWG and Legacy APIs is provided below. Above the URL -`'http://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'`, properties of -an object returned by the legacy `url.parse()` are shown. Below it are +`'http://user:pass@sub.example.com:8080/p/a/t/h?query=string#hash'`, properties +of an object returned by the legacy `url.parse()` are shown. Below it are properties of a WHATWG `URL` object. WHATWG URL's `origin` property includes `protocol` and `host`, but not `username` or `password`. ```txt -┌─────────────────────────────────────────────────────────────────────────────────────────────┐ -│ href │ -├──────────┬──┬─────────────────────┬─────────────────────┬───────────────────────────┬───────┤ -│ protocol │ │ auth │ host │ path │ hash │ -│ │ │ ├──────────────┬──────┼──────────┬────────────────┤ │ -│ │ │ │ hostname │ port │ pathname │ search │ │ -│ │ │ │ │ │ ├─┬──────────────┤ │ -│ │ │ │ │ │ │ │ query │ │ -" https: // user : pass @ sub.host.com : 8080 /p/a/t/h ? query=string #hash " -│ │ │ │ │ hostname │ port │ │ │ │ -│ │ │ │ ├──────────────┴──────┤ │ │ │ -│ protocol │ │ username │ password │ host │ │ │ │ -├──────────┴──┼──────────┴──────────┼─────────────────────┤ │ │ │ -│ origin │ │ origin │ pathname │ search │ hash │ -├─────────────┴─────────────────────┴─────────────────────┴──────────┴────────────────┴───────┤ -│ href │ -└─────────────────────────────────────────────────────────────────────────────────────────────┘ +┌────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ href │ +├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤ +│ protocol │ │ auth │ host │ path │ hash │ +│ │ │ ├─────────────────┬──────┼──────────┬────────────────┤ │ +│ │ │ │ hostname │ port │ pathname │ search │ │ +│ │ │ │ │ │ ├─┬──────────────┤ │ +│ │ │ │ │ │ │ │ query │ │ +" https: // user : pass @ sub.example.com : 8080 /p/a/t/h ? query=string #hash " +│ │ │ │ │ hostname │ port │ │ │ │ +│ │ │ │ ├─────────────────┴──────┤ │ │ │ +│ protocol │ │ username │ password │ host │ │ │ │ +├──────────┴──┼──────────┴──────────┼────────────────────────┤ │ │ │ +│ origin │ │ origin │ pathname │ search │ hash │ +├─────────────┴─────────────────────┴────────────────────────┴──────────┴────────────────┴───────┤ +│ href │ +└────────────────────────────────────────────────────────────────────────────────────────────────┘ (all spaces in the "" line should be ignored — they are purely for formatting) ``` @@ -58,7 +58,7 @@ Parsing the URL string using the WHATWG API: ```js const myURL = - new URL('https://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'); + new URL('https://user:pass@sub.example.com:8080/p/a/t/h?query=string#hash'); ``` Parsing the URL string using the Legacy API: @@ -66,7 +66,7 @@ Parsing the URL string using the Legacy API: ```js const url = require('url'); const myURL = - url.parse('https://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'); + url.parse('https://user:pass@sub.example.com:8080/p/a/t/h?query=string#hash'); ``` ## The WHATWG URL API @@ -120,8 +120,8 @@ Unicode characters appearing within the hostname of `input` will be automatically converted to ASCII using the [Punycode][] algorithm. ```js -const myURL = new URL('https://你好你好'); -// https://xn--6qqa088eba/ +const myURL = new URL('https://測試'); +// https://xn--g6w251d/ ``` This feature is only available if the `node` executable was compiled with @@ -132,23 +132,23 @@ and a `base` is provided, it is advised to validate that the `origin` of the `URL` object is what is expected. ```js -let myURL = new URL('http://anotherExample.org/', 'https://example.org/'); -// http://anotherexample.org/ +let myURL = new URL('http://Example.com/', 'https://example.org/'); +// http://example.com/ -myURL = new URL('https://anotherExample.org/', 'https://example.org/'); -// https://anotherexample.org/ +myURL = new URL('https://Example.com/', 'https://example.org/'); +// https://example.com/ -myURL = new URL('foo://anotherExample.org/', 'https://example.org/'); -// foo://anotherExample.org/ +myURL = new URL('foo://Example.com/', 'https://example.org/'); +// foo://Example.com/ -myURL = new URL('http:anotherExample.org/', 'https://example.org/'); -// http://anotherexample.org/ +myURL = new URL('http:Example.com/', 'https://example.org/'); +// http://example.com/ -myURL = new URL('https:anotherExample.org/', 'https://example.org/'); -// https://example.org/anotherExample.org/ +myURL = new URL('https:Example.com/', 'https://example.org/'); +// https://example.org/Example.com/ -myURL = new URL('foo:anotherExample.org/', 'https://example.org/'); -// foo:anotherExample.org/ +myURL = new URL('foo:Example.com/', 'https://example.org/'); +// foo:Example.com/ ``` #### url.hash @@ -249,12 +249,12 @@ console.log(myURL.origin); ``` ```js -const idnURL = new URL('https://你好你好'); +const idnURL = new URL('https://測試'); console.log(idnURL.origin); -// Prints https://xn--6qqa088eba +// Prints https://xn--g6w251d console.log(idnURL.hostname); -// Prints xn--6qqa088eba +// Prints xn--g6w251d ``` #### url.password @@ -929,16 +929,16 @@ any way. The `url.format(URL[, options])` method allows for basic customization of the output. ```js -const myURL = new URL('https://a:b@你好你好?abc#foo'); +const myURL = new URL('https://a:b@測試?abc#foo'); console.log(myURL.href); -// Prints https://a:b@xn--6qqa088eba/?abc#foo +// Prints https://a:b@xn--g6w251d/?abc#foo console.log(myURL.toString()); -// Prints https://a:b@xn--6qqa088eba/?abc#foo +// Prints https://a:b@xn--g6w251d/?abc#foo console.log(url.format(myURL, { fragment: false, unicode: true, auth: false })); -// Prints 'https://你好你好/?abc' +// Prints 'https://測試/?abc' ``` ### url.pathToFileURL(path) @@ -999,21 +999,21 @@ For example: `'#hash'`. The `host` property is the full lower-cased host portion of the URL, including the `port` if specified. -For example: `'sub.host.com:8080'`. +For example: `'sub.example.com:8080'`. #### urlObject.hostname The `hostname` property is the lower-cased host name portion of the `host` component *without* the `port` included. -For example: `'sub.host.com'`. +For example: `'sub.example.com'`. #### urlObject.href The `href` property is the full URL string that was parsed with both the `protocol` and `host` components converted to lower-case. -For example: `'http://user:pass@sub.host.com:8080/p/a/t/h?query=string#hash'`. +For example: `'http://user:pass@sub.example.com:8080/p/a/t/h?query=string#hash'`. #### urlObject.path @@ -1282,11 +1282,11 @@ using the [Punycode][] algorithm. Note, however, that a hostname *may* contain *both* Punycode encoded and percent-encoded characters: ```js -const myURL = new URL('https://%CF%80.com/foo'); +const myURL = new URL('https://%CF%80.example.com/foo'); console.log(myURL.href); -// Prints https://xn--1xa.com/foo +// Prints https://xn--1xa.example.com/foo console.log(myURL.origin); -// Prints https://π.com +// Prints https://xn--1xa.example.com ``` [`Error`]: errors.html#errors_class_error