Skip to content
Myr

chore(benchmark): polyfill `Request` and `Response` (#287)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* chore(benchmark): polyfill `Request` and `Response` * polyfill

authored by Yusuke Wada · committed by GitHub · parent 81d77ba · Browse files · 4 files+233 added−150 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+233 added−150 removed

  • other:+233 added−150 removed

4 files+233 added−150 removed

modified:benchmarks/handle-event/index.js+20 added-6 removed
modified:benchmarks/handle-event/package.json+4 added-3 removed
modified:benchmarks/handle-event/yarn.lock+206 added-135 removed
5 unmodified lines
6 version "2.2.2"7 resolved "https://registry.yarnpkg.com/@cloudflare/workers-types/-/workers-types-2.2.2.tgz#1bced16bba801d7af987da835467545bb5cc7ac6"8 integrity sha512-kaMn2rueJ0PL1TYVGknTCh0X0x0d9G+FNXAFep7/4uqecEZoQb/63o6rOmMuiqI09zLuHV6xhKRXinokV/MY9A==910accepts@~1.3.7:11 version "1.3.7"12 resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"13 integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==10accepts@~1.3.8:11 version "1.3.8"12 resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"13 integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==14 dependencies:15 mime-types "~2.1.24"16 negotiator "0.6.2"15 mime-types "~2.1.34"16 negotiator "0.6.3"1718anymatch@~3.1.2:19 version "3.1.2"20 resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
4 unmodified lines
2526array-flatten@1.1.1:27 version "1.1.1"28 resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"29 integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=29 integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==3031benchmark@^2.1.4:32 version "2.1.4"33 resolved "https://registry.yarnpkg.com/benchmark/-/benchmark-2.1.4.tgz#09f3de31c916425d498cc2ee565a0ebf3c2a5629"34 integrity sha1-CfPeMckWQl1JjMLuVloOvzwqVik=34 integrity sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==35 dependencies:36 lodash "^4.17.4"37 platform "^1.3.3"38
1 unmodified line
40 version "2.2.0"41 resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"42 integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==4344body-parser@1.19.1:45 version "1.19.1"46 resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.1.tgz#1499abbaa9274af3ecc9f6f10396c995943e31d4"47 integrity sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==44body-parser@1.20.0:45 version "1.20.0"46 resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5"47 integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==48 dependencies:49 bytes "3.1.1"49 bytes "3.1.2"50 content-type "~1.0.4"51 debug "2.6.9"52 depd "~1.1.2"53 http-errors "1.8.1"52 depd "2.0.0"53 destroy "1.2.0"54 http-errors "2.0.0"55 iconv-lite "0.4.24"55 on-finished "~2.3.0"56 qs "6.9.6"57 raw-body "2.4.2"56 on-finished "2.4.1"57 qs "6.10.3"58 raw-body "2.5.1"59 type-is "~1.6.18"60 unpipe "1.0.0"6162braces@~3.0.2:63 version "3.0.2"64 resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"65 integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==66 dependencies:67 fill-range "^7.0.1"6867bytes@3.1.1:68 version "3.1.1"69 resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a"70 integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==69bytes@3.1.2:70 version "3.1.2"71 resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"72 integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==7374call-bind@^1.0.0:75 version "1.0.2"76 resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"77 integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==78 dependencies:79 function-bind "^1.1.1"80 get-intrinsic "^1.0.2"8182chokidar@^3.5.0:83 version "3.5.3"84 resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"85 integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
22 unmodified lines
108109cookie-signature@1.0.6:110 version "1.0.6"111 resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"102 integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=112 integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==113104cookie@0.4.1:105 version "0.4.1"106 resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"107 integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==114cookie@0.5.0:115 version "0.5.0"116 resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"117 integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==118119data-uri-to-buffer@^4.0.0:120 version "4.0.0"121 resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b"122 integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==123124debug@2.6.9:125 version "2.6.9"126 resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"127 integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
4 unmodified lines
132 version "2.0.0"133 resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"134 integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==135121depd@~1.1.2:122 version "1.1.2"123 resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"124 integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=136destroy@1.2.0:137 version "1.2.0"138 resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"139 integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==140126destroy@~1.0.4:127 version "1.0.4"128 resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"129 integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=130141edge-mock@^0.0.15:142 version "0.0.15"143 resolved "https://registry.yarnpkg.com/edge-mock/-/edge-mock-0.0.15.tgz#f584b052c8023e2c1a1af454c18b3b91f01cbb2b"144 integrity sha512-Nv0MI7TmLz1rum4vCxAamabMMbRn54oOWHQ2qyymvsr3+zWG4hciFOy+fBj8/E92XGXP5a57lUeXj1V6oclSNA==
5 unmodified lines
150151ee-first@1.1.1:152 version "1.1.1"153 resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"144 integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=154 integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==155156encodeurl@~1.0.2:157 version "1.0.2"158 resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"149 integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=159 integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==160161escape-html@~1.0.3:162 version "1.0.3"163 resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"154 integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=164 integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==165166etag@~1.8.1:167 version "1.8.1"168 resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"159 integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=169 integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==170171express@^4.17.1:162 version "4.17.2"163 resolved "https://registry.yarnpkg.com/express/-/express-4.17.2.tgz#c18369f265297319beed4e5558753cc8c1364cb3"164 integrity sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==172 version "4.18.1"173 resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf"174 integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==175 dependencies:166 accepts "~1.3.7"176 accepts "~1.3.8"177 array-flatten "1.1.1"168 body-parser "1.19.1"178 body-parser "1.20.0"179 content-disposition "0.5.4"180 content-type "~1.0.4"171 cookie "0.4.1"181 cookie "0.5.0"182 cookie-signature "1.0.6"183 debug "2.6.9"174 depd "~1.1.2"184 depd "2.0.0"185 encodeurl "~1.0.2"186 escape-html "~1.0.3"187 etag "~1.8.1"178 finalhandler "~1.1.2"188 finalhandler "1.2.0"189 fresh "0.5.2"190 http-errors "2.0.0"191 merge-descriptors "1.0.1"192 methods "~1.1.2"182 on-finished "~2.3.0"193 on-finished "2.4.1"194 parseurl "~1.3.3"195 path-to-regexp "0.1.7"196 proxy-addr "~2.0.7"186 qs "6.9.6"197 qs "6.10.3"198 range-parser "~1.2.1"199 safe-buffer "5.2.1"189 send "0.17.2"190 serve-static "1.14.2"200 send "0.18.0"201 serve-static "1.15.0"202 setprototypeof "1.2.0"192 statuses "~1.5.0"203 statuses "2.0.1"204 type-is "~1.6.18"205 utils-merge "1.0.1"206 vary "~1.1.2"207
1 unmodified line
209 version "3.1.3"210 resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"211 integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==212213fetch-blob@^3.1.2, fetch-blob@^3.1.4:214 version "3.1.5"215 resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.1.5.tgz#0077bf5f3fcdbd9d75a0b5362f77dbb743489863"216 integrity sha512-N64ZpKqoLejlrwkIAnb9iLSA3Vx/kjgzpcDhygcqJ2KKjky8nCgUQ+dzXtbrLaWZGZNmNfQTsiQ0weZ1svglHg==217 dependencies:218 node-domexception "^1.0.0"219 web-streams-polyfill "^3.0.3"220221fill-range@^7.0.1:222 version "7.0.1"223 resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"224 integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==225 dependencies:226 to-regex-range "^5.0.1"227209finalhandler@~1.1.2:210 version "1.1.2"211 resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"212 integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==228finalhandler@1.2.0:229 version "1.2.0"230 resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32"231 integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==232 dependencies:233 debug "2.6.9"234 encodeurl "~1.0.2"235 escape-html "~1.0.3"217 on-finished "~2.3.0"236 on-finished "2.4.1"237 parseurl "~1.3.3"219 statuses "~1.5.0"238 statuses "2.0.1"239 unpipe "~1.0.0"240241formdata-polyfill@^4.0.10:242 version "4.0.10"243 resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423"244 integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==245 dependencies:246 fetch-blob "^3.1.2"247248forwarded@0.2.0:249 version "0.2.0"250 resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"251 integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==252253fresh@0.5.2:254 version "0.5.2"255 resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"230 integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=256 integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==257258fsevents@~2.3.2:259 version "2.3.2"260 resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"261 integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==262263function-bind@^1.1.1:264 version "1.1.1"265 resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"266 integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==267268get-intrinsic@^1.0.2:269 version "1.1.1"270 resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6"271 integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==272 dependencies:273 function-bind "^1.1.1"274 has "^1.0.3"275 has-symbols "^1.0.1"276277glob-parent@~5.1.2:278 version "5.1.2"279 resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"280 integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==281 dependencies:282 is-glob "^4.0.1"283244http-errors@1.8.1:245 version "1.8.1"246 resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"247 integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==284has-symbols@^1.0.1:285 version "1.0.3"286 resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"287 integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==288289has@^1.0.3:290 version "1.0.3"291 resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"292 integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==293 dependencies:249 depd "~1.1.2"250 inherits "2.0.4"251 setprototypeof "1.2.0"252 statuses ">= 1.5.0 < 2"253 toidentifier "1.0.1"294 function-bind "^1.1.1"295255http-errors@^2.0.0:296http-errors@2.0.0, http-errors@^2.0.0:297 version "2.0.0"298 resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"299 integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==300 dependencies:
29 unmodified lines
330331is-extglob@^2.1.1:332 version "2.1.1"333 resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"293 integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=334 integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==335336is-glob@^4.0.1, is-glob@~4.0.1:337 version "4.0.3"338 resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
5 unmodified lines
344 version "7.0.0"345 resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"346 integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==347307itty-router@^2.4.8:308 version "2.4.10"309 resolved "https://registry.yarnpkg.com/itty-router/-/itty-router-2.4.10.tgz#23c7e44e36784e106f71ae6b1ec0fd4b95c70978"310 integrity sha512-6z8UO4MoJRCdgLRVU++L6QTHJwU2pCAYFM8+9HjjcneRM5DqYyF5g6tsgIw24xXLFJlpvVrIzVzhjn862ZQZcQ==348itty-router@^2.6.1:349 version "2.6.1"350 resolved "https://registry.yarnpkg.com/itty-router/-/itty-router-2.6.1.tgz#eecb59fa25b5f6f519276cc5bcaaa1cb341d5fee"351 integrity sha512-l9gxWe5TOLUESYnBn85Jxd6tIZLWdRX5YKkHIBfSgbNQ7UFPNUGuWihRV+LlEbfJJIzgLmhwAbaWRi5yWJm8kg==352353livereload-js@^3.3.1:313 version "3.3.2"314 resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-3.3.2.tgz#c88b009c6e466b15b91faa26fd7c99d620e12651"315 integrity sha512-w677WnINxFkuixAoUEXOStewzLYGI76XVag+0JWMMEyjJQKs0ibWZMxkTlB96Lm3EjZ7IeOxVziBEbtxVQqQZA==354 version "3.4.0"355 resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-3.4.0.tgz#2083158125f16fb5207141bbadb9bdc26cfdb1ef"356 integrity sha512-F/pz9ZZP+R+arY94cECTZco7PXgBXyL+KVWUPZq8AQE9TOu14GV6fYeKOviv02JCvFa4Oi3Rs1hYEpfeajc+ow==357358livereload@^0.9.3:359 version "0.9.3"360 resolved "https://registry.yarnpkg.com/livereload/-/livereload-0.9.3.tgz#a714816375ed52471408bede8b49b2ee6a0c55b1"
11 unmodified lines
372373media-typer@0.3.0:374 version "0.3.0"375 resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"335 integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=376 integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==377378merge-descriptors@1.0.1:379 version "1.0.1"380 resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"340 integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=381 integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==382383methods@~1.1.2:384 version "1.1.2"385 resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"345 integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=386 integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==387347mime-db@1.51.0:348 version "1.51.0"349 resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c"350 integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==388mime-db@1.52.0:389 version "1.52.0"390 resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"391 integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==392352mime-types@~2.1.24:353 version "2.1.34"354 resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24"355 integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==393mime-types@~2.1.24, mime-types@~2.1.34:394 version "2.1.35"395 resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"396 integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==397 dependencies:357 mime-db "1.51.0"398 mime-db "1.52.0"399400mime@1.6.0:401 version "1.6.0"402 resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
1 unmodified line
404405ms@2.0.0:406 version "2.0.0"407 resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"367 integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=408 integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==409410ms@2.1.3:411 version "2.1.3"412 resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"413 integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==414374negotiator@0.6.2:375 version "0.6.2"376 resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"377 integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==415negotiator@0.6.3:416 version "0.6.3"417 resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"418 integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==419420node-domexception@^1.0.0:421 version "1.0.0"422 resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"423 integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==424425node-fetch@^2.6.1:426 version "2.6.7"427 resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"428 integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==429 dependencies:430 whatwg-url "^5.0.0"431432node-fetch@^3.2.4:433 version "3.2.4"434 resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.4.tgz#3fbca2d8838111048232de54cb532bd3cf134947"435 integrity sha512-WvYJRN7mMyOLurFR2YpysQGuwYrJN+qrrpHjJDuKMcSPdfFccRUla/kng2mz6HWSBxJcqPbvatS6Gb4RhOzCJw==436 dependencies:437 data-uri-to-buffer "^4.0.0"438 fetch-blob "^3.1.4"439 formdata-polyfill "^4.0.10"440441normalize-path@^3.0.0, normalize-path@~3.0.0:442 version "3.0.0"443 resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"444 integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==445391on-finished@~2.3.0:392 version "2.3.0"393 resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"394 integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=446object-inspect@^1.9.0:447 version "1.12.2"448 resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"449 integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==450451on-finished@2.4.1:452 version "2.4.1"453 resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"454 integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==455 dependencies:456 ee-first "1.1.1"457458"opts@>= 1.2.0":
11 unmodified lines
470 resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"471 integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=472473path-to-regexp@^6.1.0:414 version "6.2.0"415 resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.0.tgz#f7b3803336104c346889adece614669230645f38"416 integrity sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==474 version "6.2.1"475 resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz#d54934d6798eb9e5ef14e7af7962c945906918e5"476 integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==477478picomatch@^2.0.4, picomatch@^2.2.1:479 version "2.3.1"480 resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
11 unmodified lines
492 dependencies:493 forwarded "0.2.0"494 ipaddr.js "1.9.1"495436qs@6.9.6:437 version "6.9.6"438 resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee"439 integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==496qs@6.10.3:497 version "6.10.3"498 resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e"499 integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==500 dependencies:501 side-channel "^1.0.4"502503range-parser@~1.2.1:504 version "1.2.1"505 resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"506 integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==507446raw-body@2.4.2:447 version "2.4.2"448 resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32"449 integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==508raw-body@2.5.1:509 version "2.5.1"510 resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857"511 integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==512 dependencies:451 bytes "3.1.1"452 http-errors "1.8.1"513 bytes "3.1.2"514 http-errors "2.0.0"515 iconv-lite "0.4.24"516 unpipe "1.0.0"517518readdirp@~3.6.0:
22 unmodified lines
541 version "2.4.0"542 resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.4.0.tgz#5aaeaaef85c7a417f76271a4f5b0cc3315ddca85"543 integrity sha512-Q5Z/97nbON5t/L/sH6mY2EacfjVGwrCcSi5D3btRO2GZ8pf1K1UN7Z9H5J57hjVU2Qzxr1xO+FmBhOvEkzCMmg==544483send@0.17.2:484 version "0.17.2"485 resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820"486 integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==545send@0.18.0:546 version "0.18.0"547 resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"548 integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==549 dependencies:550 debug "2.6.9"489 depd "~1.1.2"490 destroy "~1.0.4"551 depd "2.0.0"552 destroy "1.2.0"553 encodeurl "~1.0.2"554 escape-html "~1.0.3"555 etag "~1.8.1"556 fresh "0.5.2"495 http-errors "1.8.1"557 http-errors "2.0.0"558 mime "1.6.0"559 ms "2.1.3"498 on-finished "~2.3.0"560 on-finished "2.4.1"561 range-parser "~1.2.1"500 statuses "~1.5.0"562 statuses "2.0.1"563502serve-static@1.14.2:503 version "1.14.2"504 resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa"505 integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==564serve-static@1.15.0:565 version "1.15.0"566 resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"567 integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==568 dependencies:569 encodeurl "~1.0.2"570 escape-html "~1.0.3"571 parseurl "~1.3.3"510 send "0.17.2"572 send "0.18.0"573574setprototypeof@1.2.0:575 version "1.2.0"576 resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"577 integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==578579side-channel@^1.0.4:580 version "1.0.4"581 resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"582 integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==583 dependencies:584 call-bind "^1.0.0"585 get-intrinsic "^1.0.2"586 object-inspect "^1.9.0"587588statuses@2.0.1:589 version "2.0.1"590 resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"591 integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==592522"statuses@>= 1.5.0 < 2", statuses@~1.5.0:523 version "1.5.0"524 resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"525 integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=526527sunder@^0.10.0:593sunder@^0.10.1:594 version "0.10.1"595 resolved "https://registry.yarnpkg.com/sunder/-/sunder-0.10.1.tgz#f6654e9063cbb35dd8b0e39d51cb24b29da36d22"596 integrity sha512-O1UnRExADDIH6LwV4SQkrJVV24djF02Lib5w2AnEZOBa4nvvLgiLwSMzfDkU4sLmrhEaW61VMyaRNA2tVAfBZA==597 dependencies:
48 unmodified lines
646 version "1.1.2"647 resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"648 integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=649650web-streams-polyfill@^3.0.3:651 version "3.2.1"652 resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6"653 integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==654655webidl-conversions@^3.0.0:656 version "3.0.1"657 resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"658 integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=
13 unmodified lines
672 dependencies:673 regexparam "^2.0.0"674675ws@^7.4.3:605 version "7.5.6"606 resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b"607 integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==676 version "7.5.8"677 resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a"678 integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw==
modified:src/hono.ts+3 added-6 removed
1import { compose } from './compose'2import { Context } from './context'3import type { Env } from './context'4import type { Result, Router } from './router'4import type { Router } from './router'5import { METHOD_NAME_ALL, METHOD_NAME_ALL_LOWERCASE } from './router'6import { TrieRouter } from './router/trie-router' // Default Router7import { getPathFromURL, mergePath } from './utils/url'8
163 unmodified lines
172 const r: Route<E> = { path: path, method: method, handler: handler }173 this.routes.push(r)174 }175176 private async matchRoute(177 method: string,178 path: string179 ): Promise<Result<Handler<string, E>> | null> {176 private matchRoute(method: string, path: string) {177 return this.router.match(method, path)178 }179180 private async dispatch(request: Request, event?: FetchEvent, env?: E): Promise<Response> {181 const path = getPathFromURL(request.url, { strict: this.strict })182 const method = request.method183187 const result = await this.matchRoute(method, path)184 const result = this.matchRoute(method, path)185186 request.param = ((key?: string): string | Record<string, string> | null => {187 if (result) {188 if (key) {
49 unmodified lines