node/tools/dep_updaters
Ben Noordhuis fe76e0964c
tools: don't gitignore base64 config.h
The file is checked into git. Ignoring it causes a very non-obvious way
of breaking tarball builds:

1. Download and unpack tarball
2. Check the sources into git with `git init; git add .; git commit -a`
3. Clean the source tree with `git clean -dfx`
4. Run `./configure && make`
5. Observe build failure because config.h is missing

Fixes: https://github.com/nodejs/node/issues/47638
PR-URL: https://github.com/nodejs/node/pull/48174
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-05-30 11:32:20 +00:00
..
README.md doc: fix broken link to new folder doc/contributing/maintaining 2023-05-28 21:28:19 +02:00
update-acorn-walk.sh tools: fix race condition when npm installing 2023-05-23 09:45:56 +00:00
update-acorn.sh tools: harmonize dep_updaters scripts 2023-05-29 10:59:52 +00:00
update-ada.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-base64.sh tools: don't gitignore base64 config.h 2023-05-30 11:32:20 +00:00
update-brotli.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-c-ares.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-cjs-module-lexer.sh tools: harmonize dep_updaters scripts 2023-05-29 10:59:52 +00:00
update-eslint.sh tools: fix race condition when npm installing 2023-05-23 09:45:56 +00:00
update-googletest.sh tools: add update script for googletest 2023-04-19 15:07:01 +00:00
update-histogram.sh tools: automate histogram update 2023-05-30 08:32:27 +00:00
update-icu.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-libuv.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-llhttp.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-minimatch.sh tools: fix race condition when npm installing 2023-05-23 09:45:56 +00:00
update-nghttp2.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-nghttp3.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-ngtcp2.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-npm.sh tools: log and verify sha256sum 2023-05-25 19:46:07 +00:00
update-openssl.sh doc: fix broken link to new folder doc/contributing/maintaining 2023-05-28 21:28:19 +02:00
update-postject.sh tools: fix race condition when npm installing 2023-05-23 09:45:56 +00:00
update-root-certs.mjs tools: fix updating root certificates 2023-04-21 02:14:00 +00:00
update-simdutf.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-undici.sh tools: harmonize dep_updaters scripts 2023-05-29 10:59:52 +00:00
update-uvwasi.sh tools: deps update authenticate github api request 2023-05-29 10:51:37 +00:00
update-v8-patch.sh tools: automate v8 patch update 2023-04-26 08:20:23 +00:00
update-zlib.sh tools: log and verify sha256sum 2023-05-25 19:46:07 +00:00
utils.sh tools: use shasum instead of sha256sum 2023-05-29 19:15:08 +00:00

Dependency update scripts

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.)

libuv

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:

  1. Check the changelog for things that might require changes in Node.js.
  2. If necessary, update common.gypi and uv.gyp with build-related changes.
  3. Check that Node.js compiles without errors and the tests pass.
  4. Create a commit for the update and in the commit message include the important/relevant items from the changelog (see c61870c for an example).

simdutf

The update-simdutf.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/simdutf/. 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 2.0.7, the following command can be run:

./tools/dep_updaters/update-simdutf.sh 2.0.7

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:

  1. Check the changelog for things that might require changes in Node.js.
  2. If necessary, update simdutf.gyp with build-related changes.
  3. Check that Node.js compiles without errors and the tests pass.
  4. Create a commit for the update and in the commit message include the important/relevant items from the changelog.

OpenSSL

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:

  1. Check the CHANGES.md file in the repo for things that might require changes in Node.js.
  2. Check the diffs to ensure the changes are right. Even if there are no changes in the source, buildinf.h files will be updated because they have timestamp data in them.
  3. Check that Node.js compiles without errors and the tests pass.
  4. Create a commit for the update and in the commit message include the important/relevant items from the changelog.

postject

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:

  1. Check the changelog for things that might require changes in Node.js.
  2. Check that Node.js compiles without errors and the tests pass.
  3. Create a commit for the update and in the commit message include the important/relevant items from the changelog.