Skip to content

Commit 72901b9

Browse files
committed
Update to Node 14.17 (hopefully improves HTTP/2 behaviour)
For some reason, this breaks the npm installs that occur as part of the build script - postinstall steps can no longer access the install directory, and everything fails. This change also enables unsafe-perm only in CI, so that we can npm install as root there. I can't see any risk to this - anything that could be exposed from within the CI build that's interesting would be in the env or build workspace anyway.
1 parent 7da1d7f commit 72901b9

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
- uses: actions/setup-node@v1
1414
with:
15-
node-version: 14.6
15+
node-version: 14.17
1616

1717
- name: Set up JDK 11 for Java testing
1818
uses: actions/setup-java@v1
@@ -51,6 +51,7 @@ jobs:
5151
SENTRY_AUTH_TOKEN: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && secrets.SENTRY_AUTH_TOKEN) || '' }}
5252
SENTRY_ORG: http-toolkit
5353
SENTRY_PROJECT: httptoolkit-server
54+
NPM_CONFIG_UNSAFE_PERM: true
5455

5556
- run: xvfb-run npm run test
5657
- run: xvfb-run npm run test:release

build-release.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ rm -r ./tmp || true
3939
# Build the package for this platform
4040
# ------------------------------------------------------------------------
4141

42-
env | grep -E 'npm_config_|TARGET_'
43-
4442
echo
4543
echo "BUILDING FOR $TARGET_PLATFORM"
4644
echo

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
}
155155
},
156156
"node": {
157-
"version": "14.6.0",
157+
"version": "14.17.0",
158158
"targets": [
159159
"win32-x64",
160160
"linux-x64",

test/distributables-test/unix.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ ls -la *
66

77
tar -xvzf ./distributables/v*/httptoolkit-server-*-$1-x64.tar.gz
88

9+
echo "Starting server..."
10+
911
./httptoolkit-server/bin/httptoolkit-server start &
1012
SERVER_PID=$!
1113

1214
sleep 5
1315

16+
echo "Testing server..."
17+
1418
# CSRF protection fully blocks unrecognized/missing origin requests:
1519
WITH_ORIGIN="-HOrigin: https://app.httptoolkit.tech"
1620
AS_JSON="-HContent-Type: application/json"

test/distributables-test/windows.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ FOR /F "tokens=*" %%i IN (' %GET_TAR% ') DO SET TAR_PATH=%%i
77

88
tar -xvzf %TAR_PATH%
99

10+
echo Starting server...
11+
1012
START "server" .\httptoolkit-server\bin\httptoolkit-server start
1113

1214
REM The closest we can get to a 10 second delay on Windows in CI, ick:
1315
ping -n 10 127.0.0.1 >NUL
1416

17+
echo Testing server...
18+
1519
REM CSRF protection fully blocks unrecognized/missing origin requests:
1620
set WITH_ORIGIN="-HOrigin: https://app.httptoolkit.tech"
1721
set AS_JSON="-HContent-Type: application/json"

0 commit comments

Comments
 (0)