cloudstructs 0.9.13 → 0.9.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/.jsii +3 -3
  2. package/assets/slack-textract/detect.lambda/index.js +14 -9
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/dmarc/index.js +1 -1
  5. package/lib/ecs-service-roller/index.js +2 -2
  6. package/lib/email-receiver/receiver.js +1 -1
  7. package/lib/email-receiver/whitelist.lambda.js +2 -3
  8. package/lib/mjml-template/index.js +1 -1
  9. package/lib/saml-identity-provider/index.js +2 -2
  10. package/lib/slack-app/manifest.js +1 -1
  11. package/lib/slack-app/provider.lambda.js +2 -3
  12. package/lib/slack-app/slack-app.js +2 -2
  13. package/lib/slack-events/events.lambda.js +2 -3
  14. package/lib/slack-events/index.js +1 -1
  15. package/lib/slack-events/signature.js +2 -3
  16. package/lib/slack-textract/detect.lambda.js +2 -3
  17. package/lib/slack-textract/index.js +1 -1
  18. package/lib/ssl-server-test/analyze.lambda.js +2 -3
  19. package/lib/ssl-server-test/extract-grade.lambda.js +2 -3
  20. package/lib/ssl-server-test/index.js +1 -1
  21. package/lib/state-machine-cr-provider/index.js +1 -1
  22. package/lib/state-machine-cr-provider/runtime/http.js +3 -3
  23. package/lib/state-machine-cr-provider/runtime/index.js +5 -5
  24. package/lib/static-website/index.js +1 -1
  25. package/lib/static-website/origin-request.edge-lambda.js +2 -3
  26. package/lib/toolkit-cleaner/clean-images.lambda.js +2 -3
  27. package/lib/toolkit-cleaner/clean-objects.lambda.js +2 -3
  28. package/lib/toolkit-cleaner/extract-template-hashes.lambda.js +2 -3
  29. package/lib/toolkit-cleaner/get-stack-names.lambda.js +2 -3
  30. package/lib/toolkit-cleaner/index.js +1 -1
  31. package/lib/url-shortener/index.js +1 -1
  32. package/lib/url-shortener/redirect.edge-lambda.js +2 -3
  33. package/lib/url-shortener/shortener.lambda.js +2 -3
  34. package/node_modules/@babel/runtime/helpers/extends.js +2 -2
  35. package/node_modules/@babel/runtime/helpers/get.js +2 -2
  36. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +2 -2
  37. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +2 -2
  38. package/node_modules/@babel/runtime/helpers/typeof.js +2 -2
  39. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +2 -2
  40. package/node_modules/@babel/runtime/package.json +1 -1
  41. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  42. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +47 -48
  43. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +13 -0
  44. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -0
  45. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -2
  46. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +9 -0
  47. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +35 -0
  48. package/node_modules/@slack/logger/node_modules/@types/node/sqlite.d.ts +213 -0
  49. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +18 -0
  50. package/node_modules/@slack/logger/node_modules/undici-types/package.json +1 -1
  51. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  52. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +47 -48
  53. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +13 -0
  54. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -0
  55. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  56. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +9 -0
  57. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +35 -0
  58. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +213 -0
  59. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +18 -0
  60. package/node_modules/@slack/web-api/node_modules/undici-types/package.json +1 -1
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +5 -5
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +5 -5
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +12 -1
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +2 -2
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +15 -15
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +17 -17
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +5 -78
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +1 -1
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +18 -17
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +1 -1
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +1 -1
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +19 -0
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +75 -2
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +99 -1
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +15 -2
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2 -2
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +1 -1
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -0
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +1 -1
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +0 -14
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +1 -1
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +3 -3
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -3
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +10 -1
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +45 -9
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +178 -19
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +1 -1
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +10 -10
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +12 -12
  93. package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +1 -1
  94. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +213 -0
  95. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +9 -9
  96. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +1 -1
  97. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +378 -101
  98. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +1 -1
  99. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +5 -2
  100. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +6 -6
  101. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +1 -1
  102. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +19 -2
  103. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +8 -2
  104. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +2 -2
  105. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +5 -7
  106. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +1 -1
  107. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +19 -1
  108. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +12 -3
  109. package/node_modules/@types/cacheable-request/node_modules/undici-types/LICENSE +21 -0
  110. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/balanced-pool.d.ts +11 -0
  111. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/client.d.ts +12 -1
  112. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/diagnostics-channel.d.ts +1 -2
  113. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/dispatcher.d.ts +18 -4
  114. package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  115. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/errors.d.ts +21 -0
  116. package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +63 -0
  117. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/fetch.d.ts +25 -25
  118. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/formdata.d.ts +1 -1
  119. package/node_modules/@types/cacheable-request/node_modules/undici-types/handlers.d.ts +15 -0
  120. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/index.d.ts +10 -2
  121. package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +15 -0
  122. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/mock-interceptor.d.ts +4 -4
  123. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/package.json +1 -1
  124. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/pool.d.ts +11 -0
  125. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/proxy-agent.d.ts +0 -2
  126. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/readable.d.ts +2 -3
  127. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-agent.d.ts +8 -0
  128. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-handler.d.ts +116 -0
  129. package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +18 -0
  130. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/webidl.d.ts +10 -8
  131. package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/websocket.d.ts +22 -1
  132. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  133. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +5 -5
  134. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +5 -5
  135. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +12 -1
  136. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +2 -2
  137. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +15 -15
  138. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +17 -17
  139. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +5 -78
  140. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +1 -1
  141. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  142. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +18 -17
  143. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +1 -1
  144. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +1 -1
  145. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +19 -0
  146. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +75 -2
  147. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +99 -1
  148. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +15 -2
  149. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2 -2
  150. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +1 -1
  151. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -0
  152. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +1 -1
  153. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +0 -14
  154. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +1 -1
  155. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +3 -3
  156. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -3
  157. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +10 -1
  158. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +45 -9
  159. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +178 -19
  160. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  161. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +1 -1
  162. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +10 -10
  163. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +12 -12
  164. package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +1 -1
  165. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +213 -0
  166. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +9 -9
  167. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +1 -1
  168. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +378 -101
  169. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +1 -1
  170. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +5 -2
  171. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +6 -6
  172. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +1 -1
  173. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +19 -2
  174. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +8 -2
  175. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +2 -2
  176. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +5 -7
  177. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +1 -1
  178. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +19 -1
  179. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +12 -3
  180. package/node_modules/@types/keyv/node_modules/undici-types/LICENSE +21 -0
  181. package/node_modules/@types/keyv/node_modules/undici-types/README.md +6 -0
  182. package/node_modules/@types/keyv/node_modules/undici-types/agent.d.ts +31 -0
  183. package/node_modules/@types/keyv/node_modules/undici-types/api.d.ts +43 -0
  184. package/node_modules/@types/keyv/node_modules/undici-types/balanced-pool.d.ts +29 -0
  185. package/node_modules/@types/keyv/node_modules/undici-types/cache.d.ts +36 -0
  186. package/node_modules/@types/keyv/node_modules/undici-types/client.d.ts +108 -0
  187. package/node_modules/@types/keyv/node_modules/undici-types/connector.d.ts +34 -0
  188. package/node_modules/@types/keyv/node_modules/undici-types/content-type.d.ts +21 -0
  189. package/node_modules/@types/keyv/node_modules/undici-types/cookies.d.ts +28 -0
  190. package/node_modules/@types/keyv/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  191. package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +255 -0
  192. package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  193. package/node_modules/@types/keyv/node_modules/undici-types/errors.d.ts +149 -0
  194. package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +63 -0
  195. package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +209 -0
  196. package/node_modules/@types/keyv/node_modules/undici-types/file.d.ts +39 -0
  197. package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +54 -0
  198. package/node_modules/@types/keyv/node_modules/undici-types/formdata.d.ts +108 -0
  199. package/node_modules/@types/keyv/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  200. package/node_modules/@types/keyv/node_modules/undici-types/global-origin.d.ts +7 -0
  201. package/node_modules/@types/keyv/node_modules/undici-types/handlers.d.ts +15 -0
  202. package/node_modules/@types/keyv/node_modules/undici-types/header.d.ts +4 -0
  203. package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +71 -0
  204. package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +15 -0
  205. package/node_modules/@types/keyv/node_modules/undici-types/mock-agent.d.ts +50 -0
  206. package/node_modules/@types/keyv/node_modules/undici-types/mock-client.d.ts +25 -0
  207. package/node_modules/@types/keyv/node_modules/undici-types/mock-errors.d.ts +12 -0
  208. package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  209. package/node_modules/@types/keyv/node_modules/undici-types/mock-pool.d.ts +25 -0
  210. package/node_modules/@types/keyv/node_modules/undici-types/package.json +55 -0
  211. package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +71 -0
  212. package/node_modules/@types/keyv/node_modules/undici-types/pool-stats.d.ts +19 -0
  213. package/node_modules/@types/keyv/node_modules/undici-types/pool.d.ts +39 -0
  214. package/node_modules/@types/keyv/node_modules/undici-types/proxy-agent.d.ts +28 -0
  215. package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +60 -0
  216. package/node_modules/@types/keyv/node_modules/undici-types/retry-agent.d.ts +8 -0
  217. package/node_modules/@types/keyv/node_modules/undici-types/retry-handler.d.ts +116 -0
  218. package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +18 -0
  219. package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +222 -0
  220. package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +152 -0
  221. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  222. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +5 -5
  223. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +5 -5
  224. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +12 -1
  225. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +2 -2
  226. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +15 -15
  227. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +17 -17
  228. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +5 -78
  229. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +1 -1
  230. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  231. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +18 -17
  232. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +1 -1
  233. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +1 -1
  234. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +19 -0
  235. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +75 -2
  236. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +99 -1
  237. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +15 -2
  238. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2 -2
  239. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +1 -1
  240. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -0
  241. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +1 -1
  242. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +0 -14
  243. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +1 -1
  244. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +3 -3
  245. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -3
  246. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +10 -1
  247. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +45 -9
  248. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +178 -19
  249. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  250. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +1 -1
  251. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +10 -10
  252. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +12 -12
  253. package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +1 -1
  254. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +213 -0
  255. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +9 -9
  256. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +1 -1
  257. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +378 -101
  258. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +1 -1
  259. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +5 -2
  260. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +6 -6
  261. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +1 -1
  262. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +19 -2
  263. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +8 -2
  264. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +2 -2
  265. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +5 -7
  266. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +1 -1
  267. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +19 -1
  268. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +12 -3
  269. package/node_modules/@types/responselike/node_modules/undici-types/LICENSE +21 -0
  270. package/node_modules/@types/responselike/node_modules/undici-types/README.md +6 -0
  271. package/node_modules/@types/responselike/node_modules/undici-types/agent.d.ts +31 -0
  272. package/node_modules/@types/responselike/node_modules/undici-types/api.d.ts +43 -0
  273. package/node_modules/@types/responselike/node_modules/undici-types/balanced-pool.d.ts +29 -0
  274. package/node_modules/@types/responselike/node_modules/undici-types/cache.d.ts +36 -0
  275. package/node_modules/@types/responselike/node_modules/undici-types/client.d.ts +108 -0
  276. package/node_modules/@types/responselike/node_modules/undici-types/connector.d.ts +34 -0
  277. package/node_modules/@types/responselike/node_modules/undici-types/content-type.d.ts +21 -0
  278. package/node_modules/@types/responselike/node_modules/undici-types/cookies.d.ts +28 -0
  279. package/node_modules/@types/responselike/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  280. package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +255 -0
  281. package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  282. package/node_modules/@types/responselike/node_modules/undici-types/errors.d.ts +149 -0
  283. package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +63 -0
  284. package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +209 -0
  285. package/node_modules/@types/responselike/node_modules/undici-types/file.d.ts +39 -0
  286. package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +54 -0
  287. package/node_modules/@types/responselike/node_modules/undici-types/formdata.d.ts +108 -0
  288. package/node_modules/@types/responselike/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  289. package/node_modules/@types/responselike/node_modules/undici-types/global-origin.d.ts +7 -0
  290. package/node_modules/@types/responselike/node_modules/undici-types/handlers.d.ts +15 -0
  291. package/node_modules/@types/responselike/node_modules/undici-types/header.d.ts +4 -0
  292. package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +71 -0
  293. package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +15 -0
  294. package/node_modules/@types/responselike/node_modules/undici-types/mock-agent.d.ts +50 -0
  295. package/node_modules/@types/responselike/node_modules/undici-types/mock-client.d.ts +25 -0
  296. package/node_modules/@types/responselike/node_modules/undici-types/mock-errors.d.ts +12 -0
  297. package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  298. package/node_modules/@types/responselike/node_modules/undici-types/mock-pool.d.ts +25 -0
  299. package/node_modules/@types/responselike/node_modules/undici-types/package.json +55 -0
  300. package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +71 -0
  301. package/node_modules/@types/responselike/node_modules/undici-types/pool-stats.d.ts +19 -0
  302. package/node_modules/@types/responselike/node_modules/undici-types/pool.d.ts +39 -0
  303. package/node_modules/@types/responselike/node_modules/undici-types/proxy-agent.d.ts +28 -0
  304. package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +60 -0
  305. package/node_modules/@types/responselike/node_modules/undici-types/retry-agent.d.ts +8 -0
  306. package/node_modules/@types/responselike/node_modules/undici-types/retry-handler.d.ts +116 -0
  307. package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +18 -0
  308. package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +222 -0
  309. package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +152 -0
  310. package/node_modules/axios/CHANGELOG.md +16 -0
  311. package/node_modules/axios/README.md +6 -57
  312. package/node_modules/axios/dist/axios.js +29 -22
  313. package/node_modules/axios/dist/axios.js.map +1 -1
  314. package/node_modules/axios/dist/axios.min.js +1 -1
  315. package/node_modules/axios/dist/axios.min.js.map +1 -1
  316. package/node_modules/axios/dist/browser/axios.cjs +17 -10
  317. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  318. package/node_modules/axios/dist/esm/axios.js +17 -10
  319. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  320. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  321. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  322. package/node_modules/axios/dist/node/axios.cjs +18 -11
  323. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  324. package/node_modules/axios/lib/adapters/fetch.js +4 -1
  325. package/node_modules/axios/lib/adapters/http.js +1 -1
  326. package/node_modules/axios/lib/core/AxiosError.js +5 -2
  327. package/node_modules/axios/lib/env/data.js +1 -1
  328. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +1 -1
  329. package/node_modules/axios/lib/platform/common/utils.js +5 -4
  330. package/node_modules/axios/package.json +1 -1
  331. package/node_modules/foreground-child/dist/commonjs/index.d.ts +4 -2
  332. package/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -1
  333. package/node_modules/foreground-child/dist/commonjs/index.js +4 -2
  334. package/node_modules/foreground-child/dist/commonjs/index.js.map +1 -1
  335. package/node_modules/foreground-child/dist/esm/index.d.ts +4 -2
  336. package/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -1
  337. package/node_modules/foreground-child/dist/esm/index.js +4 -2
  338. package/node_modules/foreground-child/dist/esm/index.js.map +1 -1
  339. package/node_modules/foreground-child/package.json +1 -1
  340. package/node_modules/juice/package.json +3 -3
  341. package/node_modules/uglify-js/bin/uglifyjs +6 -3
  342. package/node_modules/uglify-js/lib/compress.js +117 -75
  343. package/node_modules/uglify-js/lib/minify.js +4 -3
  344. package/node_modules/uglify-js/lib/output.js +16 -5
  345. package/node_modules/uglify-js/package.json +1 -1
  346. package/node_modules/uglify-js/tools/node.js +6 -1
  347. package/package.json +18 -18
  348. package/node_modules/undici-types/handlers.d.ts +0 -9
  349. package/node_modules/undici-types/interceptors.d.ts +0 -5
  350. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/README.md +0 -0
  351. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/agent.d.ts +0 -0
  352. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/api.d.ts +0 -0
  353. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/cache.d.ts +0 -0
  354. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/connector.d.ts +0 -0
  355. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/content-type.d.ts +0 -0
  356. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/cookies.d.ts +0 -0
  357. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/file.d.ts +0 -0
  358. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/filereader.d.ts +0 -0
  359. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/global-dispatcher.d.ts +0 -0
  360. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/global-origin.d.ts +0 -0
  361. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/header.d.ts +0 -0
  362. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/mock-agent.d.ts +0 -0
  363. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/mock-client.d.ts +0 -0
  364. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/mock-errors.d.ts +0 -0
  365. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/mock-pool.d.ts +0 -0
  366. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/patch.d.ts +0 -0
  367. /package/node_modules/{undici-types → @types/cacheable-request/node_modules/undici-types}/pool-stats.d.ts +0 -0
@@ -76,11 +76,10 @@
76
76
  *
77
77
  * If any tests fail, the process exit code is set to `1`.
78
78
  * @since v18.0.0, v16.17.0
79
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test.js)
79
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test.js)
80
80
  */
81
81
  declare module "node:test" {
82
82
  import { Readable } from "node:stream";
83
- import { AsyncResource } from "node:async_hooks";
84
83
  /**
85
84
  * **Note:** `shard` is used to horizontally parallelize test running across
86
85
  * machines or processes, ideal for large-scale executions across varied
@@ -98,7 +97,7 @@ declare module "node:test" {
98
97
  * .pipe(process.stdout);
99
98
  * ```
100
99
  * @since v18.9.0, v16.19.0
101
- * @param options Configuration options for running tests. The following properties are supported:
100
+ * @param options Configuration options for running tests.
102
101
  */
103
102
  function run(options?: RunOptions): TestsStream;
104
103
  /**
@@ -133,10 +132,11 @@ declare module "node:test" {
133
132
  * canceling tests because a running test might block the application thread and
134
133
  * thus prevent the scheduled cancellation.
135
134
  * @since v18.0.0, v16.17.0
136
- * @param [name='The name'] The name of the test, which is displayed when reporting test results.
137
- * @param options Configuration options for the test. The following properties are supported:
138
- * @param [fn='A no-op function'] The function under test. The first argument to this function is a {@link TestContext} object. If the test uses callbacks, the
139
- * callback function is passed as the second argument.
135
+ * @param name The name of the test, which is displayed when reporting test results.
136
+ * Defaults to the `name` property of `fn`, or `'<anonymous>'` if `fn` does not have a name.
137
+ * @param options Configuration options for the test.
138
+ * @param fn The function under test. The first argument to this function is a {@link TestContext} object.
139
+ * If the test uses callbacks, the callback function is passed as the second argument.
140
140
  * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite.
141
141
  */
142
142
  function test(name?: string, fn?: TestFn): Promise<void>;
@@ -144,13 +144,29 @@ declare module "node:test" {
144
144
  function test(options?: TestOptions, fn?: TestFn): Promise<void>;
145
145
  function test(fn?: TestFn): Promise<void>;
146
146
  namespace test {
147
- export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo };
147
+ export {
148
+ after,
149
+ afterEach,
150
+ before,
151
+ beforeEach,
152
+ describe,
153
+ it,
154
+ mock,
155
+ only,
156
+ run,
157
+ skip,
158
+ snapshot,
159
+ suite,
160
+ test,
161
+ todo,
162
+ };
148
163
  }
149
164
  /**
150
165
  * The `suite()` function is imported from the `node:test` module.
151
- * @param name The name of the suite, which is displayed when reporting test results. **Default:** The `name` property of `fn`, or `'<anonymous>'` if `fn` does not have a name.
152
- * @param options Optional configuration options for the suite. This supports the same options as `test([name][, options][, fn])`.
153
- * @param [fn='A no-op function'] The suite function declaring nested tests and suites. The first argument to this function is a `{@link SuiteContext}` object.
166
+ * @param name The name of the suite, which is displayed when reporting test results.
167
+ * Defaults to the `name` property of `fn`, or `'<anonymous>'` if `fn` does not have a name.
168
+ * @param options Configuration options for the suite. This supports the same options as {@link test}.
169
+ * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object.
154
170
  * @return Immediately fulfilled with `undefined`.
155
171
  * @since v20.13.0
156
172
  */
@@ -160,7 +176,7 @@ declare module "node:test" {
160
176
  function suite(fn?: SuiteFn): Promise<void>;
161
177
  namespace suite {
162
178
  /**
163
- * Shorthand for skipping a suite. This is the same as [`suite([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-v20.x/api/test.html#suitename-options-fn).
179
+ * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`.
164
180
  * @since v20.13.0
165
181
  */
166
182
  function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -168,7 +184,7 @@ declare module "node:test" {
168
184
  function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
169
185
  function skip(fn?: SuiteFn): Promise<void>;
170
186
  /**
171
- * Shorthand for marking a suite as `TODO`. This is the same as [`suite([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-v20.x/api/test.html#suitename-options-fn).
187
+ * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`.
172
188
  * @since v20.13.0
173
189
  */
174
190
  function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -176,7 +192,7 @@ declare module "node:test" {
176
192
  function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
177
193
  function todo(fn?: SuiteFn): Promise<void>;
178
194
  /**
179
- * Shorthand for marking a suite as `only`. This is the same as [`suite([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-v20.x/api/test.html#suitename-options-fn).
195
+ * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`.
180
196
  * @since v20.13.0
181
197
  */
182
198
  function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -185,7 +201,7 @@ declare module "node:test" {
185
201
  function only(fn?: SuiteFn): Promise<void>;
186
202
  }
187
203
  /**
188
- * Alias for `{@link suite}`.
204
+ * Alias for {@link suite}.
189
205
  *
190
206
  * The `describe()` function is imported from the `node:test` module.
191
207
  */
@@ -195,7 +211,7 @@ declare module "node:test" {
195
211
  function describe(fn?: SuiteFn): Promise<void>;
196
212
  namespace describe {
197
213
  /**
198
- * Shorthand for skipping a suite. This is the same as [`describe([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-v20.x/api/test.html#describename-options-fn).
214
+ * Shorthand for skipping a suite. This is the same as calling {@link describe} with `options.skip` set to `true`.
199
215
  * @since v18.15.0
200
216
  */
201
217
  function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -203,7 +219,7 @@ declare module "node:test" {
203
219
  function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
204
220
  function skip(fn?: SuiteFn): Promise<void>;
205
221
  /**
206
- * Shorthand for marking a suite as `TODO`. This is the same as [`describe([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-v20.x/api/test.html#describename-options-fn).
222
+ * Shorthand for marking a suite as `TODO`. This is the same as calling {@link describe} with `options.todo` set to `true`.
207
223
  * @since v18.15.0
208
224
  */
209
225
  function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -211,7 +227,7 @@ declare module "node:test" {
211
227
  function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
212
228
  function todo(fn?: SuiteFn): Promise<void>;
213
229
  /**
214
- * Shorthand for marking a suite as `only`. This is the same as [`describe([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-v20.x/api/test.html#describename-options-fn).
230
+ * Shorthand for marking a suite as `only`. This is the same as calling {@link describe} with `options.only` set to `true`.
215
231
  * @since v18.15.0
216
232
  */
217
233
  function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -220,7 +236,7 @@ declare module "node:test" {
220
236
  function only(fn?: SuiteFn): Promise<void>;
221
237
  }
222
238
  /**
223
- * Alias for `test()`.
239
+ * Alias for {@link test}.
224
240
  *
225
241
  * The `it()` function is imported from the `node:test` module.
226
242
  * @since v18.6.0, v16.17.0
@@ -231,21 +247,21 @@ declare module "node:test" {
231
247
  function it(fn?: TestFn): Promise<void>;
232
248
  namespace it {
233
249
  /**
234
- * Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
250
+ * Shorthand for skipping a test. This is the same as calling {@link it} with `options.skip` set to `true`.
235
251
  */
236
252
  function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
237
253
  function skip(name?: string, fn?: TestFn): Promise<void>;
238
254
  function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
239
255
  function skip(fn?: TestFn): Promise<void>;
240
256
  /**
241
- * Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
257
+ * Shorthand for marking a test as `TODO`. This is the same as calling {@link it} with `options.todo` set to `true`.
242
258
  */
243
259
  function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
244
260
  function todo(name?: string, fn?: TestFn): Promise<void>;
245
261
  function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
246
262
  function todo(fn?: TestFn): Promise<void>;
247
263
  /**
248
- * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
264
+ * Shorthand for marking a test as `only`. This is the same as calling {@link it} with `options.only` set to `true`.
249
265
  * @since v18.15.0
250
266
  */
251
267
  function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
@@ -254,7 +270,7 @@ declare module "node:test" {
254
270
  function only(fn?: TestFn): Promise<void>;
255
271
  }
256
272
  /**
257
- * Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
273
+ * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`.
258
274
  * @since v20.2.0
259
275
  */
260
276
  function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
@@ -262,7 +278,7 @@ declare module "node:test" {
262
278
  function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
263
279
  function skip(fn?: TestFn): Promise<void>;
264
280
  /**
265
- * Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
281
+ * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`.
266
282
  * @since v20.2.0
267
283
  */
268
284
  function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
@@ -270,7 +286,7 @@ declare module "node:test" {
270
286
  function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
271
287
  function todo(fn?: TestFn): Promise<void>;
272
288
  /**
273
- * Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
289
+ * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`.
274
290
  * @since v20.2.0
275
291
  */
276
292
  function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
@@ -278,18 +294,17 @@ declare module "node:test" {
278
294
  function only(options?: TestOptions, fn?: TestFn): Promise<void>;
279
295
  function only(fn?: TestFn): Promise<void>;
280
296
  /**
281
- * The type of a function under test. The first argument to this function is a
282
- * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
283
- * the second argument.
297
+ * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object.
298
+ * If the test uses callbacks, the callback function is passed as the second argument.
284
299
  */
285
300
  type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
286
301
  /**
287
- * The type of a function under Suite.
302
+ * The type of a suite test function. The argument to this function is a {@link SuiteContext} object.
288
303
  */
289
304
  type SuiteFn = (s: SuiteContext) => void | Promise<void>;
290
305
  interface TestShard {
291
306
  /**
292
- * A positive integer between 1 and `<total>` that specifies the index of the shard to run.
307
+ * A positive integer between 1 and `total` that specifies the index of the shard to run.
293
308
  */
294
309
  index: number;
295
310
  /**
@@ -305,8 +320,8 @@ declare module "node:test" {
305
320
  */
306
321
  concurrency?: number | boolean | undefined;
307
322
  /**
308
- * An array containing the list of files to run. **Default** matching files from
309
- * [test runner execution model](https://nodejs.org/docs/latest-v20.x/api/test.html#test-runner-execution-model).
323
+ * An array containing the list of files to run. If omitted, files are run according to the
324
+ * [test runner execution model](https://nodejs.org/docs/latest-v22.x/api/test.html#test-runner-execution-model).
310
325
  */
311
326
  files?: readonly string[] | undefined;
312
327
  /**
@@ -326,26 +341,33 @@ declare module "node:test" {
326
341
  /**
327
342
  * If truthy, the test context will only run tests that have the `only` option set
328
343
  */
329
- only?: boolean;
344
+ only?: boolean | undefined;
330
345
  /**
331
346
  * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run.
332
347
  * @default undefined
333
348
  */
334
- setup?: (root: Test) => void | Promise<void>;
349
+ setup?: ((reporter: TestsStream) => void | Promise<void>) | undefined;
335
350
  /**
336
351
  * Allows aborting an in-progress test execution.
337
352
  */
338
353
  signal?: AbortSignal | undefined;
339
354
  /**
340
- * A String, RegExp or a RegExp Array, that can be used to only run tests whose
355
+ * If provided, only run tests whose name matches the provided pattern.
356
+ * Strings are interpreted as JavaScript regular expressions.
357
+ * @default undefined
358
+ */
359
+ testNamePatterns?: string | RegExp | ReadonlyArray<string | RegExp> | undefined;
360
+ /**
361
+ * A String, RegExp or a RegExp Array, that can be used to exclude running tests whose
341
362
  * name matches the provided pattern. Test name patterns are interpreted as JavaScript
342
363
  * regular expressions. For each test that is executed, any corresponding test hooks,
343
364
  * such as `beforeEach()`, are also run.
344
365
  * @default undefined
366
+ * @since v22.1.0
345
367
  */
346
- testNamePatterns?: string | RegExp | string[] | RegExp[];
368
+ testSkipPatterns?: string | RegExp | ReadonlyArray<string | RegExp> | undefined;
347
369
  /**
348
- * A number of milliseconds the test execution will fail after.
370
+ * The number of milliseconds after which the test execution will fail.
349
371
  * If unspecified, subtests inherit this value from their parent.
350
372
  * @default Infinity
351
373
  */
@@ -361,18 +383,8 @@ declare module "node:test" {
361
383
  */
362
384
  shard?: TestShard | undefined;
363
385
  }
364
- class Test extends AsyncResource {
365
- concurrency: number;
366
- nesting: number;
367
- only: boolean;
368
- reporter: TestsStream;
369
- runOnlySubtests: boolean;
370
- testNumber: number;
371
- timeout: number | null;
372
- }
373
386
  /**
374
- * A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. `TestsStream` will emit events, in the
375
- * order of the tests definition
387
+ * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.
376
388
  *
377
389
  * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute.
378
390
  * @since v18.9.0, v16.19.0
@@ -389,6 +401,7 @@ declare module "node:test" {
389
401
  addListener(event: "test:start", listener: (data: TestStart) => void): this;
390
402
  addListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
391
403
  addListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
404
+ addListener(event: "test:watch:drained", listener: () => void): this;
392
405
  addListener(event: string, listener: (...args: any[]) => void): this;
393
406
  emit(event: "test:coverage", data: TestCoverage): boolean;
394
407
  emit(event: "test:complete", data: TestComplete): boolean;
@@ -401,6 +414,7 @@ declare module "node:test" {
401
414
  emit(event: "test:start", data: TestStart): boolean;
402
415
  emit(event: "test:stderr", data: TestStderr): boolean;
403
416
  emit(event: "test:stdout", data: TestStdout): boolean;
417
+ emit(event: "test:watch:drained"): boolean;
404
418
  emit(event: string | symbol, ...args: any[]): boolean;
405
419
  on(event: "test:coverage", listener: (data: TestCoverage) => void): this;
406
420
  on(event: "test:complete", listener: (data: TestComplete) => void): this;
@@ -413,6 +427,7 @@ declare module "node:test" {
413
427
  on(event: "test:start", listener: (data: TestStart) => void): this;
414
428
  on(event: "test:stderr", listener: (data: TestStderr) => void): this;
415
429
  on(event: "test:stdout", listener: (data: TestStdout) => void): this;
430
+ on(event: "test:watch:drained", listener: () => void): this;
416
431
  on(event: string, listener: (...args: any[]) => void): this;
417
432
  once(event: "test:coverage", listener: (data: TestCoverage) => void): this;
418
433
  once(event: "test:complete", listener: (data: TestComplete) => void): this;
@@ -425,6 +440,7 @@ declare module "node:test" {
425
440
  once(event: "test:start", listener: (data: TestStart) => void): this;
426
441
  once(event: "test:stderr", listener: (data: TestStderr) => void): this;
427
442
  once(event: "test:stdout", listener: (data: TestStdout) => void): this;
443
+ once(event: "test:watch:drained", listener: () => void): this;
428
444
  once(event: string, listener: (...args: any[]) => void): this;
429
445
  prependListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
430
446
  prependListener(event: "test:complete", listener: (data: TestComplete) => void): this;
@@ -437,6 +453,7 @@ declare module "node:test" {
437
453
  prependListener(event: "test:start", listener: (data: TestStart) => void): this;
438
454
  prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
439
455
  prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
456
+ prependListener(event: "test:watch:drained", listener: () => void): this;
440
457
  prependListener(event: string, listener: (...args: any[]) => void): this;
441
458
  prependOnceListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
442
459
  prependOnceListener(event: "test:complete", listener: (data: TestComplete) => void): this;
@@ -449,6 +466,7 @@ declare module "node:test" {
449
466
  prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this;
450
467
  prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
451
468
  prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
469
+ prependOnceListener(event: "test:watch:drained", listener: () => void): this;
452
470
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
453
471
  }
454
472
  /**
@@ -458,34 +476,36 @@ declare module "node:test" {
458
476
  * @since v18.0.0, v16.17.0
459
477
  */
460
478
  class TestContext {
479
+ /**
480
+ * An object containing assertion methods bound to the test context.
481
+ * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans.
482
+ * @since v22.2.0
483
+ */
484
+ readonly assert: TestContextAssert;
461
485
  /**
462
486
  * This function is used to create a hook running before subtest of the current test.
463
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
464
- * the second argument. **Default:** A no-op function.
487
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
465
488
  * @param options Configuration options for the hook.
466
489
  * @since v20.1.0
467
490
  */
468
491
  before: typeof before;
469
492
  /**
470
493
  * This function is used to create a hook running before each subtest of the current test.
471
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
472
- * the second argument. **Default:** A no-op function.
494
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
473
495
  * @param options Configuration options for the hook.
474
496
  * @since v18.8.0
475
497
  */
476
498
  beforeEach: typeof beforeEach;
477
499
  /**
478
500
  * This function is used to create a hook that runs after the current test finishes.
479
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as
480
- * the second argument. Default: A no-op function.
501
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
481
502
  * @param options Configuration options for the hook.
482
503
  * @since v18.13.0
483
504
  */
484
505
  after: typeof after;
485
506
  /**
486
507
  * This function is used to create a hook running after each subtest of the current test.
487
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
488
- * the second argument. **Default:** A no-op function.
508
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
489
509
  * @param options Configuration options for the hook.
490
510
  * @since v18.8.0
491
511
  */
@@ -504,11 +524,52 @@ declare module "node:test" {
504
524
  * @param message Message to be reported.
505
525
  */
506
526
  diagnostic(message: string): void;
527
+ /**
528
+ * The name of the test and each of its ancestors, separated by `>`.
529
+ * @since v22.3.0
530
+ */
531
+ readonly fullName: string;
507
532
  /**
508
533
  * The name of the test.
509
534
  * @since v18.8.0, v16.18.0
510
535
  */
511
536
  readonly name: string;
537
+ /**
538
+ * Used to set the number of assertions and subtests that are expected to run within the test.
539
+ * If the number of assertions and subtests that run does not match the expected count, the test will fail.
540
+ *
541
+ * To make sure assertions are tracked, the assert functions on `context.assert` must be used,
542
+ * instead of importing from the `node:assert` module.
543
+ * ```js
544
+ * test('top level test', (t) => {
545
+ * t.plan(2);
546
+ * t.assert.ok('some relevant assertion here');
547
+ * t.test('subtest', () => {});
548
+ * });
549
+ * ```
550
+ *
551
+ * When working with asynchronous code, the `plan` function can be used to ensure that the correct number of assertions are run:
552
+ * ```js
553
+ * test('planning with streams', (t, done) => {
554
+ * function* generate() {
555
+ * yield 'a';
556
+ * yield 'b';
557
+ * yield 'c';
558
+ * }
559
+ * const expected = ['a', 'b', 'c'];
560
+ * t.plan(expected.length);
561
+ * const stream = Readable.from(generate());
562
+ * stream.on('data', (chunk) => {
563
+ * t.assert.strictEqual(chunk, expected.shift());
564
+ * });
565
+ * stream.on('end', () => {
566
+ * done();
567
+ * });
568
+ * });
569
+ * ```
570
+ * @since v22.2.0
571
+ */
572
+ plan(count: number): void;
512
573
  /**
513
574
  * If `shouldRunOnlyTests` is truthy, the test context will only run tests that
514
575
  * have the `only` option set. Otherwise, all tests are run. If Node.js was not
@@ -573,11 +634,10 @@ declare module "node:test" {
573
634
  * the same fashion as the top level {@link test} function.
574
635
  * @since v18.0.0
575
636
  * @param name The name of the test, which is displayed when reporting test results.
576
- * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
577
- * @param options Configuration options for the test
578
- * @param fn The function under test. This first argument to this function is a
579
- * {@link TestContext} object. If the test uses callbacks, the callback function is
580
- * passed as the second argument. **Default:** A no-op function.
637
+ * Defaults to the `name` property of `fn`, or `'<anonymous>'` if `fn` does not have a name.
638
+ * @param options Configuration options for the test.
639
+ * @param fn The function under test. This first argument to this function is a {@link TestContext} object.
640
+ * If the test uses callbacks, the callback function is passed as the second argument.
581
641
  * @returns A {@link Promise} resolved with `undefined` once the test completes.
582
642
  */
583
643
  test: typeof test;
@@ -586,6 +646,106 @@ declare module "node:test" {
586
646
  */
587
647
  readonly mock: MockTracker;
588
648
  }
649
+ interface TestContextAssert {
650
+ /**
651
+ * Identical to the `deepEqual` function from the `node:assert` module, but bound to the test context.
652
+ */
653
+ deepEqual: typeof import("node:assert").deepEqual;
654
+ /**
655
+ * Identical to the `deepStrictEqual` function from the `node:assert` module, but bound to the test context.
656
+ */
657
+ deepStrictEqual: typeof import("node:assert").deepStrictEqual;
658
+ /**
659
+ * Identical to the `doesNotMatch` function from the `node:assert` module, but bound to the test context.
660
+ */
661
+ doesNotMatch: typeof import("node:assert").doesNotMatch;
662
+ /**
663
+ * Identical to the `doesNotReject` function from the `node:assert` module, but bound to the test context.
664
+ */
665
+ doesNotReject: typeof import("node:assert").doesNotReject;
666
+ /**
667
+ * Identical to the `doesNotThrow` function from the `node:assert` module, but bound to the test context.
668
+ */
669
+ doesNotThrow: typeof import("node:assert").doesNotThrow;
670
+ /**
671
+ * Identical to the `equal` function from the `node:assert` module, but bound to the test context.
672
+ */
673
+ equal: typeof import("node:assert").equal;
674
+ /**
675
+ * Identical to the `fail` function from the `node:assert` module, but bound to the test context.
676
+ */
677
+ fail: typeof import("node:assert").fail;
678
+ /**
679
+ * Identical to the `ifError` function from the `node:assert` module, but bound to the test context.
680
+ */
681
+ ifError: typeof import("node:assert").ifError;
682
+ /**
683
+ * Identical to the `match` function from the `node:assert` module, but bound to the test context.
684
+ */
685
+ match: typeof import("node:assert").match;
686
+ /**
687
+ * Identical to the `notDeepEqual` function from the `node:assert` module, but bound to the test context.
688
+ */
689
+ notDeepEqual: typeof import("node:assert").notDeepEqual;
690
+ /**
691
+ * Identical to the `notDeepStrictEqual` function from the `node:assert` module, but bound to the test context.
692
+ */
693
+ notDeepStrictEqual: typeof import("node:assert").notDeepStrictEqual;
694
+ /**
695
+ * Identical to the `notEqual` function from the `node:assert` module, but bound to the test context.
696
+ */
697
+ notEqual: typeof import("node:assert").notEqual;
698
+ /**
699
+ * Identical to the `notStrictEqual` function from the `node:assert` module, but bound to the test context.
700
+ */
701
+ notStrictEqual: typeof import("node:assert").notStrictEqual;
702
+ /**
703
+ * Identical to the `ok` function from the `node:assert` module, but bound to the test context.
704
+ */
705
+ ok: typeof import("node:assert").ok;
706
+ /**
707
+ * Identical to the `rejects` function from the `node:assert` module, but bound to the test context.
708
+ */
709
+ rejects: typeof import("node:assert").rejects;
710
+ /**
711
+ * Identical to the `strictEqual` function from the `node:assert` module, but bound to the test context.
712
+ */
713
+ strictEqual: typeof import("node:assert").strictEqual;
714
+ /**
715
+ * Identical to the `throws` function from the `node:assert` module, but bound to the test context.
716
+ */
717
+ throws: typeof import("node:assert").throws;
718
+ /**
719
+ * This function implements assertions for snapshot testing.
720
+ * ```js
721
+ * test('snapshot test with default serialization', (t) => {
722
+ * t.assert.snapshot({ value1: 1, value2: 2 });
723
+ * });
724
+ *
725
+ * test('snapshot test with custom serialization', (t) => {
726
+ * t.assert.snapshot({ value3: 3, value4: 4 }, {
727
+ * serializers: [(value) => JSON.stringify(value)]
728
+ * });
729
+ * });
730
+ * ```
731
+ *
732
+ * Only available through the [--experimental-test-snapshots](https://nodejs.org/api/cli.html#--experimental-test-snapshots) flag.
733
+ * @since v22.3.0
734
+ * @experimental
735
+ */
736
+ snapshot(value: any, options?: AssertSnapshotOptions): void;
737
+ }
738
+ interface AssertSnapshotOptions {
739
+ /**
740
+ * An array of synchronous functions used to serialize `value` into a string.
741
+ * `value` is passed as the only argument to the first serializer function.
742
+ * The return value of each serializer is passed as input to the next serializer.
743
+ * Once all serializers have run, the resulting value is coerced to a string.
744
+ *
745
+ * If no serializers are provided, the test runner's default serializers are used.
746
+ */
747
+ serializers?: ReadonlyArray<(value: any) => any> | undefined;
748
+ }
589
749
 
590
750
  /**
591
751
  * An instance of `SuiteContext` is passed to each suite function in order to
@@ -645,6 +805,14 @@ declare module "node:test" {
645
805
  * @default false
646
806
  */
647
807
  todo?: boolean | string | undefined;
808
+ /**
809
+ * The number of assertions and subtests expected to be run in the test.
810
+ * If the number of assertions run in the test does not match the number
811
+ * specified in the plan, the test will fail.
812
+ * @default undefined
813
+ * @since v22.2.0
814
+ */
815
+ plan?: number | undefined;
648
816
  }
649
817
  /**
650
818
  * This function creates a hook that runs before executing a suite.
@@ -658,8 +826,8 @@ declare module "node:test" {
658
826
  * });
659
827
  * ```
660
828
  * @since v18.8.0, v16.18.0
661
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
662
- * @param options Configuration options for the hook. The following properties are supported:
829
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
830
+ * @param options Configuration options for the hook.
663
831
  */
664
832
  function before(fn?: HookFn, options?: HookOptions): void;
665
833
  /**
@@ -674,8 +842,8 @@ declare module "node:test" {
674
842
  * });
675
843
  * ```
676
844
  * @since v18.8.0, v16.18.0
677
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
678
- * @param options Configuration options for the hook. The following properties are supported:
845
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
846
+ * @param options Configuration options for the hook.
679
847
  */
680
848
  function after(fn?: HookFn, options?: HookOptions): void;
681
849
  /**
@@ -690,8 +858,8 @@ declare module "node:test" {
690
858
  * });
691
859
  * ```
692
860
  * @since v18.8.0, v16.18.0
693
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
694
- * @param options Configuration options for the hook. The following properties are supported:
861
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
862
+ * @param options Configuration options for the hook.
695
863
  */
696
864
  function beforeEach(fn?: HookFn, options?: HookOptions): void;
697
865
  /**
@@ -707,8 +875,8 @@ declare module "node:test" {
707
875
  * });
708
876
  * ```
709
877
  * @since v18.8.0, v16.18.0
710
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
711
- * @param options Configuration options for the hook. The following properties are supported:
878
+ * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
879
+ * @param options Configuration options for the hook.
712
880
  */
713
881
  function afterEach(fn?: HookFn, options?: HookOptions): void;
714
882
  /**
@@ -761,6 +929,30 @@ declare module "node:test" {
761
929
  type FunctionPropertyNames<T> = {
762
930
  [K in keyof T]: T[K] extends Function ? K : never;
763
931
  }[keyof T];
932
+ interface MockModuleOptions {
933
+ /**
934
+ * If false, each call to `require()` or `import()` generates a new mock module.
935
+ * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache.
936
+ * @default false
937
+ */
938
+ cache?: boolean | undefined;
939
+ /**
940
+ * The value to use as the mocked module's default export.
941
+ *
942
+ * If this value is not provided, ESM mocks do not include a default export.
943
+ * If the mock is a CommonJS or builtin module, this setting is used as the value of `module.exports`.
944
+ * If this value is not provided, CJS and builtin mocks use an empty object as the value of `module.exports`.
945
+ */
946
+ defaultExport?: any;
947
+ /**
948
+ * An object whose keys and values are used to create the named exports of the mock module.
949
+ *
950
+ * If the mock is a CommonJS or builtin module, these values are copied onto `module.exports`.
951
+ * Therefore, if a mock is created with both named exports and a non-object default export,
952
+ * the mock will throw an exception when used as a CJS or builtin module.
953
+ */
954
+ namedExports?: object | undefined;
955
+ }
764
956
  /**
765
957
  * The `MockTracker` class is used to manage mocking functionality. The test runner
766
958
  * module provides a top level `mock` export which is a `MockTracker` instance.
@@ -798,10 +990,10 @@ declare module "node:test" {
798
990
  * });
799
991
  * ```
800
992
  * @since v19.1.0, v18.13.0
801
- * @param [original='A no-op function'] An optional function to create a mock on.
993
+ * @param original An optional function to create a mock on.
802
994
  * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and
803
995
  * then restore the behavior of `original`.
804
- * @param options Optional configuration options for the mock function. The following properties are supported:
996
+ * @param options Optional configuration options for the mock function.
805
997
  * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
806
998
  * behavior of the mocked function.
807
999
  */
@@ -843,7 +1035,7 @@ declare module "node:test" {
843
1035
  * @param object The object whose method is being mocked.
844
1036
  * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
845
1037
  * @param implementation An optional function used as the mock implementation for `object[methodName]`.
846
- * @param options Optional configuration options for the mock method. The following properties are supported:
1038
+ * @param options Optional configuration options for the mock method.
847
1039
  * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
848
1040
  * behavior of the mocked method.
849
1041
  */
@@ -923,6 +1115,19 @@ declare module "node:test" {
923
1115
  implementation?: Implementation,
924
1116
  options?: MockFunctionOptions,
925
1117
  ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
1118
+
1119
+ /**
1120
+ * This function is used to mock the exports of ECMAScript modules, CommonJS modules, and Node.js builtin modules.
1121
+ * Any references to the original module prior to mocking are not impacted.
1122
+ *
1123
+ * Only available through the [--experimental-test-module-mocks](https://nodejs.org/api/cli.html#--experimental-test-module-mocks) flag.
1124
+ * @since v22.3.0
1125
+ * @experimental
1126
+ * @param specifier A string identifying the module to mock.
1127
+ * @param options Optional configuration options for the mock module.
1128
+ */
1129
+ module(specifier: string, options?: MockModuleOptions): MockModuleContext;
1130
+
926
1131
  /**
927
1132
  * This function restores the default behavior of all mocks that were previously
928
1133
  * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be
@@ -941,17 +1146,7 @@ declare module "node:test" {
941
1146
  * @since v19.1.0, v18.13.0
942
1147
  */
943
1148
  restoreAll(): void;
944
- /**
945
- * This function is used to mock the exports of ECMAScript modules,
946
- * CommonJS modules, and Node.js builtin modules. Any references to
947
- * the original module prior to mocking are not impacted
948
- * @since v22.3.0
949
- */
950
- module(speficier: string, options?: {
951
- cache?: boolean;
952
- defaultExport?: any;
953
- namedExports?: object;
954
- }): { restore: () => void };
1149
+
955
1150
  timers: MockTimers;
956
1151
  }
957
1152
  const mock: MockTracker;
@@ -1092,11 +1287,22 @@ declare module "node:test" {
1092
1287
  */
1093
1288
  restore(): void;
1094
1289
  }
1095
- type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date";
1290
+ /**
1291
+ * @since v22.3.0
1292
+ * @experimental
1293
+ */
1294
+ class MockModuleContext {
1295
+ /**
1296
+ * Resets the implementation of the mock module.
1297
+ * @since v22.3.0
1298
+ */
1299
+ restore(): void;
1300
+ }
1096
1301
 
1302
+ type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date";
1097
1303
  interface MockTimersOptions {
1098
1304
  apis: Timer[];
1099
- now?: number | Date;
1305
+ now?: number | Date | undefined;
1100
1306
  }
1101
1307
  /**
1102
1308
  * Mocking timers is a technique commonly used in software testing to simulate and
@@ -1314,6 +1520,35 @@ declare module "node:test" {
1314
1520
  */
1315
1521
  [Symbol.dispose](): void;
1316
1522
  }
1523
+ /**
1524
+ * Only available through the [--experimental-test-snapshots](https://nodejs.org/api/cli.html#--experimental-test-snapshots) flag.
1525
+ * @since v22.3.0
1526
+ * @experimental
1527
+ */
1528
+ namespace snapshot {
1529
+ /**
1530
+ * This function is used to customize the default serialization mechanism used by the test runner.
1531
+ *
1532
+ * By default, the test runner performs serialization by calling `JSON.stringify(value, null, 2)` on the provided value.
1533
+ * `JSON.stringify()` does have limitations regarding circular structures and supported data types.
1534
+ * If a more robust serialization mechanism is required, this function should be used to specify a list of custom serializers.
1535
+ *
1536
+ * Serializers are called in order, with the output of the previous serializer passed as input to the next.
1537
+ * The final result must be a string value.
1538
+ * @since v22.3.0
1539
+ * @param serializers An array of synchronous functions used as the default serializers for snapshot tests.
1540
+ */
1541
+ function setDefaultSnapshotSerializers(serializers: ReadonlyArray<(value: any) => any>): void;
1542
+ /**
1543
+ * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing.
1544
+ * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended.
1545
+ * @since v22.3.0
1546
+ * @param fn A function which returns a string specifying the location of the snapshot file.
1547
+ * The function receives the path of the test file as its only argument.
1548
+ * If `process.argv[1]` is not associated with a file (for example in the REPL), the input is undefined.
1549
+ */
1550
+ function setResolveSnapshotPath(fn: (path: string | undefined) => string): void;
1551
+ }
1317
1552
  export {
1318
1553
  after,
1319
1554
  afterEach,
@@ -1326,6 +1561,8 @@ declare module "node:test" {
1326
1561
  only,
1327
1562
  run,
1328
1563
  skip,
1564
+ snapshot,
1565
+ suite,
1329
1566
  SuiteContext,
1330
1567
  test,
1331
1568
  test as default,
@@ -1334,6 +1571,9 @@ declare module "node:test" {
1334
1571
  };
1335
1572
  }
1336
1573
 
1574
+ interface TestError extends Error {
1575
+ cause: Error;
1576
+ }
1337
1577
  interface TestLocationInfo {
1338
1578
  /**
1339
1579
  * The column number where the test is defined, or
@@ -1365,7 +1605,7 @@ interface TestCoverage {
1365
1605
  */
1366
1606
  summary: {
1367
1607
  /**
1368
- * An array of coverage reports for individual files. Each report is an object with the following schema:
1608
+ * An array of coverage reports for individual files.
1369
1609
  */
1370
1610
  files: Array<{
1371
1611
  /**
@@ -1425,6 +1665,19 @@ interface TestCoverage {
1425
1665
  */
1426
1666
  count: number;
1427
1667
  }>;
1668
+ /**
1669
+ * An array of branches representing branch coverage.
1670
+ */
1671
+ branches: Array<{
1672
+ /**
1673
+ * The line number where the branch is defined.
1674
+ */
1675
+ line: number;
1676
+ /**
1677
+ * The number of times the branch was taken.
1678
+ */
1679
+ count: number;
1680
+ }>;
1428
1681
  /**
1429
1682
  * An array of lines representing line numbers and the number of times they were covered.
1430
1683
  */
@@ -1508,7 +1761,7 @@ interface TestComplete extends TestLocationInfo {
1508
1761
  /**
1509
1762
  * An error wrapping the error thrown by the test if it did not pass.
1510
1763
  */
1511
- error: Error;
1764
+ error?: TestError;
1512
1765
  /**
1513
1766
  * The type of the test, used to denote whether this is a suite.
1514
1767
  */
@@ -1565,9 +1818,9 @@ interface TestFail extends TestLocationInfo {
1565
1818
  */
1566
1819
  duration_ms: number;
1567
1820
  /**
1568
- * An error wrapping the error thrown by the test if it did not pass.
1821
+ * An error wrapping the error thrown by the test.
1569
1822
  */
1570
- error: Error;
1823
+ error: TestError;
1571
1824
  /**
1572
1825
  * The type of the test, used to denote whether this is a suite.
1573
1826
  * @since v20.0.0, v19.9.0, v18.17.0
@@ -1651,13 +1904,21 @@ interface TestStart extends TestLocationInfo {
1651
1904
  */
1652
1905
  nesting: number;
1653
1906
  }
1654
- interface TestStderr extends TestLocationInfo {
1907
+ interface TestStderr {
1908
+ /**
1909
+ * The path of the test file.
1910
+ */
1911
+ file: string;
1655
1912
  /**
1656
1913
  * The message written to `stderr`.
1657
1914
  */
1658
1915
  message: string;
1659
1916
  }
1660
- interface TestStdout extends TestLocationInfo {
1917
+ interface TestStdout {
1918
+ /**
1919
+ * The path of the test file.
1920
+ */
1921
+ file: string;
1661
1922
  /**
1662
1923
  * The message written to `stdout`.
1663
1924
  */
@@ -1679,7 +1940,7 @@ interface TestStdout extends TestLocationInfo {
1679
1940
  * import test from 'test/reporters';
1680
1941
  * ```
1681
1942
  * @since v19.9.0
1682
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test/reporters.js)
1943
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test/reporters.js)
1683
1944
  */
1684
1945
  declare module "node:test/reporters" {
1685
1946
  import { Transform, TransformOptions } from "node:stream";
@@ -1696,34 +1957,50 @@ declare module "node:test/reporters" {
1696
1957
  | { type: "test:start"; data: TestStart }
1697
1958
  | { type: "test:stderr"; data: TestStderr }
1698
1959
  | { type: "test:stdout"; data: TestStdout }
1699
- | { type: "test:watch:drained" };
1960
+ | { type: "test:watch:drained"; data: undefined };
1700
1961
  type TestEventGenerator = AsyncGenerator<TestEvent, void>;
1701
1962
 
1963
+ interface ReporterConstructorWrapper<T extends new(...args: any[]) => Transform> {
1964
+ new(...args: ConstructorParameters<T>): InstanceType<T>;
1965
+ (...args: ConstructorParameters<T>): InstanceType<T>;
1966
+ }
1967
+
1702
1968
  /**
1703
1969
  * The `dot` reporter outputs the test results in a compact format,
1704
1970
  * where each passing test is represented by a `.`,
1705
1971
  * and each failing test is represented by a `X`.
1972
+ * @since v20.0.0
1706
1973
  */
1707
1974
  function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>;
1708
1975
  /**
1709
1976
  * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
1977
+ * @since v20.0.0
1710
1978
  */
1711
1979
  function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
1980
+ class SpecReporter extends Transform {
1981
+ constructor();
1982
+ }
1712
1983
  /**
1713
1984
  * The `spec` reporter outputs the test results in a human-readable format.
1985
+ * @since v20.0.0
1714
1986
  */
1715
- class Spec extends Transform {
1716
- constructor();
1717
- }
1987
+ const spec: ReporterConstructorWrapper<typeof SpecReporter>;
1718
1988
  /**
1719
1989
  * The `junit` reporter outputs test results in a jUnit XML format.
1990
+ * @since v21.0.0
1720
1991
  */
1721
1992
  function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
1993
+ class LcovReporter extends Transform {
1994
+ constructor(opts?: Omit<TransformOptions, "writableObjectMode">);
1995
+ }
1722
1996
  /**
1723
- * The `lcov` reporter outputs test coverage when used with the [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--experimental-test-coverage) flag.
1997
+ * The `lcov` reporter outputs test coverage when used with the
1998
+ * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
1999
+ * @since v22.0.0
1724
2000
  */
1725
- class Lcov extends Transform {
1726
- constructor(opts?: TransformOptions);
1727
- }
1728
- export { dot, junit, Lcov as lcov, Spec as spec, tap, TestEvent };
2001
+ // TODO: change the export to a wrapper function once node@0db38f0 is merged (breaking change)
2002
+ // const lcov: ReporterConstructorWrapper<typeof LcovReporter>;
2003
+ const lcov: LcovReporter;
2004
+
2005
+ export { dot, junit, lcov, spec, tap, TestEvent };
1729
2006
  }