From db7f2e684da5abdfa7c37fd4887db1eec54496a2 Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Fri, 24 Nov 2023 13:18:36 +0100 Subject: [PATCH] meta: fixed some api docs links --- pages/en/blog/release/v20.6.0.md | 2 +- pages/en/blog/release/v8.0.0.md | 2 +- pages/en/docs/guides/diagnostics/index.md | 6 ++--- .../diagnostics/live-debugging/index.md | 2 +- .../docs/guides/diagnostics/memory/index.md | 6 ++--- .../diagnostics/poor-performance/index.md | 4 ++-- .../poor-performance/using-linux-perf.md | 4 ++-- pages/en/docs/guides/index.md | 24 +++++++++---------- .../the-nodejs-event-emitter.md | 4 ++-- .../how-to-use-the-nodejs-repl.md | 2 +- ...output-to-the-command-line-using-nodejs.md | 2 +- .../manipulating-files/nodejs-file-stats.md | 4 ++-- ...working-with-file-descriptors-in-nodejs.md | 2 +- .../writing-files-with-nodejs.md | 2 +- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/pages/en/blog/release/v20.6.0.md b/pages/en/blog/release/v20.6.0.md index db42344657df..a30c9fe7de1f 100644 --- a/pages/en/blog/release/v20.6.0.md +++ b/pages/en/blog/release/v20.6.0.md @@ -53,7 +53,7 @@ This feature was contributed by Antoine du Hamel in ` headers from V8, which are now also included into the Node.js headers available to addons. Note that since Node.js only bundles the cppgc library coming from V8, [the ABI stability](https://nodejs.org/docs/guides/abi-stability#abi-stability-in-nodejs) of cppgc is currently not guaranteed in semver-minor and -patch updates, but we do not expect the ABI to break often, as it has been stable and battle-tested in Chromium for years. We may consider including cppgc into the ABI stability guarantees when it gets enough adoption internally and externally. +Now when Node.js starts up, it makes sure that there is a `v8::CppHeap` attached to the V8 isolate. This enables users to allocate in the `v8::CppHeap` using `` headers from V8, which are now also included into the Node.js headers available to addons. Note that since Node.js only bundles the cppgc library coming from V8, [the ABI stability](/docs/guides/abi-stability#abi-stability-in-nodejs) of cppgc is currently not guaranteed in semver-minor and -patch updates, but we do not expect the ABI to break often, as it has been stable and battle-tested in Chromium for years. We may consider including cppgc into the ABI stability guarantees when it gets enough adoption internally and externally. To help addon authors create JavaScript-to-C++ references of which V8's garbage collector can be aware, a helper function [`node::SetCppgcReference(isolate, js_object, cppgc_object)`](https://github.com/nodejs/node/blob/v20.6.0/test/addons/cppgc-object/binding.cc) has been added to `node.h`. V8 may provide a native alternative in the future, which could then replace this Node.js-specific helper. In the mean time, users can use this API to avoid having to hard-code the layout of JavaScript wrapper objects. An example of how to create garbage-collected C++ objects in the unified heap and wrap it in a JavaScript object can be found in the [Node.js addon tests](https://github.com/nodejs/node/blob/v20.6.0/test/addons/cppgc-object/binding.cc). diff --git a/pages/en/blog/release/v8.0.0.md b/pages/en/blog/release/v8.0.0.md index 98ab56c4c0ed..05e4e15101c5 100644 --- a/pages/en/blog/release/v8.0.0.md +++ b/pages/en/blog/release/v8.0.0.md @@ -52,7 +52,7 @@ as well. The [N-API](https://nodejs.org/api/n-api.html) is experimental in Node.js 8.0.0, so significant changes in the implementation and API should be expected. Native addon developers are -[encouraged to begin working with the API](https://nodejs.org/docs/guides/publishing-napi-modules/) +[encouraged to begin working with the API](/docs/guides/publishing-napi-modules/) as soon as possible and to provide feedback that will be necessary to ensure that the new API meets the needs of the ecosystem. diff --git a/pages/en/docs/guides/diagnostics/index.md b/pages/en/docs/guides/diagnostics/index.md index d0cdf0bf50b3..b0766d7ab891 100644 --- a/pages/en/docs/guides/diagnostics/index.md +++ b/pages/en/docs/guides/diagnostics/index.md @@ -15,8 +15,8 @@ root-cause their issues. This is the available set of diagnostics guides: -- [Memory](https://nodejs.org/docs/guides/diagnostics/memory) -- [Live Debugging](https://nodejs.org/docs/guides/diagnostics/live-debugging) -- [Poor Performance](https://nodejs.org/docs/guides/diagnostics/poor-performance) +- [Memory](/docs/guides/diagnostics/memory) +- [Live Debugging](/docs/guides/diagnostics/live-debugging) +- [Poor Performance](/docs/guides/diagnostics/poor-performance) [Diagnostics Working Group]: https://github.com/nodejs/diagnostics diff --git a/pages/en/docs/guides/diagnostics/live-debugging/index.md b/pages/en/docs/guides/diagnostics/live-debugging/index.md index 650d6661b847..4b737beb02c7 100644 --- a/pages/en/docs/guides/diagnostics/live-debugging/index.md +++ b/pages/en/docs/guides/diagnostics/live-debugging/index.md @@ -28,4 +28,4 @@ application executes for a certain trigger like an incoming HTTP request. They may also want to step through the code and control the execution as well as inspect what values variables hold in memory. -- [Using Inspector](https://nodejs.org/docs/guides/diagnostics/live-debugging/using-inspector) +- [Using Inspector](/docs/guides/diagnostics/live-debugging/using-inspector) diff --git a/pages/en/docs/guides/diagnostics/memory/index.md b/pages/en/docs/guides/diagnostics/memory/index.md index 8cdf9c83e03a..a0083635d2e2 100644 --- a/pages/en/docs/guides/diagnostics/memory/index.md +++ b/pages/en/docs/guides/diagnostics/memory/index.md @@ -58,6 +58,6 @@ type of objects take and what variables are preventing them from being garbage collected. It can also help to know the allocation pattern of our program over time. -- [Using Heap Profiler](https://nodejs.org/docs/guides/diagnostics/memory/using-heap-profiler/) -- [Using Heap Snapshot](https://nodejs.org/docs/guides/diagnostics/memory/using-heap-snapshot/) -- [GC Traces](https://nodejs.org/docs/guides/diagnostics/memory/using-gc-traces) +- [Using Heap Profiler](/docs/guides/diagnostics/memory/using-heap-profiler/) +- [Using Heap Snapshot](/docs/guides/diagnostics/memory/using-heap-snapshot/) +- [GC Traces](/docs/guides/diagnostics/memory/using-gc-traces) diff --git a/pages/en/docs/guides/diagnostics/poor-performance/index.md b/pages/en/docs/guides/diagnostics/poor-performance/index.md index 135e6ff69ca0..6095b983acf5 100644 --- a/pages/en/docs/guides/diagnostics/poor-performance/index.md +++ b/pages/en/docs/guides/diagnostics/poor-performance/index.md @@ -32,5 +32,5 @@ the others. When we do this locally, we usually try to optimize our code. This document provides two simple ways to profile a Node.js application: -- [Using V8 Sampling Profiler](https://nodejs.org/docs/guides/simple-profiling/) -- [Using Linux Perf](https://nodejs.org/docs/guides/diagnostics/poor-performance/using-linux-perf) +- [Using V8 Sampling Profiler](/docs/guides/simple-profiling/) +- [Using Linux Perf](/docs/guides/diagnostics/poor-performance/using-linux-perf) diff --git a/pages/en/docs/guides/diagnostics/poor-performance/using-linux-perf.md b/pages/en/docs/guides/diagnostics/poor-performance/using-linux-perf.md index 480e4ec3d121..0831a1f33305 100644 --- a/pages/en/docs/guides/diagnostics/poor-performance/using-linux-perf.md +++ b/pages/en/docs/guides/diagnostics/poor-performance/using-linux-perf.md @@ -72,11 +72,11 @@ visualization. ![Example nodejs flamegraph](https://user-images.githubusercontent.com/26234614/129488674-8fc80fd5-549e-4a80-8ce2-2ba6be20f8e8.png) -To generate a flamegraph from this result, follow [this tutorial](https://nodejs.org/docs/guides/diagnostics-flamegraph/#create-a-flame-graph-with-system-perf-tools) +To generate a flamegraph from this result, follow [this tutorial](/docs/guides/diagnostics-flamegraph/#create-a-flame-graph-with-system-perf-tools) from step 6. Because `perf` output is not a Node.js specific tool, it might have issues with how JavaScript code is optimized in -Node.js. See [perf output issues](https://nodejs.org/docs/guides/diagnostics-flamegraph/#perf-output-issues) for a +Node.js. See [perf output issues](/docs/guides/diagnostics-flamegraph/#perf-output-issues) for a futher reference. ## Useful Links diff --git a/pages/en/docs/guides/index.md b/pages/en/docs/guides/index.md index 206b60f32bae..acb432615ace 100644 --- a/pages/en/docs/guides/index.md +++ b/pages/en/docs/guides/index.md @@ -7,21 +7,21 @@ layout: docs.hbs ## General -- [Debugging - Getting Started](https://nodejs.org/docs/guides/debugging-getting-started/) -- [Easy profiling for Node.js Applications](https://nodejs.org/docs/guides/simple-profiling/) -- [Diagnostics - Flame Graphs](https://nodejs.org/docs/guides/diagnostics-flamegraph/) -- [Diagnostics - User Journey](https://nodejs.org/docs/guides/diagnostics/) -- [Security Best Practices](https://nodejs.org/docs/guides/security/) +- [Debugging - Getting Started](/docs/guides/debugging-getting-started/) +- [Easy profiling for Node.js Applications](/docs/guides/simple-profiling/) +- [Diagnostics - Flame Graphs](/docs/guides/diagnostics-flamegraph/) +- [Diagnostics - User Journey](/docs/guides/diagnostics/) +- [Security Best Practices](/docs/guides/security/) ## Node.js core concepts -- [The Node.js Event Loop, Timers, and `process.nextTick()`](https://nodejs.org/docs/guides/event-loop-timers-and-nexttick/) -- [Don't Block the Event Loop (or the Worker Pool)](https://nodejs.org/docs/guides/dont-block-the-event-loop/) +- [The Node.js Event Loop, Timers, and `process.nextTick()`](/docs/guides/event-loop-timers-and-nexttick/) +- [Don't Block the Event Loop (or the Worker Pool)](/docs/guides/dont-block-the-event-loop/) ## Module-related guides -- [Anatomy of an HTTP Transaction](https://nodejs.org/docs/guides/anatomy-of-an-http-transaction/) -- [Working with Different Filesystems](https://nodejs.org/docs/guides/working-with-different-filesystems/) -- [Backpressuring in Streams](https://nodejs.org/docs/guides/backpressuring-in-streams/) -- [How to publish N-API package](https://nodejs.org/docs/guides/publishing-napi-modules/) -- [ABI Stability](https://nodejs.org/docs/guides/abi-stability/) +- [Anatomy of an HTTP Transaction](/docs/guides/anatomy-of-an-http-transaction/) +- [Working with Different Filesystems](/docs/guides/working-with-different-filesystems/) +- [Backpressuring in Streams](/docs/guides/backpressuring-in-streams/) +- [How to publish N-API package](/docs/guides/publishing-napi-modules/) +- [ABI Stability](/docs/guides/abi-stability/) diff --git a/pages/en/learn/asynchronous-work/the-nodejs-event-emitter.md b/pages/en/learn/asynchronous-work/the-nodejs-event-emitter.md index bf2413d3473c..8f4998f3074f 100644 --- a/pages/en/learn/asynchronous-work/the-nodejs-event-emitter.md +++ b/pages/en/learn/asynchronous-work/the-nodejs-event-emitter.md @@ -8,7 +8,7 @@ authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, ovflowd If you worked with JavaScript in the browser, you know how much of the interaction of the user is handled through events: mouse clicks, keyboard button presses, reacting to mouse movements, and so on. -On the backend side, Node.js offers us the option to build a similar system using the [`events` module](https://nodejs.org/api/events/). +On the backend side, Node.js offers us the option to build a similar system using the [`events` module](https://nodejs.org/api/events.html). This module, in particular, offers the `EventEmitter` class, which we'll use to handle our events. @@ -67,4 +67,4 @@ The EventEmitter object also exposes several other methods to interact with even - `removeListener()` / `off()`: remove an event listener from an event - `removeAllListeners()`: remove all listeners for an event -You can read more about these methods in the [official documentation](https://nodejs.org/api/events/). +You can read more about these methods in the [official documentation](https://nodejs.org/api/events.html). diff --git a/pages/en/learn/command-line/how-to-use-the-nodejs-repl.md b/pages/en/learn/command-line/how-to-use-the-nodejs-repl.md index 13873678c925..022534e5d18d 100644 --- a/pages/en/learn/command-line/how-to-use-the-nodejs-repl.md +++ b/pages/en/learn/command-line/how-to-use-the-nodejs-repl.md @@ -149,4 +149,4 @@ local.on('exit', () => { }); ``` -You can read more about the REPL module in the [repl documentation](https://nodejs.org/api/repl/). +You can read more about the REPL module in the [repl documentation](https://nodejs.org/api/repl.html). diff --git a/pages/en/learn/command-line/output-to-the-command-line-using-nodejs.md b/pages/en/learn/command-line/output-to-the-command-line-using-nodejs.md index cc0a734126cd..833790f355e8 100644 --- a/pages/en/learn/command-line/output-to-the-command-line-using-nodejs.md +++ b/pages/en/learn/command-line/output-to-the-command-line-using-nodejs.md @@ -8,7 +8,7 @@ authors: flaviocopes, potch, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmad ### Basic output using the console module -Node.js provides a [`console` module](https://nodejs.org/api/console/) which provides tons of very useful ways to interact with the command line. +Node.js provides a [`console` module](https://nodejs.org/api/console.html) which provides tons of very useful ways to interact with the command line. It is basically the same as the `console` object you find in the browser. diff --git a/pages/en/learn/manipulating-files/nodejs-file-stats.md b/pages/en/learn/manipulating-files/nodejs-file-stats.md index ebbc5fa8fce4..73e89f225840 100644 --- a/pages/en/learn/manipulating-files/nodejs-file-stats.md +++ b/pages/en/learn/manipulating-files/nodejs-file-stats.md @@ -6,7 +6,7 @@ authors: flaviocopes, ZYSzys, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clea # Node.js file stats -Every file comes with a set of details that we can inspect using Node.js. In particular, using the `stat()` method provided by the [`fs` module](https://nodejs.org/api/fs/). +Every file comes with a set of details that we can inspect using Node.js. In particular, using the `stat()` method provided by the [`fs` module](https://nodejs.org/api/fs.html). You call it passing a file path, and once Node.js gets the file details it will call the callback function you pass, with 2 parameters: an error message, and the file stats: @@ -78,4 +78,4 @@ async function example() { example(); ``` -You can read more about the `fs` module in the [official documentation](https://nodejs.org/api/fs/). +You can read more about the `fs` module in the [official documentation](https://nodejs.org/api/fs.html). diff --git a/pages/en/learn/manipulating-files/working-with-file-descriptors-in-nodejs.md b/pages/en/learn/manipulating-files/working-with-file-descriptors-in-nodejs.md index c9a211c1555f..34b083748390 100644 --- a/pages/en/learn/manipulating-files/working-with-file-descriptors-in-nodejs.md +++ b/pages/en/learn/manipulating-files/working-with-file-descriptors-in-nodejs.md @@ -78,4 +78,4 @@ async function example() { example(); ``` -To see more details about the `fs/promises` module, please check [fs/promises API](https://nodejs.org/api/fs/#promise-example). +To see more details about the `fs/promises` module, please check [fs/promises API](https://nodejs.org/api/fs.html#promise-example). diff --git a/pages/en/learn/manipulating-files/writing-files-with-nodejs.md b/pages/en/learn/manipulating-files/writing-files-with-nodejs.md index f28fdd7a5351..34521853adfc 100644 --- a/pages/en/learn/manipulating-files/writing-files-with-nodejs.md +++ b/pages/en/learn/manipulating-files/writing-files-with-nodejs.md @@ -73,7 +73,7 @@ fs.writeFile('/Users/joe/test.txt', content, { flag: 'a+' }, err => {}); | `a` | This flag opens the file for **writing** and it also positions the stream at the **end** of the file | ✅ | | `a+` | This flag opens the file for **reading** and **writing** and it also positions the stream at the **end** of the file | ✅ | -- You can find more information about the flags in the [fs documentation](https://nodejs.org/api/fs/#file-system-flags). +- You can find more information about the flags in the [fs documentation](https://nodejs.org/api/fs.html#file-system-flags). ## Appending content to a file