From 7f75c5b4d7411e06ee7e66ea920d6c5c41e0ee3e Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 22 Aug 2024 23:45:46 +0200 Subject: [PATCH 1/6] Update CI config to use ubuntu-latest + run with node 20 and 22 --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b85d36..bb56cb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ name: Tests jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: Node ${{ matrix.node }} strategy: matrix: @@ -13,6 +13,8 @@ jobs: - '14' - '16' - '18' + - '20' + - '22' steps: - uses: actions/checkout@v2 - name: Setup node @@ -23,7 +25,7 @@ jobs: - run: npm test test-targets: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest name: ${{ matrix.targets.name }} strategy: matrix: From 028b2e9d00b3dcff01544bd7f65f45dbbdd28080 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Sun, 25 Aug 2024 23:55:44 +0200 Subject: [PATCH 2/6] Ignore the Keep-Alive header when recording/verifying --- test/unexpectedMitm.js | 6 +++--- testdata/replay-and-verify.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unexpectedMitm.js b/test/unexpectedMitm.js index cb03848..1872669 100644 --- a/test/unexpectedMitm.js +++ b/test/unexpectedMitm.js @@ -3153,7 +3153,7 @@ describe('unexpectedMitm', () => { response: 405, verify: { response: { - ignoreHeaders: ['x-is-test'], + ignoreHeaders: ['x-is-test', 'Keep-Alive'], }, }, }, @@ -3192,7 +3192,7 @@ describe('unexpectedMitm', () => { response: 405, verify: { response: { - ignoreHeaders: ['X-Is-Test'], + ignoreHeaders: ['X-Is-Test', 'Keep-Alive'], }, }, }, @@ -3201,7 +3201,7 @@ describe('unexpectedMitm', () => { response: 406, verify: { response: { - ignoreHeaders: ['X-So-Is-This'], + ignoreHeaders: ['X-So-Is-This', 'Keep-Alive'], }, }, }, diff --git a/testdata/replay-and-verify.js b/testdata/replay-and-verify.js index a4b445f..9f12c05 100644 --- a/testdata/replay-and-verify.js +++ b/testdata/replay-and-verify.js @@ -2,7 +2,7 @@ module.exports = { "response": 202, "verify": { "response": { - "ignoreHeaders": ["X-Is-Test"] + "ignoreHeaders": ["X-Is-Test", "Keep-Alive"] } } }; From 5d18639535d59c62c033556ac8a0e4bdce5f4664 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 26 Aug 2024 00:01:42 +0200 Subject: [PATCH 3/6] npm i https://github.com/moll/node-mitm#34552640de17820418671d9d74daedfbdfbb5596 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1a9bc0..aadb018 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "detect-indent": "^6.0.0", "memoizesync": "^1.1.1", "messy": "^7.0.0", - "mitm": "^1.7.1", + "mitm": "github:moll/node-mitm#34552640de17820418671d9d74daedfbdfbb5596", "underscore": "^1.8.3", "unexpected-messy": "^11.0.1" }, From 2b619530a831894868bd828089da90ff8bede279 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 26 Aug 2024 00:12:29 +0200 Subject: [PATCH 4/6] Update pem to ^1.14.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aadb018..edff12f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "mocha": "^9.1.3", "nyc": "^15.0.0", "offline-github-changelog": "^1.7.0", - "pem": "^1.13.1", + "pem": "^1.14.8", "prettier": "~2.5.0", "request": "^2.53.0", "semver": "^7.0.0", From bef592762024e78610c009dead4ce266d131330b Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 27 Aug 2024 00:06:04 +0200 Subject: [PATCH 5/6] Update mitm to ^1.7.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index edff12f..f7fd757 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "detect-indent": "^6.0.0", "memoizesync": "^1.1.1", "messy": "^7.0.0", - "mitm": "github:moll/node-mitm#34552640de17820418671d9d74daedfbdfbb5596", + "mitm": "^1.7.3", "underscore": "^1.8.3", "unexpected-messy": "^11.0.1" }, From f080d49f213014f59d84b26aed1f00d02d7ae07b Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 27 Aug 2024 00:07:07 +0200 Subject: [PATCH 6/6] Revert "Ignore the Keep-Alive header when recording/verifying" This reverts commit 028b2e9d00b3dcff01544bd7f65f45dbbdd28080. --- test/unexpectedMitm.js | 6 +++--- testdata/replay-and-verify.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unexpectedMitm.js b/test/unexpectedMitm.js index 1872669..cb03848 100644 --- a/test/unexpectedMitm.js +++ b/test/unexpectedMitm.js @@ -3153,7 +3153,7 @@ describe('unexpectedMitm', () => { response: 405, verify: { response: { - ignoreHeaders: ['x-is-test', 'Keep-Alive'], + ignoreHeaders: ['x-is-test'], }, }, }, @@ -3192,7 +3192,7 @@ describe('unexpectedMitm', () => { response: 405, verify: { response: { - ignoreHeaders: ['X-Is-Test', 'Keep-Alive'], + ignoreHeaders: ['X-Is-Test'], }, }, }, @@ -3201,7 +3201,7 @@ describe('unexpectedMitm', () => { response: 406, verify: { response: { - ignoreHeaders: ['X-So-Is-This', 'Keep-Alive'], + ignoreHeaders: ['X-So-Is-This'], }, }, }, diff --git a/testdata/replay-and-verify.js b/testdata/replay-and-verify.js index 9f12c05..a4b445f 100644 --- a/testdata/replay-and-verify.js +++ b/testdata/replay-and-verify.js @@ -2,7 +2,7 @@ module.exports = { "response": 202, "verify": { "response": { - "ignoreHeaders": ["X-Is-Test", "Keep-Alive"] + "ignoreHeaders": ["X-Is-Test"] } } };