projen 0.71.51 → 0.71.53

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 (313) hide show
  1. package/.jsii +3 -3
  2. package/lib/awscdk/auto-discover.js +5 -5
  3. package/lib/awscdk/awscdk-app-java.js +1 -1
  4. package/lib/awscdk/awscdk-app-py.js +1 -1
  5. package/lib/awscdk/awscdk-app-ts.js +1 -1
  6. package/lib/awscdk/awscdk-construct.js +2 -2
  7. package/lib/awscdk/awscdk-deps-java.js +1 -1
  8. package/lib/awscdk/awscdk-deps-js.js +1 -1
  9. package/lib/awscdk/awscdk-deps-py.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-extension.js +1 -1
  15. package/lib/awscdk/lambda-function.js +2 -2
  16. package/lib/build/build-workflow.js +1 -1
  17. package/lib/cdk/auto-discover-base.js +2 -2
  18. package/lib/cdk/construct-lib.js +1 -1
  19. package/lib/cdk/integration-test-base.js +1 -1
  20. package/lib/cdk/jsii-docgen.js +1 -1
  21. package/lib/cdk/jsii-project.js +1 -1
  22. package/lib/cdk8s/auto-discover.js +2 -2
  23. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  24. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  25. package/lib/cdk8s/cdk8s-construct.js +1 -1
  26. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  27. package/lib/cdk8s/cdk8s-deps.js +1 -1
  28. package/lib/cdk8s/integration-test.js +1 -1
  29. package/lib/cdktf/cdktf-construct.js +1 -1
  30. package/lib/circleci/circleci.js +1 -1
  31. package/lib/component.js +1 -1
  32. package/lib/dependencies.js +1 -1
  33. package/lib/dev-env.js +1 -1
  34. package/lib/docker-compose/docker-compose-service.js +1 -1
  35. package/lib/docker-compose/docker-compose.js +1 -1
  36. package/lib/file.js +1 -1
  37. package/lib/gitattributes.js +1 -1
  38. package/lib/github/actions-provider.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/dependabot.js +1 -1
  42. package/lib/github/github-credentials.js +1 -1
  43. package/lib/github/github-project.js +1 -1
  44. package/lib/github/github.js +1 -1
  45. package/lib/github/mergify.js +1 -1
  46. package/lib/github/pr-template.js +1 -1
  47. package/lib/github/pull-request-lint.js +1 -1
  48. package/lib/github/stale.js +1 -1
  49. package/lib/github/task-workflow.js +1 -1
  50. package/lib/github/workflow-actions.js +1 -1
  51. package/lib/github/workflow-jobs.js +1 -1
  52. package/lib/github/workflows.js +1 -1
  53. package/lib/gitlab/configuration.js +1 -1
  54. package/lib/gitlab/gitlab-configuration.js +1 -1
  55. package/lib/gitlab/nested-configuration.js +1 -1
  56. package/lib/gitpod.js +1 -1
  57. package/lib/ignore-file.js +1 -1
  58. package/lib/ini.js +1 -1
  59. package/lib/java/java-project.js +1 -1
  60. package/lib/java/junit.js +1 -1
  61. package/lib/java/maven-compile.js +1 -1
  62. package/lib/java/maven-packaging.js +1 -1
  63. package/lib/java/maven-sample.js +1 -1
  64. package/lib/java/pom.js +1 -1
  65. package/lib/java/projenrc.js +1 -1
  66. package/lib/javascript/bundler.js +1 -1
  67. package/lib/javascript/eslint.js +1 -1
  68. package/lib/javascript/jest.js +4 -4
  69. package/lib/javascript/node-package.js +1 -1
  70. package/lib/javascript/node-project.js +1 -1
  71. package/lib/javascript/npm-config.js +1 -1
  72. package/lib/javascript/prettier.js +1 -1
  73. package/lib/javascript/projenrc.js +1 -1
  74. package/lib/javascript/typescript-config.js +2 -2
  75. package/lib/javascript/upgrade-dependencies.js +2 -2
  76. package/lib/json-patch.js +1 -1
  77. package/lib/json.js +1 -1
  78. package/lib/license.js +1 -1
  79. package/lib/logger.js +1 -1
  80. package/lib/makefile.js +1 -1
  81. package/lib/object-file.js +1 -1
  82. package/lib/project-build.js +1 -1
  83. package/lib/project.js +1 -1
  84. package/lib/projects.js +1 -1
  85. package/lib/projenrc-json.js +2 -2
  86. package/lib/projenrc.js +1 -1
  87. package/lib/python/pip.js +1 -1
  88. package/lib/python/poetry.js +2 -2
  89. package/lib/python/projenrc.js +1 -1
  90. package/lib/python/pytest-sample.js +1 -1
  91. package/lib/python/pytest.js +1 -1
  92. package/lib/python/python-project.js +1 -1
  93. package/lib/python/python-sample.js +1 -1
  94. package/lib/python/requirements-file.js +1 -1
  95. package/lib/python/setuppy.js +1 -1
  96. package/lib/python/setuptools.js +1 -1
  97. package/lib/python/venv.js +1 -1
  98. package/lib/readme.js +1 -1
  99. package/lib/release/publisher.js +1 -1
  100. package/lib/release/release-trigger.js +1 -1
  101. package/lib/release/release.js +1 -1
  102. package/lib/renovatebot.js +1 -1
  103. package/lib/sample-file.js +2 -2
  104. package/lib/semver.js +1 -1
  105. package/lib/source-code.js +1 -1
  106. package/lib/task-runtime.js +1 -1
  107. package/lib/task.js +1 -1
  108. package/lib/tasks.js +1 -1
  109. package/lib/testing.js +1 -1
  110. package/lib/textfile.js +1 -1
  111. package/lib/toml.js +1 -1
  112. package/lib/typescript/projenrc-ts.js +1 -1
  113. package/lib/typescript/projenrc.js +1 -1
  114. package/lib/typescript/typescript-typedoc.js +1 -1
  115. package/lib/typescript/typescript.js +3 -3
  116. package/lib/version.js +1 -1
  117. package/lib/vscode/devcontainer.js +1 -1
  118. package/lib/vscode/extensions.js +1 -1
  119. package/lib/vscode/launch-config.js +1 -1
  120. package/lib/vscode/settings.js +1 -1
  121. package/lib/vscode/vscode.js +1 -1
  122. package/lib/web/next.js +3 -3
  123. package/lib/web/postcss.js +1 -1
  124. package/lib/web/react.js +4 -4
  125. package/lib/web/tailwind.js +1 -1
  126. package/lib/xmlfile.js +1 -1
  127. package/lib/yaml.js +1 -1
  128. package/node_modules/@oozcitak/dom/LICENSE +21 -21
  129. package/node_modules/@oozcitak/dom/README.md +32 -32
  130. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.d.ts +12 -0
  131. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js +23 -3
  132. package/node_modules/@oozcitak/dom/lib/parser/XMLParserImpl.js.map +1 -1
  133. package/node_modules/@oozcitak/dom/package.json +72 -72
  134. package/node_modules/xmlbuilder2/CHANGELOG.md +95 -1
  135. package/node_modules/xmlbuilder2/README.md +5 -4
  136. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.d.ts +3 -1
  137. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js +44 -53
  138. package/node_modules/xmlbuilder2/lib/builder/XMLBuilderCBImpl.js.map +1 -1
  139. package/node_modules/xmlbuilder2/lib/constants.d.ts +1 -0
  140. package/node_modules/xmlbuilder2/lib/constants.js +4 -0
  141. package/node_modules/xmlbuilder2/lib/constants.js.map +1 -0
  142. package/node_modules/xmlbuilder2/lib/interfaces.d.ts +20 -8
  143. package/node_modules/xmlbuilder2/lib/interfaces.js +1 -0
  144. package/node_modules/xmlbuilder2/lib/interfaces.js.map +1 -1
  145. package/node_modules/xmlbuilder2/lib/readers/BaseReader.d.ts +14 -1
  146. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js +30 -1
  147. package/node_modules/xmlbuilder2/lib/readers/BaseReader.js.map +1 -1
  148. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js +12 -5
  149. package/node_modules/xmlbuilder2/lib/readers/ObjectReader.js.map +1 -1
  150. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js +11 -5
  151. package/node_modules/xmlbuilder2/lib/readers/XMLReader.js.map +1 -1
  152. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.d.ts +1 -1
  153. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js +58 -92
  154. package/node_modules/xmlbuilder2/lib/writers/BaseWriter.js.map +1 -1
  155. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js +1 -3
  156. package/node_modules/xmlbuilder2/lib/writers/JSONWriter.js.map +1 -1
  157. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js +0 -2
  158. package/node_modules/xmlbuilder2/lib/writers/MapWriter.js.map +1 -1
  159. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js +1 -2
  160. package/node_modules/xmlbuilder2/lib/writers/ObjectWriter.js.map +1 -1
  161. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js +1 -2
  162. package/node_modules/xmlbuilder2/lib/writers/XMLWriter.js.map +1 -1
  163. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js +1 -3
  164. package/node_modules/xmlbuilder2/lib/writers/YAMLWriter.js.map +1 -1
  165. package/node_modules/xmlbuilder2/lib/xmlbuilder2.min.js +2 -2
  166. package/node_modules/xmlbuilder2/node_modules/js-yaml/CHANGELOG.md +6 -0
  167. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.js +2 -2
  168. package/node_modules/xmlbuilder2/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
  169. package/node_modules/xmlbuilder2/node_modules/js-yaml/lib/js-yaml/loader.js +1 -1
  170. package/node_modules/xmlbuilder2/node_modules/js-yaml/package.json +1 -1
  171. package/node_modules/xmlbuilder2/package.json +7 -7
  172. package/package.json +2 -2
  173. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.d.ts +0 -2
  174. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js +0 -962
  175. package/node_modules/@oozcitak/dom/lib/serializer/XMLSerializerImpl2.js.map +0 -1
  176. package/node_modules/xmlbuilder2/node_modules/@types/node/LICENSE +0 -21
  177. package/node_modules/xmlbuilder2/node_modules/@types/node/README.md +0 -16
  178. package/node_modules/xmlbuilder2/node_modules/@types/node/assert/strict.d.ts +0 -8
  179. package/node_modules/xmlbuilder2/node_modules/@types/node/assert.d.ts +0 -957
  180. package/node_modules/xmlbuilder2/node_modules/@types/node/async_hooks.d.ts +0 -538
  181. package/node_modules/xmlbuilder2/node_modules/@types/node/buffer.d.ts +0 -2348
  182. package/node_modules/xmlbuilder2/node_modules/@types/node/child_process.d.ts +0 -1368
  183. package/node_modules/xmlbuilder2/node_modules/@types/node/cluster.d.ts +0 -410
  184. package/node_modules/xmlbuilder2/node_modules/@types/node/console.d.ts +0 -412
  185. package/node_modules/xmlbuilder2/node_modules/@types/node/constants.d.ts +0 -18
  186. package/node_modules/xmlbuilder2/node_modules/@types/node/crypto.d.ts +0 -3962
  187. package/node_modules/xmlbuilder2/node_modules/@types/node/dgram.d.ts +0 -545
  188. package/node_modules/xmlbuilder2/node_modules/@types/node/diagnostics_channel.d.ts +0 -191
  189. package/node_modules/xmlbuilder2/node_modules/@types/node/dns/promises.d.ts +0 -370
  190. package/node_modules/xmlbuilder2/node_modules/@types/node/dns.d.ts +0 -667
  191. package/node_modules/xmlbuilder2/node_modules/@types/node/dom-events.d.ts +0 -126
  192. package/node_modules/xmlbuilder2/node_modules/@types/node/domain.d.ts +0 -170
  193. package/node_modules/xmlbuilder2/node_modules/@types/node/events.d.ts +0 -682
  194. package/node_modules/xmlbuilder2/node_modules/@types/node/fs/promises.d.ts +0 -1189
  195. package/node_modules/xmlbuilder2/node_modules/@types/node/fs.d.ts +0 -4011
  196. package/node_modules/xmlbuilder2/node_modules/@types/node/globals.d.ts +0 -302
  197. package/node_modules/xmlbuilder2/node_modules/@types/node/globals.global.d.ts +0 -1
  198. package/node_modules/xmlbuilder2/node_modules/@types/node/http.d.ts +0 -1724
  199. package/node_modules/xmlbuilder2/node_modules/@types/node/http2.d.ts +0 -2129
  200. package/node_modules/xmlbuilder2/node_modules/@types/node/https.d.ts +0 -441
  201. package/node_modules/xmlbuilder2/node_modules/@types/node/index.d.ts +0 -134
  202. package/node_modules/xmlbuilder2/node_modules/@types/node/inspector.d.ts +0 -2748
  203. package/node_modules/xmlbuilder2/node_modules/@types/node/module.d.ts +0 -116
  204. package/node_modules/xmlbuilder2/node_modules/@types/node/net.d.ts +0 -886
  205. package/node_modules/xmlbuilder2/node_modules/@types/node/os.d.ts +0 -477
  206. package/node_modules/xmlbuilder2/node_modules/@types/node/package.json +0 -237
  207. package/node_modules/xmlbuilder2/node_modules/@types/node/path.d.ts +0 -191
  208. package/node_modules/xmlbuilder2/node_modules/@types/node/perf_hooks.d.ts +0 -638
  209. package/node_modules/xmlbuilder2/node_modules/@types/node/process.d.ts +0 -1485
  210. package/node_modules/xmlbuilder2/node_modules/@types/node/punycode.d.ts +0 -117
  211. package/node_modules/xmlbuilder2/node_modules/@types/node/querystring.d.ts +0 -131
  212. package/node_modules/xmlbuilder2/node_modules/@types/node/readline/promises.d.ts +0 -145
  213. package/node_modules/xmlbuilder2/node_modules/@types/node/readline.d.ts +0 -653
  214. package/node_modules/xmlbuilder2/node_modules/@types/node/repl.d.ts +0 -424
  215. package/node_modules/xmlbuilder2/node_modules/@types/node/stream/consumers.d.ts +0 -12
  216. package/node_modules/xmlbuilder2/node_modules/@types/node/stream/promises.d.ts +0 -42
  217. package/node_modules/xmlbuilder2/node_modules/@types/node/stream/web.d.ts +0 -330
  218. package/node_modules/xmlbuilder2/node_modules/@types/node/stream.d.ts +0 -1392
  219. package/node_modules/xmlbuilder2/node_modules/@types/node/string_decoder.d.ts +0 -67
  220. package/node_modules/xmlbuilder2/node_modules/@types/node/test.d.ts +0 -997
  221. package/node_modules/xmlbuilder2/node_modules/@types/node/timers/promises.d.ts +0 -93
  222. package/node_modules/xmlbuilder2/node_modules/@types/node/timers.d.ts +0 -101
  223. package/node_modules/xmlbuilder2/node_modules/@types/node/tls.d.ts +0 -1119
  224. package/node_modules/xmlbuilder2/node_modules/@types/node/trace_events.d.ts +0 -182
  225. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  226. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/assert.d.ts +0 -957
  227. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -538
  228. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2348
  229. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1368
  230. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/cluster.d.ts +0 -410
  231. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/console.d.ts +0 -412
  232. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/constants.d.ts +0 -18
  233. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/crypto.d.ts +0 -3961
  234. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/dgram.d.ts +0 -545
  235. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
  236. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -370
  237. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/dns.d.ts +0 -667
  238. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -126
  239. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  240. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/events.d.ts +0 -682
  241. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1189
  242. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/fs.d.ts +0 -4011
  243. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/globals.d.ts +0 -302
  244. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  245. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/http.d.ts +0 -1723
  246. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/http2.d.ts +0 -2129
  247. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/https.d.ts +0 -441
  248. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  249. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2748
  250. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/module.d.ts +0 -116
  251. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/net.d.ts +0 -886
  252. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/os.d.ts +0 -477
  253. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  254. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -638
  255. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/process.d.ts +0 -1485
  256. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  257. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/querystring.d.ts +0 -131
  258. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -145
  259. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/readline.d.ts +0 -653
  260. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/repl.d.ts +0 -424
  261. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  262. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -42
  263. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -330
  264. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/stream.d.ts +0 -1392
  265. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  266. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/test.d.ts +0 -997
  267. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  268. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/timers.d.ts +0 -101
  269. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/tls.d.ts +0 -1119
  270. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  271. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/tty.d.ts +0 -205
  272. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/url.d.ts +0 -892
  273. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/util.d.ts +0 -2044
  274. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
  275. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/vm.d.ts +0 -894
  276. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/wasi.d.ts +0 -152
  277. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -693
  278. package/node_modules/xmlbuilder2/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  279. package/node_modules/xmlbuilder2/node_modules/@types/node/tty.d.ts +0 -205
  280. package/node_modules/xmlbuilder2/node_modules/@types/node/url.d.ts +0 -892
  281. package/node_modules/xmlbuilder2/node_modules/@types/node/util.d.ts +0 -2052
  282. package/node_modules/xmlbuilder2/node_modules/@types/node/v8.d.ts +0 -635
  283. package/node_modules/xmlbuilder2/node_modules/@types/node/vm.d.ts +0 -894
  284. package/node_modules/xmlbuilder2/node_modules/@types/node/wasi.d.ts +0 -152
  285. package/node_modules/xmlbuilder2/node_modules/@types/node/worker_threads.d.ts +0 -693
  286. package/node_modules/xmlbuilder2/node_modules/@types/node/zlib.d.ts +0 -517
  287. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/CHANGELOG.md +0 -0
  288. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/LICENSE +0 -0
  289. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/README.md +0 -0
  290. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/index.js +0 -0
  291. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/append/constant.js +0 -0
  292. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/append.js +0 -0
  293. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/count.js +0 -0
  294. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/help.js +0 -0
  295. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/store/constant.js +0 -0
  296. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/store/false.js +0 -0
  297. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/store/true.js +0 -0
  298. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/store.js +0 -0
  299. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/subparsers.js +0 -0
  300. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action/version.js +0 -0
  301. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action.js +0 -0
  302. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/action_container.js +0 -0
  303. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/argparse.js +0 -0
  304. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/argument/error.js +0 -0
  305. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/argument/exclusive.js +0 -0
  306. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/argument/group.js +0 -0
  307. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/argument_parser.js +0 -0
  308. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/const.js +0 -0
  309. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/help/added_formatters.js +0 -0
  310. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/help/formatter.js +0 -0
  311. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/namespace.js +0 -0
  312. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/lib/utils.js +0 -0
  313. /package/node_modules/{argparse → xmlbuilder2/node_modules/argparse}/package.json +0 -0
@@ -1,957 +0,0 @@
1
- /**
2
- * The `node:assert` module provides a set of assertion functions for verifying
3
- * invariants.
4
- * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/assert.js)
5
- */
6
- declare module 'assert' {
7
- /**
8
- * An alias of {@link ok}.
9
- * @since v0.5.9
10
- * @param value The input that is checked for being truthy.
11
- */
12
- function assert(value: unknown, message?: string | Error): asserts value;
13
- namespace assert {
14
- /**
15
- * Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
16
- */
17
- class AssertionError extends Error {
18
- actual: unknown;
19
- expected: unknown;
20
- operator: string;
21
- generatedMessage: boolean;
22
- code: 'ERR_ASSERTION';
23
- constructor(options?: {
24
- /** If provided, the error message is set to this value. */
25
- message?: string | undefined;
26
- /** The `actual` property on the error instance. */
27
- actual?: unknown | undefined;
28
- /** The `expected` property on the error instance. */
29
- expected?: unknown | undefined;
30
- /** The `operator` property on the error instance. */
31
- operator?: string | undefined;
32
- /** If provided, the generated stack trace omits frames before this function. */
33
- // tslint:disable-next-line:ban-types
34
- stackStartFn?: Function | undefined;
35
- });
36
- }
37
- /**
38
- * This feature is deprecated and will be removed in a future version.
39
- * Please consider using alternatives such as the `mock` helper function.
40
- * @since v14.2.0, v12.19.0
41
- * @deprecated Deprecated
42
- */
43
- class CallTracker {
44
- /**
45
- * The wrapper function is expected to be called exactly `exact` times. If the
46
- * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
47
- * error.
48
- *
49
- * ```js
50
- * import assert from 'node:assert';
51
- *
52
- * // Creates call tracker.
53
- * const tracker = new assert.CallTracker();
54
- *
55
- * function func() {}
56
- *
57
- * // Returns a function that wraps func() that must be called exact times
58
- * // before tracker.verify().
59
- * const callsfunc = tracker.calls(func);
60
- * ```
61
- * @since v14.2.0, v12.19.0
62
- * @param [fn='A no-op function']
63
- * @param [exact=1]
64
- * @return that wraps `fn`.
65
- */
66
- calls(exact?: number): () => void;
67
- calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
68
- /**
69
- * Example:
70
- *
71
- * ```js
72
- * import assert from 'node:assert';
73
- *
74
- * const tracker = new assert.CallTracker();
75
- *
76
- * function func() {}
77
- * const callsfunc = tracker.calls(func);
78
- * callsfunc(1, 2, 3);
79
- *
80
- * assert.deepStrictEqual(tracker.getCalls(callsfunc),
81
- * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
82
- * ```
83
- * @since v18.8.0, v16.18.0
84
- * @param fn
85
- * @return An Array with all the calls to a tracked function.
86
- */
87
- getCalls(fn: Function): CallTrackerCall[];
88
- /**
89
- * The arrays contains information about the expected and actual number of calls of
90
- * the functions that have not been called the expected number of times.
91
- *
92
- * ```js
93
- * import assert from 'node:assert';
94
- *
95
- * // Creates call tracker.
96
- * const tracker = new assert.CallTracker();
97
- *
98
- * function func() {}
99
- *
100
- * // Returns a function that wraps func() that must be called exact times
101
- * // before tracker.verify().
102
- * const callsfunc = tracker.calls(func, 2);
103
- *
104
- * // Returns an array containing information on callsfunc()
105
- * console.log(tracker.report());
106
- * // [
107
- * // {
108
- * // message: 'Expected the func function to be executed 2 time(s) but was
109
- * // executed 0 time(s).',
110
- * // actual: 0,
111
- * // expected: 2,
112
- * // operator: 'func',
113
- * // stack: stack trace
114
- * // }
115
- * // ]
116
- * ```
117
- * @since v14.2.0, v12.19.0
118
- * @return An Array of objects containing information about the wrapper functions returned by `calls`.
119
- */
120
- report(): CallTrackerReportInformation[];
121
- /**
122
- * Reset calls of the call tracker.
123
- * If a tracked function is passed as an argument, the calls will be reset for it.
124
- * If no arguments are passed, all tracked functions will be reset.
125
- *
126
- * ```js
127
- * import assert from 'node:assert';
128
- *
129
- * const tracker = new assert.CallTracker();
130
- *
131
- * function func() {}
132
- * const callsfunc = tracker.calls(func);
133
- *
134
- * callsfunc();
135
- * // Tracker was called once
136
- * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
137
- *
138
- * tracker.reset(callsfunc);
139
- * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
140
- * ```
141
- * @since v18.8.0, v16.18.0
142
- * @param fn a tracked function to reset.
143
- */
144
- reset(fn?: Function): void;
145
- /**
146
- * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
147
- * have not been called the expected number of times.
148
- *
149
- * ```js
150
- * import assert from 'node:assert';
151
- *
152
- * // Creates call tracker.
153
- * const tracker = new assert.CallTracker();
154
- *
155
- * function func() {}
156
- *
157
- * // Returns a function that wraps func() that must be called exact times
158
- * // before tracker.verify().
159
- * const callsfunc = tracker.calls(func, 2);
160
- *
161
- * callsfunc();
162
- *
163
- * // Will throw an error since callsfunc() was only called once.
164
- * tracker.verify();
165
- * ```
166
- * @since v14.2.0, v12.19.0
167
- */
168
- verify(): void;
169
- }
170
- interface CallTrackerCall {
171
- thisArg: object;
172
- arguments: unknown[];
173
- }
174
- interface CallTrackerReportInformation {
175
- message: string;
176
- /** The actual number of times the function was called. */
177
- actual: number;
178
- /** The number of times the function was expected to be called. */
179
- expected: number;
180
- /** The name of the function that is wrapped. */
181
- operator: string;
182
- /** A stack trace of the function. */
183
- stack: object;
184
- }
185
- type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
186
- /**
187
- * Throws an `AssertionError` with the provided error message or a default
188
- * error message. If the `message` parameter is an instance of an `Error` then
189
- * it will be thrown instead of the `AssertionError`.
190
- *
191
- * ```js
192
- * import assert from 'node:assert/strict';
193
- *
194
- * assert.fail();
195
- * // AssertionError [ERR_ASSERTION]: Failed
196
- *
197
- * assert.fail('boom');
198
- * // AssertionError [ERR_ASSERTION]: boom
199
- *
200
- * assert.fail(new TypeError('need array'));
201
- * // TypeError: need array
202
- * ```
203
- *
204
- * Using `assert.fail()` with more than two arguments is possible but deprecated.
205
- * See below for further details.
206
- * @since v0.1.21
207
- * @param [message='Failed']
208
- */
209
- function fail(message?: string | Error): never;
210
- /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
211
- function fail(
212
- actual: unknown,
213
- expected: unknown,
214
- message?: string | Error,
215
- operator?: string,
216
- // tslint:disable-next-line:ban-types
217
- stackStartFn?: Function
218
- ): never;
219
- /**
220
- * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
221
- *
222
- * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
223
- * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
224
- * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
225
- *
226
- * Be aware that in the `repl` the error message will be different to the one
227
- * thrown in a file! See below for further details.
228
- *
229
- * ```js
230
- * import assert from 'node:assert/strict';
231
- *
232
- * assert.ok(true);
233
- * // OK
234
- * assert.ok(1);
235
- * // OK
236
- *
237
- * assert.ok();
238
- * // AssertionError: No value argument passed to `assert.ok()`
239
- *
240
- * assert.ok(false, 'it\'s false');
241
- * // AssertionError: it's false
242
- *
243
- * // In the repl:
244
- * assert.ok(typeof 123 === 'string');
245
- * // AssertionError: false == true
246
- *
247
- * // In a file (e.g. test.js):
248
- * assert.ok(typeof 123 === 'string');
249
- * // AssertionError: The expression evaluated to a falsy value:
250
- * //
251
- * // assert.ok(typeof 123 === 'string')
252
- *
253
- * assert.ok(false);
254
- * // AssertionError: The expression evaluated to a falsy value:
255
- * //
256
- * // assert.ok(false)
257
- *
258
- * assert.ok(0);
259
- * // AssertionError: The expression evaluated to a falsy value:
260
- * //
261
- * // assert.ok(0)
262
- * ```
263
- *
264
- * ```js
265
- * import assert from 'node:assert/strict';
266
- *
267
- * // Using `assert()` works the same:
268
- * assert(0);
269
- * // AssertionError: The expression evaluated to a falsy value:
270
- * //
271
- * // assert(0)
272
- * ```
273
- * @since v0.1.21
274
- */
275
- function ok(value: unknown, message?: string | Error): asserts value;
276
- /**
277
- * **Strict assertion mode**
278
- *
279
- * An alias of {@link strictEqual}.
280
- *
281
- * **Legacy assertion mode**
282
- *
283
- * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
284
- *
285
- * Tests shallow, coercive equality between the `actual` and `expected` parameters
286
- * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
287
- * and treated as being identical if both sides are `NaN`.
288
- *
289
- * ```js
290
- * import assert from 'node:assert';
291
- *
292
- * assert.equal(1, 1);
293
- * // OK, 1 == 1
294
- * assert.equal(1, '1');
295
- * // OK, 1 == '1'
296
- * assert.equal(NaN, NaN);
297
- * // OK
298
- *
299
- * assert.equal(1, 2);
300
- * // AssertionError: 1 == 2
301
- * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
302
- * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
303
- * ```
304
- *
305
- * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
306
- * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
307
- * @since v0.1.21
308
- */
309
- function equal(actual: unknown, expected: unknown, message?: string | Error): void;
310
- /**
311
- * **Strict assertion mode**
312
- *
313
- * An alias of {@link notStrictEqual}.
314
- *
315
- * **Legacy assertion mode**
316
- *
317
- * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
318
- *
319
- * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
320
- * specially handled and treated as being identical if both sides are `NaN`.
321
- *
322
- * ```js
323
- * import assert from 'node:assert';
324
- *
325
- * assert.notEqual(1, 2);
326
- * // OK
327
- *
328
- * assert.notEqual(1, 1);
329
- * // AssertionError: 1 != 1
330
- *
331
- * assert.notEqual(1, '1');
332
- * // AssertionError: 1 != '1'
333
- * ```
334
- *
335
- * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
336
- * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
337
- * @since v0.1.21
338
- */
339
- function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
340
- /**
341
- * **Strict assertion mode**
342
- *
343
- * An alias of {@link deepStrictEqual}.
344
- *
345
- * **Legacy assertion mode**
346
- *
347
- * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
348
- *
349
- * Tests for deep equality between the `actual` and `expected` parameters. Consider
350
- * using {@link deepStrictEqual} instead. {@link deepEqual} can have
351
- * surprising results.
352
- *
353
- * _Deep equality_ means that the enumerable "own" properties of child objects
354
- * are also recursively evaluated by the following rules.
355
- * @since v0.1.21
356
- */
357
- function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
358
- /**
359
- * **Strict assertion mode**
360
- *
361
- * An alias of {@link notDeepStrictEqual}.
362
- *
363
- * **Legacy assertion mode**
364
- *
365
- * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
366
- *
367
- * Tests for any deep inequality. Opposite of {@link deepEqual}.
368
- *
369
- * ```js
370
- * import assert from 'node:assert';
371
- *
372
- * const obj1 = {
373
- * a: {
374
- * b: 1,
375
- * },
376
- * };
377
- * const obj2 = {
378
- * a: {
379
- * b: 2,
380
- * },
381
- * };
382
- * const obj3 = {
383
- * a: {
384
- * b: 1,
385
- * },
386
- * };
387
- * const obj4 = { __proto__: obj1 };
388
- *
389
- * assert.notDeepEqual(obj1, obj1);
390
- * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
391
- *
392
- * assert.notDeepEqual(obj1, obj2);
393
- * // OK
394
- *
395
- * assert.notDeepEqual(obj1, obj3);
396
- * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
397
- *
398
- * assert.notDeepEqual(obj1, obj4);
399
- * // OK
400
- * ```
401
- *
402
- * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
403
- * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
404
- * instead of the `AssertionError`.
405
- * @since v0.1.21
406
- */
407
- function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
408
- /**
409
- * Tests strict equality between the `actual` and `expected` parameters as
410
- * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
411
- *
412
- * ```js
413
- * import assert from 'node:assert/strict';
414
- *
415
- * assert.strictEqual(1, 2);
416
- * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
417
- * //
418
- * // 1 !== 2
419
- *
420
- * assert.strictEqual(1, 1);
421
- * // OK
422
- *
423
- * assert.strictEqual('Hello foobar', 'Hello World!');
424
- * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
425
- * // + actual - expected
426
- * //
427
- * // + 'Hello foobar'
428
- * // - 'Hello World!'
429
- * // ^
430
- *
431
- * const apples = 1;
432
- * const oranges = 2;
433
- * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
434
- * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
435
- *
436
- * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
437
- * // TypeError: Inputs are not identical
438
- * ```
439
- *
440
- * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
441
- * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
442
- * instead of the `AssertionError`.
443
- * @since v0.1.21
444
- */
445
- function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
446
- /**
447
- * Tests strict inequality between the `actual` and `expected` parameters as
448
- * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
449
- *
450
- * ```js
451
- * import assert from 'node:assert/strict';
452
- *
453
- * assert.notStrictEqual(1, 2);
454
- * // OK
455
- *
456
- * assert.notStrictEqual(1, 1);
457
- * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
458
- * //
459
- * // 1
460
- *
461
- * assert.notStrictEqual(1, '1');
462
- * // OK
463
- * ```
464
- *
465
- * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
466
- * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
467
- * instead of the `AssertionError`.
468
- * @since v0.1.21
469
- */
470
- function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
471
- /**
472
- * Tests for deep equality between the `actual` and `expected` parameters.
473
- * "Deep" equality means that the enumerable "own" properties of child objects
474
- * are recursively evaluated also by the following rules.
475
- * @since v1.2.0
476
- */
477
- function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
478
- /**
479
- * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
480
- *
481
- * ```js
482
- * import assert from 'node:assert/strict';
483
- *
484
- * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
485
- * // OK
486
- * ```
487
- *
488
- * If the values are deeply and strictly equal, an `AssertionError` is thrown
489
- * with a `message` property set equal to the value of the `message` parameter. If
490
- * the `message` parameter is undefined, a default error message is assigned. If
491
- * the `message` parameter is an instance of an `Error` then it will be thrown
492
- * instead of the `AssertionError`.
493
- * @since v1.2.0
494
- */
495
- function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
496
- /**
497
- * Expects the function `fn` to throw an error.
498
- *
499
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
500
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
501
- * a validation object where each property will be tested for strict deep equality,
502
- * or an instance of error where each property will be tested for strict deep
503
- * equality including the non-enumerable `message` and `name` properties. When
504
- * using an object, it is also possible to use a regular expression, when
505
- * validating against a string property. See below for examples.
506
- *
507
- * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
508
- * fails.
509
- *
510
- * Custom validation object/error instance:
511
- *
512
- * ```js
513
- * import assert from 'node:assert/strict';
514
- *
515
- * const err = new TypeError('Wrong value');
516
- * err.code = 404;
517
- * err.foo = 'bar';
518
- * err.info = {
519
- * nested: true,
520
- * baz: 'text',
521
- * };
522
- * err.reg = /abc/i;
523
- *
524
- * assert.throws(
525
- * () => {
526
- * throw err;
527
- * },
528
- * {
529
- * name: 'TypeError',
530
- * message: 'Wrong value',
531
- * info: {
532
- * nested: true,
533
- * baz: 'text',
534
- * },
535
- * // Only properties on the validation object will be tested for.
536
- * // Using nested objects requires all properties to be present. Otherwise
537
- * // the validation is going to fail.
538
- * },
539
- * );
540
- *
541
- * // Using regular expressions to validate error properties:
542
- * assert.throws(
543
- * () => {
544
- * throw err;
545
- * },
546
- * {
547
- * // The `name` and `message` properties are strings and using regular
548
- * // expressions on those will match against the string. If they fail, an
549
- * // error is thrown.
550
- * name: /^TypeError$/,
551
- * message: /Wrong/,
552
- * foo: 'bar',
553
- * info: {
554
- * nested: true,
555
- * // It is not possible to use regular expressions for nested properties!
556
- * baz: 'text',
557
- * },
558
- * // The `reg` property contains a regular expression and only if the
559
- * // validation object contains an identical regular expression, it is going
560
- * // to pass.
561
- * reg: /abc/i,
562
- * },
563
- * );
564
- *
565
- * // Fails due to the different `message` and `name` properties:
566
- * assert.throws(
567
- * () => {
568
- * const otherErr = new Error('Not found');
569
- * // Copy all enumerable properties from `err` to `otherErr`.
570
- * for (const [key, value] of Object.entries(err)) {
571
- * otherErr[key] = value;
572
- * }
573
- * throw otherErr;
574
- * },
575
- * // The error's `message` and `name` properties will also be checked when using
576
- * // an error as validation object.
577
- * err,
578
- * );
579
- * ```
580
- *
581
- * Validate instanceof using constructor:
582
- *
583
- * ```js
584
- * import assert from 'node:assert/strict';
585
- *
586
- * assert.throws(
587
- * () => {
588
- * throw new Error('Wrong value');
589
- * },
590
- * Error,
591
- * );
592
- * ```
593
- *
594
- * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
595
- *
596
- * Using a regular expression runs `.toString` on the error object, and will
597
- * therefore also include the error name.
598
- *
599
- * ```js
600
- * import assert from 'node:assert/strict';
601
- *
602
- * assert.throws(
603
- * () => {
604
- * throw new Error('Wrong value');
605
- * },
606
- * /^Error: Wrong value$/,
607
- * );
608
- * ```
609
- *
610
- * Custom error validation:
611
- *
612
- * The function must return `true` to indicate all internal validations passed.
613
- * It will otherwise fail with an `AssertionError`.
614
- *
615
- * ```js
616
- * import assert from 'node:assert/strict';
617
- *
618
- * assert.throws(
619
- * () => {
620
- * throw new Error('Wrong value');
621
- * },
622
- * (err) => {
623
- * assert(err instanceof Error);
624
- * assert(/value/.test(err));
625
- * // Avoid returning anything from validation functions besides `true`.
626
- * // Otherwise, it's not clear what part of the validation failed. Instead,
627
- * // throw an error about the specific validation that failed (as done in this
628
- * // example) and add as much helpful debugging information to that error as
629
- * // possible.
630
- * return true;
631
- * },
632
- * 'unexpected error',
633
- * );
634
- * ```
635
- *
636
- * `error` cannot be a string. If a string is provided as the second
637
- * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
638
- * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
639
- * a string as the second argument gets considered:
640
- *
641
- * ```js
642
- * import assert from 'node:assert/strict';
643
- *
644
- * function throwingFirst() {
645
- * throw new Error('First');
646
- * }
647
- *
648
- * function throwingSecond() {
649
- * throw new Error('Second');
650
- * }
651
- *
652
- * function notThrowing() {}
653
- *
654
- * // The second argument is a string and the input function threw an Error.
655
- * // The first case will not throw as it does not match for the error message
656
- * // thrown by the input function!
657
- * assert.throws(throwingFirst, 'Second');
658
- * // In the next example the message has no benefit over the message from the
659
- * // error and since it is not clear if the user intended to actually match
660
- * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
661
- * assert.throws(throwingSecond, 'Second');
662
- * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
663
- *
664
- * // The string is only used (as message) in case the function does not throw:
665
- * assert.throws(notThrowing, 'Second');
666
- * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
667
- *
668
- * // If it was intended to match for the error message do this instead:
669
- * // It does not throw because the error messages match.
670
- * assert.throws(throwingSecond, /Second$/);
671
- *
672
- * // If the error message does not match, an AssertionError is thrown.
673
- * assert.throws(throwingFirst, /Second$/);
674
- * // AssertionError [ERR_ASSERTION]
675
- * ```
676
- *
677
- * Due to the confusing error-prone notation, avoid a string as the second
678
- * argument.
679
- * @since v0.1.21
680
- */
681
- function throws(block: () => unknown, message?: string | Error): void;
682
- function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
683
- /**
684
- * Asserts that the function `fn` does not throw an error.
685
- *
686
- * Using `assert.doesNotThrow()` is actually not useful because there
687
- * is no benefit in catching an error and then rethrowing it. Instead, consider
688
- * adding a comment next to the specific code path that should not throw and keep
689
- * error messages as expressive as possible.
690
- *
691
- * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
692
- *
693
- * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
694
- * different type, or if the `error` parameter is undefined, the error is
695
- * propagated back to the caller.
696
- *
697
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
698
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
699
- * function. See {@link throws} for more details.
700
- *
701
- * The following, for instance, will throw the `TypeError` because there is no
702
- * matching error type in the assertion:
703
- *
704
- * ```js
705
- * import assert from 'node:assert/strict';
706
- *
707
- * assert.doesNotThrow(
708
- * () => {
709
- * throw new TypeError('Wrong value');
710
- * },
711
- * SyntaxError,
712
- * );
713
- * ```
714
- *
715
- * However, the following will result in an `AssertionError` with the message
716
- * 'Got unwanted exception...':
717
- *
718
- * ```js
719
- * import assert from 'node:assert/strict';
720
- *
721
- * assert.doesNotThrow(
722
- * () => {
723
- * throw new TypeError('Wrong value');
724
- * },
725
- * TypeError,
726
- * );
727
- * ```
728
- *
729
- * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
730
- *
731
- * ```js
732
- * import assert from 'node:assert/strict';
733
- *
734
- * assert.doesNotThrow(
735
- * () => {
736
- * throw new TypeError('Wrong value');
737
- * },
738
- * /Wrong value/,
739
- * 'Whoops',
740
- * );
741
- * // Throws: AssertionError: Got unwanted exception: Whoops
742
- * ```
743
- * @since v0.1.21
744
- */
745
- function doesNotThrow(block: () => unknown, message?: string | Error): void;
746
- function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
747
- /**
748
- * Throws `value` if `value` is not `undefined` or `null`. This is useful when
749
- * testing the `error` argument in callbacks. The stack trace contains all frames
750
- * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
751
- *
752
- * ```js
753
- * import assert from 'node:assert/strict';
754
- *
755
- * assert.ifError(null);
756
- * // OK
757
- * assert.ifError(0);
758
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
759
- * assert.ifError('error');
760
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
761
- * assert.ifError(new Error());
762
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
763
- *
764
- * // Create some random error frames.
765
- * let err;
766
- * (function errorFrame() {
767
- * err = new Error('test error');
768
- * })();
769
- *
770
- * (function ifErrorFrame() {
771
- * assert.ifError(err);
772
- * })();
773
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
774
- * // at ifErrorFrame
775
- * // at errorFrame
776
- * ```
777
- * @since v0.1.97
778
- */
779
- function ifError(value: unknown): asserts value is null | undefined;
780
- /**
781
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
782
- * calls the function and awaits the returned promise to complete. It will then
783
- * check that the promise is rejected.
784
- *
785
- * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
786
- * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
787
- * handler is skipped.
788
- *
789
- * Besides the async nature to await the completion behaves identically to {@link throws}.
790
- *
791
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
792
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
793
- * an object where each property will be tested for, or an instance of error where
794
- * each property will be tested for including the non-enumerable `message` and`name` properties.
795
- *
796
- * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
797
- *
798
- * ```js
799
- * import assert from 'node:assert/strict';
800
- *
801
- * await assert.rejects(
802
- * async () => {
803
- * throw new TypeError('Wrong value');
804
- * },
805
- * {
806
- * name: 'TypeError',
807
- * message: 'Wrong value',
808
- * },
809
- * );
810
- * ```
811
- *
812
- * ```js
813
- * import assert from 'node:assert/strict';
814
- *
815
- * await assert.rejects(
816
- * async () => {
817
- * throw new TypeError('Wrong value');
818
- * },
819
- * (err) => {
820
- * assert.strictEqual(err.name, 'TypeError');
821
- * assert.strictEqual(err.message, 'Wrong value');
822
- * return true;
823
- * },
824
- * );
825
- * ```
826
- *
827
- * ```js
828
- * import assert from 'node:assert/strict';
829
- *
830
- * assert.rejects(
831
- * Promise.reject(new Error('Wrong value')),
832
- * Error,
833
- * ).then(() => {
834
- * // ...
835
- * });
836
- * ```
837
- *
838
- * `error` cannot be a string. If a string is provided as the second
839
- * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
840
- * example in {@link throws} carefully if using a string as the second
841
- * argument gets considered.
842
- * @since v10.0.0
843
- */
844
- function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
845
- function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
846
- /**
847
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
848
- * calls the function and awaits the returned promise to complete. It will then
849
- * check that the promise is not rejected.
850
- *
851
- * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
852
- * the function does not return a promise, `assert.doesNotReject()` will return a
853
- * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
854
- * the error handler is skipped.
855
- *
856
- * Using `assert.doesNotReject()` is actually not useful because there is little
857
- * benefit in catching a rejection and then rejecting it again. Instead, consider
858
- * adding a comment next to the specific code path that should not reject and keep
859
- * error messages as expressive as possible.
860
- *
861
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
862
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
863
- * function. See {@link throws} for more details.
864
- *
865
- * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
866
- *
867
- * ```js
868
- * import assert from 'node:assert/strict';
869
- *
870
- * await assert.doesNotReject(
871
- * async () => {
872
- * throw new TypeError('Wrong value');
873
- * },
874
- * SyntaxError,
875
- * );
876
- * ```
877
- *
878
- * ```js
879
- * import assert from 'node:assert/strict';
880
- *
881
- * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
882
- * .then(() => {
883
- * // ...
884
- * });
885
- * ```
886
- * @since v10.0.0
887
- */
888
- function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
889
- function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
890
- /**
891
- * Expects the `string` input to match the regular expression.
892
- *
893
- * ```js
894
- * import assert from 'node:assert/strict';
895
- *
896
- * assert.match('I will fail', /pass/);
897
- * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
898
- *
899
- * assert.match(123, /pass/);
900
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
901
- *
902
- * assert.match('I will pass', /pass/);
903
- * // OK
904
- * ```
905
- *
906
- * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
907
- * to the value of the `message` parameter. If the `message` parameter is
908
- * undefined, a default error message is assigned. If the `message` parameter is an
909
- * instance of an `Error` then it will be thrown instead of the `AssertionError`.
910
- * @since v13.6.0, v12.16.0
911
- */
912
- function match(value: string, regExp: RegExp, message?: string | Error): void;
913
- /**
914
- * Expects the `string` input not to match the regular expression.
915
- *
916
- * ```js
917
- * import assert from 'node:assert/strict';
918
- *
919
- * assert.doesNotMatch('I will fail', /fail/);
920
- * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
921
- *
922
- * assert.doesNotMatch(123, /pass/);
923
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
924
- *
925
- * assert.doesNotMatch('I will pass', /different/);
926
- * // OK
927
- * ```
928
- *
929
- * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
930
- * to the value of the `message` parameter. If the `message` parameter is
931
- * undefined, a default error message is assigned. If the `message` parameter is an
932
- * instance of an `Error` then it will be thrown instead of the `AssertionError`.
933
- * @since v13.6.0, v12.16.0
934
- */
935
- function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
936
- const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
937
- (value: unknown, message?: string | Error): asserts value;
938
- equal: typeof strictEqual;
939
- notEqual: typeof notStrictEqual;
940
- deepEqual: typeof deepStrictEqual;
941
- notDeepEqual: typeof notDeepStrictEqual;
942
- // Mapped types and assertion functions are incompatible?
943
- // TS2775: Assertions require every name in the call target
944
- // to be declared with an explicit type annotation.
945
- ok: typeof ok;
946
- strictEqual: typeof strictEqual;
947
- deepStrictEqual: typeof deepStrictEqual;
948
- ifError: typeof ifError;
949
- strict: typeof strict;
950
- };
951
- }
952
- export = assert;
953
- }
954
- declare module 'node:assert' {
955
- import assert = require('assert');
956
- export = assert;
957
- }