diff options
author | Michaƫl Zasso <targos@protonmail.com> | 2022-03-07 18:36:29 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2022-03-09 22:37:25 +0300 |
commit | cb3ce9f3789bde3d9e66582153b68c3d36fad870 (patch) | |
tree | d4faf8cb67f3e289b34ffea334dde782b074f9c6 /tools | |
parent | 1f638376c7949623a2bbec60be2f7af82c900bc4 (diff) |
deps: update undici to 4.15.1
This also adds a script to automate the update and includes the sources
included in the npm tarball.
PR-URL: https://github.com/nodejs/node/pull/42246
Fixes: https://github.com/nodejs/node/issues/42199
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/update-undici.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/update-undici.sh b/tools/update-undici.sh new file mode 100644 index 00000000000..40920df9d8f --- /dev/null +++ b/tools/update-undici.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +# Shell script to update undici in the source tree to the latest release. + +# This script must be in the tools directory when it runs because it uses the +# script source file path to determine directories to work in. + +set -ex + +cd "$( dirname "$0" )/.." || exit +rm -rf deps/undici/src +rm -f deps/undici/undici.js + +( + rm -rf undici-tmp + mkdir undici-tmp + cd undici-tmp || exit + + ROOT="$PWD/.." + [ -z "$NODE" ] && NODE="$ROOT/out/Release/node" + [ -x "$NODE" ] || NODE=$(command -v node) + NPM="$ROOT/deps/npm/bin/npm-cli.js" + + "$NODE" "$NPM" init --yes + + "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts undici + cd node_modules/undici + "$NODE" "$NPM" run build:node +) + +mv undici-tmp/node_modules/undici deps/undici/src +mv deps/undici/src/undici.js deps/undici/undici.js +cp deps/undici/src/LICENSE deps/undici/LICENSE + +rm -rf undici-tmp/ |