From bd70fd12711b9b7144537223e0105579d1ee7c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Sun, 5 May 2024 20:57:00 +0200 Subject: [PATCH 1/6] ci: fix errors in ci github action for node 8 and 9 --- .github/workflows/ci.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4304a344..0632798c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,9 @@ jobs: - Node.js 17.x - Node.js 18.x - Node.js 19.x + - Node.js 20.x + - Node.js 21.x + - Node.js 22.x include: - name: Node.js 0.8 @@ -77,11 +80,11 @@ jobs: - name: Node.js 8.x node-version: "8.17" - npm-i: mocha@7.2.0 + npm-i: mocha@7.2.0 nyc@14.1.1 - name: Node.js 9.x node-version: "9.11" - npm-i: mocha@7.2.0 + npm-i: mocha@7.2.0 nyc@14.1.1 - name: Node.js 10.x node-version: "10.24" @@ -117,8 +120,17 @@ jobs: - name: Node.js 19.x node-version: "19.7" + - name: Node.js 20.x + node-version: "20.12" + + - name: Node.js 21.x + node-version: "21.7" + + - name: Node.js 22.x + node-version: "22.0" + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Node.js ${{ matrix.node-version }} shell: bash -eo pipefail -l {0} @@ -209,7 +221,7 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install lcov shell: bash From 8eff6faf83819dcf98ef56c68c03f17795524f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Sat, 18 May 2024 11:17:19 +0200 Subject: [PATCH 2/6] ci: remove minor version on node 22 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0632798c..c5e5a313 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: node-version: "21.7" - name: Node.js 22.x - node-version: "22.0" + node-version: "22" steps: - uses: actions/checkout@v4 From 682461e7726b3b3a90756bb60e0f7a98b93af1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Marqu=C3=ADnez=20Prado?= <25435858+inigomarquinez@users.noreply.github.com> Date: Fri, 24 May 2024 12:06:16 +0200 Subject: [PATCH 3/6] ci: remove minor versions --- .github/workflows/ci.yml | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5e5a313..5d864277 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,80 +51,80 @@ jobs: npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - name: io.js 1.x - node-version: "1.8" + node-version: "1" npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - name: io.js 2.x - node-version: "2.5" + node-version: "2" npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - name: io.js 3.x - node-version: "3.3" + node-version: "3" npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 - name: Node.js 4.x - node-version: "4.9" + node-version: "4" npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 - name: Node.js 5.x - node-version: "5.12" + node-version: "5" npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 - name: Node.js 6.x - node-version: "6.17" + node-version: "6" npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6 - name: Node.js 7.x - node-version: "7.10" + node-version: "7" npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6 - name: Node.js 8.x - node-version: "8.17" + node-version: "8" npm-i: mocha@7.2.0 nyc@14.1.1 - name: Node.js 9.x - node-version: "9.11" + node-version: "9" npm-i: mocha@7.2.0 nyc@14.1.1 - name: Node.js 10.x - node-version: "10.24" + node-version: "10" npm-i: mocha@8.4.0 - name: Node.js 11.x - node-version: "11.15" + node-version: "11" npm-i: mocha@8.4.0 - name: Node.js 12.x - node-version: "12.22" + node-version: "12" npm-i: mocha@9.2.2 - name: Node.js 13.x - node-version: "13.14" + node-version: "13" npm-i: mocha@9.2.2 - name: Node.js 14.x - node-version: "14.21" + node-version: "14" - name: Node.js 15.x - node-version: "15.14" + node-version: "15" - name: Node.js 16.x - node-version: "16.19" + node-version: "16" - name: Node.js 17.x - node-version: "17.9" + node-version: "17" - name: Node.js 18.x - node-version: "18.14" + node-version: "18" - name: Node.js 19.x - node-version: "19.7" + node-version: "19" - name: Node.js 20.x - node-version: "20.12" + node-version: "20" - name: Node.js 21.x - node-version: "21.7" + node-version: "21" - name: Node.js 22.x node-version: "22" From 2edaf6da604e0b4bddb04af4d162923d4b508de9 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Wed, 5 Jun 2024 18:24:48 -0400 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=A7=AA=20skip=20query=20test=20on=20n?= =?UTF-8?q?ode=2021?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Chris de Almeida --- test/body-parser.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/body-parser.js b/test/body-parser.js index d46ea772..01ea7ece 100644 --- a/test/body-parser.js +++ b/test/body-parser.js @@ -73,11 +73,24 @@ describe('bodyParser()', function () { }) }) - methods.slice().sort().forEach(function (method) { - if (method === 'connect') { - // except CONNECT - return + function getMajorVersion (versionString) { + return versionString.split('.')[0] + } + + function shouldSkipQuery (versionString) { + // Temporarily skipping this test on 21 + // update this implementation to run on those release lines on supported versions once they exist + // upstream tracking https://github.com/nodejs/node/pull/51719 + // express tracking issue: https://github.com/expressjs/express/issues/5615 + var majorsToSkip = { + 21: true } + return majorsToSkip[getMajorVersion(versionString)] + } + + methods.slice().sort().forEach(function (method) { + if (method === 'connect') return + if (method === 'query' && shouldSkipQuery(process.versions.node)) return it('should support ' + method.toUpperCase() + ' requests', function (done) { request(this.server)[method]('/') From b360292b1fca4d86488a49d6297f1e54ef494f05 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 8 Jun 2024 23:29:19 -0400 Subject: [PATCH 5/6] update query skip, actually skip, fix tracking issue link --- test/body-parser.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/body-parser.js b/test/body-parser.js index 01ea7ece..9e250cab 100644 --- a/test/body-parser.js +++ b/test/body-parser.js @@ -78,21 +78,20 @@ describe('bodyParser()', function () { } function shouldSkipQuery (versionString) { - // Temporarily skipping this test on 21 - // update this implementation to run on those release lines on supported versions once they exist - // upstream tracking https://github.com/nodejs/node/pull/51719 + // Skipping HTTP QUERY tests on Node 21, it is reported in http.METHODS on 21.7.2 but not supported + // update this implementation to run on supported versions of 21 once they exist + // upstream tracking https://github.com/nodejs/node/issues/51562 // express tracking issue: https://github.com/expressjs/express/issues/5615 - var majorsToSkip = { - 21: true - } - return majorsToSkip[getMajorVersion(versionString)] + return getMajorVersion(versionString) == 21 } methods.slice().sort().forEach(function (method) { if (method === 'connect') return - if (method === 'query' && shouldSkipQuery(process.versions.node)) return it('should support ' + method.toUpperCase() + ' requests', function (done) { + if (method === 'query' && shouldSkipQuery(process.versions.node)) { + this.skip() + } request(this.server)[method]('/') .set('Content-Type', 'application/json') .set('Content-Length', '15') From 852555a87f7fccdac003235afc8550aaf8eda90f Mon Sep 17 00:00:00 2001 From: Jon Church Date: Sat, 8 Jun 2024 23:33:54 -0400 Subject: [PATCH 6/6] fix lint error for == --- test/body-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/body-parser.js b/test/body-parser.js index 9e250cab..2d764d3a 100644 --- a/test/body-parser.js +++ b/test/body-parser.js @@ -82,7 +82,7 @@ describe('bodyParser()', function () { // update this implementation to run on supported versions of 21 once they exist // upstream tracking https://github.com/nodejs/node/issues/51562 // express tracking issue: https://github.com/expressjs/express/issues/5615 - return getMajorVersion(versionString) == 21 + return getMajorVersion(versionString) === '21' } methods.slice().sort().forEach(function (method) {