Skip to content

Commit a4586f0

Browse files
mhdawsonmarco-ippolito
authored andcommitted
doc: update documentation for externalizing deps
Refs: #54646 - Add instructions to update how process.versions is reported as I missed that in a recent addition. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #54792 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Akhil Marsonya <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Ulises Gascón <[email protected]>
1 parent 70504f8 commit a4586f0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/contributing/maintaining/maintaining-dependencies.md

+11
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ can be added by:
123123
paste one of the existing entries and then update to match the
124124
import name for the dependency and the #define generated.
125125

126+
* if the version of the dependency is reported in `process.versions`,
127+
update `src/node_metadata.h` and `src/node_metadata.cc` so that the
128+
version is not reported when the dependency is externalized.
129+
Not reporting the version is better than incorrectly reporting
130+
the version of the dependency bundled with Node.js, instead of the
131+
version for the externalized dependency. Use one of the existing
132+
externalized dependencies, like Undici, as an example of how to
133+
update these files correctly. Make sure to run the tests with the
134+
dependency externalized, as the tests will also need to be updated
135+
to handle this properly.
136+
126137
## Supporting non-externalized dependencies with JavaScript code
127138

128139
If the dependency consists of JavaScript in the

0 commit comments

Comments
 (0)