node-red-contrib-tak-registration 0.11.5 → 0.12.0

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 (476) hide show
  1. package/node_modules/@types/node/README.md +2 -2
  2. package/node_modules/@types/node/assert.d.ts +88 -44
  3. package/node_modules/@types/node/async_hooks.d.ts +17 -15
  4. package/node_modules/@types/node/buffer.d.ts +37 -36
  5. package/node_modules/@types/node/child_process.d.ts +38 -34
  6. package/node_modules/@types/node/cluster.d.ts +165 -19
  7. package/node_modules/@types/node/console.d.ts +64 -27
  8. package/node_modules/@types/node/crypto.d.ts +139 -72
  9. package/node_modules/@types/node/dgram.d.ts +24 -14
  10. package/node_modules/@types/node/diagnostics_channel.d.ts +365 -2
  11. package/node_modules/@types/node/dns/promises.d.ts +79 -28
  12. package/node_modules/@types/node/dns.d.ts +124 -69
  13. package/node_modules/@types/node/dom-events.d.ts +2 -0
  14. package/node_modules/@types/node/domain.d.ts +4 -4
  15. package/node_modules/@types/node/events.d.ts +115 -63
  16. package/node_modules/@types/node/fs/promises.d.ts +18 -12
  17. package/node_modules/@types/node/fs.d.ts +72 -46
  18. package/node_modules/@types/node/globals.d.ts +27 -0
  19. package/node_modules/@types/node/http.d.ts +75 -55
  20. package/node_modules/@types/node/http2.d.ts +83 -47
  21. package/node_modules/@types/node/https.d.ts +3 -3
  22. package/node_modules/@types/node/index.d.ts +1 -0
  23. package/node_modules/@types/node/inspector.d.ts +5 -6
  24. package/node_modules/@types/node/module.d.ts +14 -0
  25. package/node_modules/@types/node/net.d.ts +66 -16
  26. package/node_modules/@types/node/os.d.ts +29 -12
  27. package/node_modules/@types/node/package.json +3 -16
  28. package/node_modules/@types/node/path.d.ts +1 -1
  29. package/node_modules/@types/node/perf_hooks.d.ts +320 -54
  30. package/node_modules/@types/node/process.d.ts +265 -50
  31. package/node_modules/@types/node/punycode.d.ts +4 -4
  32. package/node_modules/@types/node/querystring.d.ts +21 -9
  33. package/node_modules/@types/node/readline/promises.d.ts +9 -9
  34. package/node_modules/@types/node/readline.d.ts +21 -20
  35. package/node_modules/@types/node/repl.d.ts +10 -10
  36. package/node_modules/@types/node/sea.d.ts +153 -0
  37. package/node_modules/@types/node/stream/web.d.ts +18 -1
  38. package/node_modules/@types/node/stream.d.ts +62 -56
  39. package/node_modules/@types/node/string_decoder.d.ts +5 -5
  40. package/node_modules/@types/node/test.d.ts +445 -109
  41. package/node_modules/@types/node/timers/promises.d.ts +10 -6
  42. package/node_modules/@types/node/timers.d.ts +5 -5
  43. package/node_modules/@types/node/tls.d.ts +40 -33
  44. package/node_modules/@types/node/trace_events.d.ts +40 -25
  45. package/node_modules/@types/node/tty.d.ts +8 -8
  46. package/node_modules/@types/node/url.d.ts +73 -48
  47. package/node_modules/@types/node/util.d.ts +131 -22
  48. package/node_modules/@types/node/v8.d.ts +183 -10
  49. package/node_modules/@types/node/vm.d.ts +43 -22
  50. package/node_modules/@types/node/wasi.d.ts +38 -15
  51. package/node_modules/@types/node/worker_threads.d.ts +19 -16
  52. package/node_modules/@types/node/zlib.d.ts +16 -3
  53. package/node_modules/adm-zip/README.md +2 -1
  54. package/node_modules/adm-zip/adm-zip.js +46 -45
  55. package/node_modules/adm-zip/headers/entryHeader.js +14 -12
  56. package/node_modules/adm-zip/headers/mainHeader.js +1 -1
  57. package/node_modules/adm-zip/methods/inflater.js +6 -3
  58. package/node_modules/adm-zip/methods/zipcrypto.js +6 -2
  59. package/node_modules/adm-zip/package.json +2 -2
  60. package/node_modules/adm-zip/util/errors.js +1 -0
  61. package/node_modules/adm-zip/zipEntry.js +64 -43
  62. package/node_modules/adm-zip/zipFile.js +35 -35
  63. package/node_modules/axios/CHANGELOG.md +873 -711
  64. package/node_modules/axios/README.md +98 -8
  65. package/node_modules/axios/dist/axios.js +1461 -350
  66. package/node_modules/axios/dist/axios.js.map +1 -1
  67. package/node_modules/axios/dist/axios.min.js +1 -1
  68. package/node_modules/axios/dist/axios.min.js.map +1 -1
  69. package/node_modules/axios/dist/browser/axios.cjs +710 -306
  70. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  71. package/node_modules/axios/dist/esm/axios.js +710 -306
  72. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  73. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  74. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  75. package/node_modules/axios/dist/node/axios.cjs +628 -250
  76. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  77. package/node_modules/axios/index.d.cts +6 -3
  78. package/node_modules/axios/index.d.ts +6 -3
  79. package/node_modules/axios/lib/adapters/adapters.js +3 -1
  80. package/node_modules/axios/lib/adapters/fetch.js +227 -0
  81. package/node_modules/axios/lib/adapters/http.js +7 -3
  82. package/node_modules/axios/lib/adapters/xhr.js +31 -101
  83. package/node_modules/axios/lib/core/Axios.js +28 -1
  84. package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
  85. package/node_modules/axios/lib/core/mergeConfig.js +1 -1
  86. package/node_modules/axios/lib/defaults/index.js +7 -5
  87. package/node_modules/axios/lib/env/data.js +1 -1
  88. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +9 -8
  89. package/node_modules/axios/lib/helpers/combineURLs.js +1 -1
  90. package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
  91. package/node_modules/axios/lib/helpers/formDataToJSON.js +3 -0
  92. package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
  93. package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  94. package/node_modules/axios/lib/helpers/throttle.js +5 -3
  95. package/node_modules/axios/lib/helpers/trackStream.js +55 -0
  96. package/node_modules/axios/lib/platform/common/utils.js +4 -1
  97. package/node_modules/axios/lib/utils.js +7 -2
  98. package/node_modules/axios/package.json +27 -26
  99. package/node_modules/call-bind/CHANGELOG.md +16 -0
  100. package/node_modules/call-bind/index.js +2 -11
  101. package/node_modules/call-bind/package.json +11 -6
  102. package/node_modules/define-data-property/CHANGELOG.md +29 -0
  103. package/node_modules/define-data-property/index.d.ts +12 -3
  104. package/node_modules/define-data-property/index.js +4 -16
  105. package/node_modules/define-data-property/package.json +26 -33
  106. package/node_modules/define-data-property/test/index.js +10 -10
  107. package/node_modules/es-define-property/.eslintrc +13 -0
  108. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  109. package/node_modules/es-define-property/.nycrc +9 -0
  110. package/node_modules/es-define-property/CHANGELOG.md +15 -0
  111. package/node_modules/es-define-property/LICENSE +21 -0
  112. package/node_modules/es-define-property/README.md +49 -0
  113. package/node_modules/es-define-property/index.d.ts +3 -0
  114. package/node_modules/es-define-property/index.js +16 -0
  115. package/node_modules/es-define-property/package.json +81 -0
  116. package/node_modules/es-define-property/test/index.js +55 -0
  117. package/node_modules/es-define-property/tsconfig.json +50 -0
  118. package/node_modules/es-errors/.eslintrc +5 -0
  119. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  120. package/node_modules/es-errors/CHANGELOG.md +40 -0
  121. package/node_modules/es-errors/LICENSE +21 -0
  122. package/node_modules/es-errors/README.md +55 -0
  123. package/node_modules/es-errors/eval.d.ts +3 -0
  124. package/node_modules/es-errors/eval.js +4 -0
  125. package/node_modules/es-errors/index.d.ts +3 -0
  126. package/node_modules/es-errors/index.js +4 -0
  127. package/node_modules/es-errors/package.json +80 -0
  128. package/node_modules/es-errors/range.d.ts +3 -0
  129. package/node_modules/es-errors/range.js +4 -0
  130. package/node_modules/es-errors/ref.d.ts +3 -0
  131. package/node_modules/es-errors/ref.js +4 -0
  132. package/node_modules/es-errors/syntax.d.ts +3 -0
  133. package/node_modules/es-errors/syntax.js +4 -0
  134. package/node_modules/es-errors/test/index.js +19 -0
  135. package/node_modules/es-errors/tsconfig.json +49 -0
  136. package/node_modules/es-errors/type.d.ts +3 -0
  137. package/node_modules/es-errors/type.js +4 -0
  138. package/node_modules/es-errors/uri.d.ts +3 -0
  139. package/node_modules/es-errors/uri.js +4 -0
  140. package/node_modules/fast-xml-parser/CHANGELOG.md +17 -0
  141. package/node_modules/fast-xml-parser/README.md +9 -15
  142. package/node_modules/fast-xml-parser/package.json +4 -1
  143. package/node_modules/fast-xml-parser/src/fxp.d.ts +365 -71
  144. package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
  145. package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
  146. package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
  147. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
  148. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
  149. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
  150. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
  151. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +96 -0
  152. package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
  153. package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
  154. package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
  155. package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
  156. package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
  157. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
  158. package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
  159. package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
  160. package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
  161. package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
  162. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
  163. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
  164. package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +31 -0
  165. package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
  166. package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
  167. package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
  168. package/node_modules/fast-xml-parser/src/validator.js +2 -0
  169. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +18 -9
  170. package/node_modules/follow-redirects/index.js +115 -76
  171. package/node_modules/follow-redirects/package.json +1 -1
  172. package/node_modules/get-intrinsic/CHANGELOG.md +18 -0
  173. package/node_modules/get-intrinsic/index.js +15 -7
  174. package/node_modules/get-intrinsic/package.json +12 -12
  175. package/node_modules/has-property-descriptors/CHANGELOG.md +8 -0
  176. package/node_modules/has-property-descriptors/index.js +3 -14
  177. package/node_modules/has-property-descriptors/package.json +5 -5
  178. package/node_modules/has-proto/CHANGELOG.md +15 -0
  179. package/node_modules/has-proto/index.d.ts +3 -0
  180. package/node_modules/has-proto/index.js +5 -1
  181. package/node_modules/has-proto/package.json +9 -5
  182. package/node_modules/has-proto/tsconfig.json +49 -0
  183. package/node_modules/has-tostringtag/.eslintrc +0 -6
  184. package/node_modules/has-tostringtag/.nycrc +13 -0
  185. package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
  186. package/node_modules/has-tostringtag/index.d.ts +3 -0
  187. package/node_modules/has-tostringtag/index.js +1 -0
  188. package/node_modules/has-tostringtag/package.json +37 -13
  189. package/node_modules/has-tostringtag/shams.d.ts +3 -0
  190. package/node_modules/has-tostringtag/shams.js +1 -0
  191. package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
  192. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
  193. package/node_modules/has-tostringtag/test/tests.js +2 -1
  194. package/node_modules/has-tostringtag/tsconfig.json +49 -0
  195. package/node_modules/hasown/CHANGELOG.md +20 -0
  196. package/node_modules/hasown/index.d.ts +3 -3
  197. package/node_modules/hasown/index.js +1 -1
  198. package/node_modules/hasown/package.json +16 -15
  199. package/node_modules/hasown/tsconfig.json +3 -46
  200. package/node_modules/object-is/.eslintrc +1 -1
  201. package/node_modules/object-is/.nycrc +0 -4
  202. package/node_modules/object-is/CHANGELOG.md +25 -0
  203. package/node_modules/object-is/README.md +20 -20
  204. package/node_modules/object-is/package.json +23 -14
  205. package/node_modules/polygon-clipping/README.md +29 -26
  206. package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +1398 -1421
  207. package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +13 -10
  208. package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +1139 -1427
  209. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +1770 -1831
  210. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +22 -8
  211. package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +1 -1
  212. package/node_modules/polygon-clipping/node_modules/robust-predicates/LICENSE +24 -0
  213. package/node_modules/polygon-clipping/node_modules/robust-predicates/README.md +82 -0
  214. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/incircle.js +765 -0
  215. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/insphere.js +766 -0
  216. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient2d.js +184 -0
  217. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient3d.js +462 -0
  218. package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/util.js +138 -0
  219. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.d.ts +49 -0
  220. package/node_modules/polygon-clipping/node_modules/robust-predicates/index.js +5 -0
  221. package/node_modules/polygon-clipping/node_modules/robust-predicates/package.json +75 -0
  222. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.js +908 -0
  223. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.min.js +1 -0
  224. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.js +914 -0
  225. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.min.js +1 -0
  226. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.js +280 -0
  227. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.min.js +1 -0
  228. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.js +601 -0
  229. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.min.js +1 -0
  230. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.js +2328 -0
  231. package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.min.js +1 -0
  232. package/node_modules/polygon-clipping/package.json +30 -25
  233. package/node_modules/protobufjs/LICENSE +39 -39
  234. package/node_modules/protobufjs/README.md +727 -740
  235. package/node_modules/protobufjs/dist/light/protobuf.js +6264 -6264
  236. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  237. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  238. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  239. package/node_modules/protobufjs/dist/minimal/protobuf.js +1928 -1928
  240. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  241. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  242. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  243. package/node_modules/protobufjs/dist/protobuf.js +7978 -7961
  244. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  245. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  246. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  247. package/node_modules/protobufjs/ext/debug/README.md +4 -4
  248. package/node_modules/protobufjs/ext/debug/index.js +71 -71
  249. package/node_modules/protobufjs/ext/descriptor/README.md +72 -72
  250. package/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -191
  251. package/node_modules/protobufjs/ext/descriptor/index.js +1052 -1052
  252. package/node_modules/protobufjs/ext/descriptor/test.js +54 -54
  253. package/node_modules/protobufjs/google/LICENSE +27 -27
  254. package/node_modules/protobufjs/google/README.md +1 -1
  255. package/node_modules/protobufjs/google/api/annotations.json +82 -82
  256. package/node_modules/protobufjs/google/api/annotations.proto +10 -10
  257. package/node_modules/protobufjs/google/api/http.json +85 -85
  258. package/node_modules/protobufjs/google/api/http.proto +30 -30
  259. package/node_modules/protobufjs/google/protobuf/api.json +117 -117
  260. package/node_modules/protobufjs/google/protobuf/api.proto +33 -33
  261. package/node_modules/protobufjs/google/protobuf/descriptor.json +738 -738
  262. package/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -286
  263. package/node_modules/protobufjs/google/protobuf/source_context.json +19 -19
  264. package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -7
  265. package/node_modules/protobufjs/google/protobuf/type.json +201 -201
  266. package/node_modules/protobufjs/google/protobuf/type.proto +89 -89
  267. package/node_modules/protobufjs/index.d.ts +2741 -2741
  268. package/node_modules/protobufjs/index.js +4 -4
  269. package/node_modules/protobufjs/light.d.ts +2 -2
  270. package/node_modules/protobufjs/light.js +3 -3
  271. package/node_modules/protobufjs/minimal.d.ts +2 -2
  272. package/node_modules/protobufjs/minimal.js +4 -4
  273. package/node_modules/protobufjs/package.json +111 -111
  274. package/node_modules/protobufjs/scripts/postinstall.js +32 -32
  275. package/node_modules/protobufjs/src/common.js +399 -399
  276. package/node_modules/protobufjs/src/converter.js +301 -301
  277. package/node_modules/protobufjs/src/decoder.js +129 -129
  278. package/node_modules/protobufjs/src/encoder.js +100 -100
  279. package/node_modules/protobufjs/src/enum.js +198 -198
  280. package/node_modules/protobufjs/src/field.js +377 -377
  281. package/node_modules/protobufjs/src/index-light.js +104 -104
  282. package/node_modules/protobufjs/src/index-minimal.js +36 -36
  283. package/node_modules/protobufjs/src/index.js +12 -12
  284. package/node_modules/protobufjs/src/mapfield.js +126 -126
  285. package/node_modules/protobufjs/src/message.js +138 -138
  286. package/node_modules/protobufjs/src/method.js +160 -160
  287. package/node_modules/protobufjs/src/namespace.js +433 -433
  288. package/node_modules/protobufjs/src/object.js +243 -243
  289. package/node_modules/protobufjs/src/oneof.js +203 -203
  290. package/node_modules/protobufjs/src/parse.js +889 -872
  291. package/node_modules/protobufjs/src/reader.js +416 -416
  292. package/node_modules/protobufjs/src/reader_buffer.js +51 -51
  293. package/node_modules/protobufjs/src/root.js +368 -368
  294. package/node_modules/protobufjs/src/roots.js +18 -18
  295. package/node_modules/protobufjs/src/rpc/service.js +142 -142
  296. package/node_modules/protobufjs/src/rpc.js +36 -36
  297. package/node_modules/protobufjs/src/service.js +167 -167
  298. package/node_modules/protobufjs/src/tokenize.js +416 -416
  299. package/node_modules/protobufjs/src/type.js +589 -589
  300. package/node_modules/protobufjs/src/types.js +196 -196
  301. package/node_modules/protobufjs/src/typescript.jsdoc +15 -15
  302. package/node_modules/protobufjs/src/util/longbits.js +200 -200
  303. package/node_modules/protobufjs/src/util/minimal.js +438 -438
  304. package/node_modules/protobufjs/src/util.js +212 -212
  305. package/node_modules/protobufjs/src/verifier.js +176 -176
  306. package/node_modules/protobufjs/src/wrappers.js +102 -102
  307. package/node_modules/protobufjs/src/writer.js +465 -465
  308. package/node_modules/protobufjs/src/writer_buffer.js +85 -85
  309. package/node_modules/protobufjs/tsconfig.json +7 -7
  310. package/node_modules/regexp.prototype.flags/CHANGELOG.md +13 -0
  311. package/node_modules/regexp.prototype.flags/implementation.js +2 -2
  312. package/node_modules/regexp.prototype.flags/package.json +11 -10
  313. package/node_modules/regexp.prototype.flags/test/tests.js +13 -13
  314. package/node_modules/set-function-length/CHANGELOG.md +29 -0
  315. package/node_modules/set-function-length/env.d.ts +9 -0
  316. package/node_modules/set-function-length/env.js +10 -4
  317. package/node_modules/set-function-length/index.d.ts +7 -0
  318. package/node_modules/set-function-length/index.js +4 -3
  319. package/node_modules/set-function-length/package.json +29 -11
  320. package/node_modules/set-function-length/tsconfig.json +9 -0
  321. package/node_modules/set-function-name/.eslintrc +1 -0
  322. package/node_modules/set-function-name/CHANGELOG.md +9 -0
  323. package/node_modules/set-function-name/index.d.ts +5 -0
  324. package/node_modules/set-function-name/index.js +4 -3
  325. package/node_modules/set-function-name/package.json +28 -9
  326. package/node_modules/set-function-name/tsconfig.json +59 -0
  327. package/node_modules/uuid/CHANGELOG.md +18 -0
  328. package/node_modules/uuid/README.md +134 -16
  329. package/node_modules/uuid/dist/commonjs-browser/index.js +40 -15
  330. package/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
  331. package/node_modules/uuid/dist/commonjs-browser/md5.js +30 -53
  332. package/node_modules/uuid/dist/commonjs-browser/native.js +3 -4
  333. package/node_modules/uuid/dist/commonjs-browser/nil.js +1 -2
  334. package/node_modules/uuid/dist/commonjs-browser/parse.js +14 -15
  335. package/node_modules/uuid/dist/commonjs-browser/regex.js +1 -2
  336. package/node_modules/uuid/dist/commonjs-browser/rng.js +2 -4
  337. package/node_modules/uuid/dist/commonjs-browser/sha1.js +27 -49
  338. package/node_modules/uuid/dist/commonjs-browser/stringify.js +10 -16
  339. package/node_modules/uuid/dist/commonjs-browser/v1.js +73 -49
  340. package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
  341. package/node_modules/uuid/dist/commonjs-browser/v3.js +3 -8
  342. package/node_modules/uuid/dist/commonjs-browser/v35.js +15 -32
  343. package/node_modules/uuid/dist/commonjs-browser/v4.js +7 -18
  344. package/node_modules/uuid/dist/commonjs-browser/v5.js +3 -8
  345. package/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
  346. package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
  347. package/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
  348. package/node_modules/uuid/dist/commonjs-browser/validate.js +2 -7
  349. package/node_modules/uuid/dist/commonjs-browser/version.js +2 -8
  350. package/node_modules/uuid/dist/esm-browser/index.js +9 -4
  351. package/node_modules/uuid/dist/esm-browser/max.js +1 -0
  352. package/node_modules/uuid/dist/esm-browser/md5.js +29 -50
  353. package/node_modules/uuid/dist/esm-browser/native.js +1 -1
  354. package/node_modules/uuid/dist/esm-browser/parse.js +12 -10
  355. package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  356. package/node_modules/uuid/dist/esm-browser/rng.js +3 -4
  357. package/node_modules/uuid/dist/esm-browser/sha1.js +26 -46
  358. package/node_modules/uuid/dist/esm-browser/stringify.js +9 -11
  359. package/node_modules/uuid/dist/esm-browser/v1.js +74 -44
  360. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
  361. package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
  362. package/node_modules/uuid/dist/esm-browser/v35.js +14 -25
  363. package/node_modules/uuid/dist/esm-browser/v4.js +5 -9
  364. package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
  365. package/node_modules/uuid/dist/esm-browser/v6.js +36 -0
  366. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
  367. package/node_modules/uuid/dist/esm-browser/v7.js +146 -0
  368. package/node_modules/uuid/dist/esm-browser/validate.js +0 -2
  369. package/node_modules/uuid/dist/esm-browser/version.js +0 -3
  370. package/node_modules/uuid/dist/esm-node/index.js +9 -4
  371. package/node_modules/uuid/dist/esm-node/max.js +1 -0
  372. package/node_modules/uuid/dist/esm-node/md5.js +1 -4
  373. package/node_modules/uuid/dist/esm-node/native.js +1 -1
  374. package/node_modules/uuid/dist/esm-node/parse.js +11 -9
  375. package/node_modules/uuid/dist/esm-node/regex.js +1 -1
  376. package/node_modules/uuid/dist/esm-node/rng.js +1 -3
  377. package/node_modules/uuid/dist/esm-node/sha1.js +1 -4
  378. package/node_modules/uuid/dist/esm-node/stringify.js +7 -9
  379. package/node_modules/uuid/dist/esm-node/v1.js +66 -36
  380. package/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
  381. package/node_modules/uuid/dist/esm-node/v35.js +8 -19
  382. package/node_modules/uuid/dist/esm-node/v4.js +4 -8
  383. package/node_modules/uuid/dist/esm-node/v6.js +32 -0
  384. package/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
  385. package/node_modules/uuid/dist/esm-node/v7.js +146 -0
  386. package/node_modules/uuid/dist/esm-node/validate.js +0 -2
  387. package/node_modules/uuid/dist/esm-node/version.js +0 -3
  388. package/node_modules/uuid/dist/index.js +40 -15
  389. package/node_modules/uuid/dist/max.js +7 -0
  390. package/node_modules/uuid/dist/md5-browser.js +8 -31
  391. package/node_modules/uuid/dist/md5.js +4 -10
  392. package/node_modules/uuid/dist/native-browser.js +2 -3
  393. package/node_modules/uuid/dist/native.js +5 -9
  394. package/node_modules/uuid/dist/nil.js +1 -2
  395. package/node_modules/uuid/dist/parse.js +13 -14
  396. package/node_modules/uuid/dist/regex.js +1 -2
  397. package/node_modules/uuid/dist/rng-browser.js +1 -3
  398. package/node_modules/uuid/dist/rng.js +3 -10
  399. package/node_modules/uuid/dist/sha1-browser.js +1 -23
  400. package/node_modules/uuid/dist/sha1.js +4 -10
  401. package/node_modules/uuid/dist/stringify.js +8 -14
  402. package/node_modules/uuid/dist/uuid-bin.js +12 -22
  403. package/node_modules/uuid/dist/v1.js +66 -42
  404. package/node_modules/uuid/dist/v1ToV6.js +26 -0
  405. package/node_modules/uuid/dist/v3.js +2 -7
  406. package/node_modules/uuid/dist/v35.js +11 -28
  407. package/node_modules/uuid/dist/v4.js +6 -17
  408. package/node_modules/uuid/dist/v5.js +2 -7
  409. package/node_modules/uuid/dist/v6.js +38 -0
  410. package/node_modules/uuid/dist/v6ToV1.js +26 -0
  411. package/node_modules/uuid/dist/v7.js +152 -0
  412. package/node_modules/uuid/dist/validate.js +2 -7
  413. package/node_modules/uuid/dist/version.js +2 -8
  414. package/node_modules/uuid/package.json +41 -34
  415. package/node_modules/uuid/wrapper.mjs +5 -0
  416. package/package.json +6 -6
  417. package/tak-ingest.js +5 -1
  418. package/tak-registration.js +8 -1
  419. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  420. package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  421. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  422. package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  423. package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  424. package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  425. package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  426. package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  427. package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
  428. package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
  429. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
  430. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  431. package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  432. package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  433. package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  434. package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  435. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  436. package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4291
  437. package/node_modules/@types/node/ts4.8/globals.d.ts +0 -385
  438. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  439. package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
  440. package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  441. package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  442. package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  443. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  444. package/node_modules/@types/node/ts4.8/module.d.ts +0 -301
  445. package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  446. package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  447. package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  448. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
  449. package/node_modules/@types/node/ts4.8/process.d.ts +0 -1539
  450. package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  451. package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  452. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  453. package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  454. package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  455. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  456. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  457. package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
  458. package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  459. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  460. package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
  461. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  462. package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  463. package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  464. package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  465. package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  466. package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  467. package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  468. package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
  469. package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  470. package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  471. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  472. package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  473. package/node_modules/define-data-property/index.d.ts.map +0 -1
  474. package/node_modules/hasown/index.d.ts.map +0 -1
  475. package/node_modules/object-is/.eslintignore +0 -1
  476. package/node_modules/polygon-clipping/CHANGELOG.md +0 -129
@@ -18,14 +18,14 @@
18
18
  *
19
19
  * 1. A synchronous function that is considered failing if it throws an exception,
20
20
  * and is considered passing otherwise.
21
- * 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` fulfills.
21
+ * 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills.
22
22
  * 3. A function that receives a callback function. If the callback receives any
23
23
  * truthy value as its first argument, the test is considered failing. If a
24
24
  * falsy value is passed as the first argument to the callback, the test is
25
25
  * considered passing. If the test function receives a callback function and
26
26
  * also returns a `Promise`, the test will fail.
27
27
  *
28
- * The following example illustrates how tests are written using the`test` module.
28
+ * The following example illustrates how tests are written using the `test` module.
29
29
  *
30
30
  * ```js
31
31
  * test('synchronous passing test', (t) => {
@@ -76,12 +76,17 @@
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.4.0/lib/test.js)
79
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test.js)
80
80
  */
81
81
  declare module "node:test" {
82
82
  import { Readable } from "node:stream";
83
83
  import { AsyncResource } from "node:async_hooks";
84
84
  /**
85
+ * **Note:** `shard` is used to horizontally parallelize test running across
86
+ * machines or processes, ideal for large-scale executions across varied
87
+ * environments. It's incompatible with `watch` mode, tailored for rapid
88
+ * code iteration by automatically rerunning tests on file changes.
89
+ *
85
90
  * ```js
86
91
  * import { tap } from 'node:test/reporters';
87
92
  * import { run } from 'node:test';
@@ -105,7 +110,7 @@ declare module "node:test" {
105
110
  * additional diagnostic information, or creating subtests.
106
111
  *
107
112
  * `test()` returns a `Promise` that fulfills once the test completes.
108
- * if `test()` is called within a `describe()` block, it fulfills immediately.
113
+ * if `test()` is called within a suite, it fulfills immediately.
109
114
  * The return value can usually be discarded for top level tests.
110
115
  * However, the return value from subtests should be used to prevent the parent
111
116
  * test from finishing first and cancelling the subtest
@@ -124,15 +129,15 @@ declare module "node:test" {
124
129
  * });
125
130
  * ```
126
131
  *
127
- * The `timeout` option can be used to fail the test if it takes longer than`timeout` milliseconds to complete. However, it is not a reliable mechanism for
132
+ * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for
128
133
  * canceling tests because a running test might block the application thread and
129
134
  * thus prevent the scheduled cancellation.
130
135
  * @since v18.0.0, v16.17.0
131
136
  * @param [name='The name'] The name of the test, which is displayed when reporting test results.
132
137
  * @param options Configuration options for the test. The following properties are supported:
133
- * @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 callback function is passed as the
134
- * second argument.
135
- * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
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.
140
+ * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite.
136
141
  */
137
142
  function test(name?: string, fn?: TestFn): Promise<void>;
138
143
  function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
@@ -142,14 +147,47 @@ declare module "node:test" {
142
147
  export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo };
143
148
  }
144
149
  /**
145
- * The `describe()` function imported from the `node:test` module. Each
146
- * invocation of this function results in the creation of a Subtest.
147
- * After invocation of top level `describe` functions,
148
- * all top level tests and suites will execute.
149
- * @param [name='The name'] The name of the suite, which is displayed when reporting test results.
150
- * @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
151
- * @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object.
150
+ * 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.
152
154
  * @return Immediately fulfilled with `undefined`.
155
+ * @since v20.13.0
156
+ */
157
+ function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
158
+ function suite(name?: string, fn?: SuiteFn): Promise<void>;
159
+ function suite(options?: TestOptions, fn?: SuiteFn): Promise<void>;
160
+ function suite(fn?: SuiteFn): Promise<void>;
161
+ namespace suite {
162
+ /**
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).
164
+ * @since v20.13.0
165
+ */
166
+ function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
167
+ function skip(name?: string, fn?: SuiteFn): Promise<void>;
168
+ function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
169
+ function skip(fn?: SuiteFn): Promise<void>;
170
+ /**
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).
172
+ * @since v20.13.0
173
+ */
174
+ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
175
+ function todo(name?: string, fn?: SuiteFn): Promise<void>;
176
+ function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
177
+ function todo(fn?: SuiteFn): Promise<void>;
178
+ /**
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).
180
+ * @since v20.13.0
181
+ */
182
+ function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
183
+ function only(name?: string, fn?: SuiteFn): Promise<void>;
184
+ function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
185
+ function only(fn?: SuiteFn): Promise<void>;
186
+ }
187
+ /**
188
+ * Alias for `{@link suite}`.
189
+ *
190
+ * The `describe()` function is imported from the `node:test` module.
153
191
  */
154
192
  function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
155
193
  function describe(name?: string, fn?: SuiteFn): Promise<void>;
@@ -157,21 +195,23 @@ declare module "node:test" {
157
195
  function describe(fn?: SuiteFn): Promise<void>;
158
196
  namespace describe {
159
197
  /**
160
- * Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
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).
199
+ * @since v18.15.0
161
200
  */
162
201
  function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
163
202
  function skip(name?: string, fn?: SuiteFn): Promise<void>;
164
203
  function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
165
204
  function skip(fn?: SuiteFn): Promise<void>;
166
205
  /**
167
- * Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
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).
207
+ * @since v18.15.0
168
208
  */
169
209
  function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
170
210
  function todo(name?: string, fn?: SuiteFn): Promise<void>;
171
211
  function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
172
212
  function todo(fn?: SuiteFn): Promise<void>;
173
213
  /**
174
- * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
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).
175
215
  * @since v18.15.0
176
216
  */
177
217
  function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
@@ -180,7 +220,7 @@ declare module "node:test" {
180
220
  function only(fn?: SuiteFn): Promise<void>;
181
221
  }
182
222
  /**
183
- * Shorthand for `test()`.
223
+ * Alias for `test()`.
184
224
  *
185
225
  * The `it()` function is imported from the `node:test` module.
186
226
  * @since v18.6.0, v16.17.0
@@ -259,49 +299,57 @@ declare module "node:test" {
259
299
  }
260
300
  interface RunOptions {
261
301
  /**
262
- * If a number is provided, then that many files would run in parallel.
263
- * If truthy, it would run (number of cpu cores - 1) files in parallel.
264
- * If falsy, it would only run one file at a time.
265
- * If unspecified, subtests inherit this value from their parent.
266
- * @default true
302
+ * If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file.
303
+ * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time.
304
+ * @default false
267
305
  */
268
306
  concurrency?: number | boolean | undefined;
269
307
  /**
270
- * An array containing the list of files to run.
271
- * If unspecified, the test runner execution model will be used.
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).
272
310
  */
273
311
  files?: readonly string[] | undefined;
274
312
  /**
275
- * Allows aborting an in-progress test execution.
276
- * @default undefined
277
- */
278
- signal?: AbortSignal | undefined;
279
- /**
280
- * A number of milliseconds the test will fail after.
281
- * If unspecified, subtests inherit this value from their parent.
282
- * @default Infinity
313
+ * Configures the test runner to exit the process once all known
314
+ * tests have finished executing even if the event loop would
315
+ * otherwise remain active.
316
+ * @default false
283
317
  */
284
- timeout?: number | undefined;
318
+ forceExit?: boolean | undefined;
285
319
  /**
286
320
  * Sets inspector port of test child process.
287
321
  * If a nullish value is provided, each process gets its own port,
288
322
  * incremented from the primary's `process.debugPort`.
323
+ * @default undefined
289
324
  */
290
325
  inspectPort?: number | (() => number) | undefined;
291
- /**
292
- * That can be used to only run tests whose name matches the provided pattern.
293
- * Test name patterns are interpreted as JavaScript regular expressions.
294
- * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
295
- */
296
- testNamePatterns?: string | RegExp | string[] | RegExp[];
297
326
  /**
298
327
  * If truthy, the test context will only run tests that have the `only` option set
299
328
  */
300
329
  only?: boolean;
301
330
  /**
302
- * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
331
+ * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run.
332
+ * @default undefined
303
333
  */
304
334
  setup?: (root: Test) => void | Promise<void>;
335
+ /**
336
+ * Allows aborting an in-progress test execution.
337
+ */
338
+ signal?: AbortSignal | undefined;
339
+ /**
340
+ * A String, RegExp or a RegExp Array, that can be used to only run tests whose
341
+ * name matches the provided pattern. Test name patterns are interpreted as JavaScript
342
+ * regular expressions. For each test that is executed, any corresponding test hooks,
343
+ * such as `beforeEach()`, are also run.
344
+ * @default undefined
345
+ */
346
+ testNamePatterns?: string | RegExp | string[] | RegExp[];
347
+ /**
348
+ * A number of milliseconds the test execution will fail after.
349
+ * If unspecified, subtests inherit this value from their parent.
350
+ * @default Infinity
351
+ */
352
+ timeout?: number | undefined;
305
353
  /**
306
354
  * Whether to run in watch mode or not.
307
355
  * @default false
@@ -323,12 +371,18 @@ declare module "node:test" {
323
371
  timeout: number | null;
324
372
  }
325
373
  /**
326
- * 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
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
327
375
  * order of the tests definition
376
+ *
377
+ * 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.
328
378
  * @since v18.9.0, v16.19.0
329
379
  */
330
380
  class TestsStream extends Readable implements NodeJS.ReadableStream {
381
+ addListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
382
+ addListener(event: "test:complete", listener: (data: TestComplete) => void): this;
383
+ addListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
331
384
  addListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
385
+ addListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
332
386
  addListener(event: "test:fail", listener: (data: TestFail) => void): this;
333
387
  addListener(event: "test:pass", listener: (data: TestPass) => void): this;
334
388
  addListener(event: "test:plan", listener: (data: TestPlan) => void): this;
@@ -336,7 +390,11 @@ declare module "node:test" {
336
390
  addListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
337
391
  addListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
338
392
  addListener(event: string, listener: (...args: any[]) => void): this;
393
+ emit(event: "test:coverage", data: TestCoverage): boolean;
394
+ emit(event: "test:complete", data: TestComplete): boolean;
395
+ emit(event: "test:dequeue", data: TestDequeue): boolean;
339
396
  emit(event: "test:diagnostic", data: DiagnosticData): boolean;
397
+ emit(event: "test:enqueue", data: TestEnqueue): boolean;
340
398
  emit(event: "test:fail", data: TestFail): boolean;
341
399
  emit(event: "test:pass", data: TestPass): boolean;
342
400
  emit(event: "test:plan", data: TestPlan): boolean;
@@ -344,7 +402,11 @@ declare module "node:test" {
344
402
  emit(event: "test:stderr", data: TestStderr): boolean;
345
403
  emit(event: "test:stdout", data: TestStdout): boolean;
346
404
  emit(event: string | symbol, ...args: any[]): boolean;
405
+ on(event: "test:coverage", listener: (data: TestCoverage) => void): this;
406
+ on(event: "test:complete", listener: (data: TestComplete) => void): this;
407
+ on(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
347
408
  on(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
409
+ on(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
348
410
  on(event: "test:fail", listener: (data: TestFail) => void): this;
349
411
  on(event: "test:pass", listener: (data: TestPass) => void): this;
350
412
  on(event: "test:plan", listener: (data: TestPlan) => void): this;
@@ -352,7 +414,11 @@ declare module "node:test" {
352
414
  on(event: "test:stderr", listener: (data: TestStderr) => void): this;
353
415
  on(event: "test:stdout", listener: (data: TestStdout) => void): this;
354
416
  on(event: string, listener: (...args: any[]) => void): this;
417
+ once(event: "test:coverage", listener: (data: TestCoverage) => void): this;
418
+ once(event: "test:complete", listener: (data: TestComplete) => void): this;
419
+ once(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
355
420
  once(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
421
+ once(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
356
422
  once(event: "test:fail", listener: (data: TestFail) => void): this;
357
423
  once(event: "test:pass", listener: (data: TestPass) => void): this;
358
424
  once(event: "test:plan", listener: (data: TestPlan) => void): this;
@@ -360,7 +426,11 @@ declare module "node:test" {
360
426
  once(event: "test:stderr", listener: (data: TestStderr) => void): this;
361
427
  once(event: "test:stdout", listener: (data: TestStdout) => void): this;
362
428
  once(event: string, listener: (...args: any[]) => void): this;
429
+ prependListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
430
+ prependListener(event: "test:complete", listener: (data: TestComplete) => void): this;
431
+ prependListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
363
432
  prependListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
433
+ prependListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
364
434
  prependListener(event: "test:fail", listener: (data: TestFail) => void): this;
365
435
  prependListener(event: "test:pass", listener: (data: TestPass) => void): this;
366
436
  prependListener(event: "test:plan", listener: (data: TestPlan) => void): this;
@@ -368,7 +438,11 @@ declare module "node:test" {
368
438
  prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
369
439
  prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
370
440
  prependListener(event: string, listener: (...args: any[]) => void): this;
441
+ prependOnceListener(event: "test:coverage", listener: (data: TestCoverage) => void): this;
442
+ prependOnceListener(event: "test:complete", listener: (data: TestComplete) => void): this;
443
+ prependOnceListener(event: "test:dequeue", listener: (data: TestDequeue) => void): this;
371
444
  prependOnceListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
445
+ prependOnceListener(event: "test:enqueue", listener: (data: TestEnqueue) => void): this;
372
446
  prependOnceListener(event: "test:fail", listener: (data: TestFail) => void): this;
373
447
  prependOnceListener(event: "test:pass", listener: (data: TestPass) => void): this;
374
448
  prependOnceListener(event: "test:plan", listener: (data: TestPlan) => void): this;
@@ -387,7 +461,7 @@ declare module "node:test" {
387
461
  /**
388
462
  * This function is used to create a hook running before subtest of the current test.
389
463
  * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
390
- * the second argument. Default: A no-op function.
464
+ * the second argument. **Default:** A no-op function.
391
465
  * @param options Configuration options for the hook.
392
466
  * @since v20.1.0
393
467
  */
@@ -395,14 +469,14 @@ declare module "node:test" {
395
469
  /**
396
470
  * This function is used to create a hook running before each subtest of the current test.
397
471
  * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
398
- * the second argument. Default: A no-op function.
472
+ * the second argument. **Default:** A no-op function.
399
473
  * @param options Configuration options for the hook.
400
474
  * @since v18.8.0
401
475
  */
402
476
  beforeEach: typeof beforeEach;
403
477
  /**
404
478
  * This function is used to create a hook that runs after the current test finishes.
405
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
479
+ * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as
406
480
  * the second argument. Default: A no-op function.
407
481
  * @param options Configuration options for the hook.
408
482
  * @since v18.13.0
@@ -411,7 +485,7 @@ declare module "node:test" {
411
485
  /**
412
486
  * This function is used to create a hook running after each subtest of the current test.
413
487
  * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
414
- * the second argument. Default: A no-op function.
488
+ * the second argument. **Default:** A no-op function.
415
489
  * @param options Configuration options for the hook.
416
490
  * @since v18.8.0
417
491
  */
@@ -465,7 +539,7 @@ declare module "node:test" {
465
539
  */
466
540
  readonly signal: AbortSignal;
467
541
  /**
468
- * This function causes the test's output to indicate the test as skipped. If`message` is provided, it is included in the output. Calling `skip()` does
542
+ * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does
469
543
  * not terminate execution of the test function. This function does not return a
470
544
  * value.
471
545
  *
@@ -503,7 +577,7 @@ declare module "node:test" {
503
577
  * @param options Configuration options for the test
504
578
  * @param fn The function under test. This first argument to this function is a
505
579
  * {@link TestContext} object. If the test uses callbacks, the callback function is
506
- * passed as the second argument. Default: A no-op function.
580
+ * passed as the second argument. **Default:** A no-op function.
507
581
  * @returns A {@link Promise} resolved with `undefined` once the test completes.
508
582
  */
509
583
  test: typeof test;
@@ -512,6 +586,7 @@ declare module "node:test" {
512
586
  */
513
587
  readonly mock: MockTracker;
514
588
  }
589
+
515
590
  /**
516
591
  * An instance of `SuiteContext` is passed to each suite function in order to
517
592
  * interact with the test runner. However, the `SuiteContext` constructor is not
@@ -572,7 +647,7 @@ declare module "node:test" {
572
647
  todo?: boolean | string | undefined;
573
648
  }
574
649
  /**
575
- * This function is used to create a hook running before running a suite.
650
+ * This function creates a hook that runs before executing a suite.
576
651
  *
577
652
  * ```js
578
653
  * describe('tests', async () => {
@@ -588,7 +663,7 @@ declare module "node:test" {
588
663
  */
589
664
  function before(fn?: HookFn, options?: HookOptions): void;
590
665
  /**
591
- * This function is used to create a hook running after running a suite.
666
+ * This function creates a hook that runs after executing a suite.
592
667
  *
593
668
  * ```js
594
669
  * describe('tests', async () => {
@@ -604,8 +679,7 @@ declare module "node:test" {
604
679
  */
605
680
  function after(fn?: HookFn, options?: HookOptions): void;
606
681
  /**
607
- * This function is used to create a hook running
608
- * before each subtest of the current suite.
682
+ * This function creates a hook that runs before each test in the current suite.
609
683
  *
610
684
  * ```js
611
685
  * describe('tests', async () => {
@@ -621,8 +695,8 @@ declare module "node:test" {
621
695
  */
622
696
  function beforeEach(fn?: HookFn, options?: HookOptions): void;
623
697
  /**
624
- * This function is used to create a hook running
625
- * after each subtest of the current test.
698
+ * This function creates a hook that runs after each test in the current suite.
699
+ * The `afterEach()` hook is run even if the test fails.
626
700
  *
627
701
  * ```js
628
702
  * describe('tests', async () => {
@@ -690,7 +764,7 @@ declare module "node:test" {
690
764
  /**
691
765
  * The `MockTracker` class is used to manage mocking functionality. The test runner
692
766
  * module provides a top level `mock` export which is a `MockTracker` instance.
693
- * Each test also provides its own `MockTracker` instance via the test context's`mock` property.
767
+ * Each test also provides its own `MockTracker` instance via the test context's `mock` property.
694
768
  * @since v19.1.0, v18.13.0
695
769
  */
696
770
  class MockTracker {
@@ -806,7 +880,7 @@ declare module "node:test" {
806
880
  ): Mock<Function>;
807
881
 
808
882
  /**
809
- * This function is syntax sugar for `MockTracker.method` with `options.getter`set to `true`.
883
+ * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`.
810
884
  * @since v19.3.0, v18.13.0
811
885
  */
812
886
  getter<
@@ -828,7 +902,7 @@ declare module "node:test" {
828
902
  options?: MockFunctionOptions,
829
903
  ): Mock<(() => MockedObject[MethodName]) | Implementation>;
830
904
  /**
831
- * This function is syntax sugar for `MockTracker.method` with `options.setter`set to `true`.
905
+ * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`.
832
906
  * @since v19.3.0, v18.13.0
833
907
  */
834
908
  setter<
@@ -851,11 +925,11 @@ declare module "node:test" {
851
925
  ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
852
926
  /**
853
927
  * This function restores the default behavior of all mocks that were previously
854
- * 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
928
+ * 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
855
929
  * used to reset their behavior or
856
930
  * otherwise interact with them.
857
931
  *
858
- * After each test completes, this function is called on the test context's`MockTracker`. If the global `MockTracker` is used extensively, calling this
932
+ * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this
859
933
  * function manually is recommended.
860
934
  * @since v19.1.0, v18.13.0
861
935
  */
@@ -921,7 +995,7 @@ declare module "node:test" {
921
995
  readonly calls: Array<MockFunctionCall<F>>;
922
996
  /**
923
997
  * This function returns the number of times that this mock has been invoked. This
924
- * function is more efficient than checking `ctx.calls.length` because `ctx.calls`is a getter that creates a copy of the internal call tracking array.
998
+ * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array.
925
999
  * @since v19.1.0, v18.13.0
926
1000
  * @return The number of times that this mock has been invoked.
927
1001
  */
@@ -957,7 +1031,7 @@ declare module "node:test" {
957
1031
  * @since v19.1.0, v18.13.0
958
1032
  * @param implementation The function to be used as the mock's new implementation.
959
1033
  */
960
- mockImplementation(implementation: Function): void;
1034
+ mockImplementation(implementation: F): void;
961
1035
  /**
962
1036
  * This function is used to change the behavior of an existing mock for a single
963
1037
  * invocation. Once invocation `onCall` has occurred, the mock will revert to
@@ -994,7 +1068,7 @@ declare module "node:test" {
994
1068
  * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
995
1069
  * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown.
996
1070
  */
997
- mockImplementationOnce(implementation: Function, onCall?: number): void;
1071
+ mockImplementationOnce(implementation: F, onCall?: number): void;
998
1072
  /**
999
1073
  * Resets the call history of the mock function.
1000
1074
  * @since v19.3.0, v18.13.0
@@ -1007,12 +1081,20 @@ declare module "node:test" {
1007
1081
  */
1008
1082
  restore(): void;
1009
1083
  }
1010
- type Timer = "setInterval" | "clearInterval" | "setTimeout" | "clearTimeout";
1084
+ type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date";
1085
+
1086
+ interface MockTimersOptions {
1087
+ apis: Timer[];
1088
+ now?: number | Date;
1089
+ }
1011
1090
  /**
1012
1091
  * Mocking timers is a technique commonly used in software testing to simulate and
1013
1092
  * control the behavior of timers, such as `setInterval` and `setTimeout`,
1014
1093
  * without actually waiting for the specified time intervals.
1015
1094
  *
1095
+ * The MockTimers API also allows for mocking of the `Date` constructor and
1096
+ * `setImmediate`/`clearImmediate` functions.
1097
+ *
1016
1098
  * The `MockTracker` provides a top-level `timers` export
1017
1099
  * which is a `MockTimers` instance.
1018
1100
  * @since v20.4.0
@@ -1025,24 +1107,68 @@ declare module "node:test" {
1025
1107
  * **Note:** When you enable mocking for a specific timer, its associated
1026
1108
  * clear function will also be implicitly mocked.
1027
1109
  *
1028
- * Example usage:
1110
+ * **Note:** Mocking `Date` will affect the behavior of the mocked timers
1111
+ * as they use the same internal clock.
1112
+ *
1113
+ * Example usage without setting initial time:
1114
+ *
1115
+ * ```js
1116
+ * import { mock } from 'node:test';
1117
+ * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 });
1118
+ * ```
1119
+ *
1120
+ * The above example enables mocking for the `Date` constructor, `setInterval` timer and
1121
+ * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`,
1122
+ * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked.
1123
+ *
1124
+ * Example usage with initial time set
1029
1125
  *
1030
1126
  * ```js
1031
1127
  * import { mock } from 'node:test';
1032
- * mock.timers.enable(['setInterval']);
1128
+ * mock.timers.enable({ apis: ['Date'], now: 1000 });
1033
1129
  * ```
1034
1130
  *
1035
- * The above example enables mocking for the `setInterval` timer and
1036
- * implicitly mocks the `clearInterval` function. Only the `setInterval`and `clearInterval` functions from `node:timers`,`node:timers/promises`, and`globalThis` will be mocked.
1131
+ * Example usage with initial Date object as time set
1132
+ *
1133
+ * ```js
1134
+ * import { mock } from 'node:test';
1135
+ * mock.timers.enable({ apis: ['Date'], now: new Date() });
1136
+ * ```
1037
1137
  *
1038
1138
  * Alternatively, if you call `mock.timers.enable()` without any parameters:
1039
1139
  *
1040
- * All timers (`'setInterval'`, `'clearInterval'`, `'setTimeout'`, and `'clearTimeout'`)
1041
- * will be mocked. The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout`functions from `node:timers`, `node:timers/promises`,
1140
+ * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`)
1141
+ * will be mocked.
1142
+ *
1143
+ * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`,
1042
1144
  * and `globalThis` will be mocked.
1145
+ * The `Date` constructor from `globalThis` will be mocked.
1146
+ *
1147
+ * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can
1148
+ * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date
1149
+ * object. It can either be a positive integer, or another Date object.
1043
1150
  * @since v20.4.0
1044
1151
  */
1045
- enable(timers?: Timer[]): void;
1152
+ enable(options?: MockTimersOptions): void;
1153
+ /**
1154
+ * You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer.
1155
+ * Note: This method will execute any mocked timers that are in the past from the new time.
1156
+ * In the below example we are setting a new time for the mocked date.
1157
+ * ```js
1158
+ * import assert from 'node:assert';
1159
+ * import { test } from 'node:test';
1160
+ * test('sets the time of a date object', (context) => {
1161
+ * // Optionally choose what to mock
1162
+ * context.mock.timers.enable({ apis: ['Date'], now: 100 });
1163
+ * assert.strictEqual(Date.now(), 100);
1164
+ * // Advance in time will also advance the date
1165
+ * context.mock.timers.setTime(1000);
1166
+ * context.mock.timers.tick(200);
1167
+ * assert.strictEqual(Date.now(), 1200);
1168
+ * });
1169
+ * ```
1170
+ */
1171
+ setTime(time: number): void;
1046
1172
  /**
1047
1173
  * This function restores the default behavior of all mocks that were previously
1048
1174
  * created by this `MockTimers` instance and disassociates the mocks
@@ -1076,7 +1202,7 @@ declare module "node:test" {
1076
1202
  * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
1077
1203
  * const fn = context.mock.fn();
1078
1204
  *
1079
- * context.mock.timers.enable(['setTimeout']);
1205
+ * context.mock.timers.enable({ apis: ['setTimeout'] });
1080
1206
  *
1081
1207
  * setTimeout(fn, 9999);
1082
1208
  *
@@ -1097,7 +1223,7 @@ declare module "node:test" {
1097
1223
  *
1098
1224
  * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
1099
1225
  * const fn = context.mock.fn();
1100
- * context.mock.timers.enable(['setTimeout']);
1226
+ * context.mock.timers.enable({ apis: ['setTimeout'] });
1101
1227
  * const nineSecs = 9000;
1102
1228
  * setTimeout(fn, nineSecs);
1103
1229
  *
@@ -1109,11 +1235,35 @@ declare module "node:test" {
1109
1235
  * assert.strictEqual(fn.mock.callCount(), 1);
1110
1236
  * });
1111
1237
  * ```
1238
+ *
1239
+ * Advancing time using `.tick` will also advance the time for any `Date` object
1240
+ * created after the mock was enabled (if `Date` was also set to be mocked).
1241
+ *
1242
+ * ```js
1243
+ * import assert from 'node:assert';
1244
+ * import { test } from 'node:test';
1245
+ *
1246
+ * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
1247
+ * const fn = context.mock.fn();
1248
+ *
1249
+ * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] });
1250
+ * setTimeout(fn, 9999);
1251
+ *
1252
+ * assert.strictEqual(fn.mock.callCount(), 0);
1253
+ * assert.strictEqual(Date.now(), 0);
1254
+ *
1255
+ * // Advance in time
1256
+ * context.mock.timers.tick(9999);
1257
+ * assert.strictEqual(fn.mock.callCount(), 1);
1258
+ * assert.strictEqual(Date.now(), 9999);
1259
+ * });
1260
+ * ```
1112
1261
  * @since v20.4.0
1113
1262
  */
1114
1263
  tick(milliseconds: number): void;
1115
1264
  /**
1116
- * Triggers all pending mocked timers immediately.
1265
+ * Triggers all pending mocked timers immediately. If the `Date` object is also
1266
+ * mocked, it will also advance the `Date` object to the furthest timer's time.
1117
1267
  *
1118
1268
  * The example below triggers all pending timers immediately,
1119
1269
  * causing them to execute without any delay.
@@ -1123,7 +1273,7 @@ declare module "node:test" {
1123
1273
  * import { test } from 'node:test';
1124
1274
  *
1125
1275
  * test('runAll functions following the given order', (context) => {
1126
- * context.mock.timers.enable(['setTimeout']);
1276
+ * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] });
1127
1277
  * const results = [];
1128
1278
  * setTimeout(() => results.push(1), 9999);
1129
1279
  *
@@ -1135,8 +1285,9 @@ declare module "node:test" {
1135
1285
  * assert.deepStrictEqual(results, []);
1136
1286
  *
1137
1287
  * context.mock.timers.runAll();
1138
- *
1139
1288
  * assert.deepStrictEqual(results, [3, 2, 1]);
1289
+ * // The Date object is also advanced to the furthest timer's time
1290
+ * assert.strictEqual(Date.now(), 9999);
1140
1291
  * });
1141
1292
  * ```
1142
1293
  *
@@ -1164,8 +1315,10 @@ declare module "node:test" {
1164
1315
  only,
1165
1316
  run,
1166
1317
  skip,
1318
+ SuiteContext,
1167
1319
  test,
1168
1320
  test as default,
1321
+ TestContext,
1169
1322
  todo,
1170
1323
  };
1171
1324
  }
@@ -1177,12 +1330,11 @@ interface TestLocationInfo {
1177
1330
  */
1178
1331
  column?: number;
1179
1332
  /**
1180
- * The path of the test file, `undefined` if test is not ran through a file.
1333
+ * The path of the test file, `undefined` if test was run through the REPL.
1181
1334
  */
1182
1335
  file?: string;
1183
1336
  /**
1184
- * The line number where the test is defined, or
1185
- * `undefined` if the test was run through the REPL.
1337
+ * The line number where the test is defined, or `undefined` if the test was run through the REPL.
1186
1338
  */
1187
1339
  line?: number;
1188
1340
  }
@@ -1196,6 +1348,202 @@ interface DiagnosticData extends TestLocationInfo {
1196
1348
  */
1197
1349
  nesting: number;
1198
1350
  }
1351
+ interface TestCoverage {
1352
+ /**
1353
+ * An object containing the coverage report.
1354
+ */
1355
+ summary: {
1356
+ /**
1357
+ * An array of coverage reports for individual files. Each report is an object with the following schema:
1358
+ */
1359
+ files: Array<{
1360
+ /**
1361
+ * The absolute path of the file.
1362
+ */
1363
+ path: string;
1364
+ /**
1365
+ * The total number of lines.
1366
+ */
1367
+ totalLineCount: number;
1368
+ /**
1369
+ * The total number of branches.
1370
+ */
1371
+ totalBranchCount: number;
1372
+ /**
1373
+ * The total number of functions.
1374
+ */
1375
+ totalFunctionCount: number;
1376
+ /**
1377
+ * The number of covered lines.
1378
+ */
1379
+ coveredLineCount: number;
1380
+ /**
1381
+ * The number of covered branches.
1382
+ */
1383
+ coveredBranchCount: number;
1384
+ /**
1385
+ * The number of covered functions.
1386
+ */
1387
+ coveredFunctionCount: number;
1388
+ /**
1389
+ * The percentage of lines covered.
1390
+ */
1391
+ coveredLinePercent: number;
1392
+ /**
1393
+ * The percentage of branches covered.
1394
+ */
1395
+ coveredBranchPercent: number;
1396
+ /**
1397
+ * The percentage of functions covered.
1398
+ */
1399
+ coveredFunctionPercent: number;
1400
+ /**
1401
+ * An array of functions representing function coverage.
1402
+ */
1403
+ functions: Array<{
1404
+ /**
1405
+ * The name of the function.
1406
+ */
1407
+ name: string;
1408
+ /**
1409
+ * The line number where the function is defined.
1410
+ */
1411
+ line: number;
1412
+ /**
1413
+ * The number of times the function was called.
1414
+ */
1415
+ count: number;
1416
+ }>;
1417
+ /**
1418
+ * An array of lines representing line numbers and the number of times they were covered.
1419
+ */
1420
+ lines: Array<{
1421
+ /**
1422
+ * The line number.
1423
+ */
1424
+ line: number;
1425
+ /**
1426
+ * The number of times the line was covered.
1427
+ */
1428
+ count: number;
1429
+ }>;
1430
+ }>;
1431
+ /**
1432
+ * An object containing a summary of coverage for all files.
1433
+ */
1434
+ totals: {
1435
+ /**
1436
+ * The total number of lines.
1437
+ */
1438
+ totalLineCount: number;
1439
+ /**
1440
+ * The total number of branches.
1441
+ */
1442
+ totalBranchCount: number;
1443
+ /**
1444
+ * The total number of functions.
1445
+ */
1446
+ totalFunctionCount: number;
1447
+ /**
1448
+ * The number of covered lines.
1449
+ */
1450
+ coveredLineCount: number;
1451
+ /**
1452
+ * The number of covered branches.
1453
+ */
1454
+ coveredBranchCount: number;
1455
+ /**
1456
+ * The number of covered functions.
1457
+ */
1458
+ coveredFunctionCount: number;
1459
+ /**
1460
+ * The percentage of lines covered.
1461
+ */
1462
+ coveredLinePercent: number;
1463
+ /**
1464
+ * The percentage of branches covered.
1465
+ */
1466
+ coveredBranchPercent: number;
1467
+ /**
1468
+ * The percentage of functions covered.
1469
+ */
1470
+ coveredFunctionPercent: number;
1471
+ };
1472
+ /**
1473
+ * The working directory when code coverage began. This
1474
+ * is useful for displaying relative path names in case
1475
+ * the tests changed the working directory of the Node.js process.
1476
+ */
1477
+ workingDirectory: string;
1478
+ };
1479
+ /**
1480
+ * The nesting level of the test.
1481
+ */
1482
+ nesting: number;
1483
+ }
1484
+ interface TestComplete extends TestLocationInfo {
1485
+ /**
1486
+ * Additional execution metadata.
1487
+ */
1488
+ details: {
1489
+ /**
1490
+ * Whether the test passed or not.
1491
+ */
1492
+ passed: boolean;
1493
+ /**
1494
+ * The duration of the test in milliseconds.
1495
+ */
1496
+ duration_ms: number;
1497
+ /**
1498
+ * An error wrapping the error thrown by the test if it did not pass.
1499
+ */
1500
+ error: Error;
1501
+ /**
1502
+ * The type of the test, used to denote whether this is a suite.
1503
+ */
1504
+ type?: "suite";
1505
+ };
1506
+ /**
1507
+ * The test name.
1508
+ */
1509
+ name: string;
1510
+ /**
1511
+ * The nesting level of the test.
1512
+ */
1513
+ nesting: number;
1514
+ /**
1515
+ * The ordinal number of the test.
1516
+ */
1517
+ testNumber: number;
1518
+ /**
1519
+ * Present if `context.todo` is called.
1520
+ */
1521
+ todo?: string | boolean;
1522
+ /**
1523
+ * Present if `context.skip` is called.
1524
+ */
1525
+ skip?: string | boolean;
1526
+ }
1527
+ interface TestDequeue extends TestLocationInfo {
1528
+ /**
1529
+ * The test name.
1530
+ */
1531
+ name: string;
1532
+ /**
1533
+ * The nesting level of the test.
1534
+ */
1535
+ nesting: number;
1536
+ }
1537
+ interface TestEnqueue extends TestLocationInfo {
1538
+ /**
1539
+ * The test name.
1540
+ */
1541
+ name: string;
1542
+ /**
1543
+ * The nesting level of the test.
1544
+ */
1545
+ nesting: number;
1546
+ }
1199
1547
  interface TestFail extends TestLocationInfo {
1200
1548
  /**
1201
1549
  * Additional execution metadata.
@@ -1206,12 +1554,12 @@ interface TestFail extends TestLocationInfo {
1206
1554
  */
1207
1555
  duration_ms: number;
1208
1556
  /**
1209
- * The error thrown by the test.
1557
+ * An error wrapping the error thrown by the test if it did not pass.
1210
1558
  */
1211
1559
  error: Error;
1212
1560
  /**
1213
1561
  * The type of the test, used to denote whether this is a suite.
1214
- * @since 20.0.0, 19.9.0, 18.17.0
1562
+ * @since v20.0.0, v19.9.0, v18.17.0
1215
1563
  */
1216
1564
  type?: "suite";
1217
1565
  };
@@ -1294,36 +1642,16 @@ interface TestStart extends TestLocationInfo {
1294
1642
  }
1295
1643
  interface TestStderr extends TestLocationInfo {
1296
1644
  /**
1297
- * The message written to `stderr`
1645
+ * The message written to `stderr`.
1298
1646
  */
1299
1647
  message: string;
1300
1648
  }
1301
1649
  interface TestStdout extends TestLocationInfo {
1302
1650
  /**
1303
- * The message written to `stdout`
1651
+ * The message written to `stdout`.
1304
1652
  */
1305
1653
  message: string;
1306
1654
  }
1307
- interface TestEnqueue extends TestLocationInfo {
1308
- /**
1309
- * The test name
1310
- */
1311
- name: string;
1312
- /**
1313
- * The nesting level of the test.
1314
- */
1315
- nesting: number;
1316
- }
1317
- interface TestDequeue extends TestLocationInfo {
1318
- /**
1319
- * The test name
1320
- */
1321
- name: string;
1322
- /**
1323
- * The nesting level of the test.
1324
- */
1325
- nesting: number;
1326
- }
1327
1655
 
1328
1656
  /**
1329
1657
  * The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
@@ -1340,21 +1668,23 @@ interface TestDequeue extends TestLocationInfo {
1340
1668
  * import test from 'test/reporters';
1341
1669
  * ```
1342
1670
  * @since v19.9.0
1343
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test/reporters.js)
1671
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test/reporters.js)
1344
1672
  */
1345
1673
  declare module "node:test/reporters" {
1346
- import { Transform } from "node:stream";
1674
+ import { Transform, TransformOptions } from "node:stream";
1347
1675
 
1348
1676
  type TestEvent =
1677
+ | { type: "test:coverage"; data: TestCoverage }
1678
+ | { type: "test:complete"; data: TestComplete }
1679
+ | { type: "test:dequeue"; data: TestDequeue }
1349
1680
  | { type: "test:diagnostic"; data: DiagnosticData }
1681
+ | { type: "test:enqueue"; data: TestEnqueue }
1350
1682
  | { type: "test:fail"; data: TestFail }
1351
1683
  | { type: "test:pass"; data: TestPass }
1352
1684
  | { type: "test:plan"; data: TestPlan }
1353
1685
  | { type: "test:start"; data: TestStart }
1354
1686
  | { type: "test:stderr"; data: TestStderr }
1355
1687
  | { type: "test:stdout"; data: TestStdout }
1356
- | { type: "test:enqueue"; data: TestEnqueue }
1357
- | { type: "test:dequeue"; data: TestDequeue }
1358
1688
  | { type: "test:watch:drained" };
1359
1689
  type TestEventGenerator = AsyncGenerator<TestEvent, void>;
1360
1690
 
@@ -1375,8 +1705,14 @@ declare module "node:test/reporters" {
1375
1705
  constructor();
1376
1706
  }
1377
1707
  /**
1378
- * The `junit` reporter outputs test results in a jUnit XML format
1708
+ * The `junit` reporter outputs test results in a jUnit XML format.
1379
1709
  */
1380
1710
  function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
1381
- export { dot, junit, Spec as spec, tap, TestEvent };
1711
+ /**
1712
+ * 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.
1713
+ */
1714
+ class Lcov extends Transform {
1715
+ constructor(opts?: TransformOptions);
1716
+ }
1717
+ export { dot, junit, Lcov as lcov, Spec as spec, tap, TestEvent };
1382
1718
  }