• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Dependency update scripts
2
3This folder contains scripts used to automatically update a Node.js dependency.
4These scripts are usually run by CI (see `.github/workflows/tools.yml`) in order
5to download a new dependency version, and replace the old version with it.
6
7Since these scripts only update to the upstream code, changes might be needed in
8this repository in order to successfully update (e.g: changing API calls to
9conform to upstream changes, updating GYP build files, etc.)
10
11## libuv
12
13The `update-libuv.sh` script takes the target version to update as its only
14argument, downloads it from the [GitHub repo](https://github.com/libuv/libuv)
15and uses it to replace the contents of `deps/uv/`. The contents are replaced
16entirely except for the `*.gyp` and `*.gypi` build files, which are part of the
17Node.js build definitions and are not present in the upstream repo.
18
19For example, in order to update to version `1.44.2`, the following command can
20be run:
21
22```bash
23./tools/dep_updaters/update-libuv.sh 1.44.2
24```
25
26Once the script has run (either manually, or by CI in which case a PR will have
27been created with the changes), do the following:
28
291. Check the [changelog](https://github.com/libuv/libuv/blob/v1.x/ChangeLog) for
30   things that might require changes in Node.js.
312. If necessary, update `common.gypi` and `uv.gyp` with build-related changes.
323. Check that Node.js compiles without errors and the tests pass.
334. Create a commit for the update and in the commit message include the
34   important/relevant items from the changelog (see [`c61870c`][] for an
35   example).
36
37[`c61870c`]: https://github.com/nodejs/node/commit/c61870c376e2f5b0dbaa939972c46745e21cdbdd
38
39## simdutf
40
41The `update-simdutf.sh` script takes the target version to update as its only
42argument, downloads it from the [GitHub repo](https://github.com/simdutf/simdutf)
43and uses it to replace the contents of `deps/simdutf/`. The contents are replaced
44entirely except for the `*.gyp` and `*.gypi` build files, which are part of the
45Node.js build definitions and are not present in the upstream repo.
46
47For example, in order to update to version `2.0.7`, the following command can
48be run:
49
50```bash
51./tools/dep_updaters/update-simdutf.sh 2.0.7
52```
53
54Once the script has run (either manually, or by CI in which case a PR will have
55been created with the changes), do the following:
56
571. Check the [changelog](https://github.com/simdutf/simdutf/releases/tag/v2.0.7) for
58   things that might require changes in Node.js.
592. If necessary, update `simdutf.gyp` with build-related changes.
603. Check that Node.js compiles without errors and the tests pass.
614. Create a commit for the update and in the commit message include the
62   important/relevant items from the changelog.
63
64## postject
65
66The `update-postject.sh` script downloads postject from the [npm package](http://npmjs.com/package/postject)
67and uses it to replace the contents of `test/fixtures/postject-copy`.
68
69In order to update, the following command can be run:
70
71```bash
72./tools/dep_updaters/update-postject.sh
73```
74
75Once the script has run (either manually, or by CI in which case a PR will have
76been created with the changes), do the following:
77
781. Check the [changelog](https://github.com/nodejs/postject/releases/tag/v1.0.0-alpha.4)
79   for things that might require changes in Node.js.
802. Check that Node.js compiles without errors and the tests pass.
813. Create a commit for the update and in the commit message include the
82   important/relevant items from the changelog.
83