cdk-ecr-deployment 2.5.6 → 2.5.22

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 (376) hide show
  1. package/.gitattributes +5 -4
  2. package/.jsii +673 -21
  3. package/.jsii.tabl.json +1 -0
  4. package/.projenrc.ts +100 -0
  5. package/API.md +4 -4
  6. package/README.md +4 -4
  7. package/lambda/go.mod +2 -5
  8. package/lambda/go.sum +39 -14
  9. package/lib/index.d.ts +7 -65
  10. package/lib/index.js +7 -45
  11. package/node_modules/@sindresorhus/is/dist/index.d.ts +12 -7
  12. package/node_modules/@sindresorhus/is/dist/index.js +9 -4
  13. package/node_modules/@sindresorhus/is/dist/types.d.ts +1 -0
  14. package/node_modules/@sindresorhus/is/package.json +1 -1
  15. package/node_modules/@sindresorhus/is/readme.md +25 -7
  16. package/node_modules/@types/cacheable-request/README.md +2 -2
  17. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  18. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +135 -75
  19. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +67 -38
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +226 -104
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +87 -58
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +29 -29
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -5
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +888 -256
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +16 -16
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +52 -8
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +27 -18
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +126 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +6 -5
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +166 -93
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +169 -70
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +301 -126
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +22 -13
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +453 -125
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +74 -46
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +103 -53
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +6 -2
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +20 -16
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +6 -4
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +114 -22
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +36 -14
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +15 -3
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +37 -26
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +96 -15
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +95 -82
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +6 -6
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +145 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +51 -175
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +21 -21
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +2 -14
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +983 -824
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +6 -6
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +1154 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +26 -1
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +127 -6
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +149 -50
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +30 -9
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +116 -0
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  93. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  94. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  95. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  96. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  97. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  98. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  99. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  100. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  101. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +1154 -0
  102. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  103. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  104. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
  105. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  106. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  107. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  108. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
  109. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  110. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  111. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  112. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  113. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  114. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +11 -7
  115. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +66 -56
  116. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +528 -70
  117. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +271 -14
  118. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +421 -34
  119. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +15 -21
  120. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +81 -37
  121. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +11 -11
  122. package/node_modules/@types/cacheable-request/package.json +5 -5
  123. package/node_modules/@types/keyv/README.md +1 -1
  124. package/node_modules/@types/keyv/index.d.ts +16 -3
  125. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  126. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +135 -75
  127. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +67 -38
  128. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +226 -104
  129. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +87 -58
  130. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +29 -29
  131. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -5
  132. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +888 -256
  133. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +16 -16
  134. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
  135. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +52 -8
  136. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +27 -18
  137. package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +126 -0
  138. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +6 -5
  139. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +166 -93
  140. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +169 -70
  141. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +301 -126
  142. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +22 -13
  143. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +453 -125
  144. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +74 -46
  145. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +103 -53
  146. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +6 -2
  147. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +20 -16
  148. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +6 -4
  149. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +114 -22
  150. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +36 -14
  151. package/node_modules/@types/keyv/node_modules/@types/node/package.json +15 -3
  152. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +37 -26
  153. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +96 -15
  154. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +95 -82
  155. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  156. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +6 -6
  157. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +145 -0
  158. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +51 -175
  159. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +21 -21
  160. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +2 -14
  161. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +983 -824
  162. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +6 -6
  163. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +1154 -0
  164. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +26 -1
  165. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +127 -6
  166. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +149 -50
  167. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +30 -9
  168. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  169. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  170. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  171. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  172. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  173. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  174. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  175. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  176. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
  177. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  178. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  179. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  180. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  181. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  182. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  183. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  184. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  185. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  186. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  187. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  188. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  189. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  190. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  191. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  192. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  193. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +116 -0
  194. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  195. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  196. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  197. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  198. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  199. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  200. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  201. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  202. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  203. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  204. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  205. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  206. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  207. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  208. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  209. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +1154 -0
  210. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  211. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  212. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
  213. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  214. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  215. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  216. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
  217. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  218. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  219. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  220. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  221. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  222. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +11 -7
  223. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +66 -56
  224. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +528 -70
  225. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +271 -14
  226. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +421 -34
  227. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +15 -21
  228. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +81 -37
  229. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +11 -11
  230. package/node_modules/@types/keyv/package.json +3 -3
  231. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  232. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +135 -75
  233. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +67 -38
  234. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +226 -104
  235. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +87 -58
  236. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +29 -29
  237. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -5
  238. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +888 -256
  239. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +16 -16
  240. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
  241. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +52 -8
  242. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +27 -18
  243. package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +126 -0
  244. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +6 -5
  245. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +166 -93
  246. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +169 -70
  247. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +301 -126
  248. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +22 -13
  249. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +453 -125
  250. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +74 -46
  251. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +103 -53
  252. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +6 -2
  253. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +20 -16
  254. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +6 -4
  255. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +114 -22
  256. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +36 -14
  257. package/node_modules/@types/responselike/node_modules/@types/node/package.json +15 -3
  258. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +37 -26
  259. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +96 -15
  260. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +95 -82
  261. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  262. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +6 -6
  263. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +145 -0
  264. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +51 -175
  265. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +21 -21
  266. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +2 -14
  267. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +983 -824
  268. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +6 -6
  269. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +1154 -0
  270. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +26 -1
  271. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +127 -6
  272. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +149 -50
  273. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +30 -9
  274. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  275. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  276. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  277. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  278. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  279. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  280. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  281. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  282. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
  283. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  284. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  285. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  286. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  287. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  288. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  289. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  290. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  291. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  292. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  293. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  294. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  295. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  296. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  297. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  298. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  299. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +116 -0
  300. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  301. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  302. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  303. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  304. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  305. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  306. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  307. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  308. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  309. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  310. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  311. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  312. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  313. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  314. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  315. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +1154 -0
  316. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  317. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  318. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
  319. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  320. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  321. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  322. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
  323. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  324. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  325. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  326. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  327. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  328. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +11 -7
  329. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +66 -56
  330. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +528 -70
  331. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +271 -14
  332. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +421 -34
  333. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +15 -21
  334. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +81 -37
  335. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +11 -11
  336. package/node_modules/cacheable-request/package.json +1 -1
  337. package/node_modules/clone-response/node_modules/mimic-response/index.js +32 -0
  338. package/node_modules/{get-stream → clone-response/node_modules/mimic-response}/license +1 -1
  339. package/node_modules/clone-response/node_modules/mimic-response/package.json +37 -0
  340. package/node_modules/clone-response/node_modules/mimic-response/readme.md +54 -0
  341. package/node_modules/clone-response/package.json +3 -6
  342. package/node_modules/got/dist/source/as-promise/index.js +1 -0
  343. package/node_modules/got/package.json +2 -1
  344. package/node_modules/http-cache-semantics/index.js +4 -3
  345. package/node_modules/http-cache-semantics/package.json +2 -8
  346. package/node_modules/keyv/README.md +141 -5
  347. package/node_modules/keyv/package.json +56 -50
  348. package/node_modules/keyv/src/index.d.ts +116 -0
  349. package/node_modules/keyv/src/index.js +179 -24
  350. package/node_modules/mimic-response/index.js +58 -13
  351. package/node_modules/mimic-response/license +1 -1
  352. package/node_modules/mimic-response/package.json +40 -35
  353. package/node_modules/mimic-response/readme.md +33 -9
  354. package/node_modules/responselike/package.json +3 -2
  355. package/package.json +54 -25
  356. package/rosetta/default.ts-fixture +17 -0
  357. package/changelog.md +0 -2
  358. package/node_modules/decompress-response/node_modules/mimic-response/index.js +0 -77
  359. package/node_modules/decompress-response/node_modules/mimic-response/package.json +0 -42
  360. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +0 -78
  361. package/node_modules/keyv/.nyc_output/37411020-4142-4b08-b825-343ba2427bf7.json +0 -1
  362. package/node_modules/keyv/.nyc_output/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +0 -1
  363. package/node_modules/keyv/.nyc_output/processinfo/37411020-4142-4b08-b825-343ba2427bf7.json +0 -1
  364. package/node_modules/keyv/.nyc_output/processinfo/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +0 -1
  365. package/node_modules/keyv/.nyc_output/processinfo/index.json +0 -1
  366. package/node_modules/keyv/test/test.js +0 -132
  367. package/node_modules/keyv/test/testdb.sqlite +0 -0
  368. package/releasetag.txt +0 -1
  369. package/version.txt +0 -1
  370. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/buffer-stream.js +0 -0
  371. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.d.ts +0 -0
  372. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.js +0 -0
  373. /package/node_modules/{decompress-response/node_modules/mimic-response → cacheable-request/node_modules/get-stream}/license +0 -0
  374. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/package.json +0 -0
  375. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/readme.md +0 -0
  376. /package/node_modules/{decompress-response/node_modules/mimic-response → mimic-response}/index.d.ts +0 -0
@@ -1,22 +1,22 @@
1
1
  /**
2
- * The `fs` module enables interacting with the file system in a
2
+ * The `node:fs` module enables interacting with the file system in a
3
3
  * way modeled on standard POSIX functions.
4
4
  *
5
5
  * To use the promise-based APIs:
6
6
  *
7
7
  * ```js
8
- * import * as fs from 'fs/promises';
8
+ * import * as fs from 'node:fs/promises';
9
9
  * ```
10
10
  *
11
11
  * To use the callback and sync APIs:
12
12
  *
13
13
  * ```js
14
- * import * as fs from 'fs';
14
+ * import * as fs from 'node:fs';
15
15
  * ```
16
16
  *
17
17
  * All file system operations have synchronous, callback, and promise-based
18
18
  * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
19
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/fs.js)
19
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/fs.js)
20
20
  */
21
21
  declare module 'fs' {
22
22
  import * as stream from 'node:stream';
@@ -73,7 +73,7 @@ declare module 'fs' {
73
73
  /**
74
74
  * A `fs.Stats` object provides information about a file.
75
75
  *
76
- * Objects returned from {@link stat}, {@link lstat} and {@link fstat} and
76
+ * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and
77
77
  * their synchronous counterparts are of this type.
78
78
  * If `bigint` in the `options` passed to those methods is true, the numeric values
79
79
  * will be `bigint` instead of `number`, and the object will contain additional
@@ -131,6 +131,62 @@ declare module 'fs' {
131
131
  * @since v0.1.21
132
132
  */
133
133
  export class Stats {}
134
+ export interface StatsFsBase<T> {
135
+ /** Type of file system. */
136
+ type: T;
137
+ /** Optimal transfer block size. */
138
+ bsize: T;
139
+ /** Total data blocks in file system. */
140
+ blocks: T;
141
+ /** Free blocks in file system. */
142
+ bfree: T;
143
+ /** Available blocks for unprivileged users */
144
+ bavail: T;
145
+ /** Total file nodes in file system. */
146
+ files: T;
147
+ /** Free file nodes in file system. */
148
+ ffree: T;
149
+ }
150
+ export interface StatsFs extends StatsFsBase<number> {}
151
+ /**
152
+ * Provides information about a mounted file system.
153
+ *
154
+ * Objects returned from {@link statfs} and its synchronous counterpart are of
155
+ * this type. If `bigint` in the `options` passed to those methods is `true`, the
156
+ * numeric values will be `bigint` instead of `number`.
157
+ *
158
+ * ```console
159
+ * StatFs {
160
+ * type: 1397114950,
161
+ * bsize: 4096,
162
+ * blocks: 121938943,
163
+ * bfree: 61058895,
164
+ * bavail: 61058895,
165
+ * files: 999,
166
+ * ffree: 1000000
167
+ * }
168
+ * ```
169
+ *
170
+ * `bigint` version:
171
+ *
172
+ * ```console
173
+ * StatFs {
174
+ * type: 1397114950n,
175
+ * bsize: 4096n,
176
+ * blocks: 121938943n,
177
+ * bfree: 61058895n,
178
+ * bavail: 61058895n,
179
+ * files: 999n,
180
+ * ffree: 1000000n
181
+ * }
182
+ * ```
183
+ * @since v19.6.0, v18.15.0
184
+ */
185
+ export class StatsFs {}
186
+ export interface BigIntStatsFs extends StatsFsBase<bigint> {}
187
+ export interface StatFsOptions {
188
+ bigint?: boolean | undefined;
189
+ }
134
190
  /**
135
191
  * A representation of a directory entry, which can be a file or a subdirectory
136
192
  * within the directory, as returned by reading from an `fs.Dir`. The
@@ -184,6 +240,11 @@ declare module 'fs' {
184
240
  * @since v10.10.0
185
241
  */
186
242
  name: string;
243
+ /**
244
+ * The base path that this `fs.Dirent` object refers to.
245
+ * @since v20.1.0
246
+ */
247
+ path: string;
187
248
  }
188
249
  /**
189
250
  * A class representing a directory stream.
@@ -191,7 +252,7 @@ declare module 'fs' {
191
252
  * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
192
253
  *
193
254
  * ```js
194
- * import { opendir } from 'fs/promises';
255
+ * import { opendir } from 'node:fs/promises';
195
256
  *
196
257
  * try {
197
258
  * const dir = await opendir('./');
@@ -494,7 +555,7 @@ declare module 'fs' {
494
555
  * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html).
495
556
  *
496
557
  * ```js
497
- * import { rename } from 'fs';
558
+ * import { rename } from 'node:fs';
498
559
  *
499
560
  * rename('oldFile.txt', 'newFile.txt', (err) => {
500
561
  * if (err) throw err;
@@ -527,7 +588,7 @@ declare module 'fs' {
527
588
  * first argument. In this case, `fs.ftruncate()` is called.
528
589
  *
529
590
  * ```js
530
- * import { truncate } from 'fs';
591
+ * import { truncate } from 'node:fs';
531
592
  * // Assuming that 'path/file.txt' is a regular file.
532
593
  * truncate('path/file.txt', (err) => {
533
594
  * if (err) throw err;
@@ -579,7 +640,7 @@ declare module 'fs' {
579
640
  * file:
580
641
  *
581
642
  * ```js
582
- * import { open, close, ftruncate } from 'fs';
643
+ * import { open, close, ftruncate } from 'node:fs';
583
644
  *
584
645
  * function closeFd(fd) {
585
646
  * close(fd, (err) => {
@@ -736,7 +797,7 @@ declare module 'fs' {
736
797
  * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail.
737
798
  *
738
799
  * ```js
739
- * import { chmod } from 'fs';
800
+ * import { chmod } from 'node:fs';
740
801
  *
741
802
  * chmod('my_file.txt', 0o775, (err) => {
742
803
  * if (err) throw err;
@@ -818,7 +879,10 @@ declare module 'fs' {
818
879
  *
819
880
  * In case of an error, the `err.code` will be one of `Common System Errors`.
820
881
  *
821
- * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended.
882
+ * {@link stat} follows symbolic links. Use {@link lstat} to look at the
883
+ * links themselves.
884
+ *
885
+ * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
822
886
  * Instead, user code should open/read/write the file directly and handle the
823
887
  * error raised if the file is not available.
824
888
  *
@@ -835,7 +899,7 @@ declare module 'fs' {
835
899
  * The next program will check for the stats of the given paths:
836
900
  *
837
901
  * ```js
838
- * import { stat } from 'fs';
902
+ * import { stat } from 'node:fs';
839
903
  *
840
904
  * const pathsToCheck = ['./txtDir', './txtDir/file.txt'];
841
905
  *
@@ -1081,6 +1145,72 @@ declare module 'fs' {
1081
1145
  ): Promise<BigIntStats>;
1082
1146
  function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
1083
1147
  }
1148
+ /**
1149
+ * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
1150
+ * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object.
1151
+ *
1152
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
1153
+ * @since v19.6.0, v18.15.0
1154
+ * @param path A path to an existing file or directory on the file system to be queried.
1155
+ */
1156
+ export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void;
1157
+ export function statfs(
1158
+ path: PathLike,
1159
+ options:
1160
+ | (StatFsOptions & {
1161
+ bigint?: false | undefined;
1162
+ })
1163
+ | undefined,
1164
+ callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void
1165
+ ): void;
1166
+ export function statfs(
1167
+ path: PathLike,
1168
+ options: StatFsOptions & {
1169
+ bigint: true;
1170
+ },
1171
+ callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void
1172
+ ): void;
1173
+ export function statfs(path: PathLike, options: StatFsOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void): void;
1174
+ export namespace statfs {
1175
+ /**
1176
+ * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an <fs.StatFs> object.
1177
+ * @param path A path to an existing file or directory on the file system to be queried.
1178
+ */
1179
+ function __promisify__(
1180
+ path: PathLike,
1181
+ options?: StatFsOptions & {
1182
+ bigint?: false | undefined;
1183
+ }
1184
+ ): Promise<StatsFs>;
1185
+ function __promisify__(
1186
+ path: PathLike,
1187
+ options: StatFsOptions & {
1188
+ bigint: true;
1189
+ }
1190
+ ): Promise<BigIntStatsFs>;
1191
+ function __promisify__(path: PathLike, options?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
1192
+ }
1193
+ /**
1194
+ * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which
1195
+ * contains `path`.
1196
+ *
1197
+ * In case of an error, the `err.code` will be one of `Common System Errors`.
1198
+ * @since v19.6.0, v18.15.0
1199
+ * @param path A path to an existing file or directory on the file system to be queried.
1200
+ */
1201
+ export function statfsSync(
1202
+ path: PathLike,
1203
+ options?: StatFsOptions & {
1204
+ bigint?: false | undefined;
1205
+ }
1206
+ ): StatsFs;
1207
+ export function statfsSync(
1208
+ path: PathLike,
1209
+ options: StatFsOptions & {
1210
+ bigint: true;
1211
+ }
1212
+ ): BigIntStatsFs;
1213
+ export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs;
1084
1214
  /**
1085
1215
  * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
1086
1216
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -1114,28 +1244,30 @@ declare module 'fs' {
1114
1244
  *
1115
1245
  * The `type` argument is only available on Windows and ignored on other platforms.
1116
1246
  * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
1117
- * not set, Node.js will autodetect `target` type and use `'file'` or `'dir'`. If
1118
- * the `target` does not exist, `'file'` will be used. Windows junction points
1119
- * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path.
1247
+ * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`.
1248
+ * If the `target` does not exist, `'file'` will be used. Windows junction points
1249
+ * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction
1250
+ * points on NTFS volumes can only point to directories.
1120
1251
  *
1121
- * Relative targets are relative to the links parent directory.
1252
+ * Relative targets are relative to the link's parent directory.
1122
1253
  *
1123
1254
  * ```js
1124
- * import { symlink } from 'fs';
1255
+ * import { symlink } from 'node:fs';
1125
1256
  *
1126
- * symlink('./mew', './example/mewtwo', callback);
1257
+ * symlink('./mew', './mewtwo', callback);
1127
1258
  * ```
1128
1259
  *
1129
- * The above example creates a symbolic link `mewtwo` in the `example` which points
1130
- * to `mew` in the same directory:
1260
+ * The above example creates a symbolic link `mewtwo` which points to `mew` in the
1261
+ * same directory:
1131
1262
  *
1132
1263
  * ```bash
1133
- * $ tree example/
1134
- * example/
1264
+ * $ tree .
1265
+ * .
1135
1266
  * ├── mew
1136
1267
  * └── mewtwo -> ./mew
1137
1268
  * ```
1138
1269
  * @since v0.1.31
1270
+ * @param [type='null']
1139
1271
  */
1140
1272
  export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
1141
1273
  /**
@@ -1161,6 +1293,7 @@ declare module 'fs' {
1161
1293
  * For detailed information, see the documentation of the asynchronous version of
1162
1294
  * this API: {@link symlink}.
1163
1295
  * @since v0.1.31
1296
+ * @param [type='null']
1164
1297
  */
1165
1298
  export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
1166
1299
  /**
@@ -1238,7 +1371,7 @@ declare module 'fs' {
1238
1371
  */
1239
1372
  export function readlinkSync(path: PathLike, options?: EncodingOption): string | Buffer;
1240
1373
  /**
1241
- * Asynchronously computes the canonical pathname by resolving `.`, `..` and
1374
+ * Asynchronously computes the canonical pathname by resolving `.`, `..`, and
1242
1375
  * symbolic links.
1243
1376
  *
1244
1377
  * A canonical pathname is not necessarily unique. Hard links and bind mounts can
@@ -1352,7 +1485,7 @@ declare module 'fs' {
1352
1485
  * possible exception are given to the completion callback.
1353
1486
  *
1354
1487
  * ```js
1355
- * import { unlink } from 'fs';
1488
+ * import { unlink } from 'node:fs';
1356
1489
  * // Assuming that 'path/file.txt' is a regular file.
1357
1490
  * unlink('path/file.txt', (err) => {
1358
1491
  * if (err) throw err;
@@ -1395,7 +1528,7 @@ declare module 'fs' {
1395
1528
  * Use `fs.rm(path, { recursive: true, force: true })` instead.
1396
1529
  *
1397
1530
  * If `true`, perform a recursive directory removal. In
1398
- * recursive mode soperations are retried on failure.
1531
+ * recursive mode, operations are retried on failure.
1399
1532
  * @default false
1400
1533
  */
1401
1534
  recursive?: boolean | undefined;
@@ -1499,18 +1632,19 @@ declare module 'fs' {
1499
1632
  *
1500
1633
  * The callback is given a possible exception and, if `recursive` is `true`, the
1501
1634
  * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was
1502
- * created.
1635
+ * created (for instance, if it was previously created).
1503
1636
  *
1504
1637
  * The optional `options` argument can be an integer specifying `mode` (permission
1505
1638
  * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fs.mkdir()` when `path` is a directory that
1506
1639
  * exists results in an error only
1507
- * when `recursive` is false.
1640
+ * when `recursive` is false. If `recursive` is false and the directory exists,
1641
+ * an `EEXIST` error occurs.
1508
1642
  *
1509
1643
  * ```js
1510
- * import { mkdir } from 'fs';
1644
+ * import { mkdir } from 'node:fs';
1511
1645
  *
1512
- * // Creates /tmp/a/apple, regardless of whether `/tmp` and /tmp/a exist.
1513
- * mkdir('/tmp/a/apple', { recursive: true }, (err) => {
1646
+ * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist.
1647
+ * mkdir('./tmp/a/apple', { recursive: true }, (err) => {
1514
1648
  * if (err) throw err;
1515
1649
  * });
1516
1650
  * ```
@@ -1519,7 +1653,7 @@ declare module 'fs' {
1519
1653
  * result in an error:
1520
1654
  *
1521
1655
  * ```js
1522
- * import { mkdir } from 'fs';
1656
+ * import { mkdir } from 'node:fs';
1523
1657
  *
1524
1658
  * mkdir('/', { recursive: true }, (err) => {
1525
1659
  * // => [Error: EPERM: operation not permitted, mkdir 'C:\']
@@ -1651,9 +1785,11 @@ declare module 'fs' {
1651
1785
  * object with an `encoding` property specifying the character encoding to use.
1652
1786
  *
1653
1787
  * ```js
1654
- * import { mkdtemp } from 'fs';
1788
+ * import { mkdtemp } from 'node:fs';
1789
+ * import { join } from 'node:path';
1790
+ * import { tmpdir } from 'node:os';
1655
1791
  *
1656
- * mkdtemp(path.join(os.tmpdir(), 'foo-'), (err, directory) => {
1792
+ * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => {
1657
1793
  * if (err) throw err;
1658
1794
  * console.log(directory);
1659
1795
  * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2
@@ -1663,11 +1799,11 @@ declare module 'fs' {
1663
1799
  * The `fs.mkdtemp()` method will append the six randomly selected characters
1664
1800
  * directly to the `prefix` string. For instance, given a directory `/tmp`, if the
1665
1801
  * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator
1666
- * (`require('path').sep`).
1802
+ * (`require('node:path').sep`).
1667
1803
  *
1668
1804
  * ```js
1669
- * import { tmpdir } from 'os';
1670
- * import { mkdtemp } from 'fs';
1805
+ * import { tmpdir } from 'node:os';
1806
+ * import { mkdtemp } from 'node:fs';
1671
1807
  *
1672
1808
  * // The parent directory for the new temporary directory
1673
1809
  * const tmpDir = tmpdir();
@@ -1682,7 +1818,7 @@ declare module 'fs' {
1682
1818
  * });
1683
1819
  *
1684
1820
  * // This method is *CORRECT*:
1685
- * import { sep } from 'path';
1821
+ * import { sep } from 'node:path';
1686
1822
  * mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
1687
1823
  * if (err) throw err;
1688
1824
  * console.log(directory);
@@ -1781,6 +1917,7 @@ declare module 'fs' {
1781
1917
  | {
1782
1918
  encoding: BufferEncoding | null;
1783
1919
  withFileTypes?: false | undefined;
1920
+ recursive?: boolean | undefined;
1784
1921
  }
1785
1922
  | BufferEncoding
1786
1923
  | undefined
@@ -1798,6 +1935,7 @@ declare module 'fs' {
1798
1935
  | {
1799
1936
  encoding: 'buffer';
1800
1937
  withFileTypes?: false | undefined;
1938
+ recursive?: boolean | undefined;
1801
1939
  }
1802
1940
  | 'buffer',
1803
1941
  callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void
@@ -1812,6 +1950,7 @@ declare module 'fs' {
1812
1950
  options:
1813
1951
  | (ObjectEncodingOptions & {
1814
1952
  withFileTypes?: false | undefined;
1953
+ recursive?: boolean | undefined;
1815
1954
  })
1816
1955
  | BufferEncoding
1817
1956
  | undefined
@@ -1832,6 +1971,7 @@ declare module 'fs' {
1832
1971
  path: PathLike,
1833
1972
  options: ObjectEncodingOptions & {
1834
1973
  withFileTypes: true;
1974
+ recursive?: boolean | undefined;
1835
1975
  },
1836
1976
  callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void
1837
1977
  ): void;
@@ -1847,6 +1987,7 @@ declare module 'fs' {
1847
1987
  | {
1848
1988
  encoding: BufferEncoding | null;
1849
1989
  withFileTypes?: false | undefined;
1990
+ recursive?: boolean | undefined;
1850
1991
  }
1851
1992
  | BufferEncoding
1852
1993
  | null
@@ -1863,6 +2004,7 @@ declare module 'fs' {
1863
2004
  | {
1864
2005
  encoding: 'buffer';
1865
2006
  withFileTypes?: false | undefined;
2007
+ recursive?: boolean | undefined;
1866
2008
  }
1867
2009
  ): Promise<Buffer[]>;
1868
2010
  /**
@@ -1875,6 +2017,7 @@ declare module 'fs' {
1875
2017
  options?:
1876
2018
  | (ObjectEncodingOptions & {
1877
2019
  withFileTypes?: false | undefined;
2020
+ recursive?: boolean | undefined;
1878
2021
  })
1879
2022
  | BufferEncoding
1880
2023
  | null
@@ -1888,6 +2031,7 @@ declare module 'fs' {
1888
2031
  path: PathLike,
1889
2032
  options: ObjectEncodingOptions & {
1890
2033
  withFileTypes: true;
2034
+ recursive?: boolean | undefined;
1891
2035
  }
1892
2036
  ): Promise<Dirent[]>;
1893
2037
  }
@@ -1910,6 +2054,7 @@ declare module 'fs' {
1910
2054
  | {
1911
2055
  encoding: BufferEncoding | null;
1912
2056
  withFileTypes?: false | undefined;
2057
+ recursive?: boolean | undefined;
1913
2058
  }
1914
2059
  | BufferEncoding
1915
2060
  | null
@@ -1925,6 +2070,7 @@ declare module 'fs' {
1925
2070
  | {
1926
2071
  encoding: 'buffer';
1927
2072
  withFileTypes?: false | undefined;
2073
+ recursive?: boolean | undefined;
1928
2074
  }
1929
2075
  | 'buffer'
1930
2076
  ): Buffer[];
@@ -1938,6 +2084,7 @@ declare module 'fs' {
1938
2084
  options?:
1939
2085
  | (ObjectEncodingOptions & {
1940
2086
  withFileTypes?: false | undefined;
2087
+ recursive?: boolean | undefined;
1941
2088
  })
1942
2089
  | BufferEncoding
1943
2090
  | null
@@ -1951,6 +2098,7 @@ declare module 'fs' {
1951
2098
  path: PathLike,
1952
2099
  options: ObjectEncodingOptions & {
1953
2100
  withFileTypes: true;
2101
+ recursive?: boolean | undefined;
1954
2102
  }
1955
2103
  ): Dirent[];
1956
2104
  /**
@@ -1998,12 +2146,18 @@ declare module 'fs' {
1998
2146
  * @param [flags='r'] See `support of file system `flags``.
1999
2147
  * @param [mode=0o666]
2000
2148
  */
2001
- export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
2149
+ export function open(path: PathLike, flags: OpenMode | undefined, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
2002
2150
  /**
2003
2151
  * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
2004
2152
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2153
+ * @param [flags='r'] See `support of file system `flags``.
2005
2154
  */
2006
- export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
2155
+ export function open(path: PathLike, flags: OpenMode | undefined, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
2156
+ /**
2157
+ * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
2158
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2159
+ */
2160
+ export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
2007
2161
  export namespace open {
2008
2162
  /**
2009
2163
  * Asynchronous open(2) - open and possibly create a file.
@@ -2028,7 +2182,7 @@ declare module 'fs' {
2028
2182
  * The `atime` and `mtime` arguments follow these rules:
2029
2183
  *
2030
2184
  * * Values can be either numbers representing Unix epoch time in seconds,`Date`s, or a numeric string like `'123456789.0'`.
2031
- * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
2185
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
2032
2186
  * @since v0.4.2
2033
2187
  */
2034
2188
  export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void;
@@ -2092,8 +2246,7 @@ declare module 'fs' {
2092
2246
  */
2093
2247
  export function fsyncSync(fd: number): void;
2094
2248
  /**
2095
- * Write `buffer` to the file specified by `fd`. If `buffer` is a normal object, it
2096
- * must have an own `toString` function property.
2249
+ * Write `buffer` to the file specified by `fd`.
2097
2250
  *
2098
2251
  * `offset` determines the part of the buffer to be written, and `length` is
2099
2252
  * an integer specifying the number of bytes to write.
@@ -2115,6 +2268,9 @@ declare module 'fs' {
2115
2268
  * The kernel ignores the position argument and always appends the data to
2116
2269
  * the end of the file.
2117
2270
  * @since v0.0.2
2271
+ * @param [offset=0]
2272
+ * @param [length=buffer.byteLength - offset]
2273
+ * @param [position='null']
2118
2274
  */
2119
2275
  export function write<TBuffer extends NodeJS.ArrayBufferView>(
2120
2276
  fd: number,
@@ -2216,11 +2372,12 @@ declare module 'fs' {
2216
2372
  }>;
2217
2373
  }
2218
2374
  /**
2219
- * If `buffer` is a plain object, it must have an own (not inherited) `toString`function property.
2220
- *
2221
2375
  * For detailed information, see the documentation of the asynchronous version of
2222
2376
  * this API: {@link write}.
2223
2377
  * @since v0.1.21
2378
+ * @param [offset=0]
2379
+ * @param [length=buffer.byteLength - offset]
2380
+ * @param [position='null']
2224
2381
  * @return The number of bytes written.
2225
2382
  */
2226
2383
  export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
@@ -2289,10 +2446,7 @@ declare module 'fs' {
2289
2446
  options: ReadAsyncOptions<TBuffer>,
2290
2447
  callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
2291
2448
  ): void;
2292
- export function read(
2293
- fd: number,
2294
- callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void
2295
- ): void;
2449
+ export function read(fd: number, callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void): void;
2296
2450
  export namespace read {
2297
2451
  /**
2298
2452
  * @param fd A file descriptor.
@@ -2318,9 +2472,7 @@ declare module 'fs' {
2318
2472
  bytesRead: number;
2319
2473
  buffer: TBuffer;
2320
2474
  }>;
2321
- function __promisify__(
2322
- fd: number
2323
- ): Promise<{
2475
+ function __promisify__(fd: number): Promise<{
2324
2476
  bytesRead: number;
2325
2477
  buffer: NodeJS.ArrayBufferView;
2326
2478
  }>;
@@ -2331,6 +2483,7 @@ declare module 'fs' {
2331
2483
  * For detailed information, see the documentation of the asynchronous version of
2332
2484
  * this API: {@link read}.
2333
2485
  * @since v0.1.21
2486
+ * @param [position='null']
2334
2487
  */
2335
2488
  export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: ReadPosition | null): number;
2336
2489
  /**
@@ -2342,7 +2495,7 @@ declare module 'fs' {
2342
2495
  * Asynchronously reads the entire contents of a file.
2343
2496
  *
2344
2497
  * ```js
2345
- * import { readFile } from 'fs';
2498
+ * import { readFile } from 'node:fs';
2346
2499
  *
2347
2500
  * readFile('/etc/passwd', (err, data) => {
2348
2501
  * if (err) throw err;
@@ -2358,7 +2511,7 @@ declare module 'fs' {
2358
2511
  * If `options` is a string, then it specifies the encoding:
2359
2512
  *
2360
2513
  * ```js
2361
- * import { readFile } from 'fs';
2514
+ * import { readFile } from 'node:fs';
2362
2515
  *
2363
2516
  * readFile('/etc/passwd', 'utf8', callback);
2364
2517
  * ```
@@ -2368,7 +2521,7 @@ declare module 'fs' {
2368
2521
  * will be returned.
2369
2522
  *
2370
2523
  * ```js
2371
- * import { readFile } from 'fs';
2524
+ * import { readFile } from 'node:fs';
2372
2525
  *
2373
2526
  * // macOS, Linux, and Windows
2374
2527
  * readFile('<directory>', (err, data) => {
@@ -2385,7 +2538,7 @@ declare module 'fs' {
2385
2538
  * request is aborted the callback is called with an `AbortError`:
2386
2539
  *
2387
2540
  * ```js
2388
- * import { readFile } from 'fs';
2541
+ * import { readFile } from 'node:fs';
2389
2542
  *
2390
2543
  * const controller = new AbortController();
2391
2544
  * const signal = controller.signal;
@@ -2518,7 +2671,7 @@ declare module 'fs' {
2518
2671
  * Similar to {@link readFile}, when the path is a directory, the behavior of`fs.readFileSync()` is platform-specific.
2519
2672
  *
2520
2673
  * ```js
2521
- * import { readFileSync } from 'fs';
2674
+ * import { readFileSync } from 'node:fs';
2522
2675
  *
2523
2676
  * // macOS, Linux, and Windows
2524
2677
  * readFileSync('<directory>');
@@ -2588,11 +2741,9 @@ declare module 'fs' {
2588
2741
  *
2589
2742
  * The `mode` option only affects the newly created file. See {@link open} for more details.
2590
2743
  *
2591
- * If `data` is a plain object, it must have an own (not inherited) `toString`function property.
2592
- *
2593
2744
  * ```js
2594
- * import { writeFile } from 'fs';
2595
- * import { Buffer } from 'buffer';
2745
+ * import { writeFile } from 'node:fs';
2746
+ * import { Buffer } from 'node:buffer';
2596
2747
  *
2597
2748
  * const data = new Uint8Array(Buffer.from('Hello Node.js'));
2598
2749
  * writeFile('message.txt', data, (err) => {
@@ -2604,7 +2755,7 @@ declare module 'fs' {
2604
2755
  * If `options` is a string, then it specifies the encoding:
2605
2756
  *
2606
2757
  * ```js
2607
- * import { writeFile } from 'fs';
2758
+ * import { writeFile } from 'node:fs';
2608
2759
  *
2609
2760
  * writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
2610
2761
  * ```
@@ -2622,8 +2773,8 @@ declare module 'fs' {
2622
2773
  * to be written.
2623
2774
  *
2624
2775
  * ```js
2625
- * import { writeFile } from 'fs';
2626
- * import { Buffer } from 'buffer';
2776
+ * import { writeFile } from 'node:fs';
2777
+ * import { Buffer } from 'node:buffer';
2627
2778
  *
2628
2779
  * const controller = new AbortController();
2629
2780
  * const { signal } = controller;
@@ -2666,8 +2817,6 @@ declare module 'fs' {
2666
2817
  /**
2667
2818
  * Returns `undefined`.
2668
2819
  *
2669
- * If `data` is a plain object, it must have an own (not inherited) `toString`function property.
2670
- *
2671
2820
  * The `mode` option only affects the newly created file. See {@link open} for more details.
2672
2821
  *
2673
2822
  * For detailed information, see the documentation of the asynchronous version of
@@ -2683,7 +2832,7 @@ declare module 'fs' {
2683
2832
  * The `mode` option only affects the newly created file. See {@link open} for more details.
2684
2833
  *
2685
2834
  * ```js
2686
- * import { appendFile } from 'fs';
2835
+ * import { appendFile } from 'node:fs';
2687
2836
  *
2688
2837
  * appendFile('message.txt', 'data to append', (err) => {
2689
2838
  * if (err) throw err;
@@ -2694,7 +2843,7 @@ declare module 'fs' {
2694
2843
  * If `options` is a string, then it specifies the encoding:
2695
2844
  *
2696
2845
  * ```js
2697
- * import { appendFile } from 'fs';
2846
+ * import { appendFile } from 'node:fs';
2698
2847
  *
2699
2848
  * appendFile('message.txt', 'data to append', 'utf8', callback);
2700
2849
  * ```
@@ -2704,7 +2853,7 @@ declare module 'fs' {
2704
2853
  * not be closed automatically.
2705
2854
  *
2706
2855
  * ```js
2707
- * import { open, close, appendFile } from 'fs';
2856
+ * import { open, close, appendFile } from 'node:fs';
2708
2857
  *
2709
2858
  * function closeFd(fd) {
2710
2859
  * close(fd, (err) => {
@@ -2759,7 +2908,7 @@ declare module 'fs' {
2759
2908
  * The `mode` option only affects the newly created file. See {@link open} for more details.
2760
2909
  *
2761
2910
  * ```js
2762
- * import { appendFileSync } from 'fs';
2911
+ * import { appendFileSync } from 'node:fs';
2763
2912
  *
2764
2913
  * try {
2765
2914
  * appendFileSync('message.txt', 'data to append');
@@ -2772,7 +2921,7 @@ declare module 'fs' {
2772
2921
  * If `options` is a string, then it specifies the encoding:
2773
2922
  *
2774
2923
  * ```js
2775
- * import { appendFileSync } from 'fs';
2924
+ * import { appendFileSync } from 'node:fs';
2776
2925
  *
2777
2926
  * appendFileSync('message.txt', 'data to append', 'utf8');
2778
2927
  * ```
@@ -2782,7 +2931,7 @@ declare module 'fs' {
2782
2931
  * not be closed automatically.
2783
2932
  *
2784
2933
  * ```js
2785
- * import { openSync, closeSync, appendFileSync } from 'fs';
2934
+ * import { openSync, closeSync, appendFileSync } from 'node:fs';
2786
2935
  *
2787
2936
  * let fd;
2788
2937
  *
@@ -2864,7 +3013,7 @@ declare module 'fs' {
2864
3013
  * stat object:
2865
3014
  *
2866
3015
  * ```js
2867
- * import { watchFile } from 'fs';
3016
+ * import { watchFile } from 'node:fs';
2868
3017
  *
2869
3018
  * watchFile('message.text', (curr, prev) => {
2870
3019
  * console.log(`the current mtime is: ${curr.mtime}`);
@@ -2904,7 +3053,7 @@ declare module 'fs' {
2904
3053
  bigint?: false | undefined;
2905
3054
  })
2906
3055
  | undefined,
2907
- listener: (curr: Stats, prev: Stats) => void
3056
+ listener: StatsListener
2908
3057
  ): StatWatcher;
2909
3058
  export function watchFile(
2910
3059
  filename: PathLike,
@@ -2913,13 +3062,13 @@ declare module 'fs' {
2913
3062
  bigint: true;
2914
3063
  })
2915
3064
  | undefined,
2916
- listener: (curr: BigIntStats, prev: BigIntStats) => void
3065
+ listener: BigIntStatsListener
2917
3066
  ): StatWatcher;
2918
3067
  /**
2919
3068
  * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
2920
3069
  * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2921
3070
  */
2922
- export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): StatWatcher;
3071
+ export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher;
2923
3072
  /**
2924
3073
  * Stop watching for changes on `filename`. If `listener` is specified, only that
2925
3074
  * particular listener is removed. Otherwise, _all_ listeners are removed,
@@ -2932,14 +3081,17 @@ declare module 'fs' {
2932
3081
  * @since v0.1.31
2933
3082
  * @param listener Optional, a listener previously attached using `fs.watchFile()`
2934
3083
  */
2935
- export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
3084
+ export function unwatchFile(filename: PathLike, listener?: StatsListener): void;
3085
+ export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
2936
3086
  export interface WatchOptions extends Abortable {
2937
3087
  encoding?: BufferEncoding | 'buffer' | undefined;
2938
3088
  persistent?: boolean | undefined;
2939
3089
  recursive?: boolean | undefined;
2940
3090
  }
2941
3091
  export type WatchEventType = 'rename' | 'change';
2942
- export type WatchListener<T> = (event: WatchEventType, filename: T) => void;
3092
+ export type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
3093
+ export type StatsListener = (curr: Stats, prev: Stats) => void;
3094
+ export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void;
2943
3095
  /**
2944
3096
  * Watch for changes on `filename`, where `filename` is either a file or a
2945
3097
  * directory.
@@ -2997,7 +3149,7 @@ declare module 'fs' {
2997
3149
  * Then call the `callback` argument with either true or false:
2998
3150
  *
2999
3151
  * ```js
3000
- * import { exists } from 'fs';
3152
+ * import { exists } from 'node:fs';
3001
3153
  *
3002
3154
  * exists('/etc/passwd', (e) => {
3003
3155
  * console.log(e ? 'it exists' : 'no passwd!');
@@ -3009,7 +3161,7 @@ declare module 'fs' {
3009
3161
  * has only one boolean parameter. This is one reason `fs.access()` is recommended
3010
3162
  * instead of `fs.exists()`.
3011
3163
  *
3012
- * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Doing
3164
+ * Using `fs.exists()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing
3013
3165
  * so introduces a race condition, since other processes may change the file's
3014
3166
  * state between the two calls. Instead, user code should open/read/write the
3015
3167
  * file directly and handle the error raised if the file does not exist.
@@ -3017,7 +3169,7 @@ declare module 'fs' {
3017
3169
  * **write (NOT RECOMMENDED)**
3018
3170
  *
3019
3171
  * ```js
3020
- * import { exists, open, close } from 'fs';
3172
+ * import { exists, open, close } from 'node:fs';
3021
3173
  *
3022
3174
  * exists('myfile', (e) => {
3023
3175
  * if (e) {
@@ -3041,7 +3193,7 @@ declare module 'fs' {
3041
3193
  * **write (RECOMMENDED)**
3042
3194
  *
3043
3195
  * ```js
3044
- * import { open, close } from 'fs';
3196
+ * import { open, close } from 'node:fs';
3045
3197
  * open('myfile', 'wx', (err, fd) => {
3046
3198
  * if (err) {
3047
3199
  * if (err.code === 'EEXIST') {
@@ -3065,7 +3217,7 @@ declare module 'fs' {
3065
3217
  * **read (NOT RECOMMENDED)**
3066
3218
  *
3067
3219
  * ```js
3068
- * import { open, close, exists } from 'fs';
3220
+ * import { open, close, exists } from 'node:fs';
3069
3221
  *
3070
3222
  * exists('myfile', (e) => {
3071
3223
  * if (e) {
@@ -3089,7 +3241,7 @@ declare module 'fs' {
3089
3241
  * **read (RECOMMENDED)**
3090
3242
  *
3091
3243
  * ```js
3092
- * import { open, close } from 'fs';
3244
+ * import { open, close } from 'node:fs';
3093
3245
  *
3094
3246
  * open('myfile', 'r', (err, fd) => {
3095
3247
  * if (err) {
@@ -3115,7 +3267,7 @@ declare module 'fs' {
3115
3267
  * file; the "recommended" examples are better because they use the file directly
3116
3268
  * and handle the error, if any.
3117
3269
  *
3118
- * In general, check for the existence of a file only if the file wont be
3270
+ * In general, check for the existence of a file only if the file won't be
3119
3271
  * used directly, for example when its existence is a signal from another
3120
3272
  * process.
3121
3273
  * @since v0.0.2
@@ -3140,7 +3292,7 @@ declare module 'fs' {
3140
3292
  * Node.js callbacks. `fs.existsSync()` does not use a callback.
3141
3293
  *
3142
3294
  * ```js
3143
- * import { existsSync } from 'fs';
3295
+ * import { existsSync } from 'node:fs';
3144
3296
  *
3145
3297
  * if (existsSync('/etc/passwd'))
3146
3298
  * console.log('The path exists.');
@@ -3265,16 +3417,16 @@ declare module 'fs' {
3265
3417
  /**
3266
3418
  * Tests a user's permissions for the file or directory specified by `path`.
3267
3419
  * The `mode` argument is an optional integer that specifies the accessibility
3268
- * checks to be performed. Check `File access constants` for possible values
3269
- * of `mode`. It is possible to create a mask consisting of the bitwise OR of
3270
- * two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
3420
+ * checks to be performed. `mode` should be either the value `fs.constants.F_OK`or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`,`fs.constants.W_OK`, and `fs.constants.X_OK`
3421
+ * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
3422
+ * possible values of `mode`.
3271
3423
  *
3272
3424
  * The final argument, `callback`, is a callback function that is invoked with
3273
3425
  * a possible error argument. If any of the accessibility checks fail, the error
3274
3426
  * argument will be an `Error` object. The following examples check if`package.json` exists, and if it is readable or writable.
3275
3427
  *
3276
3428
  * ```js
3277
- * import { access, constants } from 'fs';
3429
+ * import { access, constants } from 'node:fs';
3278
3430
  *
3279
3431
  * const file = 'package.json';
3280
3432
  *
@@ -3293,18 +3445,13 @@ declare module 'fs' {
3293
3445
  * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`);
3294
3446
  * });
3295
3447
  *
3296
- * // Check if the file exists in the current directory, and if it is writable.
3297
- * access(file, constants.F_OK | constants.W_OK, (err) => {
3298
- * if (err) {
3299
- * console.error(
3300
- * `${file} ${err.code === 'ENOENT' ? 'does not exist' : 'is read-only'}`);
3301
- * } else {
3302
- * console.log(`${file} exists, and it is writable`);
3303
- * }
3448
+ * // Check if the file is readable and writable.
3449
+ * access(file, constants.R_OK | constants.W_OK, (err) => {
3450
+ * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`);
3304
3451
  * });
3305
3452
  * ```
3306
3453
  *
3307
- * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()` or `fs.writeFile()`. Doing
3454
+ * Do not use `fs.access()` to check for the accessibility of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing
3308
3455
  * so introduces a race condition, since other processes may change the file's
3309
3456
  * state between the two calls. Instead, user code should open/read/write the
3310
3457
  * file directly and handle the error raised if the file is not accessible.
@@ -3312,7 +3459,7 @@ declare module 'fs' {
3312
3459
  * **write (NOT RECOMMENDED)**
3313
3460
  *
3314
3461
  * ```js
3315
- * import { access, open, close } from 'fs';
3462
+ * import { access, open, close } from 'node:fs';
3316
3463
  *
3317
3464
  * access('myfile', (err) => {
3318
3465
  * if (!err) {
@@ -3337,7 +3484,7 @@ declare module 'fs' {
3337
3484
  * **write (RECOMMENDED)**
3338
3485
  *
3339
3486
  * ```js
3340
- * import { open, close } from 'fs';
3487
+ * import { open, close } from 'node:fs';
3341
3488
  *
3342
3489
  * open('myfile', 'wx', (err, fd) => {
3343
3490
  * if (err) {
@@ -3362,7 +3509,7 @@ declare module 'fs' {
3362
3509
  * **read (NOT RECOMMENDED)**
3363
3510
  *
3364
3511
  * ```js
3365
- * import { access, open, close } from 'fs';
3512
+ * import { access, open, close } from 'node:fs';
3366
3513
  * access('myfile', (err) => {
3367
3514
  * if (err) {
3368
3515
  * if (err.code === 'ENOENT') {
@@ -3390,7 +3537,7 @@ declare module 'fs' {
3390
3537
  * **read (RECOMMENDED)**
3391
3538
  *
3392
3539
  * ```js
3393
- * import { open, close } from 'fs';
3540
+ * import { open, close } from 'node:fs';
3394
3541
  *
3395
3542
  * open('myfile', 'r', (err, fd) => {
3396
3543
  * if (err) {
@@ -3444,16 +3591,15 @@ declare module 'fs' {
3444
3591
  /**
3445
3592
  * Synchronously tests a user's permissions for the file or directory specified
3446
3593
  * by `path`. The `mode` argument is an optional integer that specifies the
3447
- * accessibility checks to be performed. Check `File access constants` for
3448
- * possible values of `mode`. It is possible to create a mask consisting of
3449
- * the bitwise OR of two or more values
3450
- * (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
3594
+ * accessibility checks to be performed. `mode` should be either the value`fs.constants.F_OK` or a mask consisting of the bitwise OR of any of`fs.constants.R_OK`, `fs.constants.W_OK`, and
3595
+ * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
3596
+ * possible values of `mode`.
3451
3597
  *
3452
3598
  * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise,
3453
3599
  * the method will return `undefined`.
3454
3600
  *
3455
3601
  * ```js
3456
- * import { accessSync, constants } from 'fs';
3602
+ * import { accessSync, constants } from 'node:fs';
3457
3603
  *
3458
3604
  * try {
3459
3605
  * accessSync('etc/passwd', constants.R_OK | constants.W_OK);
@@ -3483,8 +3629,8 @@ declare module 'fs' {
3483
3629
  end?: number | undefined;
3484
3630
  }
3485
3631
  /**
3486
- * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
3487
- * returned by this method has a default `highWaterMark` of 64 kb.
3632
+ * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
3633
+ * returned by this method has a default `highWaterMark` of 64 KiB.
3488
3634
  *
3489
3635
  * `options` can include `start` and `end` values to read a range of bytes from
3490
3636
  * the file instead of the entire file. Both `start` and `end` are inclusive and
@@ -3510,7 +3656,7 @@ declare module 'fs' {
3510
3656
  * also required.
3511
3657
  *
3512
3658
  * ```js
3513
- * import { createReadStream } from 'fs';
3659
+ * import { createReadStream } from 'node:fs';
3514
3660
  *
3515
3661
  * // Create a stream from some character device.
3516
3662
  * const stream = createReadStream('/dev/input/event0');
@@ -3538,7 +3684,7 @@ declare module 'fs' {
3538
3684
  * An example to read the last 10 bytes of a file which is 100 bytes long:
3539
3685
  *
3540
3686
  * ```js
3541
- * import { createReadStream } from 'fs';
3687
+ * import { createReadStream } from 'node:fs';
3542
3688
  *
3543
3689
  * createReadStream('sample.txt', { start: 90, end: 99 });
3544
3690
  * ```
@@ -3550,9 +3696,9 @@ declare module 'fs' {
3550
3696
  /**
3551
3697
  * `options` may also include a `start` option to allow writing data at some
3552
3698
  * position past the beginning of the file, allowed values are in the
3553
- * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing
3554
- * it may require the `flags` option to be set to `r+` rather than the default `w`.
3555
- * The `encoding` can be any one of those accepted by `Buffer`.
3699
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
3700
+ * replacing it may require the `flags` option to be set to `r+` rather than the
3701
+ * default `w`. The `encoding` can be any one of those accepted by `Buffer`.
3556
3702
  *
3557
3703
  * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
3558
3704
  * then the file descriptor won't be closed, even if there's an error.
@@ -3562,7 +3708,7 @@ declare module 'fs' {
3562
3708
  * By default, the stream will emit a `'close'` event after it has been
3563
3709
  * destroyed. Set the `emitClose` option to `false` to change this behavior.
3564
3710
  *
3565
- * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev` and `close`. Overriding `write()`without `writev()` can reduce
3711
+ * By providing the `fs` option it is possible to override the corresponding `fs`implementations for `open`, `write`, `writev`, and `close`. Overriding `write()`without `writev()` can reduce
3566
3712
  * performance as some optimizations (`_writev()`)
3567
3713
  * will be disabled. When providing the `fs` option, overrides for at least one of`write` and `writev` are required. If no `fd` option is supplied, an override
3568
3714
  * for `open` is also required. If `autoClose` is `true`, an override for `close`is also required.
@@ -3617,7 +3763,7 @@ declare module 'fs' {
3617
3763
  * copy-on-write, then the operation will fail.
3618
3764
  *
3619
3765
  * ```js
3620
- * import { copyFile, constants } from 'fs';
3766
+ * import { copyFile, constants } from 'node:fs';
3621
3767
  *
3622
3768
  * function callback(err) {
3623
3769
  * if (err) throw err;
@@ -3660,7 +3806,7 @@ declare module 'fs' {
3660
3806
  * copy-on-write, then the operation will fail.
3661
3807
  *
3662
3808
  * ```js
3663
- * import { copyFileSync, constants } from 'fs';
3809
+ * import { copyFileSync, constants } from 'node:fs';
3664
3810
  *
3665
3811
  * // destination.txt will be created or overwritten by default.
3666
3812
  * copyFileSync('source.txt', 'destination.txt');
@@ -3693,6 +3839,7 @@ declare module 'fs' {
3693
3839
  * The kernel ignores the position argument and always appends the data to
3694
3840
  * the end of the file.
3695
3841
  * @since v12.9.0
3842
+ * @param [position='null']
3696
3843
  */
3697
3844
  export function writev(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
3698
3845
  export function writev(
@@ -3712,6 +3859,7 @@ declare module 'fs' {
3712
3859
  * For detailed information, see the documentation of the asynchronous version of
3713
3860
  * this API: {@link writev}.
3714
3861
  * @since v12.9.0
3862
+ * @param [position='null']
3715
3863
  * @return The number of bytes written.
3716
3864
  */
3717
3865
  export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
@@ -3728,6 +3876,7 @@ declare module 'fs' {
3728
3876
  * If this method is invoked as its `util.promisify()` ed version, it returns
3729
3877
  * a promise for an `Object` with `bytesRead` and `buffers` properties.
3730
3878
  * @since v13.13.0, v12.17.0
3879
+ * @param [position='null']
3731
3880
  */
3732
3881
  export function readv(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void): void;
3733
3882
  export function readv(
@@ -3747,10 +3896,14 @@ declare module 'fs' {
3747
3896
  * For detailed information, see the documentation of the asynchronous version of
3748
3897
  * this API: {@link readv}.
3749
3898
  * @since v13.13.0, v12.17.0
3899
+ * @param [position='null']
3750
3900
  * @return The number of bytes read.
3751
3901
  */
3752
3902
  export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
3753
3903
  export interface OpenDirOptions {
3904
+ /**
3905
+ * @default 'utf8'
3906
+ */
3754
3907
  encoding?: BufferEncoding | undefined;
3755
3908
  /**
3756
3909
  * Number of directory entries that are buffered
@@ -3759,6 +3912,10 @@ declare module 'fs' {
3759
3912
  * @default 32
3760
3913
  */
3761
3914
  bufferSize?: number | undefined;
3915
+ /**
3916
+ * @default false
3917
+ */
3918
+ recursive?: boolean;
3762
3919
  }
3763
3920
  /**
3764
3921
  * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
@@ -3802,7 +3959,7 @@ declare module 'fs' {
3802
3959
  export interface StatSyncOptions extends StatOptions {
3803
3960
  throwIfNoEntry?: boolean | undefined;
3804
3961
  }
3805
- export interface CopyOptions {
3962
+ interface CopyOptionsBase {
3806
3963
  /**
3807
3964
  * Dereference symlinks
3808
3965
  * @default false
@@ -3814,11 +3971,6 @@ declare module 'fs' {
3814
3971
  * @default false
3815
3972
  */
3816
3973
  errorOnExist?: boolean;
3817
- /**
3818
- * Function to filter copied files/directories. Return
3819
- * `true` to copy the item, `false` to ignore it.
3820
- */
3821
- filter?(source: string, destination: string): boolean;
3822
3974
  /**
3823
3975
  * Overwrite existing file or directory. _The copy
3824
3976
  * operation will ignore errors if you set this to false and the destination
@@ -3826,6 +3978,10 @@ declare module 'fs' {
3826
3978
  * @default true
3827
3979
  */
3828
3980
  force?: boolean;
3981
+ /**
3982
+ * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()}
3983
+ */
3984
+ mode?: number;
3829
3985
  /**
3830
3986
  * When `true` timestamps from `src` will
3831
3987
  * be preserved.
@@ -3837,6 +3993,25 @@ declare module 'fs' {
3837
3993
  * @default false
3838
3994
  */
3839
3995
  recursive?: boolean;
3996
+ /**
3997
+ * When true, path resolution for symlinks will be skipped
3998
+ * @default false
3999
+ */
4000
+ verbatimSymlinks?: boolean;
4001
+ }
4002
+ export interface CopyOptions extends CopyOptionsBase {
4003
+ /**
4004
+ * Function to filter copied files/directories. Return
4005
+ * `true` to copy the item, `false` to ignore it.
4006
+ */
4007
+ filter?(source: string, destination: string): boolean | Promise<boolean>;
4008
+ }
4009
+ export interface CopySyncOptions extends CopyOptionsBase {
4010
+ /**
4011
+ * Function to filter copied files/directories. Return
4012
+ * `true` to copy the item, `false` to ignore it.
4013
+ */
4014
+ filter?(source: string, destination: string): boolean;
3840
4015
  }
3841
4016
  /**
3842
4017
  * Asynchronously copies the entire directory structure from `src` to `dest`,
@@ -3849,8 +4024,8 @@ declare module 'fs' {
3849
4024
  * @param src source path to copy.
3850
4025
  * @param dest destination path to copy to.
3851
4026
  */
3852
- export function cp(source: string, destination: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
3853
- export function cp(source: string, destination: string, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
4027
+ export function cp(source: string | URL, destination: string | URL, callback: (err: NodeJS.ErrnoException | null) => void): void;
4028
+ export function cp(source: string | URL, destination: string | URL, opts: CopyOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
3854
4029
  /**
3855
4030
  * Synchronously copies the entire directory structure from `src` to `dest`,
3856
4031
  * including subdirectories and files.
@@ -3862,7 +4037,7 @@ declare module 'fs' {
3862
4037
  * @param src source path to copy.
3863
4038
  * @param dest destination path to copy to.
3864
4039
  */
3865
- export function cpSync(source: string, destination: string, opts?: CopyOptions): void;
4040
+ export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
3866
4041
  }
3867
4042
  declare module 'node:fs' {
3868
4043
  export * from 'fs';