From c2af877c794a45615bf14c3f92954e310a3ea852 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 22 Jun 2020 00:04:05 -0400 Subject: [PATCH 01/67] build: Node.js@10.21 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a5dfafe..d9fa210 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.17" - "9.11" - - "10.19" + - "10.21" - "11.15" - "12.16" - "13.11" From 35e6a1436b721e74fc25ff0062cd7c2703aa0845 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 22 Jun 2020 00:11:04 -0400 Subject: [PATCH 02/67] build: mocha@7.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f2bd98..37f30f1 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "7.1.1", + "mocha": "7.2.0", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From e575e44cc5c8327ad2f39cd0ed263dbb384ca601 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 22 Jun 2020 19:33:18 -0400 Subject: [PATCH 03/67] build: support Node.js 14.x --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d9fa210..47d1307 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ node_js: - "11.15" - "12.16" - "13.11" + - "14.4" cache: directories: - node_modules From 9fcb097d5e354ba830043ae613a71cf1a211d1fb Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 24 Jun 2020 16:58:36 -0400 Subject: [PATCH 04/67] build: Node.js@13.14 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 47d1307..5d6dfbc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ node_js: - "10.21" - "11.15" - "12.16" - - "13.11" + - "13.14" - "14.4" cache: directories: From b7d571ce2c58115cd7c2ba2dc7eb9d50efdcc2ed Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 24 Jun 2020 17:03:15 -0400 Subject: [PATCH 05/67] build: Node.js@12.18 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d6dfbc..97360e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.21" - "11.15" - - "12.16" + - "12.18" - "13.14" - "14.4" cache: From 233f2b83b6585f13c4ed503cfb09b990c4c609e2 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 9 Jul 2020 19:22:31 -0400 Subject: [PATCH 06/67] build: Node.js@14.10 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97360e4..7f0cc75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ node_js: - "11.15" - "12.18" - "13.14" - - "14.4" + - "14.10" cache: directories: - node_modules From 5fa7c9c81704f35278283ee9ab3a59eb318161f7 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 10 Jul 2020 01:28:21 -0400 Subject: [PATCH 07/67] build: mocha@8.0.1 --- .travis.yml | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7f0cc75..6067c93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,6 +72,7 @@ before_install: 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' + elif node_version_lt '10.0'; then npm_use_module 'mocha' '7.2.0' fi - | # Configure supertest for http calls diff --git a/package.json b/package.json index 37f30f1..d99e252 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "7.2.0", + "mocha": "8.0.1", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From a25d74616a3a6b4b544e772bf54869e8d22e2775 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 11 Jul 2020 18:59:22 -0400 Subject: [PATCH 08/67] build: eslint@7.4.0 --- .travis.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6067c93..97c7cdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,7 @@ before_install: # Setup Node.js version-specific dependencies - | # Configure eslint for linting - if node_version_lt '8.0'; then npm_remove_module_re '^eslint(-|$)' + if node_version_lt '10.0'; then npm_remove_module_re '^eslint(-|$)' fi - | # Configure istanbul for coverage diff --git a/package.json b/package.json index d99e252..56fb3f8 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "6.8.0", + "eslint": "7.4.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 823838f5dcfb5f3924820b0d6885962bd5a1a4b4 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 10 Aug 2020 21:51:54 -0400 Subject: [PATCH 09/67] build: mocha@8.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56fb3f8..a1ea463 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.0.1", + "mocha": "8.1.1", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From 897dd685ff8fa8575cbc33e546d4a8c0721960d4 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 1 Sep 2020 23:44:10 -0400 Subject: [PATCH 10/67] build: eslint@7.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a1ea463..82734fe 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.4.0", + "eslint": "7.8.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 911bd11c832b584d63cc8aa4573df347e48d8805 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 2 Sep 2020 00:02:24 -0400 Subject: [PATCH 11/67] build: mocha@8.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 82734fe..852e18d 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.1.1", + "mocha": "8.1.3", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From 3b71a1f09a5a46fbbe2eb5ee063cd1678dde98ff Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 2 Sep 2020 00:07:31 -0400 Subject: [PATCH 12/67] build: Node.js@10.22 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97c7cdf..7b94205 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.17" - "9.11" - - "10.21" + - "10.22" - "11.15" - "12.18" - "13.14" From 230dd8f671521adea09358a805358b5b0274eb9e Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 20 Oct 2020 19:33:49 -0400 Subject: [PATCH 13/67] build: Node.js@14.11 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7b94205..f67265b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ node_js: - "11.15" - "12.18" - "13.14" - - "14.10" + - "14.11" cache: directories: - node_modules From fc70d6ff53674f92dad203ea8d16407141ff5178 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 21 Oct 2020 20:03:12 -0400 Subject: [PATCH 14/67] build: support Node.js 15.x --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f67265b..d2af64b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ node_js: - "12.18" - "13.14" - "14.11" + - "15.0" cache: directories: - node_modules From 3327211677e3725ce5426e8294032fdd2ec8cc3e Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 21 Oct 2020 20:07:42 -0400 Subject: [PATCH 15/67] build: mocha@8.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 852e18d..ea8837d 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.1.3", + "mocha": "8.2.0", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From a5dcda228e53583c162bbd7b2b55c7ab62f00307 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 27 Oct 2020 18:31:26 -0400 Subject: [PATCH 16/67] build: eslint@7.12.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea8837d..40733e2 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.8.0", + "eslint": "7.12.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 85aca8cd22e28c896b4345a62e5d3ae8aa998c37 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 27 Oct 2020 18:35:03 -0400 Subject: [PATCH 17/67] build: Node.js@14.15 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d2af64b..b2d2709 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ node_js: - "11.15" - "12.18" - "13.14" - - "14.11" + - "14.15" - "15.0" cache: directories: From 48a0cea6bb93ef9f4a8a66fb1a5e005e9fd895c7 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 28 Oct 2020 01:22:00 -0400 Subject: [PATCH 18/67] build: Node.js@10.23 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b2d2709..a1e5272 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.17" - "9.11" - - "10.22" + - "10.23" - "11.15" - "12.18" - "13.14" From 1b629c88ceccfb71ca39b5e9f592f746122b67b8 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 31 Oct 2020 19:21:24 -0400 Subject: [PATCH 19/67] build: Node.js@12.19 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a1e5272..7e14546 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.23" - "11.15" - - "12.18" + - "12.19" - "13.14" - "14.15" - "15.0" From 9b8823386cca5f87a89b062becbe0dc10c1fe4b5 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 16 Nov 2020 17:22:11 -0500 Subject: [PATCH 20/67] build: Node.js@15.2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7e14546..19ff521 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.19" - "13.14" - "14.15" - - "15.0" + - "15.2" cache: directories: - node_modules From 400fd73f9401af33280a1f5108fd713d086b666b Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 16 Nov 2020 17:28:45 -0500 Subject: [PATCH 21/67] build: eslint@7.13.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 40733e2..d5172a7 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.12.0", + "eslint": "7.13.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 79cf93562aeda07c7e9410f2586e560f09e37dd2 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 17 Nov 2020 00:32:53 -0500 Subject: [PATCH 22/67] build: mocha@8.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d5172a7..e088b64 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.2.0", + "mocha": "8.2.1", "safe-buffer": "5.2.0", "supertest": "4.0.2" }, From a88d7b0fbc93b306f0d9fe9d8c87bac3203304c5 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 17 Nov 2020 19:48:43 -0500 Subject: [PATCH 23/67] build: supertest@5.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e088b64..26d74fa 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "istanbul": "0.4.5", "mocha": "8.2.1", "safe-buffer": "5.2.0", - "supertest": "4.0.2" + "supertest": "5.0.0" }, "files": [ "lib/", From d9f050d7d581a4407b71a1ce137e01c50c8179c6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 8 Dec 2020 21:10:53 -0500 Subject: [PATCH 24/67] build: Node.js@15.3 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 19ff521..58410f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.19" - "13.14" - "14.15" - - "15.2" + - "15.3" cache: directories: - node_modules From c20c9bd69f0af3b6dd57d9ff360c7187738d3133 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 8 Dec 2020 21:12:30 -0500 Subject: [PATCH 25/67] build: Node.js@12.20 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 58410f4..e08af2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.23" - "11.15" - - "12.19" + - "12.20" - "13.14" - "14.15" - "15.3" From 7b786cd5093b8e136ff05b26e1e901320a451343 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 9 Dec 2020 00:02:55 -0500 Subject: [PATCH 26/67] build: eslint@7.15.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26d74fa..ec6a348 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.13.0", + "eslint": "7.15.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 2ece61d1688fef33e6d83a79cc3774d9ab957bf8 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 9 Dec 2020 00:09:36 -0500 Subject: [PATCH 27/67] build: supertest@6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec6a348..907a69f 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "istanbul": "0.4.5", "mocha": "8.2.1", "safe-buffer": "5.2.0", - "supertest": "5.0.0" + "supertest": "6.0.1" }, "files": [ "lib/", From d2f6db84c9969c35defc9e1c203029ccfa882cc6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 12 Jan 2021 23:54:36 -0500 Subject: [PATCH 28/67] build: Node.js@15.6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e08af2b..b8c76fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.20" - "13.14" - "14.15" - - "15.3" + - "15.6" cache: directories: - node_modules From ebf4abbeb99cf8a2613cc493831d6157416459bd Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 13 Jan 2021 00:25:10 -0500 Subject: [PATCH 29/67] build: eslint@7.17.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 907a69f..cd9e7c9 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.15.0", + "eslint": "7.17.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 15a60312db7e5fb331270c846436b073709e0b9f Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Wed, 13 Jan 2021 00:31:07 -0500 Subject: [PATCH 30/67] deps: safe-buffer@5.2.1 --- HISTORY.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 1000457..322ef5e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ +unreleased +========== + + * deps: safe-buffer@5.2.1 + 1.3.5 / 2020-03-24 ================== diff --git a/package.json b/package.json index cd9e7c9..2bd025d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "finalhandler": "1.1.2", "istanbul": "0.4.5", "mocha": "8.2.1", - "safe-buffer": "5.2.0", + "safe-buffer": "5.2.1", "supertest": "6.0.1" }, "files": [ From d07d28ce7e6bd8788e2d8c1a7a009792d9182ff3 Mon Sep 17 00:00:00 2001 From: Rodion Abdurakhimov Date: Wed, 25 Nov 2020 10:15:07 +0200 Subject: [PATCH 31/67] docs: fix typo in code example closes #98 closes #97 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6be6155..591fd60 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ handler.get('/', function (req, res) { res.setHeader('Content-Type', 'text/plain; charset=utf-8') // will respond with the param of the router's parent route - res.end(path + '\n') + res.end(req.params.path + '\n') }) // make our http server listen to connections From 22feb335df9137bd6a76812b8276d943ce39322d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 23 Jan 2021 23:17:35 -0500 Subject: [PATCH 32/67] build: supertest@6.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2bd025d..df5ea68 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "istanbul": "0.4.5", "mocha": "8.2.1", "safe-buffer": "5.2.1", - "supertest": "6.0.1" + "supertest": "6.1.1" }, "files": [ "lib/", From f68ab38de341e883ace8ca5f172ee68d1b1f0deb Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 1 Feb 2021 19:32:24 -0500 Subject: [PATCH 33/67] build: Node.js@15.7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b8c76fd..6299b68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.20" - "13.14" - "14.15" - - "15.6" + - "15.7" cache: directories: - node_modules From 511a375a6ba3fffe10c13b1da094cc923bb6e11d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 1 Mar 2021 20:41:34 -0500 Subject: [PATCH 34/67] build: eslint@7.21.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df5ea68..a94f600 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.17.0", + "eslint": "7.21.0", "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 12de6bedf779120bfa3ee27ec409e341aa62d867 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 4 Mar 2021 19:33:30 -0500 Subject: [PATCH 35/67] build: Node.js@12.21 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6299b68..4308b38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.23" - "11.15" - - "12.20" + - "12.21" - "13.14" - "14.15" - "15.7" From ddf17c2d776fb7ddfc5fb6d58601612f1ea53e1a Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 5 Mar 2021 01:22:12 -0500 Subject: [PATCH 36/67] build: Node.js@14.16 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4308b38..9111bff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ node_js: - "11.15" - "12.21" - "13.14" - - "14.15" + - "14.16" - "15.7" cache: directories: From a7959381269fb8f4142b72efff528de1159b5362 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 5 Mar 2021 01:29:08 -0500 Subject: [PATCH 37/67] build: mocha@8.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a94f600..207c1fe 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "1.0.2", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.2.1", + "mocha": "8.3.0", "safe-buffer": "5.2.1", "supertest": "6.1.1" }, From 91476193accf19a1b40fbd072cfe4f9bf518907c Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sat, 6 Mar 2021 21:22:58 -0500 Subject: [PATCH 38/67] build: Node.js@10.24 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9111bff..7f26f7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ node_js: - "7.10" - "8.17" - "9.11" - - "10.23" + - "10.24" - "11.15" - "12.21" - "13.14" From d6a357aca530be32034de99202a83ae5b707ff89 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 7 Mar 2021 23:08:06 -0500 Subject: [PATCH 39/67] build: eslint-plugin-markdown@2.0.0 --- .eslintrc | 8 -------- .eslintrc.yml | 18 ++++++++++++++++++ package.json | 4 ++-- 3 files changed, 20 insertions(+), 10 deletions(-) delete mode 100644 .eslintrc create mode 100644 .eslintrc.yml diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 07eb965..0000000 --- a/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "rules": { - "eol-last": "error", - "indent": ["error", 2, { "SwitchCase": 1 }], - "no-trailing-spaces": "error", - "semi": ["error", "never"] - } -} diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..241439a --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,18 @@ +root: true +extends: + - plugin:markdown/recommended +plugins: + - markdown +overrides: + - files: '**/*.md' + processor: 'markdown/markdown' +rules: + eol-last: error + indent: + - error + - 2 + - SwitchCase: 1 + no-trailing-spaces: error + semi: + - error + - never diff --git a/package.json b/package.json index 207c1fe..0f35f56 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "devDependencies": { "after": "0.8.2", "eslint": "7.21.0", - "eslint-plugin-markdown": "1.0.2", + "eslint-plugin-markdown": "2.0.0", "finalhandler": "1.1.2", "istanbul": "0.4.5", "mocha": "8.3.0", @@ -38,7 +38,7 @@ "node": ">= 0.8" }, "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", + "lint": "eslint .", "test": "mocha --reporter spec --bail --check-leaks test/", "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", From 5410d765667f4317c4bb15c95112fd9852bc02be Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 7 Mar 2021 23:27:04 -0500 Subject: [PATCH 40/67] build: Node.js@15.11 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7f26f7a..bc3ea2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.21" - "13.14" - "14.16" - - "15.7" + - "15.11" cache: directories: - node_modules From 9c2000dbb8750bed4ba75552667aa3b1dae6673d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 18 Mar 2021 17:38:25 -0400 Subject: [PATCH 41/67] build: mocha@8.3.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f35f56..066da6a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "2.0.0", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.3.0", + "mocha": "8.3.2", "safe-buffer": "5.2.1", "supertest": "6.1.1" }, From e1eceec0529960023d158c4d92882111fc1684a8 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 18 Mar 2021 18:08:17 -0400 Subject: [PATCH 42/67] build: Node.js@15.12 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bc3ea2c..b443bea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.21" - "13.14" - "14.16" - - "15.11" + - "15.12" cache: directories: - node_modules From daa8b535eda7520811149fe8136a5028b1c4a7d4 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 19 Mar 2021 01:22:24 -0400 Subject: [PATCH 43/67] build: supertest@6.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 066da6a..88893ee 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "istanbul": "0.4.5", "mocha": "8.3.2", "safe-buffer": "5.2.1", - "supertest": "6.1.1" + "supertest": "6.1.3" }, "files": [ "lib/", From 5c3c62fb289406fa924465df543f05dc75c79ef7 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 4 Apr 2021 15:38:47 -0400 Subject: [PATCH 44/67] build: eslint@7.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88893ee..510d9cb 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.21.0", + "eslint": "7.23.0", "eslint-plugin-markdown": "2.0.0", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 160baac0fff5daae542ad335ce554bc1537a3d7b Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 4 Apr 2021 15:46:55 -0400 Subject: [PATCH 45/67] build: Node.js@15.13 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b443bea..ae00b65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.21" - "13.14" - "14.16" - - "15.12" + - "15.13" cache: directories: - node_modules From 7c43278e72f935ae7c5e2a13232ab2902bed3772 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 6 Apr 2021 17:49:25 -0400 Subject: [PATCH 46/67] build: eslint-plugin-markdown@2.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 510d9cb..61fdbdb 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "devDependencies": { "after": "0.8.2", "eslint": "7.23.0", - "eslint-plugin-markdown": "2.0.0", + "eslint-plugin-markdown": "2.0.1", "finalhandler": "1.1.2", "istanbul": "0.4.5", "mocha": "8.3.2", From 579aa7858f402e7cd385379cf6aa2eddeacad741 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 6 Apr 2021 17:56:53 -0400 Subject: [PATCH 47/67] build: Node.js@12.22 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ae00b65..9bf905c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ node_js: - "9.11" - "10.24" - "11.15" - - "12.21" + - "12.22" - "13.14" - "14.16" - "15.13" From 1e9d9855c7273d6f1076f6dcbca5b88e0c0d3182 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 6 Apr 2021 18:02:13 -0400 Subject: [PATCH 48/67] build: Node.js@15.14 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9bf905c..16ab52d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ node_js: - "12.22" - "13.14" - "14.16" - - "15.13" + - "15.14" cache: directories: - node_modules From 089ba6f5c4f61b286d401c816244b842cc18e15e Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 18 Apr 2021 20:31:16 -0400 Subject: [PATCH 49/67] build: eslint@7.24.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 61fdbdb..4864987 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.23.0", + "eslint": "7.24.0", "eslint-plugin-markdown": "2.0.1", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 2c1a96eba9db28130a8cd8efaff6587feb3ffdec Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 14 May 2021 15:49:10 -0400 Subject: [PATCH 50/67] build: Node.js@14.17 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 16ab52d..edd2908 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ node_js: - "11.15" - "12.22" - "13.14" - - "14.16" + - "14.17" - "15.14" cache: directories: From 0c7e9b201951b0a6f24e4dcc286c725b722430e6 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 14 May 2021 15:56:10 -0400 Subject: [PATCH 51/67] build: support Node.js 16.x --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index edd2908..fa1043c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ node_js: - "13.14" - "14.17" - "15.14" + - "16.1" cache: directories: - node_modules From b4aa9f6f78bb459ef8cd7c1f37a72d029c621ed1 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Fri, 14 May 2021 16:18:29 -0400 Subject: [PATCH 52/67] build: eslint@7.26.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4864987..92d47f0 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.24.0", + "eslint": "7.26.0", "eslint-plugin-markdown": "2.0.1", "finalhandler": "1.1.2", "istanbul": "0.4.5", From 64ef7594155f35b2de31ea080ff3f6c0471de32f Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 16 May 2021 17:38:32 -0400 Subject: [PATCH 53/67] build: mocha@8.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92d47f0..f976f07 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint-plugin-markdown": "2.0.1", "finalhandler": "1.1.2", "istanbul": "0.4.5", - "mocha": "8.3.2", + "mocha": "8.4.0", "safe-buffer": "5.2.1", "supertest": "6.1.3" }, From 7be0e0442bec0db43ba5ae1b35eab4d14175b79d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 16 May 2021 17:49:07 -0400 Subject: [PATCH 54/67] build: eslint-plugin-markdown@2.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f976f07..d80bfc6 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "devDependencies": { "after": "0.8.2", "eslint": "7.26.0", - "eslint-plugin-markdown": "2.0.1", + "eslint-plugin-markdown": "2.1.0", "finalhandler": "1.1.2", "istanbul": "0.4.5", "mocha": "8.4.0", From 4b5db127545bf6264e14eecde4597f34860ad05e Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 17 May 2021 11:15:22 -0400 Subject: [PATCH 55/67] build: use nyc for test coverage --- .gitignore | 1 + .travis.yml | 19 +++++++++++-------- package.json | 6 +++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0fa6951..f15b98e 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 fa1043c..a771aa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,10 +64,6 @@ before_install: # Configure eslint for linting if node_version_lt '10.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' @@ -76,6 +72,13 @@ before_install: elif node_version_lt '8.0' ; then npm_use_module 'mocha' '6.2.2' elif node_version_lt '10.0'; then npm_use_module 'mocha' '7.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' @@ -90,9 +93,9 @@ before_install: npm rebuild fi script: - # Run test script, depending on istanbul install + # Run test script, depending on nyc install - | - if npm_module_installed 'istanbul'; then npm run-script test-travis + if npm_module_installed 'nyc'; then npm run-script test-ci else npm test fi # Run linting, depending on eslint install @@ -102,7 +105,7 @@ script: after_script: # Upload coverage to coveralls if exists - | - if [[ -f ./coverage/lcov.info ]]; then + 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 d80bfc6..583c472 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "eslint": "7.26.0", "eslint-plugin-markdown": "2.1.0", "finalhandler": "1.1.2", - "istanbul": "0.4.5", "mocha": "8.4.0", + "nyc": "15.1.0", "safe-buffer": "5.2.1", "supertest": "6.1.3" }, @@ -40,8 +40,8 @@ "scripts": { "lint": "eslint .", "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/", + "test-ci": "nyc --reporter=html --reporter=text npm test", + "test-cov": "nyc --reporter=text npm test", "version": "node scripts/version-history.js && git add HISTORY.md" } } From 8643ec6a63a09ffaeb492b1513cc63fc8ac93950 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 17 May 2021 11:55:46 -0400 Subject: [PATCH 56/67] build: use GitHub Actions instead of Travis CI --- .github/workflows/ci.yml | 180 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 111 ------------------------ README.md | 6 +- package.json | 2 +- 4 files changed, 184 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b52cfc9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,180 @@ +name: ci + +on: +- pull_request +- push + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + name: + - Node.js 0.8 + - Node.js 0.10 + - Node.js 0.12 + - io.js 1.x + - io.js 2.x + - io.js 3.x + - Node.js 4.x + - Node.js 5.x + - Node.js 6.x + - Node.js 7.x + - Node.js 8.x + - Node.js 9.x + - Node.js 10.x + - Node.js 11.x + - Node.js 12.x + - Node.js 13.x + - Node.js 14.x + - Node.js 15.x + - Node.js 16.x + + include: + - name: Node.js 0.8 + node-version: "0.8" + npm-i: mocha@2.5.3 supertest@1.1.0 + npm-rm: nyc + + - name: Node.js 0.10 + node-version: "0.10" + npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + + - name: Node.js 0.12 + node-version: "0.12" + npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + + - name: io.js 1.x + node-version: "1.8" + npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + + - name: io.js 2.x + node-version: "2.5" + npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + + - name: io.js 3.x + node-version: "3.3" + npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0 + + - name: Node.js 4.x + node-version: "4.9" + npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 + + - name: Node.js 5.x + node-version: "5.12" + npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2 + + - name: Node.js 6.x + node-version: "6.17" + npm-i: mocha@6.2.2 nyc@14.1.1 + + - name: Node.js 7.x + node-version: "7.10" + npm-i: mocha@6.2.2 nyc@14.1.1 + + - name: Node.js 8.x + node-version: "8.17" + npm-i: mocha@7.2.0 + + - name: Node.js 9.x + node-version: "9.11" + npm-i: mocha@7.2.0 + + - name: Node.js 10.x + node-version: "10.24" + + - name: Node.js 11.x + node-version: "11.15" + + - name: Node.js 12.x + node-version: "12.22" + + - name: Node.js 13.x + node-version: "13.14" + + - name: Node.js 14.x + node-version: "14.17" + + - name: Node.js 15.x + node-version: "15.14" + + - name: Node.js 16.x + node-version: "16.1" + + steps: + - uses: actions/checkout@v2 + + - name: Install Node.js ${{ matrix.node-version }} + shell: bash -eo pipefail -l {0} + run: | + nvm install --default ${{ matrix.node-version }} + if [[ "${{ matrix.node-version }}" == 0.* ]]; then + npm config set strict-ssl false + fi + dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" + + - name: Configure npm + run: npm config set shrinkwrap false + + - name: Remove npm module(s) ${{ matrix.npm-rm }} + run: npm rm --silent --save-dev ${{ matrix.npm-rm }} + if: matrix.npm-rm != '' + + - name: Install npm module(s) ${{ matrix.npm-i }} + run: npm install --save-dev ${{ matrix.npm-i }} + if: matrix.npm-i != '' + + - name: Setup Node.js version-specific dependencies + shell: bash + run: | + # eslint for linting + # - remove on Node.js < 10 + if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then + node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \ + grep -E '^eslint(-|$)' | \ + sort -r | \ + xargs -n1 npm rm --silent --save-dev + fi + + - name: Install Node.js dependencies + run: npm install + + - name: List environment + id: list_env + shell: bash + run: | + echo "node@$(node -v)" + echo "npm@$(npm -v)" + npm -s ls ||: + (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }' + + - name: Run tests + shell: bash + run: | + if npm -ps ls nyc | grep -q nyc; then + npm run test-ci + else + npm test + fi + + - name: Lint code + if: steps.list_env.outputs.eslint != '' + run: npm run lint + + - name: Collect code coverage + uses: coverallsapp/github-action@master + if: steps.list_env.outputs.nyc != '' + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: run-${{ matrix.test_number }} + parallel: true + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - name: Upload code coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a771aa4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,111 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" - - "0.12" - - "1.8" - - "2.5" - - "3.3" - - "4.9" - - "5.12" - - "6.17" - - "7.10" - - "8.17" - - "9.11" - - "10.24" - - "11.15" - - "12.22" - - "13.14" - - "14.17" - - "15.14" - - "16.1" -cache: - directories: - - node_modules -before_install: - - | - # Setup utility functions - function node_version_lt () { - [[ "$(v "$TRAVIS_NODE_VERSION")" -lt "$(v "${1}")" ]] - } - function npm_module_installed () { - npm -lsp ls | grep -Fq "$(pwd)/node_modules/${1}:${1}@" - } - function npm_remove_module_re () { - node -e ' - fs = require("fs"); - p = JSON.parse(fs.readFileSync("package.json", "utf8")); - r = RegExp(process.argv[1]); - for (k in p.devDependencies) { - if (r.test(k)) delete p.devDependencies[k]; - } - fs.writeFileSync("package.json", JSON.stringify(p, null, 2) + "\n"); - ' "$@" - } - function npm_use_module () { - node -e ' - fs = require("fs"); - p = JSON.parse(fs.readFileSync("package.json", "utf8")); - p.devDependencies[process.argv[1]] = process.argv[2]; - fs.writeFileSync("package.json", JSON.stringify(p, null, 2) + "\n"); - ' "$@" - } - function v () { - tr '.' '\n' <<< "${1}" \ - | awk '{ printf "%03d", $0 }' \ - | sed 's/^0*//' - } - # Configure npm - - | - # Skip updating shrinkwrap / lock - npm config set shrinkwrap false - # Setup Node.js version-specific dependencies - - | - # Configure eslint for linting - if node_version_lt '10.0'; then npm_remove_module_re '^eslint(-|$)' - 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' - elif node_version_lt '8.0' ; then npm_use_module 'mocha' '6.2.2' - elif node_version_lt '10.0'; then npm_use_module 'mocha' '7.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' - elif node_version_lt '4.0' ; then npm_use_module 'supertest' '2.0.0' - elif node_version_lt '6.0' ; then npm_use_module 'supertest' '3.4.2' - fi - # Update Node.js modules - - | - # Prune and rebuild node_modules - if [[ -d node_modules ]]; then - npm prune - npm rebuild - fi -script: - # Run test script, depending on nyc install - - | - if npm_module_installed 'nyc'; then npm run-script test-ci - else npm test - fi - # Run linting, depending on eslint install - - | - if npm_module_installed 'eslint'; then npm run-script lint - fi -after_script: - # Upload coverage to coveralls if exists - - | - if [[ -d .nyc_output ]]; then - npm install --save-dev coveralls@2 - nyc report --reporter=text-lcov | coveralls - fi diff --git a/README.md b/README.md index 591fd60..fe4e570 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] +[![Build Status][ci-image]][ci-url] [![Test Coverage][coveralls-image]][coveralls-url] Simple middleware-style router @@ -381,12 +381,12 @@ server.listen(8080) [MIT](LICENSE) +[ci-image]: https://badgen.net/github/checks/pillarjs/router/master?label=ci +[ci-url]: https://github.com/pillarjs/router/actions?query=workflow%3Aci [npm-image]: https://img.shields.io/npm/v/router.svg [npm-url]: https://npmjs.org/package/router [node-version-image]: https://img.shields.io/node/v/router.svg [node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/pillarjs/router/master.svg -[travis-url]: https://travis-ci.org/pillarjs/router [coveralls-image]: https://img.shields.io/coveralls/pillarjs/router/master.svg [coveralls-url]: https://coveralls.io/r/pillarjs/router?branch=master [downloads-image]: https://img.shields.io/npm/dm/router.svg diff --git a/package.json b/package.json index 583c472..2495c71 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "scripts": { "lint": "eslint .", "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=html --reporter=text npm test", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", "test-cov": "nyc --reporter=text npm test", "version": "node scripts/version-history.js && git add HISTORY.md" } From e96ebf5ab30661905107e1ff15250baeb4a47b9f Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 17 May 2021 12:36:53 -0400 Subject: [PATCH 57/67] Fix handling very large stacks of sync middleware --- HISTORY.md | 1 + index.js | 8 ++++++++ lib/route.js | 14 ++++++++++++++ test/route.js | 18 ++++++++++++++++++ test/router.js | 17 +++++++++++++++++ 5 files changed, 58 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 322ef5e..6a8d71c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,7 @@ unreleased ========== + * Fix handling very large stacks of sync middleware * deps: safe-buffer@5.2.1 1.3.5 / 2020-03-24 diff --git a/index.js b/index.js index 3608f26..4220442 100644 --- a/index.js +++ b/index.js @@ -163,6 +163,7 @@ Router.prototype.handle = function handle(req, res, callback) { var removed = '' var self = this var slashAdded = false + var sync = 0 var paramcalled = {} // middleware and routes @@ -218,6 +219,11 @@ Router.prototype.handle = function handle(req, res, callback) { return } + // max sync stack + if (++sync > 100) { + return defer(next, err) + } + // get pathname of request var path = getPathname(req) @@ -340,6 +346,8 @@ Router.prototype.handle = function handle(req, res, callback) { } else { layer.handle_request(req, res, next) } + + sync = 0 } } diff --git a/lib/route.js b/lib/route.js index 98363fe..a6a55a5 100644 --- a/lib/route.js +++ b/lib/route.js @@ -24,6 +24,11 @@ var methods = require('methods') var slice = Array.prototype.slice +/* istanbul ignore next */ +var defer = typeof setImmediate === 'function' + ? setImmediate + : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) } + /** * Expose `Route`. */ @@ -95,6 +100,8 @@ Route.prototype._methods = function _methods() { Route.prototype.dispatch = function dispatch(req, res, done) { var idx = 0 var stack = this.stack + var sync = 0 + if (stack.length === 0) { return done() } @@ -124,6 +131,11 @@ Route.prototype.dispatch = function dispatch(req, res, done) { return done(err) } + // max sync stack + if (++sync > 100) { + return defer(next, err) + } + var layer var match @@ -143,6 +155,8 @@ Route.prototype.dispatch = function dispatch(req, res, done) { } else { layer.handle_request(req, res, next) } + + sync = 0 } } diff --git a/test/route.js b/test/route.js index a88b29f..ba00fec 100644 --- a/test/route.js +++ b/test/route.js @@ -103,6 +103,24 @@ describe('Router', function () { .expect(404, done) }) + it('should not stack overflow with a large sync stack', function (done) { + this.timeout(5000) // long-running test + + var router = new Router() + var route = router.route('/foo') + var server = createServer(router) + + for (var i = 0; i < 6000; i++) { + route.all(function (req, res, next) { next() }) + } + + route.get(helloWorld) + + request(server) + .get('/foo') + .expect(200, 'hello, world', done) + }) + describe('.all(...fn)', function () { it('should reject no arguments', function () { var router = new Router() diff --git a/test/router.js b/test/router.js index 138f221..9d011ed 100644 --- a/test/router.js +++ b/test/router.js @@ -577,6 +577,23 @@ describe('Router', function () { .expect(404, done) }) + it('should not stack overflow with a large sync stack', function (done) { + this.timeout(5000) // long-running test + + var router = new Router() + var server = createServer(router) + + for (var i = 0; i < 6000; i++) { + router.use(function (req, res, next) { next() }) + } + + router.use(helloWorld) + + request(server) + .get('/') + .expect(200, 'hello, world', done) + }) + describe('error handling', function () { it('should invoke error function after next(err)', function (done) { var router = new Router() From d115b11b2238dc078e05b15080cbfee96d81d885 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 3 Oct 2021 21:44:00 -0400 Subject: [PATCH 58/67] build: update CI for npm TLS upgrade --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b52cfc9..524e778 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,10 @@ jobs: shell: bash -eo pipefail -l {0} run: | nvm install --default ${{ matrix.node-version }} - if [[ "${{ matrix.node-version }}" == 0.* ]]; then + if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then + nvm install --alias=npm 0.10 + nvm use ${{ matrix.node-version }} + sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" npm config set strict-ssl false fi dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" From 4b2703110340cf3ea00b7c3d35f3aa9c2ca0c713 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 3 Oct 2021 21:46:00 -0400 Subject: [PATCH 59/67] build: Node.js@14.18 --- .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 524e778..6c2131c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,7 @@ jobs: node-version: "13.14" - name: Node.js 14.x - node-version: "14.17" + node-version: "14.18" - name: Node.js 15.x node-version: "15.14" From 6b0756d3c22e122099d915038f06ef8d5266d5e0 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 3 Oct 2021 21:50:00 -0400 Subject: [PATCH 60/67] build: eslint@7.32.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2495c71..a76936d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "after": "0.8.2", - "eslint": "7.26.0", + "eslint": "7.32.0", "eslint-plugin-markdown": "2.1.0", "finalhandler": "1.1.2", "mocha": "8.4.0", From 5ed19f49cdd067f3c089eaebe2d3e804476e7f1b Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Sun, 3 Oct 2021 21:55:00 -0400 Subject: [PATCH 61/67] build: eslint-plugin-markdown@2.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a76936d..7ab0d0a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "devDependencies": { "after": "0.8.2", "eslint": "7.32.0", - "eslint-plugin-markdown": "2.1.0", + "eslint-plugin-markdown": "2.2.1", "finalhandler": "1.1.2", "mocha": "8.4.0", "nyc": "15.1.0", From d45d0fa367d8d0bccb9a734048a4c629df7b1622 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 15 Nov 2021 17:36:21 -0500 Subject: [PATCH 62/67] build: supertest@6.1.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ab0d0a..d7c9707 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "mocha": "8.4.0", "nyc": "15.1.0", "safe-buffer": "5.2.1", - "supertest": "6.1.3" + "supertest": "6.1.6" }, "files": [ "lib/", From 0d4633703537f069cad2fd9e447395542f565023 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 15 Nov 2021 17:37:17 -0500 Subject: [PATCH 63/67] build: mocha@9.1.3 --- .github/workflows/ci.yml | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c2131c..744aa95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,9 +82,11 @@ jobs: - name: Node.js 10.x node-version: "10.24" + npm-i: mocha@8.4.0 - name: Node.js 11.x node-version: "11.15" + npm-i: mocha@8.4.0 - name: Node.js 12.x node-version: "12.22" diff --git a/package.json b/package.json index d7c9707..4c89d80 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "eslint": "7.32.0", "eslint-plugin-markdown": "2.2.1", "finalhandler": "1.1.2", - "mocha": "8.4.0", + "mocha": "9.1.3", "nyc": "15.1.0", "safe-buffer": "5.2.1", "supertest": "6.1.6" From 78d067f4c4fd124d241e9161883081240cd9c6ef Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 15 Nov 2021 17:40:04 -0500 Subject: [PATCH 64/67] build: Node.js@16.13 --- .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 744aa95..9414d16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: node-version: "15.14" - name: Node.js 16.x - node-version: "16.1" + node-version: "16.13" steps: - uses: actions/checkout@v2 From c030e5310fc5f5da85950ff51392c2ae4626f283 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 15 Nov 2021 17:40:31 -0500 Subject: [PATCH 65/67] build: support Node.js 17.x --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9414d16..85a2d8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: - Node.js 14.x - Node.js 15.x - Node.js 16.x + - Node.js 17.x include: - name: Node.js 0.8 @@ -103,6 +104,9 @@ jobs: - name: Node.js 16.x node-version: "16.13" + - name: Node.js 17.x + node-version: "17.1" + steps: - uses: actions/checkout@v2 From 0298aa8a6e451e569559833ab734a4fc4bdd12cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Fantone?= Date: Mon, 15 Nov 2021 23:34:13 +0000 Subject: [PATCH 66/67] tests: fix typos in test descriptions --- test/req.params.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/req.params.js b/test/req.params.js index 46e5b19..fc0e16c 100644 --- a/test/req.params.js +++ b/test/req.params.js @@ -68,7 +68,7 @@ describe('req.params', function () { }) describe('when "mergeParams: true"', function () { - it('should merge outsite object with params', function (done) { + it('should merge outside object with params', function (done) { var router = Router({ mergeParams: true }) var server = createServer(function (req, res, next) { req.params = {'foo': 'bar'} @@ -87,7 +87,7 @@ describe('req.params', function () { .expect(200, '{"foo":"bar"}', done) }) - it('should ignore non-object outsite object', function (done) { + it('should ignore non-object outside object', function (done) { var router = Router({ mergeParams: true }) var server = createServer(function (req, res, next) { req.params = 42 @@ -126,7 +126,7 @@ describe('req.params', function () { }) describe('with numeric properties in req.params', function () { - it('should merge numeric properies by offsetting', function (done) { + it('should merge numeric properties by offsetting', function (done) { var router = Router({ mergeParams: true }) var server = createServer(function (req, res, next) { req.params = {'0': 'foo', '1': 'bar'} From 3b8351859859c259aa0c8b1174693b82aab04d35 Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Mon, 15 Nov 2021 19:08:32 -0500 Subject: [PATCH 67/67] 1.3.6 --- HISTORY.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 6a8d71c..81325b6 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,5 @@ -unreleased -========== +1.3.6 / 2021-11-15 +================== * Fix handling very large stacks of sync middleware * deps: safe-buffer@5.2.1 diff --git a/package.json b/package.json index 4c89d80..29c5e47 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "router", "description": "Simple middleware-style router", - "version": "1.3.5", + "version": "1.3.6", "author": "Douglas Christopher Wilson ", "contributors": [ "Blake Embrey "