cloudstructs 0.9.19 → 0.9.21

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 (252) hide show
  1. package/.jsii +4 -4
  2. package/assets/slack-textract/detect.lambda/index.js +21 -10
  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/mjml-template/index.js +1 -1
  8. package/lib/saml-identity-provider/index.js +2 -2
  9. package/lib/slack-app/manifest.js +1 -1
  10. package/lib/slack-app/slack-app.js +2 -2
  11. package/lib/slack-events/index.js +1 -1
  12. package/lib/slack-textract/index.js +1 -1
  13. package/lib/ssl-server-test/index.js +1 -1
  14. package/lib/state-machine-cr-provider/index.js +1 -1
  15. package/lib/static-website/index.js +1 -1
  16. package/lib/toolkit-cleaner/index.js +1 -1
  17. package/lib/url-shortener/index.js +1 -1
  18. package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +4 -4
  19. package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +2 -2
  20. package/node_modules/@babel/runtime/helpers/superPropGet.js +4 -4
  21. package/node_modules/@babel/runtime/helpers/superPropSet.js +2 -2
  22. package/node_modules/@babel/runtime/package.json +1 -1
  23. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  24. package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +2 -2
  25. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  26. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/index.d.ts +9 -0
  27. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  28. package/node_modules/@slack/logger/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  29. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +10 -9
  30. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +2 -2
  31. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +15 -4
  32. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +1 -1
  33. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +17 -48
  34. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +37 -0
  35. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +8 -10
  36. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +91 -0
  37. package/node_modules/@slack/logger/node_modules/@types/node/package.json +4 -3
  38. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +24 -0
  39. package/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +14 -2
  40. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +58 -9
  41. package/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +8 -1
  42. package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +5 -2
  43. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +2 -2
  44. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +36 -5
  45. package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +1 -1
  46. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +6 -0
  47. package/node_modules/@slack/logger/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  48. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +7 -4
  49. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +80 -10
  50. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +81 -27
  51. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +1 -1
  52. package/node_modules/@slack/web-api/dist/WebClient.d.ts +36 -4
  53. package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
  54. package/node_modules/@slack/web-api/dist/WebClient.js +23 -10
  55. package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
  56. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  57. package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +2 -2
  58. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  59. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/index.d.ts +9 -0
  60. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  61. package/node_modules/@slack/web-api/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  62. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +10 -9
  63. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +2 -2
  64. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +15 -4
  65. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +1 -1
  66. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +17 -48
  67. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +37 -0
  68. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +8 -10
  69. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +91 -0
  70. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +4 -3
  71. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +24 -0
  72. package/node_modules/@slack/web-api/node_modules/@types/node/readline/promises.d.ts +14 -2
  73. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +58 -9
  74. package/node_modules/@slack/web-api/node_modules/@types/node/stream/promises.d.ts +8 -1
  75. package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +5 -2
  76. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +2 -2
  77. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +36 -5
  78. package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +1 -1
  79. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +6 -0
  80. package/node_modules/@slack/web-api/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  81. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +7 -4
  82. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +80 -10
  83. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +81 -27
  84. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +1 -1
  85. package/node_modules/@slack/web-api/package.json +1 -1
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +2 -2
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +9 -0
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +10 -9
  93. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +2 -2
  94. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +15 -4
  95. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +1 -1
  96. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +17 -48
  97. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +37 -0
  98. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +8 -10
  99. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +91 -0
  100. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +4 -3
  101. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +24 -0
  102. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +14 -2
  103. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +58 -9
  104. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +8 -1
  105. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +5 -2
  106. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +2 -2
  107. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +36 -5
  108. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +1 -1
  109. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +6 -0
  110. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  111. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +7 -4
  112. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +80 -10
  113. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +81 -27
  114. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +1 -1
  115. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  116. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +2 -2
  117. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  118. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +9 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +10 -9
  122. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +2 -2
  123. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +15 -4
  124. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +1 -1
  125. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +17 -48
  126. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +37 -0
  127. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +8 -10
  128. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +91 -0
  129. package/node_modules/@types/keyv/node_modules/@types/node/package.json +4 -3
  130. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +24 -0
  131. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +14 -2
  132. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +58 -9
  133. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +8 -1
  134. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +5 -2
  135. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +2 -2
  136. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +36 -5
  137. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +1 -1
  138. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +6 -0
  139. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  140. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +7 -4
  141. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +80 -10
  142. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +81 -27
  143. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +1 -1
  144. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  145. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +2 -2
  146. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +9 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  149. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  150. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +10 -9
  151. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +2 -2
  152. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +15 -4
  153. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +1 -1
  154. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +17 -48
  155. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +37 -0
  156. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +8 -10
  157. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +91 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/package.json +4 -3
  159. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +24 -0
  160. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +14 -2
  161. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +58 -9
  162. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +8 -1
  163. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +5 -2
  164. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +2 -2
  165. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +36 -5
  166. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +1 -1
  167. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +6 -0
  168. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +8 -10
  169. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +7 -4
  170. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +80 -10
  171. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +81 -27
  172. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +1 -1
  173. package/node_modules/cross-spawn/README.md +3 -10
  174. package/node_modules/cross-spawn/lib/enoent.js +1 -1
  175. package/node_modules/cross-spawn/lib/util/escape.js +4 -2
  176. package/node_modules/cross-spawn/package.json +1 -1
  177. package/node_modules/form-data/Readme.md +4 -4
  178. package/node_modules/form-data/lib/form_data.js +1 -1
  179. package/node_modules/form-data/package.json +9 -6
  180. package/node_modules/parse5/dist/cjs/common/doctype.d.ts +0 -1
  181. package/node_modules/parse5/dist/cjs/common/doctype.js +2 -4
  182. package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +0 -1
  183. package/node_modules/parse5/dist/cjs/common/error-codes.js +1 -2
  184. package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +0 -1
  185. package/node_modules/parse5/dist/cjs/common/foreign-content.js +7 -9
  186. package/node_modules/parse5/dist/cjs/common/html.d.ts +32 -31
  187. package/node_modules/parse5/dist/cjs/common/html.js +41 -42
  188. package/node_modules/parse5/dist/cjs/common/token.d.ts +0 -1
  189. package/node_modules/parse5/dist/cjs/common/token.js +3 -4
  190. package/node_modules/parse5/dist/cjs/common/unicode.d.ts +1 -8
  191. package/node_modules/parse5/dist/cjs/common/unicode.js +7 -14
  192. package/node_modules/parse5/dist/cjs/index.d.ts +15 -4
  193. package/node_modules/parse5/dist/cjs/index.js +3 -6
  194. package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +0 -1
  195. package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +1 -2
  196. package/node_modules/parse5/dist/cjs/parser/index.d.ts +72 -8
  197. package/node_modules/parse5/dist/cjs/parser/index.js +81 -9
  198. package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +2 -2
  199. package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +95 -87
  200. package/node_modules/parse5/dist/cjs/serializer/index.d.ts +1 -2
  201. package/node_modules/parse5/dist/cjs/serializer/index.js +8 -9
  202. package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +130 -131
  203. package/node_modules/parse5/dist/cjs/tokenizer/index.js +87 -281
  204. package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +3 -4
  205. package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +8 -7
  206. package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +0 -1
  207. package/node_modules/parse5/dist/cjs/tree-adapters/default.js +9 -10
  208. package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +7 -2
  209. package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +0 -1
  210. package/node_modules/parse5/dist/common/doctype.d.ts +0 -1
  211. package/node_modules/parse5/dist/common/doctype.js +0 -1
  212. package/node_modules/parse5/dist/common/error-codes.d.ts +0 -1
  213. package/node_modules/parse5/dist/common/error-codes.js +1 -2
  214. package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -1
  215. package/node_modules/parse5/dist/common/foreign-content.js +0 -2
  216. package/node_modules/parse5/dist/common/html.d.ts +32 -31
  217. package/node_modules/parse5/dist/common/html.js +38 -38
  218. package/node_modules/parse5/dist/common/token.d.ts +0 -1
  219. package/node_modules/parse5/dist/common/token.js +1 -2
  220. package/node_modules/parse5/dist/common/unicode.d.ts +1 -8
  221. package/node_modules/parse5/dist/common/unicode.js +1 -8
  222. package/node_modules/parse5/dist/index.d.ts +15 -4
  223. package/node_modules/parse5/dist/index.js +0 -3
  224. package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -1
  225. package/node_modules/parse5/dist/parser/formatting-element-list.js +1 -2
  226. package/node_modules/parse5/dist/parser/index.d.ts +72 -8
  227. package/node_modules/parse5/dist/parser/index.js +82 -10
  228. package/node_modules/parse5/dist/parser/open-element-stack.d.ts +2 -2
  229. package/node_modules/parse5/dist/parser/open-element-stack.js +96 -88
  230. package/node_modules/parse5/dist/serializer/index.d.ts +1 -2
  231. package/node_modules/parse5/dist/serializer/index.js +6 -6
  232. package/node_modules/parse5/dist/tokenizer/index.d.ts +130 -131
  233. package/node_modules/parse5/dist/tokenizer/index.js +88 -282
  234. package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +3 -4
  235. package/node_modules/parse5/dist/tokenizer/preprocessor.js +8 -7
  236. package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -1
  237. package/node_modules/parse5/dist/tree-adapters/default.js +9 -10
  238. package/node_modules/parse5/dist/tree-adapters/interface.d.ts +7 -2
  239. package/node_modules/parse5/dist/tree-adapters/interface.js +0 -1
  240. package/node_modules/parse5/package.json +4 -4
  241. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +1 -2
  242. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +11 -12
  243. package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +1 -2
  244. package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +9 -10
  245. package/node_modules/parse5-htmlparser2-tree-adapter/package.json +7 -6
  246. package/package.json +21 -20
  247. package/node_modules/@slack/logger/node_modules/@types/node/globals.global.d.ts +0 -1
  248. package/node_modules/@slack/web-api/node_modules/@types/node/globals.global.d.ts +0 -1
  249. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +0 -1
  250. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +0 -1
  251. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +0 -1
  252. package/node_modules/form-data/README.md.bak +0 -358
@@ -166,6 +166,9 @@ declare module "stream/web" {
166
166
  interface ReadableStreamErrorCallback {
167
167
  (reason: any): void | PromiseLike<void>;
168
168
  }
169
+ interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
170
+ [Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
171
+ }
169
172
  /** This Streams API interface represents a readable stream of byte data. */
170
173
  interface ReadableStream<R = any> {
171
174
  readonly locked: boolean;
@@ -176,8 +179,8 @@ declare module "stream/web" {
176
179
  pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
177
180
  pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
178
181
  tee(): [ReadableStream<R>, ReadableStream<R>];
179
- values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
180
- [Symbol.asyncIterator](): AsyncIterableIterator<R>;
182
+ values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>;
183
+ [Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>;
181
184
  }
182
185
  const ReadableStream: {
183
186
  prototype: ReadableStream;
@@ -422,7 +422,7 @@ declare module "stream" {
422
422
  * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
423
423
  * **Default: `true`**.
424
424
  */
425
- iterator(options?: { destroyOnReturn?: boolean }): AsyncIterableIterator<any>;
425
+ iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator<any>;
426
426
  /**
427
427
  * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
428
428
  * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
@@ -651,7 +651,7 @@ declare module "stream" {
651
651
  removeListener(event: "readable", listener: () => void): this;
652
652
  removeListener(event: "resume", listener: () => void): this;
653
653
  removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
654
- [Symbol.asyncIterator](): AsyncIterableIterator<any>;
654
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
655
655
  /**
656
656
  * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
657
657
  * @since v20.4.0
@@ -340,11 +340,22 @@ declare module "node:test" {
340
340
  globPatterns?: readonly string[] | undefined;
341
341
  /**
342
342
  * Sets inspector port of test child process.
343
- * If a nullish value is provided, each process gets its own port,
344
- * incremented from the primary's `process.debugPort`.
343
+ * This can be a number, or a function that takes no arguments and returns a
344
+ * number. If a nullish value is provided, each process gets its own port,
345
+ * incremented from the primary's `process.debugPort`. This option is ignored
346
+ * if the `isolation` option is set to `'none'` as no child processes are
347
+ * spawned.
345
348
  * @default undefined
346
349
  */
347
350
  inspectPort?: number | (() => number) | undefined;
351
+ /**
352
+ * Configures the type of test isolation. If set to
353
+ * `'process'`, each test file is run in a separate child process. If set to
354
+ * `'none'`, all test files run in the current process.
355
+ * @default 'process'
356
+ * @since v22.8.0
357
+ */
358
+ isolation?: "process" | "none" | undefined;
348
359
  /**
349
360
  * If truthy, the test context will only run tests that have the `only` option set
350
361
  */
@@ -1635,9 +1646,10 @@ declare module "node:test" {
1635
1646
  * This function is used to set a custom resolver for the location of the snapshot file used for snapshot testing.
1636
1647
  * By default, the snapshot filename is the same as the entry point filename with `.snapshot` appended.
1637
1648
  * @since v22.3.0
1638
- * @param fn A function which returns a string specifying the location of the snapshot file.
1639
- * The function receives the path of the test file as its only argument.
1640
- * If `process.argv[1]` is not associated with a file (for example in the REPL), the input is undefined.
1649
+ * @param fn A function used to compute the location of the snapshot file.
1650
+ * The function receives the path of the test file as its only argument. If the
1651
+ * test is not associated with a file (for example in the REPL), the input is
1652
+ * undefined. `fn()` must return a string specifying the location of the snapshot file.
1641
1653
  */
1642
1654
  function setResolveSnapshotPath(fn: (path: string | undefined) => string): void;
1643
1655
  }
@@ -1784,6 +1796,25 @@ interface TestCoverage {
1784
1796
  count: number;
1785
1797
  }>;
1786
1798
  }>;
1799
+ /**
1800
+ * An object containing whether or not the coverage for
1801
+ * each coverage type.
1802
+ * @since v22.9.0
1803
+ */
1804
+ thresholds: {
1805
+ /**
1806
+ * The function coverage threshold.
1807
+ */
1808
+ function: number;
1809
+ /**
1810
+ * The branch coverage threshold.
1811
+ */
1812
+ branch: number;
1813
+ /**
1814
+ * The line coverage threshold.
1815
+ */
1816
+ line: number;
1817
+ };
1787
1818
  /**
1788
1819
  * An object containing a summary of coverage for all files.
1789
1820
  */
@@ -80,7 +80,7 @@ declare module "timers/promises" {
80
80
  * @experimental
81
81
  * @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
82
82
  */
83
- wait: (delay?: number, options?: Pick<TimerOptions, "signal">) => Promise<void>;
83
+ wait: (delay?: number, options?: TimerOptions) => Promise<void>;
84
84
  /**
85
85
  * An experimental API defined by the [Scheduling APIs](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking) draft specification
86
86
  * being developed as a standard Web Platform API.
@@ -809,6 +809,12 @@ declare module "tls" {
809
809
  * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error.
810
810
  */
811
811
  ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined;
812
+ /**
813
+ * Treat intermediate (non-self-signed)
814
+ * certificates in the trust CA certificate list as trusted.
815
+ * @since v22.9.0, v20.18.0
816
+ */
817
+ allowPartialTrustChain?: boolean | undefined;
812
818
  /**
813
819
  * Optionally override the trusted CA certificates. Default is to trust
814
820
  * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
@@ -22,22 +22,22 @@
22
22
  * IN THE SOFTWARE.
23
23
  */
24
24
 
25
- // NOTE: These definitions support NodeJS and TypeScript 4.9 through 5.6.
25
+ // NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6.
26
26
 
27
- // Reference required types from the default lib:
27
+ // Reference required TypeScript libs:
28
28
  /// <reference lib="es2020" />
29
- /// <reference lib="esnext.asynciterable" />
30
- /// <reference lib="esnext.intl" />
31
- /// <reference lib="esnext.bigint" />
32
29
 
33
- // Definitions specific to TypeScript 4.9 through 5.6
30
+ // TypeScript backwards-compatibility definitions:
31
+ /// <reference path="../compatibility/index.d.ts" />
32
+
33
+ // Definitions specific to TypeScript 4.9 through 5.6:
34
34
  /// <reference path="./globals.typedarray.d.ts" />
35
35
  /// <reference path="./buffer.buffer.d.ts" />
36
36
 
37
- // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
37
+ // Definitions for Node.js modules that are not specific to any version of TypeScript:
38
+ /// <reference path="../globals.d.ts" />
38
39
  /// <reference path="../assert.d.ts" />
39
40
  /// <reference path="../assert/strict.d.ts" />
40
- /// <reference path="../globals.d.ts" />
41
41
  /// <reference path="../async_hooks.d.ts" />
42
42
  /// <reference path="../buffer.d.ts" />
43
43
  /// <reference path="../child_process.d.ts" />
@@ -90,5 +90,3 @@
90
90
  /// <reference path="../wasi.d.ts" />
91
91
  /// <reference path="../worker_threads.d.ts" />
92
92
  /// <reference path="../zlib.d.ts" />
93
-
94
- /// <reference path="../globals.global.d.ts" />
@@ -757,6 +757,9 @@ declare module "url" {
757
757
  */
758
758
  toJSON(): string;
759
759
  }
760
+ interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
761
+ [Symbol.iterator](): URLSearchParamsIterator<T>;
762
+ }
760
763
  /**
761
764
  * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the
762
765
  * four following constructors.
@@ -827,7 +830,7 @@ declare module "url" {
827
830
  *
828
831
  * Alias for `urlSearchParams[@@iterator]()`.
829
832
  */
830
- entries(): IterableIterator<[string, string]>;
833
+ entries(): URLSearchParamsIterator<[string, string]>;
831
834
  /**
832
835
  * Iterates over each name-value pair in the query and invokes the given function.
833
836
  *
@@ -881,7 +884,7 @@ declare module "url" {
881
884
  * // foo
882
885
  * ```
883
886
  */
884
- keys(): IterableIterator<string>;
887
+ keys(): URLSearchParamsIterator<string>;
885
888
  /**
886
889
  * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
887
890
  * set the first such pair's value to `value` and remove all others. If not,
@@ -931,8 +934,8 @@ declare module "url" {
931
934
  /**
932
935
  * Returns an ES6 `Iterator` over the values of each name-value pair.
933
936
  */
934
- values(): IterableIterator<string>;
935
- [Symbol.iterator](): IterableIterator<[string, string]>;
937
+ values(): URLSearchParamsIterator<string>;
938
+ [Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
936
939
  }
937
940
  import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
938
941
  global {
@@ -108,6 +108,25 @@ declare module "util" {
108
108
  export interface InspectOptionsStylized extends InspectOptions {
109
109
  stylize(text: string, styleType: Style): string;
110
110
  }
111
+ export interface StacktraceObject {
112
+ /**
113
+ * Returns the name of the function associated with this stack frame.
114
+ */
115
+ functionName: string;
116
+ /**
117
+ * Returns the name of the resource that contains the script for the
118
+ * function for this StackFrame.
119
+ */
120
+ scriptName: string;
121
+ /**
122
+ * Returns the number, 1-based, of the line for the associate function call.
123
+ */
124
+ lineNumber: number;
125
+ /**
126
+ * Returns the 1-based column offset on the line for the associated function call.
127
+ */
128
+ column: number;
129
+ }
111
130
  /**
112
131
  * The `util.format()` method returns a formatted string using the first argument
113
132
  * as a `printf`-like format string which can contain zero or more format
@@ -166,6 +185,52 @@ declare module "util" {
166
185
  * @since v10.0.0
167
186
  */
168
187
  export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
188
+ /**
189
+ * Returns an array of stacktrace objects containing the stack of
190
+ * the caller function.
191
+ *
192
+ * ```js
193
+ * const util = require('node:util');
194
+ *
195
+ * function exampleFunction() {
196
+ * const callSites = util.getCallSite();
197
+ *
198
+ * console.log('Call Sites:');
199
+ * callSites.forEach((callSite, index) => {
200
+ * console.log(`CallSite ${index + 1}:`);
201
+ * console.log(`Function Name: ${callSite.functionName}`);
202
+ * console.log(`Script Name: ${callSite.scriptName}`);
203
+ * console.log(`Line Number: ${callSite.lineNumber}`);
204
+ * console.log(`Column Number: ${callSite.column}`);
205
+ * });
206
+ * // CallSite 1:
207
+ * // Function Name: exampleFunction
208
+ * // Script Name: /home/example.js
209
+ * // Line Number: 5
210
+ * // Column Number: 26
211
+ *
212
+ * // CallSite 2:
213
+ * // Function Name: anotherFunction
214
+ * // Script Name: /home/example.js
215
+ * // Line Number: 22
216
+ * // Column Number: 3
217
+ *
218
+ * // ...
219
+ * }
220
+ *
221
+ * // A function to simulate another stack layer
222
+ * function anotherFunction() {
223
+ * exampleFunction();
224
+ * }
225
+ *
226
+ * anotherFunction();
227
+ * ```
228
+ * @param frames Number of frames returned in the stacktrace.
229
+ * **Default:** `10`. Allowable range is between 1 and 200.
230
+ * @return An array of stacktrace objects
231
+ * @since v22.9.0
232
+ */
233
+ export function getCallSite(frames?: number): StacktraceObject[];
169
234
  /**
170
235
  * Returns the string name for a numeric error code that comes from a Node.js API.
171
236
  * The mapping between error codes and error names is platform-dependent.
@@ -1517,18 +1582,23 @@ declare module "util" {
1517
1582
  string | boolean
1518
1583
  >;
1519
1584
 
1585
+ type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
1586
+ & { -readonly [LongOption in keyof O]?: V[LongOption] }
1587
+ & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
1588
+ ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
1589
+
1520
1590
  type ParsedValues<T extends ParseArgsConfig> =
1521
1591
  & IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
1522
- & (T["options"] extends ParseArgsOptionsConfig ? {
1523
- -readonly [LongOption in keyof T["options"]]:
1524
- // when "default" is not undefined, the value will be present
1525
- | (T["options"][LongOption]["default"] extends {} ? never : undefined)
1526
- | IfDefaultsFalse<
1592
+ & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
1593
+ T["options"],
1594
+ {
1595
+ [LongOption in keyof T["options"]]: IfDefaultsFalse<
1527
1596
  T["options"][LongOption]["multiple"],
1528
1597
  Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1529
1598
  ExtractOptionValue<T, T["options"][LongOption]>
1530
1599
  >;
1531
- }
1600
+ }
1601
+ >
1532
1602
  : {});
1533
1603
 
1534
1604
  type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
@@ -1720,7 +1790,7 @@ declare module "util" {
1720
1790
  * Each item of the iterator is a JavaScript `Array`. The first item of the array
1721
1791
  * is the `name`, the second item of the array is the `value`.
1722
1792
  */
1723
- entries(): IterableIterator<[name: string, value: string]>;
1793
+ entries(): NodeJS.Iterator<[name: string, value: string]>;
1724
1794
  /**
1725
1795
  * Returns the value of the first name-value pair whose name is `name`. If there
1726
1796
  * are no such pairs, `null` is returned.
@@ -1746,7 +1816,7 @@ declare module "util" {
1746
1816
  * // bar
1747
1817
  * ```
1748
1818
  */
1749
- keys(): IterableIterator<string>;
1819
+ keys(): NodeJS.Iterator<string>;
1750
1820
  /**
1751
1821
  * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
1752
1822
  * set the first such pair's value to `value`.
@@ -1765,11 +1835,11 @@ declare module "util" {
1765
1835
  /**
1766
1836
  * Returns an iterator over the values of each name-value pair.
1767
1837
  */
1768
- values(): IterableIterator<string>;
1838
+ values(): NodeJS.Iterator<string>;
1769
1839
  /**
1770
1840
  * Returns an iterator over each of the name-value pairs in the parameters.
1771
1841
  */
1772
- [Symbol.iterator]: typeof MIMEParams.prototype.entries;
1842
+ [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>;
1773
1843
  }
1774
1844
  }
1775
1845
  declare module "util/types" {
@@ -230,16 +230,23 @@ declare module "vm" {
230
230
  */
231
231
  runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
232
232
  /**
233
- * First contextifies the given `contextObject`, runs the compiled code contained
234
- * by the `vm.Script` object within the created context, and returns the result.
235
- * Running code does not have access to local scope.
233
+ * This method is a shortcut to `script.runInContext(vm.createContext(options), options)`.
234
+ * It does several things at once:
235
+ *
236
+ * 1. Creates a new context.
237
+ * 2. If `contextObject` is an object, contextifies it with the new context.
238
+ * If `contextObject` is undefined, creates a new object and contextifies it.
239
+ * If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
240
+ * 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code
241
+ * does not have access to the scope in which this method is called.
242
+ * 4. Returns the result.
236
243
  *
237
244
  * The following example compiles code that sets a global variable, then executes
238
245
  * the code multiple times in different contexts. The globals are set on and
239
246
  * contained within each individual `context`.
240
247
  *
241
248
  * ```js
242
- * import vm from 'node:vm';
249
+ * const vm = require('node:vm');
243
250
  *
244
251
  * const script = new vm.Script('globalVar = "set"');
245
252
  *
@@ -250,12 +257,22 @@ declare module "vm" {
250
257
  *
251
258
  * console.log(contexts);
252
259
  * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
260
+ *
261
+ * // This would throw if the context is created from a contextified object.
262
+ * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary
263
+ * // global objects that can be frozen.
264
+ * const freezeScript = new vm.Script('Object.freeze(globalThis); globalThis;');
265
+ * const frozenContext = freezeScript.runInNewContext(vm.constants.DONT_CONTEXTIFY);
253
266
  * ```
254
267
  * @since v0.3.1
255
- * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
268
+ * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
269
+ * If `undefined`, an empty contextified object will be created for backwards compatibility.
256
270
  * @return the result of the very last statement executed in the script.
257
271
  */
258
- runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
272
+ runInNewContext(
273
+ contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
274
+ options?: RunningScriptInNewContextOptions,
275
+ ): any;
259
276
  /**
260
277
  * Runs the compiled code contained by the `vm.Script` within the context of the
261
278
  * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
@@ -347,17 +364,17 @@ declare module "vm" {
347
364
  sourceMapURL?: string | undefined;
348
365
  }
349
366
  /**
350
- * If given a `contextObject`, the `vm.createContext()` method will
367
+ * If the given `contextObject` is an object, the `vm.createContext()` method will
351
368
  * [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
352
- * and return a reference to it so that it can be used in `{@link runInContext}` or
353
- * [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options). Inside such
354
- * scripts, the `contextObject` will be the global object, retaining all of its
355
- * existing properties but also having the built-in objects and functions any
356
- * standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
369
+ * and return a reference to it so that it can be used in calls to {@link runInContext} or
370
+ * [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
371
+ * Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
372
+ * existing properties but also having the built-in objects and functions any standard
373
+ * [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
357
374
  * variables will remain unchanged.
358
375
  *
359
376
  * ```js
360
- * import vm from 'node:vm';
377
+ * const vm = require('node:vm');
361
378
  *
362
379
  * global.globalVar = 3;
363
380
  *
@@ -374,7 +391,12 @@ declare module "vm" {
374
391
  * ```
375
392
  *
376
393
  * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
377
- * empty `contextified` object will be returned.
394
+ * empty contextified object will be returned.
395
+ *
396
+ * When the global object in the newly created context is contextified, it has some quirks
397
+ * compared to ordinary global objects. For example, it cannot be frozen. To create a context
398
+ * without the contextifying quirks, pass `vm.constants.DONT_CONTEXTIFY` as the `contextObject`
399
+ * argument. See the documentation of `vm.constants.DONT_CONTEXTIFY` for details.
378
400
  *
379
401
  * The `vm.createContext()` method is primarily useful for creating a single
380
402
  * context that can be used to run multiple scripts. For instance, if emulating a
@@ -385,11 +407,17 @@ declare module "vm" {
385
407
  * The provided `name` and `origin` of the context are made visible through the
386
408
  * Inspector API.
387
409
  * @since v0.3.1
410
+ * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
411
+ * If `undefined`, an empty contextified object will be created for backwards compatibility.
388
412
  * @return contextified object.
389
413
  */
390
- function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
414
+ function createContext(
415
+ contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
416
+ options?: CreateContextOptions,
417
+ ): Context;
391
418
  /**
392
- * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
419
+ * Returns `true` if the given `object` object has been contextified using {@link createContext},
420
+ * or if it's the global object of a context created using `vm.constants.DONT_CONTEXTIFY`.
393
421
  * @since v0.11.7
394
422
  */
395
423
  function isContext(sandbox: Context): boolean;
@@ -422,18 +450,26 @@ declare module "vm" {
422
450
  */
423
451
  function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
424
452
  /**
425
- * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
426
- * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
427
- * runs it within the created context, then returns the result. Running code
428
- * does not have access to the local scope.
429
- *
453
+ * This method is a shortcut to
454
+ * `(new vm.Script(code, options)).runInContext(vm.createContext(options), options)`.
430
455
  * If `options` is a string, then it specifies the filename.
431
456
  *
457
+ * It does several things at once:
458
+ *
459
+ * 1. Creates a new context.
460
+ * 2. If `contextObject` is an object, contextifies it with the new context.
461
+ * If `contextObject` is undefined, creates a new object and contextifies it.
462
+ * If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
463
+ * 3. Compiles the code as a`vm.Script`
464
+ * 4. Runs the compield code within the created context. The code does not have access to the scope in
465
+ * which this method is called.
466
+ * 5. Returns the result.
467
+ *
432
468
  * The following example compiles and executes code that increments a global
433
469
  * variable and sets a new one. These globals are contained in the `contextObject`.
434
470
  *
435
471
  * ```js
436
- * import vm from 'node:vm';
472
+ * const vm = require('node:vm');
437
473
  *
438
474
  * const contextObject = {
439
475
  * animal: 'cat',
@@ -443,15 +479,21 @@ declare module "vm" {
443
479
  * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
444
480
  * console.log(contextObject);
445
481
  * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
482
+ *
483
+ * // This would throw if the context is created from a contextified object.
484
+ * // vm.constants.DONT_CONTEXTIFY allows creating contexts with ordinary global objects that
485
+ * // can be frozen.
486
+ * const frozenContext = vm.runInNewContext('Object.freeze(globalThis); globalThis;', vm.constants.DONT_CONTEXTIFY);
446
487
  * ```
447
488
  * @since v0.3.1
448
489
  * @param code The JavaScript code to compile and run.
449
- * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
490
+ * @param contextObject Either `vm.constants.DONT_CONTEXTIFY` or an object that will be contextified.
491
+ * If `undefined`, an empty contextified object will be created for backwards compatibility.
450
492
  * @return the result of the very last statement executed in the script.
451
493
  */
452
494
  function runInNewContext(
453
495
  code: string,
454
- contextObject?: Context,
496
+ contextObject?: Context | typeof constants.DONT_CONTEXTIFY,
455
497
  options?: RunningCodeInNewContextOptions | string,
456
498
  ): any;
457
499
  /**
@@ -902,19 +944,31 @@ declare module "vm" {
902
944
  }
903
945
  /**
904
946
  * Returns an object containing commonly used constants for VM operations.
905
- * @since v20.12.0
947
+ * @since v21.7.0, v20.12.0
906
948
  */
907
949
  namespace constants {
908
950
  /**
909
- * Stability: 1.1 - Active development
910
- *
911
951
  * A constant that can be used as the `importModuleDynamically` option to `vm.Script`
912
952
  * and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
913
953
  * context to load the requested module.
914
954
  *
915
955
  * For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
956
+ * @since v21.7.0, v20.12.0
916
957
  */
917
958
  const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
959
+ /**
960
+ * This constant, when used as the `contextObject` argument in vm APIs, instructs Node.js to create
961
+ * a context without wrapping its global object with another object in a Node.js-specific manner.
962
+ * As a result, the `globalThis` value inside the new context would behave more closely to an ordinary
963
+ * one.
964
+ *
965
+ * When `vm.constants.DONT_CONTEXTIFY` is used as the `contextObject` argument to {@link createContext},
966
+ * the returned object is a proxy-like object to the global object in the newly created context with
967
+ * fewer Node.js-specific quirks. It is reference equal to the `globalThis` value in the new context,
968
+ * can be modified from outside the context, and can be used to access built-ins in the new context directly.
969
+ * @since v22.8.0
970
+ */
971
+ const DONT_CONTEXTIFY: number;
918
972
  }
919
973
  }
920
974
  declare module "node:vm" {
@@ -267,7 +267,7 @@ declare module "worker_threads" {
267
267
  trackUnmanagedFds?: boolean | undefined;
268
268
  /**
269
269
  * An optional `name` to be appended to the worker title
270
- * for debuggin/identification purposes, making the final title as
270
+ * for debugging/identification purposes, making the final title as
271
271
  * `[worker ${id}] ${name}`.
272
272
  */
273
273
  name?: string | undefined;
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 07 Oct 2024 22:07:58 GMT
11
+ * Last updated: Tue, 05 Nov 2024 01:29:26 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -45,7 +45,7 @@ declare module "assert" {
45
45
  /** The `operator` property on the error instance. */
46
46
  operator?: string | undefined;
47
47
  /** If provided, the generated stack trace omits frames before this function. */
48
- // eslint-disable-next-line @typescript-eslint/ban-types
48
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
49
49
  stackStartFn?: Function | undefined;
50
50
  });
51
51
  }
@@ -226,7 +226,7 @@ declare module "assert" {
226
226
  expected: unknown,
227
227
  message?: string | Error,
228
228
  operator?: string,
229
- // eslint-disable-next-line @typescript-eslint/ban-types
229
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
230
230
  stackStartFn?: Function,
231
231
  ): never;
232
232
  /**
@@ -0,0 +1,16 @@
1
+ // Polyfills for the explicit resource management types added in TypeScript 5.2.
2
+ // TODO: remove once this package no longer supports TS 5.1, and replace with a
3
+ // <reference> to TypeScript's disposable library in index.d.ts.
4
+
5
+ interface SymbolConstructor {
6
+ readonly dispose: unique symbol;
7
+ readonly asyncDispose: unique symbol;
8
+ }
9
+
10
+ interface Disposable {
11
+ [Symbol.dispose](): void;
12
+ }
13
+
14
+ interface AsyncDisposable {
15
+ [Symbol.asyncDispose](): PromiseLike<void>;
16
+ }
@@ -0,0 +1,9 @@
1
+ // Declaration files in this directory contain types relating to TypeScript library features
2
+ // that are not included in all TypeScript versions supported by DefinitelyTyped, but
3
+ // which can be made backwards-compatible without needing `typesVersions`.
4
+ // If adding declarations to this directory, please specify which versions of TypeScript require them,
5
+ // so that they can be removed when no longer needed.
6
+
7
+ /// <reference path="disposable.d.ts" />
8
+ /// <reference path="indexable.d.ts" />
9
+ /// <reference path="iterators.d.ts" />
@@ -0,0 +1,23 @@
1
+ // Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
2
+ // TODO: these methods are not used within @types/node, and should be removed at the next
3
+ // major @types/node version; users should include the es2022 TypeScript libraries
4
+ // if they need these features.
5
+
6
+ interface RelativeIndexable<T> {
7
+ at(index: number): T | undefined;
8
+ }
9
+
10
+ interface String extends RelativeIndexable<string> {}
11
+ interface Array<T> extends RelativeIndexable<T> {}
12
+ interface ReadonlyArray<T> extends RelativeIndexable<T> {}
13
+ interface Int8Array extends RelativeIndexable<number> {}
14
+ interface Uint8Array extends RelativeIndexable<number> {}
15
+ interface Uint8ClampedArray extends RelativeIndexable<number> {}
16
+ interface Int16Array extends RelativeIndexable<number> {}
17
+ interface Uint16Array extends RelativeIndexable<number> {}
18
+ interface Int32Array extends RelativeIndexable<number> {}
19
+ interface Uint32Array extends RelativeIndexable<number> {}
20
+ interface Float32Array extends RelativeIndexable<number> {}
21
+ interface Float64Array extends RelativeIndexable<number> {}
22
+ interface BigInt64Array extends RelativeIndexable<bigint> {}
23
+ interface BigUint64Array extends RelativeIndexable<bigint> {}