Skip to content

Commit

Permalink
doc: update documentation for externalizing deps
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
mhdawson authored and marco-ippolito committed Nov 17, 2024
1 parent 70504f8 commit a4586f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/contributing/maintaining/maintaining-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,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
Expand Down

0 comments on commit a4586f0

Please sign in to comment.