tools/dep_updaters/README.md
This folder contains scripts used to automatically update a Node.js dependency.
These scripts are usually run by CI (see .github/workflows/tools.yml) in order
to download a new dependency version, and replace the old version with it.
Since these scripts only update to the upstream code, changes might be needed in this repository in order to successfully update (e.g: changing API calls to conform to upstream changes, updating GYP build files, etc.)
The update-libuv.sh script takes the target version to update as its only
argument, downloads it from the GitHub repo
and uses it to replace the contents of deps/uv/. The contents are replaced
entirely except for the *.gyp and *.gypi build files, which are part of the
Node.js build definitions and are not present in the upstream repo.
For example, in order to update to version 1.44.2, the following command can
be run:
./tools/dep_updaters/update-libuv.sh 1.44.2
Once the script has run (either manually, or by CI in which case a PR will have been created with the changes), do the following:
common.gypi and uv.gyp with build-related changes.c61870c for an
example).The update-openssl.sh script automates the steps described in
maintaining-openssl.md. The main difference is that the script downloads
the release tarball from GitHub, instead of cloning the repo and using that as
the source code. This is useful since the release tarball does not include
development-specific files and directories (e.g the .github folder).
The script has to be run in two steps. The first one (using the download
sub-command) replaces the OpenSSL source code with the new version. The second
one (using the regenerate sub-command) regenerates the platform-specific
files. This makes it easier to create two separate git commits, making the git
history more descriptive.
For example, in order to update to version 3.0.7+quic1, the following commands
should be run:
./tools/dep_updaters/update-openssl.sh download 3.0.7+quic1
git add -A deps/openssl/openssl
git commit -m "deps: upgrade openssl sources to quictls/openssl-3.0.7+quic1"
./tools/dep_updaters/update-openssl.sh regenerate 3.0.7+quic1
git add -A deps/openssl/config/archs deps/openssl/openssl
git commit -m "deps: update archs files for openssl"
Once the script has run (either manually, or by CI in which case a PR will have been created with the changes), do the following:
CHANGES.md file in the repo
for things that might require changes in Node.js.buildinf.h files will be updated because they have timestamp
data in them.The update-postject.sh script downloads postject from the npm package
and uses it to replace the contents of test/fixtures/postject-copy.
In order to update, the following command can be run:
./tools/dep_updaters/update-postject.sh
Once the script has run (either manually, or by CI in which case a PR will have been created with the changes), do the following: