0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-25 08:19:38 +01:00
nodejs/doc/contributing/maintaining-c-ares.md
Michael Dawson a199387f04 doc: make contributing info more discoverable
There are been several discussions in recent PRs about
the docs related to contributing not being very discoverable.
Move these docs from doc/guides/ to doc/contributing.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/41408
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
2022-01-18 14:24:30 -05:00

1.6 KiB

Maintaining c-ares

Updates to the c-ares dependency involve the following steps:

  1. Downloading the source archive for the new version.
  2. Unpacking the source in a temporary workspace directory.
  3. Removing the test directory (to save disk space).
  4. Copying over the existing .gitignore, pre-generated config directory and cares.gyp files.
  5. Replacing the existing deps/cares with the workspace directory.
  6. Modifying the cares.gyp file for file additions/deletions.
  7. Rebuilding the main Node.js LICENSE.

Running the update script

The tools/update-cares.sh script automates the update of the c-ares source files, preserving the existing files added by Node.js.

In the following examples, x.y.z should match the c-ares version to update to.

./tools/update-cares.sh x.y.z

e.g.

./tools/update-cares.sh 1.18.1

Check that Node.js still builds and tests

It may be necessary to update deps/cares/cares.gyp if any significant changes have occurred upstream.

Rebuild the main Node.js license

Run the tools/license-builder.sh script to rebuild the main Node.js LICENSE file. This may result in no changes if c-ares' license has not changed.

./tools/license-builder.sh

If the updated LICENSE contains changes for other dependencies, those should be done in a separate pull request first.

Commit the changes

git add -A deps/cares

Add the rebuilt LICENSE if it has been updated.

git add LICENSE

Commit the changes with a message like

deps: update c-ares to x.y.z

Updated as described in doc/contributing/maintaining-c-ares.md.