diff --git a/doc/api/addons.md b/doc/api/addons.md index d3fcc642577208..b2f5cad1c85335 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -454,7 +454,7 @@ in the Node-API are used. Creating and maintaining an addon that benefits from the ABI stability provided by Node-API carries with it certain -[implementation considerations](n-api.md#n_api_implications_of_abi_stability). +[implementation considerations][]. To use Node-API in the above "Hello world" example, replace the content of `hello.cc` with the following. All other instructions remain the same. @@ -1360,15 +1360,16 @@ console.log(result); [Electron]: https://electronjs.org/ [Embedder's Guide]: https://github.com/v8/v8/wiki/Embedder's%20Guide -[Linking to libraries included with Node.js]: #addons_linking_to_libraries_included_with_node_js +[Linking to libraries included with Node.js]: #linking-to-libraries-included-with-nodejs [Native Abstractions for Node.js]: https://github.com/nodejs/nan [V8]: https://v8.dev/ -[`Worker`]: worker_threads.md#worker_threads_class_worker +[`Worker`]: worker_threads.md#class-worker [bindings]: https://github.com/TooTallNate/node-bindings [download]: https://github.com/nodejs/node-addon-examples [examples]: https://github.com/nodejs/nan/tree/HEAD/examples/ +[implementation considerations]: n-api.md#implications-of-abi-stability [installation instructions]: https://github.com/nodejs/node-gyp#installation [libuv]: https://github.com/libuv/libuv [node-gyp]: https://github.com/nodejs/node-gyp -[require]: modules.md#modules_require_id +[require]: modules.md#requireid [v8-docs]: https://v8docs.nodesource.com/ diff --git a/doc/api/assert.md b/doc/api/assert.md index 70c03bda3773eb..6169850daa8dd9 100644 --- a/doc/api/assert.md +++ b/doc/api/assert.md @@ -65,7 +65,7 @@ assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]); To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` environment variables. This will also deactivate the colors in the REPL. For more on color support in terminal environments, read the tty -[getColorDepth()](tty.md#tty_writestream_getcolordepth_env) documentation. +[`getColorDepth()`][] documentation. ## Legacy assertion mode @@ -1584,34 +1584,35 @@ argument. [Object.prototype.toString()]: https://tc39.github.io/ecma262/#sec-object.prototype.tostring [SameValue Comparison]: https://tc39.github.io/ecma262/#sec-samevalue [Strict Equality Comparison]: https://tc39.github.io/ecma262/#sec-strict-equality-comparison -[`AssertionError`]: #assert_class_assert_assertionerror +[`AssertionError`]: #class-assertassertionerror +[`CallTracker`]: #class-assertcalltracker [`Class`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes -[`ERR_INVALID_RETURN_VALUE`]: errors.md#errors_err_invalid_return_value -[`Error.captureStackTrace`]: errors.md#errors_error_capturestacktrace_targetobject_constructoropt -[`Error`]: errors.md#errors_class_error +[`ERR_INVALID_RETURN_VALUE`]: errors.md#err_invalid_return_value +[`Error.captureStackTrace`]: errors.md#errorcapturestacktracetargetobject-constructoropt +[`Error`]: errors.md#class-error [`Map`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map [`Object.is()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is [`RegExp`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions [`Set`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set [`Symbol`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol -[`TypeError`]: errors.md#errors_class_typeerror +[`TypeError`]: errors.md#class-typeerror [`WeakMap`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap [`WeakSet`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet -[`CallTracker`]: #assert_class_assert_calltracker -[`assert.deepEqual()`]: #assert_assert_deepequal_actual_expected_message -[`assert.deepStrictEqual()`]: #assert_assert_deepstrictequal_actual_expected_message -[`assert.doesNotThrow()`]: #assert_assert_doesnotthrow_fn_error_message -[`assert.equal()`]: #assert_assert_equal_actual_expected_message -[`assert.notDeepEqual()`]: #assert_assert_notdeepequal_actual_expected_message -[`assert.notDeepStrictEqual()`]: #assert_assert_notdeepstrictequal_actual_expected_message -[`assert.notEqual()`]: #assert_assert_notequal_actual_expected_message -[`assert.notStrictEqual()`]: #assert_assert_notstrictequal_actual_expected_message -[`assert.ok()`]: #assert_assert_ok_value_message -[`assert.strictEqual()`]: #assert_assert_strictequal_actual_expected_message -[`assert.throws()`]: #assert_assert_throws_fn_error_message -[`process.on('exit')`]: process.md#process_event_exit -[`tracker.calls()`]: #assert_tracker_calls_fn_exact -[`tracker.verify()`]: #assert_tracker_verify -[strict assertion mode]: #assert_strict_assertion_mode +[`assert.deepEqual()`]: #assertdeepequalactual-expected-message +[`assert.deepStrictEqual()`]: #assertdeepstrictequalactual-expected-message +[`assert.doesNotThrow()`]: #assertdoesnotthrowfn-error-message +[`assert.equal()`]: #assertequalactual-expected-message +[`assert.notDeepEqual()`]: #assertnotdeepequalactual-expected-message +[`assert.notDeepStrictEqual()`]: #assertnotdeepstrictequalactual-expected-message +[`assert.notEqual()`]: #assertnotequalactual-expected-message +[`assert.notStrictEqual()`]: #assertnotstrictequalactual-expected-message +[`assert.ok()`]: #assertokvalue-message +[`assert.strictEqual()`]: #assertstrictequalactual-expected-message +[`assert.throws()`]: #assertthrowsfn-error-message +[`getColorDepth()`]: tty.md#writestreamgetcolordepthenv +[`process.on('exit')`]: process.md#event-exit +[`tracker.calls()`]: #trackercallsfn-exact +[`tracker.verify()`]: #trackerverify [enumerable "own" properties]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties [prototype-spec]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots +[strict assertion mode]: #strict-assertion-mode diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index c2028f02a40d78..987a0194511dcd 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -1193,16 +1193,16 @@ If you need to keep using callback-based API, or your code assumes a custom thenable implementation, use the [`AsyncResource`][] class to associate the asynchronous operation with the correct execution context. -[Hook Callbacks]: #async_hooks_hook_callbacks +[Hook Callbacks]: #hook-callbacks [PromiseHooks]: https://docs.google.com/document/d/1rda3yKGHimKIhg5YeoAmCOtyURgsbTH_qaYR79FELlk/edit -[`AsyncResource`]: #async_hooks_class_asyncresource -[`after` callback]: #async_hooks_after_asyncid -[`before` callback]: #async_hooks_before_asyncid -[`destroy` callback]: #async_hooks_destroy_asyncid -[`init` callback]: #async_hooks_init_asyncid_type_triggerasyncid_resource -[`promiseResolve` callback]: #async_hooks_promiseresolve_asyncid -[`EventEmitter`]: events.md#events_class_eventemitter -[`Stream`]: stream.md#stream_stream -[`Worker`]: worker_threads.md#worker_threads_class_worker -[`util.promisify()`]: util.md#util_util_promisify_original -[promise execution tracking]: #async_hooks_promise_execution_tracking +[`AsyncResource`]: #class-asyncresource +[`EventEmitter`]: events.md#class-eventemitter +[`Stream`]: stream.md#stream +[`Worker`]: worker_threads.md#class-worker +[`after` callback]: #afterasyncid +[`before` callback]: #beforeasyncid +[`destroy` callback]: #destroyasyncid +[`init` callback]: #initasyncid-type-triggerasyncid-resource +[`promiseResolve` callback]: #promiseresolveasyncid +[`util.promisify()`]: util.md#utilpromisifyoriginal +[promise execution tracking]: #promise-execution-tracking diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 9ada48fb4f7a40..619dafcbb50ab1 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -3511,19 +3511,19 @@ introducing security vulnerabilities into an application. [WHATWG Encoding Standard]: https://encoding.spec.whatwg.org/ [`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer [`Blob`]: https://developer.mozilla.org/en-US/docs/Web/API/Blob -[`Buffer.alloc()`]: #buffer_static_method_buffer_alloc_size_fill_encoding -[`Buffer.allocUnsafe()`]: #buffer_static_method_buffer_allocunsafe_size -[`Buffer.allocUnsafeSlow()`]: #buffer_static_method_buffer_allocunsafeslow_size -[`Buffer.concat()`]: #buffer_static_method_buffer_concat_list_totallength -[`Buffer.from(array)`]: #buffer_static_method_buffer_from_array -[`Buffer.from(arrayBuf)`]: #buffer_static_method_buffer_from_arraybuffer_byteoffset_length -[`Buffer.from(buffer)`]: #buffer_static_method_buffer_from_buffer -[`Buffer.from(string)`]: #buffer_static_method_buffer_from_string_encoding -[`Buffer.poolSize`]: #buffer_class_property_buffer_poolsize +[`Buffer.alloc()`]: #static-method-bufferallocsize-fill-encoding +[`Buffer.allocUnsafe()`]: #static-method-bufferallocunsafesize +[`Buffer.allocUnsafeSlow()`]: #static-method-bufferallocunsafeslowsize +[`Buffer.concat()`]: #static-method-bufferconcatlist-totallength +[`Buffer.from(array)`]: #static-method-bufferfromarray +[`Buffer.from(arrayBuf)`]: #static-method-bufferfromarraybuffer-byteoffset-length +[`Buffer.from(buffer)`]: #static-method-bufferfrombuffer +[`Buffer.from(string)`]: #static-method-bufferfromstring-encoding +[`Buffer.poolSize`]: #class-property-bufferpoolsize [`DataView`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView -[`ERR_INVALID_BUFFER_SIZE`]: errors.md#ERR_INVALID_BUFFER_SIZE -[`ERR_INVALID_OPT_VALUE`]: errors.md#ERR_INVALID_OPT_VALUE -[`ERR_OUT_OF_RANGE`]: errors.md#ERR_OUT_OF_RANGE +[`ERR_INVALID_BUFFER_SIZE`]: errors.md#err_invalid_buffer_size +[`ERR_INVALID_OPT_VALUE`]: errors.md#err_invalid_opt_value +[`ERR_OUT_OF_RANGE`]: errors.md#err_out_of_range [`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify [`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer [`String.prototype.indexOf()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf @@ -3535,20 +3535,20 @@ introducing security vulnerabilities into an application. [`TypedArray.prototype.subarray()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray [`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray [`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array -[`buf.buffer`]: #buffer_buf_buffer -[`buf.compare()`]: #buffer_buf_compare_target_targetstart_targetend_sourcestart_sourceend -[`buf.entries()`]: #buffer_buf_entries -[`buf.fill()`]: #buffer_buf_fill_value_offset_end_encoding -[`buf.indexOf()`]: #buffer_buf_indexof_value_byteoffset_encoding -[`buf.keys()`]: #buffer_buf_keys -[`buf.length`]: #buffer_buf_length -[`buf.slice()`]: #buffer_buf_slice_start_end -[`buf.toString()`]: #buffer_buf_tostring_encoding_start_end -[`buf.values()`]: #buffer_buf_values -[`buffer.constants.MAX_LENGTH`]: #buffer_buffer_constants_max_length -[`buffer.constants.MAX_STRING_LENGTH`]: #buffer_buffer_constants_max_string_length -[`buffer.kMaxLength`]: #buffer_buffer_kmaxlength -[`util.inspect()`]: util.md#util_util_inspect_object_options +[`buf.buffer`]: #bufbuffer +[`buf.compare()`]: #bufcomparetarget-targetstart-targetend-sourcestart-sourceend +[`buf.entries()`]: #bufentries +[`buf.fill()`]: #buffillvalue-offset-end-encoding +[`buf.indexOf()`]: #bufindexofvalue-byteoffset-encoding +[`buf.keys()`]: #bufkeys +[`buf.length`]: #buflength +[`buf.slice()`]: #bufslicestart-end +[`buf.toString()`]: #buftostringencoding-start-end +[`buf.values()`]: #bufvalues +[`buffer.constants.MAX_LENGTH`]: #bufferconstantsmax_length +[`buffer.constants.MAX_STRING_LENGTH`]: #bufferconstantsmax_string_length +[`buffer.kMaxLength`]: #bufferkmaxlength +[`util.inspect()`]: util.md#utilinspectobject-options [`v8::TypedArray::kMaxLength`]: https://v8.github.io/api/head/classv8_1_1TypedArray.html#a54a48f4373da0850663c4393d843b9b0 [base64url]: https://tools.ietf.org/html/rfc4648#section-5 [binary strings]: https://developer.mozilla.org/en-US/docs/Web/API/DOMString/Binary diff --git a/doc/api/child_process.md b/doc/api/child_process.md index e3151b78e91957..8db88932961e42 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -1680,42 +1680,42 @@ Therefore, this feature requires opting in by setting the `serialization` option to `'advanced'` when calling [`child_process.spawn()`][] or [`child_process.fork()`][]. -[Advanced serialization]: #child_process_advanced_serialization -[Default Windows shell]: #child_process_default_windows_shell +[Advanced serialization]: #advanced-serialization +[Default Windows shell]: #default-windows-shell [HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm -[Shell requirements]: #child_process_shell_requirements -[Signal Events]: process.md#process_signal_events -[`'disconnect'`]: process.md#process_event_disconnect -[`'error'`]: #child_process_event_error -[`'exit'`]: #child_process_event_exit -[`'message'`]: process.md#process_event_message -[`ChildProcess`]: #child_process_class_childprocess -[`Error`]: errors.md#errors_class_error -[`EventEmitter`]: events.md#events_class_eventemitter -[`child_process.exec()`]: #child_process_child_process_exec_command_options_callback -[`child_process.execFile()`]: #child_process_child_process_execfile_file_args_options_callback -[`child_process.execFileSync()`]: #child_process_child_process_execfilesync_file_args_options -[`child_process.execSync()`]: #child_process_child_process_execsync_command_options -[`child_process.fork()`]: #child_process_child_process_fork_modulepath_args_options -[`child_process.spawn()`]: #child_process_child_process_spawn_command_args_options -[`child_process.spawnSync()`]: #child_process_child_process_spawnsync_command_args_options -[`maxBuffer` and Unicode]: #child_process_maxbuffer_and_unicode -[`net.Server`]: net.md#net_class_net_server -[`net.Socket`]: net.md#net_class_net_socket -[`options.detached`]: #child_process_options_detached -[`process.disconnect()`]: process.md#process_process_disconnect -[`process.env`]: process.md#process_process_env -[`process.execPath`]: process.md#process_process_execpath -[`process.send()`]: process.md#process_process_send_message_sendhandle_options_callback -[`stdio`]: #child_process_options_stdio -[`subprocess.connected`]: #child_process_subprocess_connected -[`subprocess.disconnect()`]: #child_process_subprocess_disconnect -[`subprocess.kill()`]: #child_process_subprocess_kill_signal -[`subprocess.send()`]: #child_process_subprocess_send_message_sendhandle_options_callback -[`subprocess.stderr`]: #child_process_subprocess_stderr -[`subprocess.stdin`]: #child_process_subprocess_stdin -[`subprocess.stdio`]: #child_process_subprocess_stdio -[`subprocess.stdout`]: #child_process_subprocess_stdout -[`util.promisify()`]: util.md#util_util_promisify_original -[synchronous counterparts]: #child_process_synchronous_process_creation -[v8.serdes]: v8.md#v8_serialization_api +[Shell requirements]: #shell-requirements +[Signal Events]: process.md#signal-events +[`'disconnect'`]: process.md#event-disconnect +[`'error'`]: #event-error +[`'exit'`]: #event-exit +[`'message'`]: process.md#event-message +[`ChildProcess`]: #class-childprocess +[`Error`]: errors.md#class-error +[`EventEmitter`]: events.md#class-eventemitter +[`child_process.exec()`]: #child_processexeccommand-options-callback +[`child_process.execFile()`]: #child_processexecfilefile-args-options-callback +[`child_process.execFileSync()`]: #child_processexecfilesyncfile-args-options +[`child_process.execSync()`]: #child_processexecsynccommand-options +[`child_process.fork()`]: #child_processforkmodulepath-args-options +[`child_process.spawn()`]: #child_processspawncommand-args-options +[`child_process.spawnSync()`]: #child_processspawnsynccommand-args-options +[`maxBuffer` and Unicode]: #maxbuffer-and-unicode +[`net.Server`]: net.md#class-netserver +[`net.Socket`]: net.md#class-netsocket +[`options.detached`]: #optionsdetached +[`process.disconnect()`]: process.md#processdisconnect +[`process.env`]: process.md#processenv +[`process.execPath`]: process.md#processexecpath +[`process.send()`]: process.md#processsendmessage-sendhandle-options-callback +[`stdio`]: #optionsstdio +[`subprocess.connected`]: #subprocessconnected +[`subprocess.disconnect()`]: #subprocessdisconnect +[`subprocess.kill()`]: #subprocesskillsignal +[`subprocess.send()`]: #subprocesssendmessage-sendhandle-options-callback +[`subprocess.stderr`]: #subprocessstderr +[`subprocess.stdin`]: #subprocessstdin +[`subprocess.stdio`]: #subprocessstdio +[`subprocess.stdout`]: #subprocessstdout +[`util.promisify()`]: util.md#utilpromisifyoriginal +[synchronous counterparts]: #synchronous-process-creation +[v8.serdes]: v8.md#serialization-api diff --git a/doc/api/cli.md b/doc/api/cli.md index 1b3bdf4484f757..6f74292414a14f 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -134,7 +134,7 @@ Specify the directory where the CPU profiles generated by `--cpu-prof` will be placed. The default value is controlled by the -[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option. +[`--diagnostic-dir`][] command-line option. ### `--cpu-prof-interval` #### Warning: binding inspector to a public IP:port combination is insecure @@ -727,7 +728,7 @@ warning will be written to stderr instead. The `file` name may be an absolute path. If it is not, the default directory it will be written to is controlled by the -[--diagnostic-dir](#cli_diagnostic_dir_directory) command-line option. +[`--diagnostic-dir`]() command-line option. ### `--report-compact` @@ -314,7 +314,7 @@ An `import` statement can reference an ES module or a CommonJS module. `import` statements are permitted only in ES modules, but dynamic [`import()`][] expressions are supported in CommonJS for loading ES modules. -When importing [CommonJS modules](#esm_commonjs_namespaces), the +When importing [CommonJS modules](#commonjs-namespaces), the `module.exports` object is provided as the default export. Named exports may be available, provided by static analysis as a convenience for better ecosystem compatibility. @@ -1304,37 +1304,37 @@ success! [6.1.7 Array Index]: https://tc39.es/ecma262/#integer-index [CommonJS]: modules.md -[Conditional exports]: packages.md#packages_conditional_exports -[Core modules]: modules.md#modules_core_modules +[Conditional exports]: packages.md#conditional-exports +[Core modules]: modules.md#core-modules [Dynamic `import()`]: https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports [ECMAScript Top-Level `await` proposal]: https://github.com/tc39/proposal-top-level-await/ [ES Module Integration Proposal for Web Assembly]: https://github.com/webassembly/esm-integration -[Node.js Module Resolution Algorithm]: #esm_resolver_algorithm_specification -[Terminology]: #esm_terminology +[Node.js Module Resolution Algorithm]: #resolver-algorithm-specification +[Terminology]: #terminology [URL]: https://url.spec.whatwg.org/ [WHATWG JSON modules specification]: https://html.spec.whatwg.org/#creating-a-json-module-script -[`"exports"`]: packages.md#packages_exports -[`"type"`]: packages.md#packages_type +[`"exports"`]: packages.md#exports +[`"type"`]: packages.md#type [`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer [`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer [`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray [`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array [`data:` URLs]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs [`export`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export -[`import()`]: #esm_import_expressions -[`import.meta.url`]: #esm_import_meta_url -[`import.meta.resolve`]: #esm_import_meta_resolve_specifier_parent +[`import()`]: #import-expressions +[`import.meta.resolve`]: #importmetaresolvespecifier-parent +[`import.meta.url`]: #importmetaurl [`import`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import -[`module.createRequire()`]: module.md#module_module_createrequire_filename -[`module.syncBuiltinESMExports()`]: module.md#module_module_syncbuiltinesmexports -[`package.json`]: packages.md#packages_node_js_package_json_field_definitions -[`process.dlopen`]: process.md#process_process_dlopen_module_filename_flags -[`transformSource` hook]: #esm_transformsource_source_context_defaulttransformsource +[`module.createRequire()`]: module.md#modulecreaterequirefilename +[`module.syncBuiltinESMExports()`]: module.md#modulesyncbuiltinesmexports +[`package.json`]: packages.md#nodejs-packagejson-field-definitions +[`process.dlopen`]: process.md#processdlopenmodule-filename-flags [`string`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String -[`util.TextDecoder`]: util.md#util_class_util_textdecoder +[`transformSource` hook]: #transformsourcesource-context-defaulttransformsource +[`util.TextDecoder`]: util.md#class-utiltextdecoder [cjs-module-lexer]: https://github.com/guybedford/cjs-module-lexer/tree/1.2.2 -[custom https loader]: #esm_https_loader +[custom https loader]: #https-loader [special scheme]: https://url.spec.whatwg.org/#special-scheme [the official standard format]: https://tc39.github.io/ecma262/#sec-modules -[transpiler loader example]: #esm_transpiler_loader -[url.pathToFileURL]: url.md#url_url_pathtofileurl_path +[transpiler loader example]: #transpiler-loader +[url.pathToFileURL]: url.md#urlpathtofileurlpath diff --git a/doc/api/events.md b/doc/api/events.md index 8d01f4851d7050..8dabb54d281ea2 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -1608,20 +1608,20 @@ and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`. [WHATWG-EventTarget]: https://dom.spec.whatwg.org/#interface-eventtarget -[`--trace-warnings`]: cli.md#cli_trace_warnings +[`--trace-warnings`]: cli.md#--trace-warnings [`EventTarget` Web API]: https://dom.spec.whatwg.org/#eventtarget -[`EventTarget` error handling]: #events_eventtarget_error_handling +[`EventTarget` error handling]: #eventtarget-error-handling [`Event` Web API]: https://dom.spec.whatwg.org/#event [`domain`]: domain.md -[`emitter.listenerCount()`]: #events_emitter_listenercount_eventname -[`emitter.removeListener()`]: #events_emitter_removelistener_eventname_listener -[`emitter.setMaxListeners(n)`]: #events_emitter_setmaxlisteners_n -[`events.defaultMaxListeners`]: #events_events_defaultmaxlisteners -[`fs.ReadStream`]: fs.md#fs_class_fs_readstream -[`net.Server`]: net.md#net_class_net_server -[`process.on('warning')`]: process.md#process_event_warning +[`emitter.listenerCount()`]: #emitterlistenercounteventname +[`emitter.removeListener()`]: #emitterremovelistenereventname-listener +[`emitter.setMaxListeners(n)`]: #emittersetmaxlistenersn +[`events.defaultMaxListeners`]: #eventsdefaultmaxlisteners +[`fs.ReadStream`]: fs.md#class-fsreadstream +[`net.Server`]: net.md#class-netserver +[`process.on('warning')`]: process.md#event-warning +[capturerejections]: #capture-rejections-of-promises +[error]: #error-events +[rejection]: #emittersymbolfornodejsrejectionerr-eventname-args +[rejectionsymbol]: #eventscapturerejectionsymbol [stream]: stream.md -[capturerejections]: #events_capture_rejections_of_promises -[rejection]: #events_emitter_symbol_for_nodejs_rejection_err_eventname_args -[rejectionsymbol]: #events_events_capturerejectionsymbol -[error]: #events_error_events diff --git a/doc/api/fs.md b/doc/api/fs.md index 8cef874b6b2e98..77ce6cc2ed2b1f 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -4107,7 +4107,7 @@ changes: as long as files are being watched. **Default:** `true`. * `recursive` {boolean} Indicates whether all subdirectories should be watched, or only the current directory. This applies when a directory is - specified, and only on supported platforms (See [Caveats][]). **Default:** + specified, and only on supported platforms (See [caveats][]). **Default:** `false`. * `encoding` {string} Specifies the character encoding to be used for the filename passed to the listener. **Default:** `'utf8'`. @@ -6197,75 +6197,75 @@ A call to `fs.ftruncate()` or `filehandle.truncate()` can be used to reset the file contents. [#25741]: https://github.com/nodejs/node/issues/25741 -[Caveats]: #fs_caveats -[Common System Errors]: errors.md#errors_common_system_errors -[FS constants]: #fs_fs_constants_1 -[File access constants]: #fs_file_access_constants +[Common System Errors]: errors.md#common-system-errors +[File access constants]: #file-access-constants +[FS constants]: #fsconstants [MDN-Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date [MDN-Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type [MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths [MSDN-Using-Streams]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams [Naming Files, Paths, and Namespaces]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file -[Readable Stream]: stream.md#stream_class_stream_readable -[Writable Stream]: stream.md#stream_class_stream_writable -[`AHAFS`]: https://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/ -[`Buffer.byteLength`]: buffer.md#buffer_static_method_buffer_bytelength_string_encoding -[`Buffer`]: buffer.md#buffer_buffer +[Readable Stream]: stream.md#class-streamreadable +[Writable Stream]: stream.md#class-streamwritable +[`AHAFS`]: https://developer.ibm.com/articles/au-aix_event_infrastructure/ +[`Buffer`]: buffer.md#buffer +[`Buffer.byteLength`]: buffer.md#static-method-bufferbytelengthstring-encoding [`FSEvents`]: https://developer.apple.com/documentation/coreservices/file_system_events [`Number.MAX_SAFE_INTEGER`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER [`ReadDirectoryChangesW`]: https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-readdirectorychangesw -[`ReadStream`]: #fs_class_fs_readstream -[`URL`]: url.md#url_the_whatwg_url_api -[`UV_THREADPOOL_SIZE`]: cli.md#cli_uv_threadpool_size_size -[`WriteStream`]: #fs_class_fs_writestream +[`ReadStream`]: #class-fsreadstream +[`URL`]: url.md#the-whatwg-url-api +[`UV_THREADPOOL_SIZE`]: cli.md#uv_threadpool_sizesize +[`WriteStream`]: #class-fswritestream [`event ports`]: https://illumos.org/man/port_create -[`filehandle.writeFile()`]: #fs_filehandle_writefile_data_options -[`fs.Dir`]: #fs_class_fs_dir -[`fs.Dirent`]: #fs_class_fs_dirent -[`fs.FSWatcher`]: #fs_class_fs_fswatcher -[`fs.Stats`]: #fs_class_fs_stats -[`fs.access()`]: #fs_fs_access_path_mode_callback -[`fs.chmod()`]: #fs_fs_chmod_path_mode_callback -[`fs.chown()`]: #fs_fs_chown_path_uid_gid_callback -[`fs.copyFile()`]: #fs_fs_copyfile_src_dest_mode_callback -[`fs.createReadStream()`]: #fs_fs_createreadstream_path_options -[`fs.createWriteStream()`]: #fs_fs_createwritestream_path_options -[`fs.exists()`]: fs.md#fs_fs_exists_path_callback -[`fs.fstat()`]: #fs_fs_fstat_fd_options_callback -[`fs.ftruncate()`]: #fs_fs_ftruncate_fd_len_callback -[`fs.futimes()`]: #fs_fs_futimes_fd_atime_mtime_callback -[`fs.lstat()`]: #fs_fs_lstat_path_options_callback -[`fs.lutimes()`]: #fs_fs_lutimes_path_atime_mtime_callback -[`fs.mkdir()`]: #fs_fs_mkdir_path_options_callback -[`fs.mkdtemp()`]: #fs_fs_mkdtemp_prefix_options_callback -[`fs.open()`]: #fs_fs_open_path_flags_mode_callback -[`fs.opendir()`]: #fs_fs_opendir_path_options_callback -[`fs.opendirSync()`]: #fs_fs_opendirsync_path_options -[`fs.read()`]: #fs_fs_read_fd_buffer_offset_length_position_callback -[`fs.readFile()`]: #fs_fs_readfile_path_options_callback -[`fs.readFileSync()`]: #fs_fs_readfilesync_path_options -[`fs.readdir()`]: #fs_fs_readdir_path_options_callback -[`fs.readdirSync()`]: #fs_fs_readdirsync_path_options -[`fs.readv()`]: #fs_fs_readv_fd_buffers_position_callback -[`fs.realpath()`]: #fs_fs_realpath_path_options_callback -[`fs.rmdir()`]: #fs_fs_rmdir_path_options_callback -[`fs.stat()`]: #fs_fs_stat_path_options_callback -[`fs.symlink()`]: #fs_fs_symlink_target_path_type_callback -[`fs.utimes()`]: #fs_fs_utimes_path_atime_mtime_callback -[`fs.watch()`]: #fs_fs_watch_filename_options_listener -[`fs.write(fd, buffer...)`]: #fs_fs_write_fd_buffer_offset_length_position_callback -[`fs.write(fd, string...)`]: #fs_fs_write_fd_string_position_encoding_callback -[`fs.writeFile()`]: #fs_fs_writefile_file_data_options_callback -[`fs.writev()`]: #fs_fs_writev_fd_buffers_position_callback -[`fsPromises.open()`]: #fs_fspromises_open_path_flags_mode -[`fsPromises.opendir()`]: #fs_fspromises_opendir_path_options -[`fsPromises.utimes()`]: #fs_fspromises_utimes_path_atime_mtime +[`filehandle.writeFile()`]: #filehandlewritefiledata-options +[`fs.Dir`]: #class-fsdir +[`fs.Dirent`]: #class-fsdirent +[`fs.FSWatcher`]: #class-fsfswatcher +[`fs.Stats`]: #class-fsstats +[`fs.access()`]: #fsaccesspath-mode-callback +[`fs.chmod()`]: #fschmodpath-mode-callback +[`fs.chown()`]: #fschownpath-uid-gid-callback +[`fs.copyFile()`]: #fscopyfilesrc-dest-mode-callback +[`fs.createReadStream()`]: #fscreatereadstreampath-options +[`fs.createWriteStream()`]: #fscreatewritestreampath-options +[`fs.exists()`]: #fsexistspath-callback +[`fs.fstat()`]: #fsfstatfd-options-callback +[`fs.ftruncate()`]: #fsftruncatefd-len-callback +[`fs.futimes()`]: #fsfutimesfd-atime-mtime-callback +[`fs.lstat()`]: #fslstatpath-options-callback +[`fs.lutimes()`]: #fslutimespath-atime-mtime-callback +[`fs.mkdir()`]: #fsmkdirpath-options-callback +[`fs.mkdtemp()`]: #fsmkdtempprefix-options-callback +[`fs.open()`]: #fsopenpath-flags-mode-callback +[`fs.opendir()`]: #fsopendirpath-options-callback +[`fs.opendirSync()`]: #fsopendirsyncpath-options +[`fs.read()`]: #fsreadfd-buffer-offset-length-position-callback +[`fs.readFile()`]: #fsreadfilepath-options-callback +[`fs.readFileSync()`]: #fsreadfilesyncpath-options +[`fs.readdir()`]: #fsreaddirpath-options-callback +[`fs.readdirSync()`]: #fsreaddirsyncpath-options +[`fs.readv()`]: #fsreadvfd-buffers-position-callback +[`fs.realpath()`]: #fsrealpathpath-options-callback +[`fs.rmdir()`]: #fsrmdirpath-options-callback +[`fs.stat()`]: #fsstatpath-options-callback +[`fs.symlink()`]: #fssymlinktarget-path-type-callback +[`fs.utimes()`]: #fsutimespath-atime-mtime-callback +[`fs.watch()`]: #fswatchfilename-options-listener +[`fs.write(fd, buffer...)`]: #fswritefd-buffer-offset-length-position-callback +[`fs.write(fd, string...)`]: #fswritefd-string-position-encoding-callback +[`fs.writeFile()`]: #fswritefilefile-data-options-callback +[`fs.writev()`]: #fswritevfd-buffers-position-callback +[`fsPromises.open()`]: #fspromisesopenpath-flags-mode +[`fsPromises.opendir()`]: #fspromisesopendirpath-options +[`fsPromises.utimes()`]: #fspromisesutimespath-atime-mtime [`inotify(7)`]: https://man7.org/linux/man-pages/man7/inotify.7.html [`kqueue(2)`]: https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2 -[`net.Socket`]: net.md#net_class_net_socket -[`stat()`]: fs.md#fs_fs_stat_path_options_callback -[`util.promisify()`]: util.md#util_util_promisify_original +[`net.Socket`]: net.md#class-netsocket +[`stat()`]: fs.md#fsstatpath-options-callback +[`util.promisify()`]: util.md#utilpromisifyoriginal [bigints]: https://tc39.github.io/proposal-bigint +[caveats]: #caveats [chcp]: https://ss64.com/nt/chcp.html [inode]: https://en.wikipedia.org/wiki/Inode -[support of file system `flags`]: #fs_file_system_flags +[support of file system `flags`]: #file-system-flags diff --git a/doc/api/globals.md b/doc/api/globals.md index e577372b5c4cf6..e6746376355910 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -337,24 +337,24 @@ The object that acts as the namespace for all W3C [Mozilla Developer Network][webassembly-mdn] for usage and compatibility. [`AbortController`]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController -[`TextDecoder`]: util.md#util_class_util_textdecoder -[`TextEncoder`]: util.md#util_class_util_textencoder -[`URLSearchParams`]: url.md#url_class_urlsearchparams -[`URL`]: url.md#url_class_url -[`__dirname`]: modules.md#modules_dirname -[`__filename`]: modules.md#modules_filename -[`clearImmediate`]: timers.md#timers_clearimmediate_immediate -[`clearInterval`]: timers.md#timers_clearinterval_timeout -[`clearTimeout`]: timers.md#timers_cleartimeout_timeout +[`TextDecoder`]: util.md#class-utiltextdecoder +[`TextEncoder`]: util.md#class-utiltextencoder +[`URLSearchParams`]: url.md#class-urlsearchparams +[`URL`]: url.md#class-url +[`__dirname`]: modules.md#__dirname +[`__filename`]: modules.md#__filename +[`clearImmediate`]: timers.md#clearimmediateimmediate +[`clearInterval`]: timers.md#clearintervaltimeout +[`clearTimeout`]: timers.md#cleartimeouttimeout [`console`]: console.md -[`exports`]: modules.md#modules_exports -[`module`]: modules.md#modules_module -[`process.nextTick()`]: process.md#process_process_nexttick_callback_args -[`process` object]: process.md#process_process -[`require()`]: modules.md#modules_require_id -[`setImmediate`]: timers.md#timers_setimmediate_callback_args -[`setInterval`]: timers.md#timers_setinterval_callback_delay_args -[`setTimeout`]: timers.md#timers_settimeout_callback_delay_args +[`exports`]: modules.md#exports +[`module`]: modules.md#module +[`process.nextTick()`]: process.md#processnexttickcallback-args +[`process` object]: process.md#process +[`require()`]: modules.md#requireid +[`setImmediate`]: timers.md#setimmediatecallback-args +[`setInterval`]: timers.md#setintervalcallback-delay-args +[`setTimeout`]: timers.md#settimeoutcallback-delay-args [buffer section]: buffer.md [built-in objects]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects [module system documentation]: modules.md diff --git a/doc/api/http.md b/doc/api/http.md index 1df8bc6a48ccc8..a069ed2837480e 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -60,7 +60,7 @@ for a given host and port, reusing a single socket connection for each until the queue is empty, at which time the socket is either destroyed or put into a pool where it is kept to be used again for requests to the same host and port. Whether it is destroyed or pooled depends on the -`keepAlive` [option](#http_new_agent_options). +`keepAlive` [option](#new-agentoptions). Pooled connections have TCP Keep-Alive enabled for them, but servers may still close idle connections, in which case they will be removed from the @@ -136,7 +136,7 @@ changes: options are respectively set to `false` and `Infinity`, in which case `Connection: close` will be used. **Default:** `false`. * `keepAliveMsecs` {number} When using the `keepAlive` option, specifies - the [initial delay](net.md#net_socket_setkeepalive_enable_initialdelay) + the [initial delay][] for TCP Keep-Alive packets. Ignored when the `keepAlive` option is `false` or `undefined`. **Default:** `1000`. * `maxSockets` {number} Maximum number of sockets to allow per host. @@ -3073,72 +3073,73 @@ try { } ``` -[`--insecure-http-parser`]: cli.md#cli_insecure_http_parser -[`--max-http-header-size`]: cli.md#cli_max_http_header_size_size -[`'checkContinue'`]: #http_event_checkcontinue -[`'finish'`]: #http_event_finish -[`'request'`]: #http_event_request -[`'response'`]: #http_event_response -[`'upgrade'`]: #http_event_upgrade -[`Agent`]: #http_class_http_agent -[`Buffer.byteLength()`]: buffer.md#buffer_static_method_buffer_bytelength_string_encoding -[`Duplex`]: stream.md#stream_class_stream_duplex -[`HPE_HEADER_OVERFLOW`]: errors.md#errors_hpe_header_overflow -[`TypeError`]: errors.md#errors_class_typeerror -[`URL`]: url.md#url_the_whatwg_url_api -[`agent.createConnection()`]: #http_agent_createconnection_options_callback -[`agent.getName()`]: #http_agent_getname_options -[`destroy()`]: #http_agent_destroy -[`dns.lookup()`]: dns.md#dns_dns_lookup_hostname_options_callback -[`dns.lookup()` hints]: dns.md#dns_supported_getaddrinfo_flags -[`getHeader(name)`]: #http_request_getheader_name -[`http.Agent`]: #http_class_http_agent -[`http.ClientRequest`]: #http_class_http_clientrequest -[`http.IncomingMessage`]: #http_class_http_incomingmessage -[`http.Server`]: #http_class_http_server -[`http.ServerResponse`]: #http_class_http_serverresponse -[`http.get()`]: #http_http_get_options_callback -[`http.globalAgent`]: #http_http_globalagent -[`http.request()`]: #http_http_request_options_callback -[`message.headers`]: #http_message_headers -[`net.Server.close()`]: net.md#net_server_close_callback -[`net.Server`]: net.md#net_class_net_server -[`net.Socket`]: net.md#net_class_net_socket -[`net.createConnection()`]: net.md#net_net_createconnection_options_connectlistener -[`new URL()`]: url.md#url_new_url_input_base -[`outgoingMessage.socket`]: #http_outgoingMessage.socket -[`removeHeader(name)`]: #http_request_removeheader_name -[`request.end()`]: #http_request_end_data_encoding_callback -[`request.destroy()`]: #http_request_destroy_error -[`request.flushHeaders()`]: #http_request_flushheaders -[`request.getHeader()`]: #http_request_getheader_name -[`request.setHeader()`]: #http_request_setheader_name_value -[`request.setTimeout()`]: #http_request_settimeout_timeout_callback -[`request.socket.getPeerCertificate()`]: tls.md#tls_tlssocket_getpeercertificate_detailed -[`request.socket`]: #http_request_socket -[`request.writableFinished`]: #http_request_writablefinished -[`request.writableEnded`]: #http_request_writableended -[`request.write(data, encoding)`]: #http_request_write_chunk_encoding_callback -[`response.end()`]: #http_response_end_data_encoding_callback -[`response.getHeader()`]: #http_response_getheader_name -[`response.setHeader()`]: #http_response_setheader_name_value -[`response.socket`]: #http_response_socket -[`response.writableFinished`]: #http_response_writablefinished -[`response.writableEnded`]: #http_response_writableended -[`response.write()`]: #http_response_write_chunk_encoding_callback -[`response.write(data, encoding)`]: #http_response_write_chunk_encoding_callback -[`response.writeContinue()`]: #http_response_writecontinue -[`response.writeHead()`]: #http_response_writehead_statuscode_statusmessage_headers -[`server.listen()`]: net.md#net_server_listen -[`server.timeout`]: #http_server_timeout -[`setHeader(name, value)`]: #http_request_setheader_name_value -[`socket.connect()`]: net.md#net_socket_connect_options_connectlistener -[`socket.setKeepAlive()`]: net.md#net_socket_setkeepalive_enable_initialdelay -[`socket.setNoDelay()`]: net.md#net_socket_setnodelay_nodelay -[`socket.setTimeout()`]: net.md#net_socket_settimeout_timeout_callback -[`socket.unref()`]: net.md#net_socket_unref -[`url.parse()`]: url.md#url_url_parse_urlstring_parsequerystring_slashesdenotehost -[`writable.cork()`]: stream.md#stream_writable_cork -[`writable.destroy()`]: stream.md#stream_writable_destroy_error -[`writable.destroyed`]: stream.md#stream_writable_destroyed -[`writable.uncork()`]: stream.md#stream_writable_uncork +[`'checkContinue'`]: #event-checkcontinue +[`'finish'`]: #event-finish +[`'request'`]: #event-request +[`'response'`]: #event-response +[`'upgrade'`]: #event-upgrade +[`--insecure-http-parser`]: cli.md#--insecure-http-parser +[`--max-http-header-size`]: cli.md#--max-http-header-sizesize +[`Agent`]: #class-httpagent +[`Buffer.byteLength()`]: buffer.md#static-method-bufferbytelengthstring-encoding +[`Duplex`]: stream.md#class-streamduplex +[`HPE_HEADER_OVERFLOW`]: errors.md#hpe_header_overflow +[`TypeError`]: errors.md#class-typeerror +[`URL`]: url.md#the-whatwg-url-api +[`agent.createConnection()`]: #agentcreateconnectionoptions-callback +[`agent.getName()`]: #agentgetnameoptions +[`destroy()`]: #agentdestroy +[`dns.lookup()`]: dns.md#dnslookuphostname-options-callback +[`dns.lookup()` hints]: dns.md#supported-getaddrinfo-flags +[`getHeader(name)`]: #requestgetheadername +[`http.Agent`]: #class-httpagent +[`http.ClientRequest`]: #class-httpclientrequest +[`http.IncomingMessage`]: #class-httpincomingmessage +[`http.ServerResponse`]: #class-httpserverresponse +[`http.Server`]: #class-httpserver +[`http.get()`]: #httpgetoptions-callback +[`http.globalAgent`]: #httpglobalagent +[`http.request()`]: #httprequestoptions-callback +[`message.headers`]: #messageheaders +[`net.Server.close()`]: net.md#serverclosecallback +[`net.Server`]: net.md#class-netserver +[`net.Socket`]: net.md#class-netsocket +[`net.createConnection()`]: net.md#netcreateconnectionoptions-connectlistener +[`new URL()`]: url.md#new-urlinput-base +[`outgoingMessage.socket`]: #outgoingmessagesocket +[`removeHeader(name)`]: #requestremoveheadername +[`request.destroy()`]: #requestdestroyerror +[`request.end()`]: #requestenddata-encoding-callback +[`request.flushHeaders()`]: #requestflushheaders +[`request.getHeader()`]: #requestgetheadername +[`request.setHeader()`]: #requestsetheadername-value +[`request.setTimeout()`]: #requestsettimeouttimeout-callback +[`request.socket.getPeerCertificate()`]: tls.md#tlssocketgetpeercertificatedetailed +[`request.socket`]: #requestsocket +[`request.writableEnded`]: #requestwritableended +[`request.writableFinished`]: #requestwritablefinished +[`request.write(data, encoding)`]: #requestwritechunk-encoding-callback +[`response.end()`]: #responseenddata-encoding-callback +[`response.getHeader()`]: #responsegetheadername +[`response.setHeader()`]: #responsesetheadername-value +[`response.socket`]: #responsesocket +[`response.writableEnded`]: #responsewritableended +[`response.writableFinished`]: #responsewritablefinished +[`response.write()`]: #responsewritechunk-encoding-callback +[`response.write(data, encoding)`]: #responsewritechunk-encoding-callback +[`response.writeContinue()`]: #responsewritecontinue +[`response.writeHead()`]: #responsewriteheadstatuscode-statusmessage-headers +[`server.listen()`]: net.md#serverlisten +[`server.timeout`]: #servertimeout +[`setHeader(name, value)`]: #requestsetheadername-value +[`socket.connect()`]: net.md#socketconnectoptions-connectlistener +[`socket.setKeepAlive()`]: net.md#socketsetkeepaliveenable-initialdelay +[`socket.setNoDelay()`]: net.md#socketsetnodelaynodelay +[`socket.setTimeout()`]: net.md#socketsettimeouttimeout-callback +[`socket.unref()`]: net.md#socketunref +[`url.parse()`]: url.md#urlparseurlstring-parsequerystring-slashesdenotehost +[`writable.cork()`]: stream.md#writablecork +[`writable.destroy()`]: stream.md#writabledestroyerror +[`writable.destroyed`]: stream.md#writabledestroyed +[`writable.uncork()`]: stream.md#writableuncork +[initial delay]: net.md#socketsetkeepaliveenable-initialdelay diff --git a/doc/api/http2.md b/doc/api/http2.md index 46a0cd37270d9a..b4ee324dc45928 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3795,60 +3795,61 @@ following additional properties: `Http2Session`. [ALPN Protocol ID]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids -[ALPN negotiation]: #http2_alpn_negotiation -[Compatibility API]: #http2_compatibility_api +[ALPN negotiation]: #alpn-negotiation +[Compatibility API]: #compatibility-api [HTTP/1]: http.md [HTTP/2]: https://tools.ietf.org/html/rfc7540 -[HTTP/2 Headers Object]: #http2_headers_object -[HTTP/2 Settings Object]: #http2_settings_object +[HTTP/2 Headers Object]: #headers-object +[HTTP/2 Settings Object]: #settings-object [HTTP/2 Unencrypted]: https://http2.github.io/faq/#does-http2-require-encryption [HTTPS]: https.md [Performance Observer]: perf_hooks.md [RFC 7838]: https://tools.ietf.org/html/rfc7838 [RFC 8336]: https://tools.ietf.org/html/rfc8336 [RFC 8441]: https://tools.ietf.org/html/rfc8441 -[`'checkContinue'`]: #http2_event_checkcontinue -[`'connect'`]: #http2_event_connect -[`'request'`]: #http2_event_request -[`'unknownProtocol'`]: #http2_event_unknownprotocol -[`ClientHttp2Stream`]: #http2_class_clienthttp2stream -[`Duplex`]: stream.md#stream_class_stream_duplex -[`Http2ServerRequest`]: #http2_class_http2_http2serverrequest -[`Http2ServerResponse`]: #http2_class_http2_http2serverresponse -[`Http2Session` and Sockets]: #http2_http2session_and_sockets -[`Http2Session`'s `'stream'` event]: #http2_event_stream -[`Http2Stream`]: #http2_class_http2stream -[`ServerHttp2Stream`]: #http2_class_serverhttp2stream -[`TypeError`]: errors.md#errors_class_typeerror -[`http.ClientRequest#maxHeadersCount`]: http.md#http_request_maxheaderscount -[`http.Server#maxHeadersCount`]: http.md#http_server_maxheaderscount -[`http2.SecureServer`]: #http2_class_http2secureserver -[`http2.Server`]: #http2_class_http2server -[`http2.createSecureServer()`]: #http2_http2_createsecureserver_options_onrequesthandler -[`http2.createServer()`]: #http2_http2_createserver_options_onrequesthandler -[`http2session.close()`]: #http2_http2session_close_callback -[`http2stream.pushStream()`]: #http2_http2stream_pushstream_headers_options_callback -[`net.Server.close()`]: net.md#net_server_close_callback -[`net.Socket.bufferSize`]: net.md#net_socket_buffersize -[`net.Socket.prototype.ref()`]: net.md#net_socket_ref -[`net.Socket.prototype.unref()`]: net.md#net_socket_unref -[`net.Socket`]: net.md#net_class_net_socket -[`net.connect()`]: net.md#net_net_connect -[`net.createServer()`]: net.md#net_net_createserver_options_connectionlistener -[`request.socket`]: #http2_request_socket -[`request.socket.getPeerCertificate()`]: tls.md#tls_tlssocket_getpeercertificate_detailed -[`response.end()`]: #http2_response_end_data_encoding_callback -[`response.setHeader()`]: #http2_response_setheader_name_value -[`response.socket`]: #http2_response_socket -[`response.writableEnded`]: #http2_response_writableended -[`response.write()`]: #http2_response_write_chunk_encoding_callback -[`response.write(data, encoding)`]: http.md#http_response_write_chunk_encoding_callback -[`response.writeContinue()`]: #http2_response_writecontinue -[`response.writeHead()`]: #http2_response_writehead_statuscode_statusmessage_headers -[`tls.Server.close()`]: tls.md#tls_server_close_callback -[`tls.TLSSocket`]: tls.md#tls_class_tls_tlssocket -[`tls.connect()`]: tls.md#tls_tls_connect_options_callback -[`tls.createServer()`]: tls.md#tls_tls_createserver_options_secureconnectionlistener -[`writable.writableFinished`]: stream.md#stream_writable_writablefinished -[error code]: #http2_error_codes_for_rst_stream_and_goaway -[Sensitive headers]: #http2_sensitive_headers +[`'checkContinue'`]: #event-checkcontinue +[`'connect'`]: #event-connect +[`'request'`]: #event-request +[`'unknownProtocol'`]: #event-unknownprotocol +[`ClientHttp2Stream`]: #class-clienthttp2stream +[`Duplex`]: stream.md#class-streamduplex +[`Http2ServerRequest`]: #class-http2http2serverrequest +[`Http2ServerResponse`]: #class-http2http2serverresponse +[`Http2Session` and Sockets]: #http2session-and-sockets +[`Http2Session`'s `'stream'` event]: #event-stream +[`Http2Stream`]: #class-http2stream +[`ServerHttp2Stream`]: #class-serverhttp2stream +[`TypeError`]: errors.md#class-typeerror +[`http.ClientRequest#maxHeadersCount`]: http.md#requestmaxheaderscount +[`http.Server#maxHeadersCount`]: http.md#servermaxheaderscount +[`http2.SecureServer`]: #class-http2secureserver +[`http2.Server`]: #class-http2server +[`http2.createSecureServer()`]: #http2createsecureserveroptions-onrequesthandler +[`http2.createServer()`]: #http2createserveroptions-onrequesthandler +[`http2session.close()`]: #http2sessionclosecallback +[`http2stream.pushStream()`]: #http2streampushstreamheaders-options-callback +[`net.Server.close()`]: net.md#serverclosecallback +[`net.Socket.bufferSize`]: net.md#socketbuffersize +[`net.Socket.prototype.ref()`]: net.md#socketref +[`net.Socket.prototype.unref()`]: net.md#socketunref +[`net.Socket`]: net.md#class-netsocket +[`net.connect()`]: net.md#netconnect +[`net.createServer()`]: net.md#netcreateserveroptions-connectionlistener +[`request.authority`]: #requestauthority +[`request.socket.getPeerCertificate()`]: tls.md#tlssocketgetpeercertificatedetailed +[`request.socket`]: #requestsocket +[`response.end()`]: #responseenddata-encoding-callback +[`response.setHeader()`]: #responsesetheadername-value +[`response.socket`]: #responsesocket +[`response.writableEnded`]: #responsewritableended +[`response.write()`]: #responsewritechunk-encoding-callback +[`response.write(data, encoding)`]: http.md#responsewritechunk-encoding-callback +[`response.writeContinue()`]: #responsewritecontinue +[`response.writeHead()`]: #responsewriteheadstatuscode-statusmessage-headers +[`tls.Server.close()`]: tls.md#serverclosecallback +[`tls.TLSSocket`]: tls.md#class-tlstlssocket +[`tls.connect()`]: tls.md#tlsconnectoptions-callback +[`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener +[`writable.writableFinished`]: stream.md#writablewritablefinished +[error code]: #error-codes-for-rst_stream-and-goaway +[Sensitive headers]: #sensitive-headers diff --git a/doc/api/https.md b/doc/api/https.md index f7cc2a340101e7..f2fa3d8fe1a1a7 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -456,29 +456,29 @@ statusCode: 200 headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains ``` -[`Agent`]: #https_class_https_agent -[`Session Resumption`]: tls.md#tls_session_resumption -[`URL`]: url.md#url_the_whatwg_url_api -[`http.Agent(options)`]: http.md#http_new_agent_options -[`http.Agent`]: http.md#http_class_http_agent -[`http.ClientRequest`]: http.md#http_class_http_clientrequest -[`http.Server#headersTimeout`]: http.md#http_server_headerstimeout -[`http.Server#keepAliveTimeout`]: http.md#http_server_keepalivetimeout -[`http.Server#maxHeadersCount`]: http.md#http_server_maxheaderscount -[`http.Server#requestTimeout`]: http.md#http_server_requesttimeout -[`http.Server#setTimeout()`]: http.md#http_server_settimeout_msecs_callback -[`http.Server#timeout`]: http.md#http_server_timeout -[`http.Server`]: http.md#http_class_http_server -[`http.close()`]: http.md#http_server_close_callback -[`http.createServer()`]: http.md#http_http_createserver_options_requestlistener -[`http.get()`]: http.md#http_http_get_options_callback -[`http.request()`]: http.md#http_http_request_options_callback -[`https.Agent`]: #https_class_https_agent -[`https.request()`]: #https_https_request_options_callback -[`net.Server`]: net.md#net_class_net_server -[`new URL()`]: url.md#url_new_url_input_base -[`server.listen()`]: net.md#net_server_listen -[`tls.connect()`]: tls.md#tls_tls_connect_options_callback -[`tls.createSecureContext()`]: tls.md#tls_tls_createsecurecontext_options -[`tls.createServer()`]: tls.md#tls_tls_createserver_options_secureconnectionlistener +[`Agent`]: #class-httpsagent +[`Session Resumption`]: tls.md#session-resumption +[`URL`]: url.md#the-whatwg-url-api +[`http.Agent(options)`]: http.md#new-agentoptions +[`http.Agent`]: http.md#class-httpagent +[`http.ClientRequest`]: http.md#class-httpclientrequest +[`http.Server#headersTimeout`]: http.md#serverheaderstimeout +[`http.Server#keepAliveTimeout`]: http.md#serverkeepalivetimeout +[`http.Server#maxHeadersCount`]: http.md#servermaxheaderscount +[`http.Server#requestTimeout`]: http.md#serverrequesttimeout +[`http.Server#setTimeout()`]: http.md#serversettimeoutmsecs-callback +[`http.Server#timeout`]: http.md#servertimeout +[`http.Server`]: http.md#class-httpserver +[`http.close()`]: http.md#serverclosecallback +[`http.createServer()`]: http.md#httpcreateserveroptions-requestlistener +[`http.get()`]: http.md#httpgetoptions-callback +[`http.request()`]: http.md#httprequestoptions-callback +[`https.Agent`]: #class-httpsagent +[`https.request()`]: #httpsrequestoptions-callback +[`net.Server`]: net.md#class-netserver +[`new URL()`]: url.md#new-urlinput-base +[`server.listen()`]: net.md#serverlisten +[`tls.connect()`]: tls.md#tlsconnectoptions-callback +[`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions +[`tls.createServer()`]: tls.md#tlscreateserveroptions-secureconnectionlistener [sni wiki]: https://en.wikipedia.org/wiki/Server_Name_Indication diff --git a/doc/api/inspector.md b/doc/api/inspector.md index c22dbca03bcbf1..8383f2b7964b35 100644 --- a/doc/api/inspector.md +++ b/doc/api/inspector.md @@ -45,7 +45,7 @@ started. If wait is `true`, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. -See the [security warning](cli.md#inspector_security) regarding the `host` +See the [security warning][] regarding the `host` parameter usage. ## `inspector.url()` @@ -243,4 +243,5 @@ session.post('HeapProfiler.takeHeapSnapshot', null, (err, r) => { [Chrome DevTools Protocol Viewer]: https://chromedevtools.github.io/devtools-protocol/v8/ [Heap Profiler]: https://chromedevtools.github.io/devtools-protocol/v8/HeapProfiler [`'Debugger.paused'`]: https://chromedevtools.github.io/devtools-protocol/v8/Debugger#event-paused -[`session.connect()`]: #inspector_session_connect +[`session.connect()`]: #sessionconnect +[security warning]: cli.md#warning-binding-inspector-to-a-public-ipport-combination-is-insecure diff --git a/doc/api/intl.md b/doc/api/intl.md index 015872330c9433..ad54e04920a003 100644 --- a/doc/api/intl.md +++ b/doc/api/intl.md @@ -194,22 +194,22 @@ to be helpful: [ECMA-262]: https://tc39.github.io/ecma262/ [ECMA-402]: https://tc39.github.io/ecma402/ [ICU]: http://site.icu-project.org/ -[REPL]: repl.md#repl_repl +[REPL]: repl.md#repl [Test262]: https://github.com/tc39/test262/tree/HEAD/test/intl402 -[WHATWG URL parser]: url.md#url_the_whatwg_url_api -[`--icu-data-dir`]: cli.md#cli_icu_data_dir_file +[WHATWG URL parser]: url.md#the-whatwg-url-api +[`--icu-data-dir`]: cli.md#--icu-data-dirfile [`Date.prototype.toLocaleString()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString [`Intl.DateTimeFormat`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat [`Intl`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl -[`NODE_ICU_DATA`]: cli.md#cli_node_icu_data_file +[`NODE_ICU_DATA`]: cli.md#node_icu_datafile [`Number.prototype.toLocaleString()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString [`RegExp` Unicode Property Escapes]: https://github.com/tc39/proposal-regexp-unicode-property-escapes [`String.prototype.localeCompare()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare [`String.prototype.normalize()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize [`String.prototype.toLowerCase()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase [`String.prototype.toUpperCase()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase -[`require('buffer').transcode()`]: buffer.md#buffer_buffer_transcode_source_fromenc_toenc -[`require('util').TextDecoder`]: util.md#util_class_util_textdecoder +[`require('buffer').transcode()`]: buffer.md#buffertranscodesource-fromenc-toenc +[`require('util').TextDecoder`]: util.md#class-utiltextdecoder [btest402]: https://github.com/srl295/btest402 [full-icu]: https://www.npmjs.com/package/full-icu [internationalized domain names]: https://en.wikipedia.org/wiki/Internationalized_domain_name diff --git a/doc/api/module.md b/doc/api/module.md index 65744b68d95a8e..1d5bcc0342e5e3 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -211,10 +211,10 @@ consists of the following keys: [CommonJS]: modules.md [ES Modules]: esm.md [Source map v3 format]: https://sourcemaps.info/spec.html#h.mofvlxcwqzej -[`--enable-source-maps`]: cli.md#cli_enable_source_maps -[`NODE_V8_COVERAGE=dir`]: cli.md#cli_node_v8_coverage_dir -[`SourceMap`]: #module_class_module_sourcemap -[`createRequire()`]: #module_module_createrequire_filename -[`module`]: modules.md#modules_the_module_object -[module wrapper]: modules.md#modules_the_module_wrapper +[`--enable-source-maps`]: cli.md#--enable-source-maps +[`NODE_V8_COVERAGE=dir`]: cli.md#node_v8_coveragedir +[`SourceMap`]: #class-modulesourcemap +[`createRequire()`]: #modulecreaterequirefilename +[`module`]: modules.md#the-module-object +[module wrapper]: modules.md#the-module-wrapper [source map include directives]: https://sourcemaps.info/spec.html#h.lmz475t4mvbx diff --git a/doc/api/modules.md b/doc/api/modules.md index 1667c149953773..71e4f8c530491b 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -32,7 +32,7 @@ The module `circle.js` has exported the functions `area()` and by specifying additional properties on the special `exports` object. Variables local to the module will be private, because the module is wrapped -in a function by Node.js (see [module wrapper](#modules_the_module_wrapper)). +in a function by Node.js (see [module wrapper](#the-module-wrapper)). In this example, the variable `PI` is private to `circle.js`. The `module.exports` property can be assigned a new value (such as a function @@ -99,7 +99,7 @@ package may itself have dependencies, and in some cases, these may even collide or form cyclic dependencies. Because Node.js looks up the `realpath` of any modules it loads (that is, it -resolves symlinks) and then [looks for their dependencies in `node_modules` folders](#modules_loading_from_node_modules_folders), +resolves symlinks) and then [looks for their dependencies in `node_modules` folders](#loading-from-node_modules-folders), this situation can be resolved with the following architecture: * `/usr/lib/node/foo/1.2.3/`: Contents of the `foo` package, version 1.2.3. @@ -426,7 +426,7 @@ Error: Cannot find module 'some-library' If the module identifier passed to `require()` is not a -[core](#modules_core_modules) module, and does not begin with `'/'`, `'../'`, or +[core](#core-modules) module, and does not begin with `'/'`, `'../'`, or `'./'`, then Node.js starts at the parent directory of the current module, and adds `/node_modules`, and attempts to load the module from that location. Node.js will not append `node_modules` to a path already ending in @@ -680,7 +680,7 @@ added: v0.1.17 The `Module` object representing the entry script loaded when the Node.js process launched. -See ["Accessing the main module"](#modules_accessing_the_main_module). +See ["Accessing the main module"](#accessing-the-main-module). In `entry.js` script: @@ -962,39 +962,39 @@ in order to be used. ## The `Module` object This section was moved to -[Modules: `module` core module](module.md#module_the_module_object). +[Modules: `module` core module](module.md#the-module-object). -* `module.builtinModules` -* `module.createRequire(filename)` -* `module.createRequireFromPath(filename)` -* `module.syncBuiltinESMExports()` +* `module.builtinModules` +* `module.createRequire(filename)` +* `module.createRequireFromPath(filename)` +* `module.syncBuiltinESMExports()` ## Source map v3 support This section was moved to -[Modules: `module` core module](module.md#module_source_map_v3_support). +[Modules: `module` core module](module.md#source-map-v3-support). -* `module.findSourceMap(path)` -* Class: `module.SourceMap` - * `new SourceMap(payload)` - * `sourceMap.payload` - * `sourceMap.findEntry(lineNumber, columnNumber)` +* `module.findSourceMap(path)` +* Class: `module.SourceMap` + * `new SourceMap(payload)` + * `sourceMap.payload` + * `sourceMap.findEntry(lineNumber, columnNumber)` [ECMAScript Modules]: esm.md -[GLOBAL_FOLDERS]: #modules_loading_from_the_global_folders -[`"main"`]: packages.md#packages_main -[`Error`]: errors.md#errors_class_error -[`__dirname`]: #modules_dirname -[`__filename`]: #modules_filename -[`module` object]: #modules_the_module_object -[`module.id`]: #modules_module_id -[`module.children`]: #modules_module_children -[`package.json`]: packages.md#packages_node_js_package_json_field_definitions -[`path.dirname()`]: path.md#path_path_dirname_path -[`require.main`]: #modules_require_main -[an error]: errors.md#errors_err_require_esm -[exports shortcut]: #modules_exports_shortcut -[module resolution]: #modules_all_together +[GLOBAL_FOLDERS]: #loading-from-the-global-folders +[`"main"`]: packages.md#main +[`Error`]: errors.md#class-error +[`__dirname`]: #__dirname +[`__filename`]: #__filename +[`module.children`]: #modulechildren +[`module.id`]: #moduleid +[`module` object]: #the-module-object +[`package.json`]: packages.md#nodejs-packagejson-field-definitions +[`path.dirname()`]: path.md#pathdirnamepath +[`require.main`]: #requiremain +[an error]: errors.md#err_require_esm +[exports shortcut]: #exports-shortcut +[module resolution]: #all-together [native addons]: addons.md diff --git a/doc/api/n-api.md b/doc/api/n-api.md index d25fc4193590d1..597ad01af1a009 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -5969,14 +5969,14 @@ the add-on's file name during loading. [CMake]: https://cmake.org [CMake.js]: https://github.com/cmake-js/cmake-js [ECMAScript Language Specification]: https://tc39.github.io/ecma262/ -[Error handling]: #n_api_error_handling +[Error handling]: #error-handling [GCC]: https://gcc.gnu.org [GYP]: https://gyp.gsrc.io [GitHub releases]: https://help.github.com/en/github/administering-a-repository/about-releases [LLVM]: https://llvm.org [Native Abstractions for Node.js]: https://github.com/nodejs/nan -[Object lifetime management]: #n_api_object_lifetime_management -[Object wrap]: #n_api_object_wrap +[Object lifetime management]: #object-lifetime-management +[Object wrap]: #object-wrap [Section 12.10.4]: https://tc39.github.io/ecma262/#sec-instanceofoperator [Section 12.5.5]: https://tc39.github.io/ecma262/#sec-typeof-operator [Section 19.2]: https://tc39.github.io/ecma262/#sec-function-objects @@ -6006,79 +6006,79 @@ the add-on's file name during loading. [Section 9.1.6]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc [Travis CI]: https://travis-ci.org [Visual Studio]: https://visualstudio.microsoft.com -[Working with JavaScript properties]: #n_api_working_with_javascript_properties +[Working with JavaScript properties]: #working-with-javascript-properties [Xcode]: https://developer.apple.com/xcode/ [`Number.MAX_SAFE_INTEGER`]: https://tc39.github.io/ecma262/#sec-number.max_safe_integer [`Number.MIN_SAFE_INTEGER`]: https://tc39.github.io/ecma262/#sec-number.min_safe_integer -[`Worker`]: worker_threads.md#worker_threads_class_worker -[`async_hooks.executionAsyncResource()`]: async_hooks.md#async_hooks_async_hooks_executionasyncresource -[`global`]: globals.md#globals_global -[`init` hooks]: async_hooks.md#async_hooks_init_asyncid_type_triggerasyncid_resource -[`napi_add_async_cleanup_hook`]: #n_api_napi_add_async_cleanup_hook -[`napi_add_env_cleanup_hook`]: #n_api_napi_add_env_cleanup_hook -[`napi_add_finalizer`]: #n_api_napi_add_finalizer -[`napi_async_cleanup_hook`]: #n_api_napi_async_cleanup_hook -[`napi_async_complete_callback`]: #n_api_napi_async_complete_callback -[`napi_async_destroy`]: #n_api_napi_async_destroy -[`napi_async_init`]: #n_api_napi_async_init -[`napi_callback`]: #n_api_napi_callback -[`napi_cancel_async_work`]: #n_api_napi_cancel_async_work -[`napi_close_callback_scope`]: #n_api_napi_close_callback_scope -[`napi_close_escapable_handle_scope`]: #n_api_napi_close_escapable_handle_scope -[`napi_close_handle_scope`]: #n_api_napi_close_handle_scope -[`napi_create_async_work`]: #n_api_napi_create_async_work -[`napi_create_error`]: #n_api_napi_create_error -[`napi_create_external_arraybuffer`]: #n_api_napi_create_external_arraybuffer -[`napi_create_range_error`]: #n_api_napi_create_range_error -[`napi_create_reference`]: #n_api_napi_create_reference -[`napi_create_type_error`]: #n_api_napi_create_type_error -[`napi_define_class`]: #n_api_napi_define_class -[`napi_delete_async_work`]: #n_api_napi_delete_async_work -[`napi_delete_reference`]: #n_api_napi_delete_reference -[`napi_escape_handle`]: #n_api_napi_escape_handle -[`napi_finalize`]: #n_api_napi_finalize -[`napi_get_and_clear_last_exception`]: #n_api_napi_get_and_clear_last_exception -[`napi_get_array_length`]: #n_api_napi_get_array_length -[`napi_get_element`]: #n_api_napi_get_element -[`napi_get_last_error_info`]: #n_api_napi_get_last_error_info -[`napi_get_property`]: #n_api_napi_get_property -[`napi_get_reference_value`]: #n_api_napi_get_reference_value -[`napi_get_value_external`]: #n_api_napi_get_value_external -[`napi_has_property`]: #n_api_napi_has_property -[`napi_instanceof`]: #n_api_napi_instanceof -[`napi_is_error`]: #n_api_napi_is_error -[`napi_is_exception_pending`]: #n_api_napi_is_exception_pending -[`napi_make_callback`]: #n_api_napi_make_callback -[`napi_open_callback_scope`]: #n_api_napi_open_callback_scope -[`napi_open_escapable_handle_scope`]: #n_api_napi_open_escapable_handle_scope -[`napi_open_handle_scope`]: #n_api_napi_open_handle_scope -[`napi_property_attributes`]: #n_api_napi_property_attributes -[`napi_property_descriptor`]: #n_api_napi_property_descriptor -[`napi_queue_async_work`]: #n_api_napi_queue_async_work -[`napi_reference_ref`]: #n_api_napi_reference_ref -[`napi_reference_unref`]: #n_api_napi_reference_unref -[`napi_remove_async_cleanup_hook`]: #n_api_napi_remove_async_cleanup_hook -[`napi_remove_env_cleanup_hook`]: #n_api_napi_remove_env_cleanup_hook -[`napi_set_instance_data`]: #n_api_napi_set_instance_data -[`napi_set_property`]: #n_api_napi_set_property -[`napi_threadsafe_function_call_js`]: #n_api_napi_threadsafe_function_call_js -[`napi_throw_error`]: #n_api_napi_throw_error -[`napi_throw_range_error`]: #n_api_napi_throw_range_error -[`napi_throw_type_error`]: #n_api_napi_throw_type_error -[`napi_throw`]: #n_api_napi_throw -[`napi_unwrap`]: #n_api_napi_unwrap -[`napi_wrap`]: #n_api_napi_wrap +[`Worker`]: worker_threads.md#class-worker +[`async_hooks.executionAsyncResource()`]: async_hooks.md#async_hooksexecutionasyncresource +[`global`]: globals.md#global +[`init` hooks]: async_hooks.md#initasyncid-type-triggerasyncid-resource +[`napi_add_async_cleanup_hook`]: #napi_add_async_cleanup_hook +[`napi_add_env_cleanup_hook`]: #napi_add_env_cleanup_hook +[`napi_add_finalizer`]: #napi_add_finalizer +[`napi_async_cleanup_hook`]: #napi_async_cleanup_hook +[`napi_async_complete_callback`]: #napi_async_complete_callback +[`napi_async_destroy`]: #napi_async_destroy +[`napi_async_init`]: #napi_async_init +[`napi_callback`]: #napi_callback +[`napi_cancel_async_work`]: #napi_cancel_async_work +[`napi_close_callback_scope`]: #napi_close_callback_scope +[`napi_close_escapable_handle_scope`]: #napi_close_escapable_handle_scope +[`napi_close_handle_scope`]: #napi_close_handle_scope +[`napi_create_async_work`]: #napi_create_async_work +[`napi_create_error`]: #napi_create_error +[`napi_create_external_arraybuffer`]: #napi_create_external_arraybuffer +[`napi_create_range_error`]: #napi_create_range_error +[`napi_create_reference`]: #napi_create_reference +[`napi_create_type_error`]: #napi_create_type_error +[`napi_define_class`]: #napi_define_class +[`napi_delete_async_work`]: #napi_delete_async_work +[`napi_delete_reference`]: #napi_delete_reference +[`napi_escape_handle`]: #napi_escape_handle +[`napi_finalize`]: #napi_finalize +[`napi_get_and_clear_last_exception`]: #napi_get_and_clear_last_exception +[`napi_get_array_length`]: #napi_get_array_length +[`napi_get_element`]: #napi_get_element +[`napi_get_last_error_info`]: #napi_get_last_error_info +[`napi_get_property`]: #napi_get_property +[`napi_get_reference_value`]: #napi_get_reference_value +[`napi_get_value_external`]: #napi_get_value_external +[`napi_has_property`]: #napi_has_property +[`napi_instanceof`]: #napi_instanceof +[`napi_is_error`]: #napi_is_error +[`napi_is_exception_pending`]: #napi_is_exception_pending +[`napi_make_callback`]: #napi_make_callback +[`napi_open_callback_scope`]: #napi_open_callback_scope +[`napi_open_escapable_handle_scope`]: #napi_open_escapable_handle_scope +[`napi_open_handle_scope`]: #napi_open_handle_scope +[`napi_property_attributes`]: #napi_property_attributes +[`napi_property_descriptor`]: #napi_property_descriptor +[`napi_queue_async_work`]: #napi_queue_async_work +[`napi_reference_ref`]: #napi_reference_ref +[`napi_reference_unref`]: #napi_reference_unref +[`napi_remove_async_cleanup_hook`]: #napi_remove_async_cleanup_hook +[`napi_remove_env_cleanup_hook`]: #napi_remove_env_cleanup_hook +[`napi_set_instance_data`]: #napi_set_instance_data +[`napi_set_property`]: #napi_set_property +[`napi_threadsafe_function_call_js`]: #napi_threadsafe_function_call_js +[`napi_throw_error`]: #napi_throw_error +[`napi_throw_range_error`]: #napi_throw_range_error +[`napi_throw_type_error`]: #napi_throw_type_error +[`napi_throw`]: #napi_throw +[`napi_unwrap`]: #napi_unwrap +[`napi_wrap`]: #napi_wrap [`node-addon-api`]: https://github.com/nodejs/node-addon-api [`node_api.h`]: https://github.com/nodejs/node/blob/HEAD/src/node_api.h -[`process.release`]: process.md#process_process_release +[`process.release`]: process.md#processrelease [`uv_ref`]: https://docs.libuv.org/en/v1.x/handle.html#c.uv_ref [`uv_unref`]: https://docs.libuv.org/en/v1.x/handle.html#c.uv_unref -[async_hooks `type`]: async_hooks.md#async_hooks_type -[context-aware addons]: addons.md#addons_context_aware_addons +[async_hooks `type`]: async_hooks.md#type +[context-aware addons]: addons.md#context-aware-addons [docs]: https://github.com/nodejs/node-addon-api#api-documentation [global scope]: globals.md [gyp-next]: https://github.com/nodejs/gyp-next -[module scope]: modules.md#modules_the_module_scope +[module scope]: modules.md#the-module-scope [node-gyp]: https://github.com/nodejs/node-gyp [node-pre-gyp]: https://github.com/mapbox/node-pre-gyp [prebuild]: https://github.com/prebuild/prebuild diff --git a/doc/api/net.md b/doc/api/net.md index 2a8ade43dd3e09..c5aa1021e16a65 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -325,7 +325,7 @@ Possible signatures: * [`server.listen(options[, callback])`][`server.listen(options)`] * [`server.listen(path[, backlog][, callback])`][`server.listen(path)`] for [IPC][] servers -* +* server.listen([port[, host[, backlog]]][, callback]) for TCP servers @@ -412,7 +412,7 @@ changes: If `port` is specified, it behaves the same as - + server.listen([port[, host[, backlog]]][, callback]). Otherwise, if `path` is specified, it behaves the same as [`server.listen(path[, backlog][, callback])`][`server.listen(path)`]. @@ -1402,59 +1402,59 @@ added: v0.3.0 Returns `true` if input is a version 6 IP address, otherwise returns `false`. -[IPC]: #net_ipc_support -[Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections -[Readable Stream]: stream.md#stream_class_stream_readable -[`'close'`]: #net_event_close -[`'connect'`]: #net_event_connect -[`'connection'`]: #net_event_connection -[`'data'`]: #net_event_data -[`'drain'`]: #net_event_drain -[`'end'`]: #net_event_end -[`'error'`]: #net_event_error_1 -[`'listening'`]: #net_event_listening -[`'timeout'`]: #net_event_timeout -[`EventEmitter`]: events.md#events_class_eventemitter -[`child_process.fork()`]: child_process.md#child_process_child_process_fork_modulepath_args_options -[`dns.lookup()`]: dns.md#dns_dns_lookup_hostname_options_callback -[`dns.lookup()` hints]: dns.md#dns_supported_getaddrinfo_flags -[`net.Server`]: #net_class_net_server -[`net.Socket`]: #net_class_net_socket -[`net.connect()`]: #net_net_connect -[`net.connect(options)`]: #net_net_connect_options_connectlistener -[`net.connect(path)`]: #net_net_connect_path_connectlistener -[`net.connect(port, host)`]: #net_net_connect_port_host_connectlistener -[`net.createConnection()`]: #net_net_createconnection -[`net.createConnection(options)`]: #net_net_createconnection_options_connectlistener -[`net.createConnection(path)`]: #net_net_createconnection_path_connectlistener -[`net.createConnection(port, host)`]: #net_net_createconnection_port_host_connectlistener -[`net.createServer()`]: #net_net_createserver_options_connectionlistener -[`new net.Socket(options)`]: #net_new_net_socket_options -[`readable.setEncoding()`]: stream.md#stream_readable_setencoding_encoding -[`server.close()`]: #net_server_close_callback -[`server.getConnections()`]: #net_server_getconnections_callback -[`server.listen()`]: #net_server_listen -[`server.listen(handle)`]: #net_server_listen_handle_backlog_callback -[`server.listen(options)`]: #net_server_listen_options_callback -[`server.listen(path)`]: #net_server_listen_path_backlog_callback +[IPC]: #ipc-support +[Identifying paths for IPC connections]: #identifying-paths-for-ipc-connections +[Readable Stream]: stream.md#class-streamreadable +[`'close'`]: #event-close +[`'connect'`]: #event-connect +[`'connection'`]: #event-connection +[`'data'`]: #event-data +[`'drain'`]: #event-drain +[`'end'`]: #event-end +[`'error'`]: #event-error_1 +[`'listening'`]: #event-listening +[`'timeout'`]: #event-timeout +[`EventEmitter`]: events.md#class-eventemitter +[`child_process.fork()`]: child_process.md#child_processforkmodulepath-args-options +[`dns.lookup()`]: dns.md#dnslookuphostname-options-callback +[`dns.lookup()` hints]: dns.md#supported-getaddrinfo-flags +[`net.Server`]: #class-netserver +[`net.Socket`]: #class-netsocket +[`net.connect()`]: #netconnect +[`net.connect(options)`]: #netconnectoptions-connectlistener +[`net.connect(path)`]: #netconnectpath-connectlistener +[`net.connect(port, host)`]: #netconnectport-host-connectlistener +[`net.createConnection()`]: #netcreateconnection +[`net.createConnection(options)`]: #netcreateconnectionoptions-connectlistener +[`net.createConnection(path)`]: #netcreateconnectionpath-connectlistener +[`net.createConnection(port, host)`]: #netcreateconnectionport-host-connectlistener +[`net.createServer()`]: #netcreateserveroptions-connectionlistener +[`new net.Socket(options)`]: #new-netsocketoptions +[`readable.setEncoding()`]: stream.md#readablesetencodingencoding +[`server.close()`]: #serverclosecallback +[`server.getConnections()`]: #servergetconnectionscallback +[`server.listen()`]: #serverlisten +[`server.listen(handle)`]: #serverlistenhandle-backlog-callback +[`server.listen(options)`]: #serverlistenoptions-callback +[`server.listen(path)`]: #serverlistenpath-backlog-callback [`socket(7)`]: https://man7.org/linux/man-pages/man7/socket.7.html -[`socket.connect()`]: #net_socket_connect -[`socket.connect(options)`]: #net_socket_connect_options_connectlistener -[`socket.connect(path)`]: #net_socket_connect_path_connectlistener -[`socket.connect(port)`]: #net_socket_connect_port_host_connectlistener -[`socket.connecting`]: #net_socket_connecting -[`socket.destroy()`]: #net_socket_destroy_error -[`socket.end()`]: #net_socket_end_data_encoding_callback -[`socket.pause()`]: #net_socket_pause -[`socket.resume()`]: #net_socket_resume -[`socket.setEncoding()`]: #net_socket_setencoding_encoding -[`socket.setTimeout()`]: #net_socket_settimeout_timeout_callback -[`socket.setTimeout(timeout)`]: #net_socket_settimeout_timeout_callback -[`writable.destroy()`]: stream.md#stream_writable_destroy_error -[`writable.destroyed`]: stream.md#stream_writable_destroyed -[`writable.end()`]: stream.md#stream_writable_end_chunk_encoding_callback -[`writable.writableLength`]: stream.md#stream_writable_writablelength +[`socket.connect()`]: #socketconnect +[`socket.connect(options)`]: #socketconnectoptions-connectlistener +[`socket.connect(path)`]: #socketconnectpath-connectlistener +[`socket.connect(port)`]: #socketconnectport-host-connectlistener +[`socket.connecting`]: #socketconnecting +[`socket.destroy()`]: #socketdestroyerror +[`socket.end()`]: #socketenddata-encoding-callback +[`socket.pause()`]: #socketpause +[`socket.resume()`]: #socketresume +[`socket.setEncoding()`]: #socketsetencodingencoding +[`socket.setTimeout()`]: #socketsettimeouttimeout-callback +[`socket.setTimeout(timeout)`]: #socketsettimeouttimeout-callback +[`writable.destroy()`]: stream.md#writabledestroyerror +[`writable.destroyed`]: stream.md#writabledestroyed +[`writable.end()`]: stream.md#writableendchunk-encoding-callback +[`writable.writableLength`]: stream.md#writablewritablelength [half-closed]: https://tools.ietf.org/html/rfc1122 -[stream_writable_write]: stream.md#stream_writable_write_chunk_encoding_callback +[stream_writable_write]: stream.md#writablewritechunk-encoding-callback [unspecified IPv4 address]: https://en.wikipedia.org/wiki/0.0.0.0 [unspecified IPv6 address]: https://en.wikipedia.org/wiki/IPv6_address#Unspecified_address diff --git a/doc/api/os.md b/doc/api/os.md index ab39a81904149f..02a4c49a0a0d40 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -47,7 +47,7 @@ added: v6.3.0 Contains commonly used operating system-specific constants for error codes, process signals, and so on. The specific constants defined are described in -[OS constants](#os_os_constants_1). +[OS constants](#os-constants). ## `os.cpus()` ' + '

Describe Something in more detail here.

' }, @@ -104,18 +114,22 @@ const testData = [ { file: fixtures.path('document_with_links.md'), html: '

Usage and Example#' + - '

Usage#

node \\[options\\] index.js' + + 'href="#usage-and-example" id="usage-and-example">#' + + '

Usage#

node \\[options\\] index.js' + '

Please see the' + 'Command Line Optionsdocument for more information.

' + '

' + - 'Example' + - '#

An example of a' + + 'Example' + + '#

An example of a' + 'webserverwritten with Node.js which responds with' + '\'Hello, World!\':

' + '

See also#

Check' + + 'href="#see-also" id="see-also">#

Check' + 'out alsothis guide

' }, { diff --git a/tools/doc/allhtml.mjs b/tools/doc/allhtml.mjs index 54a51dd6316010..f240a88e9072de 100644 --- a/tools/doc/allhtml.mjs +++ b/tools/doc/allhtml.mjs @@ -31,13 +31,31 @@ for (const link of toc.match(//g)) { // Split the doc. const match = /(<\/ul>\s*)?<\/\w+>\s*<\w+ id="apicontent">/.exec(data); + // Get module name + const moduleName = href.replace(/\.html$/, ''); + contents += data.slice(0, match.index) - .replace(/[\s\S]*?id="toc"[^>]*>\s*<\w+>.*?<\/\w+>\s*(
    \s*)?/, ''); + .replace(/[\s\S]*?id="toc"[^>]*>\s*<\w+>.*?<\/\w+>\s*(
') - .replace(/ { - return htmlFiles.includes(href) ? ' { + if (anchor !== id) throw new Error(`Mark does not match: ${anchor} should match ${id}`); + return ` { + return ` { + if (!htmlFiles.includes(href)) return match; + return `` + (noLinking ? '' : - '') + + '') + `${prefix} ${number}${noLinking ? '' : ''}` .replace(/\n/g, ' ') }); @@ -387,6 +387,7 @@ const DEPRECATION_HEADING_PATTERN = /^DEP\d+:/; export function buildToc({ filename, apilinks }) { return (tree, file) => { const idCounters = Object.create(null); + const legacyIdCounters = Object.create(null); let toc = ''; let depth = 0; @@ -404,7 +405,9 @@ export function buildToc({ filename, apilinks }) { const headingText = file.contents.slice( node.children[0].position.start.offset, node.position.end.offset).trim(); - const id = getId(`${realFilename}_${headingText}`, idCounters); + const id = getId(headingText, idCounters); + // Use previous ID generator to create alias + const legacyId = getLegacyId(`${realFilename}_${headingText}`, legacyIdCounters); const isDeprecationHeading = DEPRECATION_HEADING_PATTERN.test(headingText); @@ -424,6 +427,9 @@ export function buildToc({ filename, apilinks }) { let anchor = `#`; + // Add alias anchor to preserve old links + anchor += ``; + if (realFilename === 'errors' && headingText.startsWith('ERR_')) { anchor += `#`; @@ -453,10 +459,25 @@ export function buildToc({ filename, apilinks }) { }; } +// ID generator that mirrors Github's heading anchor parser +const punctuation = /[^\w\- ]/g; +function getId(text, idCounters) { + text = text.toLowerCase() + .replace(punctuation, '') + .replace(/ /g, '-'); + if (idCounters[text] !== undefined) { + return `${text}_${++idCounters[text]}`; + } + idCounters[text] = 0; + return text; +} + +// This ID generator is purely to generate aliases +// so we can preserve old doc links const notAlphaNumerics = /[^a-z0-9]+/g; const edgeUnderscores = /^_+|_+$/g; const notAlphaStart = /^[^a-z]/; -function getId(text, idCounters) { +function getLegacyId(text, idCounters) { text = text.toLowerCase() .replace(notAlphaNumerics, '_') .replace(edgeUnderscores, '') diff --git a/tools/doc/links-mapper.json b/tools/doc/links-mapper.json index 158d72c7fe5822..7232539ca461f5 100644 --- a/tools/doc/links-mapper.json +++ b/tools/doc/links-mapper.json @@ -1,6 +1,6 @@ { "doc/api/synopsis.md": { - "command line options": "cli.html#cli_command_line_options", + "command line options": "cli.html#command-line-options", "web server": "http.html" } } \ No newline at end of file diff --git a/tools/doc/type-parser.mjs b/tools/doc/type-parser.mjs index 3feac3b211c749..0d2cc46e28756e 100644 --- a/tools/doc/type-parser.mjs +++ b/tools/doc/type-parser.mjs @@ -24,8 +24,8 @@ const customTypesMap = { 'this': `${jsDocPrefix}Reference/Operators/this`, - 'AbortController': 'globals.html#globals_class_abortcontroller', - 'AbortSignal': 'globals.html#globals_class_abortsignal', + 'AbortController': 'globals.html#class-abortcontroller', + 'AbortSignal': 'globals.html#class-abortsignal', 'ArrayBufferView': 'https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView', @@ -38,7 +38,7 @@ const customTypesMap = { 'WebAssembly.Instance': `${jsDocPrefix}Reference/Global_Objects/WebAssembly/Instance`, - 'Blob': 'buffer.html#buffer_class_blob', + 'Blob': 'buffer.html#class-blob', 'Iterable': `${jsDocPrefix}Reference/Iteration_protocols#The_iterable_protocol`, @@ -48,135 +48,136 @@ const customTypesMap = { 'Module Namespace Object': 'https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects', - 'AsyncHook': 'async_hooks.html#async_hooks_async_hooks_createhook_callbacks', - 'AsyncResource': 'async_hooks.html#async_hooks_class_asyncresource', + 'AsyncHook': 'async_hooks.html#async_hookscreatehookcallbacks', + 'AsyncResource': 'async_hooks.html#class-asyncresource', - 'brotli options': 'zlib.html#zlib_class_brotlioptions', + 'brotli options': 'zlib.html#class-brotlioptions', - 'Buffer': 'buffer.html#buffer_class_buffer', + 'Buffer': 'buffer.html#class-buffer', - 'ChildProcess': 'child_process.html#child_process_class_childprocess', + 'ChildProcess': 'child_process.html#class-childprocess', - 'cluster.Worker': 'cluster.html#cluster_class_worker', + 'cluster.Worker': 'cluster.html#class-worker', - 'Cipher': 'crypto.html#crypto_class_cipher', - 'Decipher': 'crypto.html#crypto_class_decipher', - 'DiffieHellman': 'crypto.html#crypto_class_diffiehellman', - 'DiffieHellmanGroup': 'crypto.html#crypto_class_diffiehellmangroup', - 'ECDH': 'crypto.html#crypto_class_ecdh', - 'Hash': 'crypto.html#crypto_class_hash', - 'Hmac': 'crypto.html#crypto_class_hmac', - 'KeyObject': 'crypto.html#crypto_class_keyobject', - 'Sign': 'crypto.html#crypto_class_sign', - 'Verify': 'crypto.html#crypto_class_verify', - 'crypto.constants': 'crypto.html#crypto_crypto_constants_1', + 'Cipher': 'crypto.html#class-cipher', + 'Decipher': 'crypto.html#class-decipher', + 'DiffieHellman': 'crypto.html#class-diffiehellman', + 'DiffieHellmanGroup': 'crypto.html#class-diffiehellmangroup', + 'ECDH': 'crypto.html#class-ecdh', + 'Hash': 'crypto.html#class-hash', + 'Hmac': 'crypto.html#class-hmac', + 'KeyObject': 'crypto.html#class-keyobject', + 'Sign': 'crypto.html#class-sign', + 'Verify': 'crypto.html#class-verify', + 'crypto.constants': 'crypto.html#cryptoconstants', - 'dgram.Socket': 'dgram.html#dgram_class_dgram_socket', + 'dgram.Socket': 'dgram.html#class-dgramsocket', - 'Channel': 'diagnostics_channel.html#diagnostics_channel_class_channel', + 'Channel': 'diagnostics_channel.html#class-channel', - 'Domain': 'domain.html#domain_class_domain', + 'Domain': 'domain.html#class-domain', - 'errors.Error': 'errors.html#errors_class_error', + 'errors.Error': 'errors.html#class-error', - 'import.meta': 'esm.html#esm_import_meta', + 'import.meta': 'esm.html#importmeta', - 'EventEmitter': 'events.html#events_class_eventemitter', - 'EventTarget': 'events.html#events_class_eventtarget', - 'Event': 'events.html#events_class_event', - 'EventListener': 'events.html#events_event_listener', + 'EventEmitter': 'events.html#class-eventemitter', + 'EventTarget': 'events.html#class-eventtarget', + 'Event': 'events.html#class-event', + 'EventListener': 'events.html#event-listener', - 'FileHandle': 'fs.html#fs_class_filehandle', - 'fs.Dir': 'fs.html#fs_class_fs_dir', - 'fs.Dirent': 'fs.html#fs_class_fs_dirent', - 'fs.FSWatcher': 'fs.html#fs_class_fs_fswatcher', - 'fs.ReadStream': 'fs.html#fs_class_fs_readstream', - 'fs.Stats': 'fs.html#fs_class_fs_stats', - 'fs.StatWatcher': 'fs.html#fs_class_fs_statwatcher', - 'fs.WriteStream': 'fs.html#fs_class_fs_writestream', + 'FileHandle': 'fs.html#class-filehandle', + 'fs.Dir': 'fs.html#class-fsdir', + 'fs.Dirent': 'fs.html#class-fsdirent', + 'fs.FSWatcher': 'fs.html#class-fsfswatcher', + 'fs.ReadStream': 'fs.html#class-fsreadstream', + 'fs.Stats': 'fs.html#class-fsstats', + 'fs.StatWatcher': 'fs.html#class-fsstatwatcher', + 'fs.WriteStream': 'fs.html#class-fswritestream', - 'http.Agent': 'http.html#http_class_http_agent', - 'http.ClientRequest': 'http.html#http_class_http_clientrequest', - 'http.IncomingMessage': 'http.html#http_class_http_incomingmessage', - 'http.Server': 'http.html#http_class_http_server', - 'http.ServerResponse': 'http.html#http_class_http_serverresponse', + 'http.Agent': 'http.html#class-httpagent', + 'http.ClientRequest': 'http.html#class-httpclientrequest', + 'http.IncomingMessage': 'http.html#class-httpincomingmessage', + 'http.Server': 'http.html#class-httpserver', + 'http.ServerResponse': 'http.html#class-httpserverresponse', - 'ClientHttp2Session': 'http2.html#http2_class_clienthttp2session', - 'ClientHttp2Stream': 'http2.html#http2_class_clienthttp2stream', - 'HTTP/2 Headers Object': 'http2.html#http2_headers_object', - 'HTTP/2 Settings Object': 'http2.html#http2_settings_object', - 'http2.Http2ServerRequest': 'http2.html#http2_class_http2_http2serverrequest', + 'ClientHttp2Session': 'http2.html#class-clienthttp2session', + 'ClientHttp2Stream': 'http2.html#class-clienthttp2stream', + 'HTTP/2 Headers Object': 'http2.html#headers-object', + 'HTTP/2 Settings Object': 'http2.html#settings-object', + 'http2.Http2ServerRequest': 'http2.html#class-http2http2serverrequest', 'http2.Http2ServerResponse': - 'http2.html#http2_class_http2_http2serverresponse', - 'Http2SecureServer': 'http2.html#http2_class_http2secureserver', - 'Http2Server': 'http2.html#http2_class_http2server', - 'Http2Session': 'http2.html#http2_class_http2session', - 'Http2Stream': 'http2.html#http2_class_http2stream', - 'ServerHttp2Stream': 'http2.html#http2_class_serverhttp2stream', + 'http2.html#class-http2http2serverresponse', + 'Http2SecureServer': 'http2.html#class-http2secureserver', + 'Http2Server': 'http2.html#class-http2server', + 'Http2Session': 'http2.html#class-http2session', + 'Http2Stream': 'http2.html#class-http2stream', + 'ServerHttp2Stream': 'http2.html#class-serverhttp2stream', - 'https.Server': 'https.html#https_class_https_server', + 'https.Server': 'https.html#class-httpsserver', - 'module': 'modules.html#modules_the_module_object', + 'module': 'modules.html#the-module-object', 'module.SourceMap': - 'module.html#module_class_module_sourcemap', + 'module.html#class-modulesourcemap', - 'require': 'modules.html#modules_require_id', + 'require': 'modules.html#requireid', - 'Handle': 'net.html#net_server_listen_handle_backlog_callback', - 'net.BlockList': 'net.html#net_class_net_blocklist', - 'net.Server': 'net.html#net_class_net_server', - 'net.Socket': 'net.html#net_class_net_socket', - 'net.SocketAddress': 'net.html#net_class_net_socketaddress', + 'Handle': 'net.html#serverlistenhandle-backlog-callback', + 'net.BlockList': 'net.html#class-netblocklist', + 'net.Server': 'net.html#class-netserver', + 'net.Socket': 'net.html#class-netsocket', + 'net.SocketAddress': 'net.html#class-netsocketaddress', 'NodeEventTarget': - 'events.html#events_class_nodeeventtarget', + 'events.html#class-nodeeventtarget', - 'os.constants.dlopen': 'os.html#os_dlopen_constants', + 'os.constants.dlopen': 'os.html#dlopen-constants', - 'Histogram': 'perf_hooks.html#perf_hooks_class_histogram', + 'Histogram': 'perf_hooks.html#class-histogram', 'IntervalHistogram': - 'perf_hooks.html#perf_hooks_class_intervalhistogram_extends_histogram', + 'perf_hooks.html#class-intervalhistogram-extends-histogram', 'RecordableHistogram': - 'perf_hooks.html#perf_hooks_class_recordablehistogram_extends_histogram', - 'PerformanceEntry': 'perf_hooks.html#perf_hooks_class_performanceentry', + 'perf_hooks.html#class-recordablehistogram-extends-histogram', + 'PerformanceEntry': 'perf_hooks.html#class-performanceentry', 'PerformanceNodeTiming': - 'perf_hooks.html#perf_hooks_class_performancenodetiming', + 'perf_hooks.html#class-performancenodetiming', 'PerformanceObserver': - 'perf_hooks.html#perf_hooks_class_perf_hooks_performanceobserver', + 'perf_hooks.html#class-perf_hooksperformanceobserver', 'PerformanceObserverEntryList': - 'perf_hooks.html#perf_hooks_class_performanceobserverentrylist', + 'perf_hooks.html#class-performanceobserverentrylist', - 'readline.Interface': 'readline.html#readline_class_interface', + 'readline.Interface': 'readline.html#class-interface', - 'repl.REPLServer': 'repl.html#repl_class_replserver', + 'repl.REPLServer': 'repl.html#class-replserver', - 'Stream': 'stream.html#stream_stream', - 'stream.Duplex': 'stream.html#stream_class_stream_duplex', - 'stream.Readable': 'stream.html#stream_class_stream_readable', - 'stream.Transform': 'stream.html#stream_class_stream_transform', - 'stream.Writable': 'stream.html#stream_class_stream_writable', + 'Stream': 'stream.html#stream', + 'stream.Duplex': 'stream.html#class-streamduplex', + 'stream.Readable': 'stream.html#class-streamreadable', + 'stream.Transform': 'stream.html#class-streamtransform', + 'stream.Writable': 'stream.html#class-streamwritable', - 'Immediate': 'timers.html#timers_class_immediate', - 'Timeout': 'timers.html#timers_class_timeout', - 'Timer': 'timers.html#timers_timers', + 'Immediate': 'timers.html#class-immediate', + 'Timeout': 'timers.html#class-timeout', + 'Timer': 'timers.html#timers', - 'tls.SecureContext': 'tls.html#tls_tls_createsecurecontext_options', - 'tls.Server': 'tls.html#tls_class_tls_server', - 'tls.TLSSocket': 'tls.html#tls_class_tls_tlssocket', + 'tls.SecureContext': 'tls.html#tlscreatesecurecontextoptions', + 'tls.Server': 'tls.html#class-tlsserver', + 'tls.TLSSocket': 'tls.html#class-tlstlssocket', - 'Tracing': 'tracing.html#tracing_tracing_object', + 'Tracing': 'tracing.html#tracing-object', - 'URL': 'url.html#url_the_whatwg_url_api', - 'URLSearchParams': 'url.html#url_class_urlsearchparams', + 'URL': 'url.html#the-whatwg-url-api', + 'URLSearchParams': 'url.html#class-urlsearchparams', - 'vm.Module': 'vm.html#vm_class_vm_module', - 'vm.Script': 'vm.html#vm_class_vm_script', - 'vm.SourceTextModule': 'vm.html#vm_class_vm_sourcetextmodule', + 'vm.Module': 'vm.html#class-vmmodule', + 'vm.Script': 'vm.html#class-vmscript', + 'vm.SourceTextModule': 'vm.html#class-vmsourcetextmodule', - 'MessagePort': 'worker_threads.html#worker_threads_class_messageport', + 'MessagePort': 'worker_threads.html#class-messageport', + + 'zlib options': 'zlib.html#class-options', - 'zlib options': 'zlib.html#zlib_class_options', }; const arrayPart = /(?:\[])+$/;