From 2ca50dafc0e63bbedf2a676bf4438aee18faeb2e Mon Sep 17 00:00:00 2001 From: Andrew Ahearne Date: Tue, 24 Sep 2024 17:16:21 +0100 Subject: [PATCH 1/2] fix: add QUERY httpMethods which is new in v22 --- lib/http-methods.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http-methods.js b/lib/http-methods.js index 39e340e..c681f7a 100644 --- a/lib/http-methods.js +++ b/lib/http-methods.js @@ -1,11 +1,11 @@ 'use strict' -// defined by Node.js http module, a snapshot from Node.js 18.12.0 +// defined by Node.js http module, a snapshot from Node.js 22.9.0 const httpMethods = [ 'ACL', 'BIND', 'CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LINK', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCALENDAR', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', - 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', + 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'QUERY', 'REBIND', 'REPORT', 'SEARCH', 'SOURCE', 'SUBSCRIBE', 'TRACE', 'UNBIND', 'UNLINK', 'UNLOCK', 'UNSUBSCRIBE' ] From 674900a7756edc3e6a802e8ccdd4ae3a9395ef96 Mon Sep 17 00:00:00 2001 From: Andrew Ahearne Date: Tue, 24 Sep 2024 17:42:24 +0100 Subject: [PATCH 2/2] test: update pretty-print.test.js Add QUERY to list of methods in test --- test/pretty-print.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pretty-print.test.js b/test/pretty-print.test.js index 50f622c..c265350 100644 --- a/test/pretty-print.test.js +++ b/test/pretty-print.test.js @@ -673,8 +673,8 @@ test('pretty print - print all methods', t => { └── / └── test (ACL, BIND, CHECKOUT, CONNECT, COPY, DELETE, GET, HEAD, LINK, LOCK, \ M-SEARCH, MERGE, MKACTIVITY, MKCALENDAR, MKCOL, MOVE, NOTIFY, OPTIONS, PATCH, \ -POST, PROPFIND, PROPPATCH, PURGE, PUT, REBIND, REPORT, SEARCH, SOURCE, SUBSCRIBE, \ -TRACE, UNBIND, UNLINK, UNLOCK, UNSUBSCRIBE) +POST, PROPFIND, PROPPATCH, PURGE, PUT, QUERY, REBIND, REPORT, SEARCH, SOURCE, \ +SUBSCRIBE, TRACE, UNBIND, UNLINK, UNLOCK, UNSUBSCRIBE) ` t.equal(typeof tree, 'string') t.equal(tree, expected)