mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
doc: update documentation for externalizing deps
Refs: https://github.com/nodejs/node/pull/54646 - Add instructions to update how process.versions is reported as I missed that in a recent addition. Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: https://github.com/nodejs/node/pull/54792 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
parent
c1afd2c8e3
commit
7feff2434d
@ -126,6 +126,17 @@ can be added by:
|
||||
paste one of the existing entries and then update to match the
|
||||
import name for the dependency and the #define generated.
|
||||
|
||||
* if the version of the dependency is reported in `process.versions`,
|
||||
update `src/node_metadata.h` and `src/node_metadata.cc` so that the
|
||||
version is not reported when the dependency is externalized.
|
||||
Not reporting the version is better than incorrectly reporting
|
||||
the version of the dependency bundled with Node.js, instead of the
|
||||
version for the externalized dependency. Use one of the existing
|
||||
externalized dependencies, like Undici, as an example of how to
|
||||
update these files correctly. Make sure to run the tests with the
|
||||
dependency externalized, as the tests will also need to be updated
|
||||
to handle this properly.
|
||||
|
||||
## Supporting non-externalized dependencies with JavaScript code
|
||||
|
||||
If the dependency consists of JavaScript in the
|
||||
|
Loading…
Reference in New Issue
Block a user