From ab941082cf812ecefea820e3d9e6ddc9f2f9ca9c Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 26 Jul 2019 23:47:04 -0400 Subject: [PATCH 01/40] build: eslint@6.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3348038..0e0aa0d2 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "type-is": "~1.6.18" }, "devDependencies": { - "eslint": "6.0.0", + "eslint": "6.1.0", "eslint-config-standard": "12.0.0", "eslint-plugin-import": "2.18.0", "eslint-plugin-markdown": "1.0.0", From 85b207ef5188489e607422b946d57218a31d0c0b Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 26 Jul 2019 23:54:20 -0400 Subject: [PATCH 02/40] build: eslint-plugin-import@2.18.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e0aa0d2..e838783e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "devDependencies": { "eslint": "6.1.0", "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.18.0", + "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.0", "eslint-plugin-node": "9.1.0", "eslint-plugin-promise": "4.2.1", From 912afb223d7f3c4880d5731807965c2617c37af0 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 27 Jul 2019 00:09:05 -0400 Subject: [PATCH 03/40] lint: apply standard 13 style --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e838783e..7e51a253 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "eslint": "6.1.0", - "eslint-config-standard": "12.0.0", + "eslint-config-standard": "13.0.1", "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.0", "eslint-plugin-node": "9.1.0", From 37e37c9bb5b213dd9b9ff3151695111a16eb8ca4 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 3 Aug 2019 14:50:25 -0400 Subject: [PATCH 04/40] build: mocha@6.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e51a253..c170ed85 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "eslint-plugin-standard": "4.0.0", "istanbul": "0.4.5", "methods": "1.1.2", - "mocha": "6.1.4", + "mocha": "6.2.0", "safe-buffer": "5.1.2", "supertest": "4.0.2" }, From 51ff9d48a41b06a2f004f8b22920e9424902bcc6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 5 Aug 2019 22:41:36 -0400 Subject: [PATCH 05/40] deps: safe-buffer@5.2.0 --- HISTORY.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 1798afaa..220b993a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ unreleased - deps: inherits@2.0.4 * deps: raw-body@2.4.1 - deps: http-errors@1.7.3 + * deps: safe-buffer@5.2.0 * deps: type-is@~1.6.18 1.19.0 / 2019-04-25 diff --git a/package.json b/package.json index c170ed85..90b5337e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "istanbul": "0.4.5", "methods": "1.1.2", "mocha": "6.2.0", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.0", "supertest": "4.0.2" }, "files": [ From bc6effd057612833e783600be69cf18d1aff279a Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 5 Sep 2019 19:33:02 -0400 Subject: [PATCH 06/40] lint: apply standard 14 style --- package.json | 8 ++--- test/body-parser.js | 16 ++++++---- test/json.js | 76 +++++++++++++++++++++++++++------------------ test/raw.js | 30 +++++++++++------- test/text.js | 38 ++++++++++++++--------- test/urlencoded.js | 60 +++++++++++++++++++++-------------- 6 files changed, 137 insertions(+), 91 deletions(-) diff --git a/package.json b/package.json index 90b5337e..1756764d 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ "type-is": "~1.6.18" }, "devDependencies": { - "eslint": "6.1.0", - "eslint-config-standard": "13.0.1", + "eslint": "6.3.0", + "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-node": "9.1.0", + "eslint-plugin-node": "9.2.0", "eslint-plugin-promise": "4.2.1", - "eslint-plugin-standard": "4.0.0", + "eslint-plugin-standard": "4.0.1", "istanbul": "0.4.5", "methods": "1.1.2", "mocha": "6.2.0", diff --git a/test/body-parser.js b/test/body-parser.js index efdd7f98..e32cf94d 100644 --- a/test/body-parser.js +++ b/test/body-parser.js @@ -114,9 +114,11 @@ describe('bodyParser()', function () { describe('with verify option', function () { it('should apply to json', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x20) throw new Error('no leading space') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x20) throw new Error('no leading space') + } + }) request(server) .post('/') @@ -126,9 +128,11 @@ describe('bodyParser()', function () { }) it('should apply to urlencoded', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x20) throw new Error('no leading space') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x20) throw new Error('no leading space') + } + }) request(server) .post('/') diff --git a/test/json.js b/test/json.js index 3fd42d90..ae745712 100644 --- a/test/json.js +++ b/test/json.js @@ -390,9 +390,11 @@ describe('bodyParser.json()', function () { }) it('should error from verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x5b) throw new Error('no arrays') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x5b) throw new Error('no arrays') + } + }) request(server) .post('/') @@ -402,9 +404,11 @@ describe('bodyParser.json()', function () { }) it('should error with type = "entity.verify.failed"', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x5b) throw new Error('no arrays') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x5b) throw new Error('no arrays') + } + }) request(server) .post('/') @@ -415,12 +419,14 @@ describe('bodyParser.json()', function () { }) it('should allow custom codes', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] !== 0x5b) return - var err = new Error('no arrays') - err.status = 400 - throw err - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] !== 0x5b) return + var err = new Error('no arrays') + err.status = 400 + throw err + } + }) request(server) .post('/') @@ -430,12 +436,14 @@ describe('bodyParser.json()', function () { }) it('should allow custom type', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] !== 0x5b) return - var err = new Error('no arrays') - err.type = 'foo.bar' - throw err - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] !== 0x5b) return + var err = new Error('no arrays') + err.type = 'foo.bar' + throw err + } + }) request(server) .post('/') @@ -446,9 +454,11 @@ describe('bodyParser.json()', function () { }) it('should include original body on error object', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x5b) throw new Error('no arrays') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x5b) throw new Error('no arrays') + } + }) request(server) .post('/') @@ -459,9 +469,11 @@ describe('bodyParser.json()', function () { }) it('should allow pass-through', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x5b) throw new Error('no arrays') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x5b) throw new Error('no arrays') + } + }) request(server) .post('/') @@ -471,9 +483,11 @@ describe('bodyParser.json()', function () { }) it('should work with different charsets', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x5b) throw new Error('no arrays') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x5b) throw new Error('no arrays') + } + }) var test = request(server).post('/') test.set('Content-Type', 'application/json; charset=utf-16') @@ -482,9 +496,11 @@ describe('bodyParser.json()', function () { }) it('should 415 on unknown charset prior to verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - throw new Error('unexpected verify call') - } }) + var server = createServer({ + verify: function (req, res, buf) { + throw new Error('unexpected verify call') + } + }) var test = request(server).post('/') test.set('Content-Type', 'application/json; charset=x-bogus') diff --git a/test/raw.js b/test/raw.js index 50b59d0d..36dc1ef6 100644 --- a/test/raw.js +++ b/test/raw.js @@ -248,9 +248,11 @@ describe('bodyParser.raw()', function () { }) it('should error from verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x00) throw new Error('no leading null') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x00) throw new Error('no leading null') + } + }) var test = request(server).post('/') test.set('Content-Type', 'application/octet-stream') @@ -259,12 +261,14 @@ describe('bodyParser.raw()', function () { }) it('should allow custom codes', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] !== 0x00) return - var err = new Error('no leading null') - err.status = 400 - throw err - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] !== 0x00) return + var err = new Error('no leading null') + err.status = 400 + throw err + } + }) var test = request(server).post('/') test.set('Content-Type', 'application/octet-stream') @@ -273,9 +277,11 @@ describe('bodyParser.raw()', function () { }) it('should allow pass-through', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x00) throw new Error('no leading null') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x00) throw new Error('no leading null') + } + }) var test = request(server).post('/') test.set('Content-Type', 'application/octet-stream') diff --git a/test/text.js b/test/text.js index 4f902680..01781d7f 100644 --- a/test/text.js +++ b/test/text.js @@ -271,9 +271,11 @@ describe('bodyParser.text()', function () { }) it('should error from verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x20) throw new Error('no leading space') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x20) throw new Error('no leading space') + } + }) request(server) .post('/') @@ -283,12 +285,14 @@ describe('bodyParser.text()', function () { }) it('should allow custom codes', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] !== 0x20) return - var err = new Error('no leading space') - err.status = 400 - throw err - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] !== 0x20) return + var err = new Error('no leading space') + err.status = 400 + throw err + } + }) request(server) .post('/') @@ -298,9 +302,11 @@ describe('bodyParser.text()', function () { }) it('should allow pass-through', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x20) throw new Error('no leading space') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x20) throw new Error('no leading space') + } + }) request(server) .post('/') @@ -310,9 +316,11 @@ describe('bodyParser.text()', function () { }) it('should 415 on unknown charset prior to verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - throw new Error('unexpected verify call') - } }) + var server = createServer({ + verify: function (req, res, buf) { + throw new Error('unexpected verify call') + } + }) var test = request(server).post('/') test.set('Content-Type', 'text/plain; charset=x-bogus') diff --git a/test/urlencoded.js b/test/urlencoded.js index 3d0c16af..e867c0f4 100644 --- a/test/urlencoded.js +++ b/test/urlencoded.js @@ -519,9 +519,11 @@ describe('bodyParser.urlencoded()', function () { }) it('should error from verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x20) throw new Error('no leading space') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x20) throw new Error('no leading space') + } + }) request(server) .post('/') @@ -531,9 +533,11 @@ describe('bodyParser.urlencoded()', function () { }) it('should error with type = "entity.verify.failed"', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x20) throw new Error('no leading space') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x20) throw new Error('no leading space') + } + }) request(server) .post('/') @@ -544,12 +548,14 @@ describe('bodyParser.urlencoded()', function () { }) it('should allow custom codes', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] !== 0x20) return - var err = new Error('no leading space') - err.status = 400 - throw err - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] !== 0x20) return + var err = new Error('no leading space') + err.status = 400 + throw err + } + }) request(server) .post('/') @@ -559,12 +565,14 @@ describe('bodyParser.urlencoded()', function () { }) it('should allow custom type', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] !== 0x20) return - var err = new Error('no leading space') - err.type = 'foo.bar' - throw err - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] !== 0x20) return + var err = new Error('no leading space') + err.type = 'foo.bar' + throw err + } + }) request(server) .post('/') @@ -575,9 +583,11 @@ describe('bodyParser.urlencoded()', function () { }) it('should allow pass-through', function (done) { - var server = createServer({ verify: function (req, res, buf) { - if (buf[0] === 0x5b) throw new Error('no arrays') - } }) + var server = createServer({ + verify: function (req, res, buf) { + if (buf[0] === 0x5b) throw new Error('no arrays') + } + }) request(server) .post('/') @@ -587,9 +597,11 @@ describe('bodyParser.urlencoded()', function () { }) it('should 415 on unknown charset prior to verify', function (done) { - var server = createServer({ verify: function (req, res, buf) { - throw new Error('unexpected verify call') - } }) + var server = createServer({ + verify: function (req, res, buf) { + throw new Error('unexpected verify call') + } + }) var test = request(server).post('/') test.set('Content-Type', 'application/x-www-form-urlencoded; charset=x-bogus') From 6d92def5e588513899b170094259a3acdc229c14 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 7 Sep 2019 22:31:59 -0400 Subject: [PATCH 07/40] build: Node.js@12.10 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fc5cf851..cec8e34d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.16" - "11.15" - - "12.7" + - "12.10" sudo: false cache: directories: From 512d25f0038fac0b7eadb6b5cca6e28f49ed2fcd Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 15 Sep 2019 20:41:17 -0400 Subject: [PATCH 08/40] deps: qs@6.8.0 --- HISTORY.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 220b993a..eb234583 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,7 @@ unreleased * deps: http-errors@1.7.3 - deps: inherits@2.0.4 + * deps: qs@6.8.0 * deps: raw-body@2.4.1 - deps: http-errors@1.7.3 * deps: safe-buffer@5.2.0 diff --git a/package.json b/package.json index 1756764d..deff66b6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "http-errors": "1.7.3", "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.7.0", + "qs": "6.8.0", "raw-body": "2.4.1", "type-is": "~1.6.18" }, From 5110fa8415b1ade27db17f1f9b4de088b164cbfc Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 17 Sep 2019 19:22:24 -0400 Subject: [PATCH 09/40] build: eslint@6.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index deff66b6..ef89699e 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "type-is": "~1.6.18" }, "devDependencies": { - "eslint": "6.3.0", + "eslint": "6.4.0", "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.0", From 978262848e97e2a557128643de666571b8e19d7b Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 14 Oct 2019 20:03:43 -0400 Subject: [PATCH 10/40] build: mocha@6.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ef89699e..cbb1a6f6 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "eslint-plugin-standard": "4.0.1", "istanbul": "0.4.5", "methods": "1.1.2", - "mocha": "6.2.0", + "mocha": "6.2.1", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From e0f6e8f81024fa78889fbbef6ba083ed4a08b3df Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 14 Oct 2019 20:09:58 -0400 Subject: [PATCH 11/40] build: eslint@6.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cbb1a6f6..549dc398 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "type-is": "~1.6.18" }, "devDependencies": { - "eslint": "6.4.0", + "eslint": "6.5.1", "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.0", From 143598c5ccf2c6300d3d3efaf65587c70d120b44 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 14 Oct 2019 20:11:56 -0400 Subject: [PATCH 12/40] build: Node.js@12.12 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cec8e34d..e37974c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.16" - "11.15" - - "12.10" + - "12.12" sudo: false cache: directories: From c2614379344963c59e5c6c9f8497143562d04eeb Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 17 Oct 2019 18:32:15 -0400 Subject: [PATCH 13/40] deps: qs@6.9.0 --- HISTORY.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index eb234583..bc0323a7 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,7 +3,7 @@ unreleased * deps: http-errors@1.7.3 - deps: inherits@2.0.4 - * deps: qs@6.8.0 + * deps: qs@6.9.0 * deps: raw-body@2.4.1 - deps: http-errors@1.7.3 * deps: safe-buffer@5.2.0 diff --git a/package.json b/package.json index 549dc398..6324fa64 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "http-errors": "1.7.3", "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.8.0", + "qs": "6.9.0", "raw-body": "2.4.1", "type-is": "~1.6.18" }, From 260479bc90f9c01f7354139ab1840f3dcacb4410 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 7 Nov 2019 23:51:11 -0500 Subject: [PATCH 14/40] build: eslint-plugin-markdown@1.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6324fa64..83b2a849 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "eslint": "6.5.1", "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.18.2", - "eslint-plugin-markdown": "1.0.0", + "eslint-plugin-markdown": "1.0.1", "eslint-plugin-node": "9.2.0", "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", From 04dc88ccaefe039279599af6c59e46ac0c96487a Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 8 Nov 2019 00:21:00 -0500 Subject: [PATCH 15/40] build: eslint@6.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83b2a849..45a1c8dd 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "type-is": "~1.6.18" }, "devDependencies": { - "eslint": "6.5.1", + "eslint": "6.6.0", "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.1", From df929fffea0ef36bcb86bbbec0420e88975480df Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 8 Nov 2019 00:28:44 -0500 Subject: [PATCH 16/40] build: mocha@6.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45a1c8dd..3130db6f 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "eslint-plugin-standard": "4.0.1", "istanbul": "0.4.5", "methods": "1.1.2", - "mocha": "6.2.1", + "mocha": "6.2.2", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From bb7464cabf6d34ebb92dd93ef24c542358bccde8 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 8 Nov 2019 00:32:53 -0500 Subject: [PATCH 17/40] build: Node.js@10.17 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e37974c7..cd1401aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.16" - "9.11" - - "10.16" + - "10.17" - "11.15" - "12.12" sudo: false From a13c073d3671f3e8595a1688d6a512ce5bb3693c Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 15 Nov 2019 19:33:20 -0500 Subject: [PATCH 18/40] deps: qs@6.9.1 --- HISTORY.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index bc0323a7..3c534e4e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,7 +3,7 @@ unreleased * deps: http-errors@1.7.3 - deps: inherits@2.0.4 - * deps: qs@6.9.0 + * deps: qs@6.9.1 * deps: raw-body@2.4.1 - deps: http-errors@1.7.3 * deps: safe-buffer@5.2.0 diff --git a/package.json b/package.json index 3130db6f..da95635e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "http-errors": "1.7.3", "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.9.0", + "qs": "6.9.1", "raw-body": "2.4.1", "type-is": "~1.6.18" }, From c6856db7d00f2626538ba7d0cdb53504b63b92d6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 22 Dec 2019 21:43:10 -0500 Subject: [PATCH 19/40] build: use nyc for test coverage --- .gitignore | 1 + .travis.yml | 21 ++++++++++++--------- package.json | 6 +++--- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 0fa6951f..f15b98e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.nyc_output/ coverage/ node_modules/ npm-debug.log diff --git a/.travis.yml b/.travis.yml index cd1401aa..7a89a3d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,16 +66,19 @@ before_install: # Configure eslint for linting if node_version_lt '8.0'; then npm_remove_module_re '^eslint(-|$)' fi - - | - # Configure istanbul for coverage - if node_version_lt '0.10'; then npm_remove_module_re '^istanbul$' - fi - | # Configure mocha for testing if node_version_lt '0.10'; then npm_use_module 'mocha' '2.5.3' elif node_version_lt '4.0' ; then npm_use_module 'mocha' '3.5.3' elif node_version_lt '6.0' ; then npm_use_module 'mocha' '5.2.0' fi + - | + # Configure nyc for coverage + if node_version_lt '0.10'; then npm_remove_module_re '^nyc$' + elif node_version_lt '4.0' ; then npm_use_module 'nyc' '10.3.2' + elif node_version_lt '6.0' ; then npm_use_module 'nyc' '11.9.0' + elif node_version_lt '8.0' ; then npm_use_module 'nyc' '14.1.1' + fi - | # Configure supertest for http calls if node_version_lt '0.10'; then npm_use_module 'supertest' '1.1.0' @@ -95,8 +98,8 @@ before_scrpt: npm -s ls ||: script: - | - # Run test script, depending on istanbul install - if npm_module_installed 'istanbul'; then npm run-script test-travis + # Run test script, depending on nyc install + if npm_module_installed 'nyc'; then npm run-script test-travis else npm test fi - | @@ -105,8 +108,8 @@ script: fi after_script: - | - # Upload coverage to coveralls if exists - if [[ -e ./coverage/lcov.info ]]; then + # Upload coverage to coveralls + if [[ -d .nyc_output ]]; then npm install --save-dev coveralls@2 - coveralls < ./coverage/lcov.info + nyc report --reporter=text-lcov | coveralls fi diff --git a/package.json b/package.json index da95635e..4dbf397d 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "eslint-plugin-node": "9.2.0", "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", - "istanbul": "0.4.5", "methods": "1.1.2", "mocha": "6.2.2", + "nyc": "15.0.0", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, @@ -46,7 +46,7 @@ "scripts": { "lint": "eslint --plugin markdown --ext js,md .", "test": "mocha --require test/support/env --reporter spec --check-leaks --bail test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require test/support/env --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --require test/support/env --reporter spec --check-leaks test/" + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test" } } From c00bab90f58db221acbdf04205a164114fd97372 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 22 Dec 2019 21:57:37 -0500 Subject: [PATCH 20/40] build: eslint@6.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4dbf397d..27cd120e 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "type-is": "~1.6.18" }, "devDependencies": { - "eslint": "6.6.0", + "eslint": "6.8.0", "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-markdown": "1.0.1", From 819e9ac2dd1157bcef2df969664b06aeeadef8fb Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 27 Dec 2019 18:39:19 -0500 Subject: [PATCH 21/40] build: Node.js@8.17 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7a89a3d6..d91c8826 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ node_js: - "5.12" - "6.17" - "7.10" - - "8.16" + - "8.17" - "9.11" - "10.17" - "11.15" From e910f401e04516ba576e6306a07a1c6bd624322e Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 27 Dec 2019 18:47:06 -0500 Subject: [PATCH 22/40] build: Node.js@10.18 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d91c8826..41c33b77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.17" - "9.11" - - "10.17" + - "10.18" - "11.15" - "12.12" sudo: false From 2f8a203a5d3df0f5b7cd4eec50e9b7094bd468d0 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 28 Dec 2019 00:10:12 -0500 Subject: [PATCH 23/40] build: Node.js@12.14 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 41c33b77..1768ce98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.18" - "11.15" - - "12.12" + - "12.14" sudo: false cache: directories: From dc3e58bcb4f173ab11895f3753ecbf22e653a232 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 6 Feb 2019 20:31:41 -0500 Subject: [PATCH 24/40] build: eslint-plugin-import@2.20.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27cd120e..37ac1056 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "devDependencies": { "eslint": "6.8.0", "eslint-config-standard": "14.1.0", - "eslint-plugin-import": "2.18.2", + "eslint-plugin-import": "2.20.1", "eslint-plugin-markdown": "1.0.1", "eslint-plugin-node": "9.2.0", "eslint-plugin-promise": "4.2.1", From b8e2709174102ad2be07a56a333d267ec0b5f97c Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 6 Feb 2019 20:40:26 -0500 Subject: [PATCH 25/40] build: mocha@7.0.1 --- .travis.yml | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1768ce98..3be8e457 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,6 +71,7 @@ before_install: if node_version_lt '0.10'; then npm_use_module 'mocha' '2.5.3' elif node_version_lt '4.0' ; then npm_use_module 'mocha' '3.5.3' elif node_version_lt '6.0' ; then npm_use_module 'mocha' '5.2.0' + elif node_version_lt '8.0' ; then npm_use_module 'mocha' '6.2.2' fi - | # Configure nyc for coverage diff --git a/package.json b/package.json index 37ac1056..b3ce3854 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", "methods": "1.1.2", - "mocha": "6.2.2", + "mocha": "7.0.1", "nyc": "15.0.0", "safe-buffer": "5.2.0", "supertest": "4.0.2" From fddbbc8c8ceb10c6b4c202a2f045bc0e104bddc6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 7 Feb 2019 00:03:58 -0500 Subject: [PATCH 26/40] build: Node.js@10.19 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3be8e457..6e7499f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.17" - "9.11" - - "10.18" + - "10.19" - "11.15" - "12.14" sudo: false From 35d8ceb5de7d6b8f1788d912a9b76d71872fa9c3 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 7 Feb 2019 00:09:26 -0500 Subject: [PATCH 27/40] build: Node.js@12.15 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6e7499f4..a4c154fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.19" - "11.15" - - "12.14" + - "12.15" sudo: false cache: directories: From a00d29d505b847e8597038468a90cc9d6c1c4feb Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 7 Feb 2019 00:14:13 -0500 Subject: [PATCH 28/40] build: support Node.js 13.x --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a4c154fe..3a38c6b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ node_js: - "10.19" - "11.15" - "12.15" + - "13.8" sudo: false cache: directories: From c29f3781c34dd7d33d08f7671104fe09e2308924 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 28 Feb 2020 20:33:42 -0500 Subject: [PATCH 29/40] build: eslint-plugin-markdown@1.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3ce3854..a24ce858 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "eslint": "6.8.0", "eslint-config-standard": "14.1.0", "eslint-plugin-import": "2.20.1", - "eslint-plugin-markdown": "1.0.1", + "eslint-plugin-markdown": "1.0.2", "eslint-plugin-node": "9.2.0", "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", From bf158bdecc9a0e1ebfab2566862af5bcb9ee78b9 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 28 Feb 2020 20:37:15 -0500 Subject: [PATCH 30/40] build: mocha@7.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a24ce858..803e9cd7 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", "methods": "1.1.2", - "mocha": "7.0.1", + "mocha": "7.1.0", "nyc": "15.0.0", "safe-buffer": "5.2.0", "supertest": "4.0.2" From 83b129b87459f52ff06a60a31e1179dd38d96834 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 28 Feb 2020 20:40:34 -0500 Subject: [PATCH 31/40] build: Node.js@12.16 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3a38c6b1..4ee9cb45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.19" - "11.15" - - "12.15" + - "12.16" - "13.8" sudo: false cache: From 67a1e44a260dde3427106d1a2ef4ef0c948d0454 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 29 Feb 2020 00:18:07 -0500 Subject: [PATCH 32/40] build: Node.js@13.9 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ee9cb45..9d8b694c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ node_js: - "10.19" - "11.15" - "12.16" - - "13.8" + - "13.9" sudo: false cache: directories: From 7cc057f3e6d18531680b4bcdbb11de3d85ed384c Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 23 Mar 2020 22:30:46 -0400 Subject: [PATCH 33/40] build: remove deprecated Travis CI directive --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9d8b694c..3cd07fd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ node_js: - "11.15" - "12.16" - "13.9" -sudo: false cache: directories: - node_modules From 334f068932f65ed1f6a001d741987b60e7a0db01 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 23 Mar 2020 22:34:44 -0400 Subject: [PATCH 34/40] build: Node.js@13.11 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3cd07fd3..1a38cdc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ node_js: - "10.19" - "11.15" - "12.16" - - "13.9" + - "13.11" cache: directories: - node_modules From 4e4601f23a0ead89c7ae90a53f6c3724db6294be Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 23 Mar 2020 22:38:59 -0400 Subject: [PATCH 35/40] build: eslint-config-standard@14.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 803e9cd7..84c6e2c0 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "devDependencies": { "eslint": "6.8.0", - "eslint-config-standard": "14.1.0", + "eslint-config-standard": "14.1.1", "eslint-plugin-import": "2.20.1", "eslint-plugin-markdown": "1.0.2", "eslint-plugin-node": "9.2.0", From 345a425b9c2a323d5b082384ba10b4b59f6affb8 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 24 Mar 2020 00:04:30 -0400 Subject: [PATCH 36/40] build: mocha@7.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84c6e2c0..b3543e01 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint-plugin-promise": "4.2.1", "eslint-plugin-standard": "4.0.1", "methods": "1.1.2", - "mocha": "7.1.0", + "mocha": "7.1.1", "nyc": "15.0.0", "safe-buffer": "5.2.0", "supertest": "4.0.2" From a0ac3e9eb8ad507ae4d35fa1e86d9e6889fbf57f Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 26 Mar 2020 19:16:30 -0400 Subject: [PATCH 37/40] deps: qs@6.9.3 --- HISTORY.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 3c534e4e..63288c30 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,7 +3,7 @@ unreleased * deps: http-errors@1.7.3 - deps: inherits@2.0.4 - * deps: qs@6.9.1 + * deps: qs@6.9.3 * deps: raw-body@2.4.1 - deps: http-errors@1.7.3 * deps: safe-buffer@5.2.0 diff --git a/package.json b/package.json index b3543e01..1ea75517 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "http-errors": "1.7.3", "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.9.1", + "qs": "6.9.3", "raw-body": "2.4.1", "type-is": "~1.6.18" }, From 0b58196ea776da8f8f004892e3f3eb0cab1afa90 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 26 Mar 2020 19:29:35 -0400 Subject: [PATCH 38/40] docs: document how the errors are created closes #377 --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aba6297a..83f0f3a2 100644 --- a/README.md +++ b/README.md @@ -281,14 +281,15 @@ encoding of the request. The parsing can be aborted by throwing an error. ## Errors -The middlewares provided by this module create errors depending on the error -condition during parsing. The errors will typically have a `status`/`statusCode` -property that contains the suggested HTTP response code, an `expose` property -to determine if the `message` property should be displayed to the client, a -`type` property to determine the type of error without matching against the -`message`, and a `body` property containing the read body, if available. - -The following are the common errors emitted, though any error can come through +The middlewares provided by this module create errors using the +[`http-errors` module](https://www.npmjs.com/package/http-errors). The errors +will typically have a `status`/`statusCode` property that contains the suggested +HTTP response code, an `expose` property to determine if the `message` property +should be displayed to the client, a `type` property to determine the type of +error without matching against the `message`, and a `body` property containing +the read body, if available. + +The following are the common errors created, though any error can come through for various reasons. ### content encoding unsupported From ea5ffde42ef5351113cec3c5743a6d014230a0fb Mon Sep 17 00:00:00 2001 From: Jonathan Law Date: Tue, 8 Oct 2019 13:27:09 +0100 Subject: [PATCH 39/40] docs: add entity parse failed error documentation closes #378 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 83f0f3a2..b47c4cf0 100644 --- a/README.md +++ b/README.md @@ -300,6 +300,13 @@ contained an encoding but the "inflation" option was set to `false`. The `'encoding.unsupported'`, and the `charset` property will be set to the encoding that is unsupported. +### entity parse failed + +This error will occur when the request contained an entity that could not be +parsed by the middleware. The `status` property is set to `400`, the `type` +property is set to `'entity.parse.failed'`, and the `body` property is set to +the entity value that failed parsing. + ### request aborted This error will occur when the request is aborted by the client before reading From 480b1cfe29af19c070f4ae96e0d598c099f42a12 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 26 Mar 2020 19:56:39 -0400 Subject: [PATCH 40/40] docs: add entity verify failed error documentation --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b47c4cf0..73acf89e 100644 --- a/README.md +++ b/README.md @@ -307,6 +307,13 @@ parsed by the middleware. The `status` property is set to `400`, the `type` property is set to `'entity.parse.failed'`, and the `body` property is set to the entity value that failed parsing. +### entity verify failed + +This error will occur when the request contained an entity that could not be +failed verification by the defined `verify` option. The `status` property is +set to `403`, the `type` property is set to `'entity.verify.failed'`, and the +`body` property is set to the entity value that failed verification. + ### request aborted This error will occur when the request is aborted by the client before reading