Updates to the c-ares dependency involve the following steps:
- Downloading the source archive for the new version.
- Unpacking the source in a temporary workspace directory.
- Removing the
testdirectory (to save disk space). - Copying over the existing
.gitignore, pre-generatedconfigdirectory andcares.gypfiles. - Replacing the existing
deps/careswith the workspace directory. - Modifying the
cares.gypfile for file additions/deletions. - Rebuilding the main Node.js
LICENSE.
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.ze.g.
./tools/update-cares.sh 1.18.1It may be necessary to update deps/cares/cares.gyp if any significant changes
have occurred upstream.
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.shIf the updated LICENSE contains changes for other dependencies, those should
be done in a separate pull request first.
git add -A deps/caresAdd the rebuilt LICENSE if it has been updated.
git add LICENSECommit the changes with a message like
deps: update c-ares to x.y.z
Updated as described in doc/contributing/maintaining-c-ares.md.