• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Maintaining c-ares
2
3Updates to the c-ares dependency involve the following steps:
4
51. Downloading the source archive for the new version.
62. Unpacking the source in a temporary workspace directory.
73. Removing the `test` directory (to save disk space).
84. Copying over the existing `.gitignore`, pre-generated `config` directory and
9   `cares.gyp` files.
105. Replacing the existing `deps/cares` with the workspace directory.
116. Modifying the `cares.gyp` file for file additions/deletions.
127. Rebuilding the main Node.js `LICENSE`.
13
14## Running the update script
15
16The `tools/update-cares.sh` script automates the update of the c-ares source
17files, preserving the existing files added by Node.js.
18
19In the following examples, `x.y.z` should match the c-ares version to update to.
20
21```console
22./tools/update-cares.sh x.y.z
23```
24
25e.g.
26
27```console
28./tools/update-cares.sh 1.18.1
29```
30
31## Check that Node.js still builds and tests
32
33It may be necessary to update `deps/cares/cares.gyp` if any significant changes
34have occurred upstream.
35
36## Rebuild the main Node.js license
37
38Run the `tools/license-builder.sh` script to rebuild the main Node.js `LICENSE`
39file. This may result in no changes if c-ares' license has not changed.
40
41```console
42./tools/license-builder.sh
43```
44
45If the updated `LICENSE` contains changes for other dependencies, those should
46be done in a separate pull request first.
47
48## Commit the changes
49
50```console
51git add -A deps/cares
52```
53
54Add the rebuilt `LICENSE` if it has been updated.
55
56```console
57git add LICENSE
58```
59
60Commit the changes with a message like
61
62```text
63deps: update c-ares to x.y.z
64
65Updated as described in doc/guides/maintaining-c-ares.md.
66```
67