@mnaoumov/typescript-dev-toolkit 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -1
  3. package/bundlers/esbuild-impl/change-extension-plugin/package.json +6 -0
  4. package/bundlers/esbuild-impl/custom-esbuild-options-plugin/package.json +6 -0
  5. package/bundlers/esbuild-impl/fix-esm-plugin/package.json +6 -0
  6. package/bundlers/esbuild-impl/index/package.json +6 -0
  7. package/bundlers/esbuild-impl/package.json +6 -0
  8. package/bundlers/esbuild-impl/preprocess-plugin/package.json +6 -0
  9. package/bundlers/esbuild-impl/svelte-wrapper-plugin/package.json +6 -0
  10. package/bundlers/index/package.json +6 -0
  11. package/bundlers/package.json +6 -0
  12. package/dist/lib/cjs/build.cjs +191 -0
  13. package/dist/lib/cjs/build.d.cts +59 -0
  14. package/dist/lib/cjs/bundlers/esbuild-impl/change-extension-plugin.cjs +139 -0
  15. package/dist/lib/cjs/bundlers/esbuild-impl/change-extension-plugin.d.cts +25 -0
  16. package/dist/lib/cjs/bundlers/esbuild-impl/custom-esbuild-options-plugin.cjs +96 -0
  17. package/dist/lib/cjs/bundlers/esbuild-impl/custom-esbuild-options-plugin.d.cts +14 -0
  18. package/dist/lib/cjs/bundlers/esbuild-impl/fix-esm-plugin.cjs +106 -0
  19. package/dist/lib/cjs/bundlers/esbuild-impl/fix-esm-plugin.d.cts +13 -0
  20. package/dist/lib/cjs/bundlers/esbuild-impl/index.cjs +111 -0
  21. package/dist/lib/cjs/bundlers/esbuild-impl/index.d.cts +6 -0
  22. package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.cjs +211 -0
  23. package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.d.cts +143 -0
  24. package/dist/lib/cjs/bundlers/esbuild-impl/svelte-wrapper-plugin.cjs +129 -0
  25. package/dist/lib/cjs/bundlers/esbuild-impl/svelte-wrapper-plugin.d.cts +14 -0
  26. package/dist/lib/cjs/bundlers/index.cjs +99 -0
  27. package/dist/lib/cjs/bundlers/index.d.cts +2 -0
  28. package/dist/lib/cjs/check-project-types.cjs +163 -0
  29. package/dist/lib/cjs/check-project-types.d.cts +92 -0
  30. package/dist/lib/cjs/cli-utils.cjs +276 -0
  31. package/dist/lib/cjs/cli-utils.d.cts +123 -0
  32. package/dist/lib/cjs/code-generator.cjs +96 -0
  33. package/dist/lib/cjs/code-generator.d.cts +14 -0
  34. package/dist/lib/cjs/commitlint-config.cjs +110 -0
  35. package/dist/lib/cjs/commitlint-config.d.cts +14 -0
  36. package/dist/lib/cjs/commitlint-forbidden-patterns.cjs +110 -0
  37. package/dist/lib/cjs/commitlint-forbidden-patterns.d.cts +37 -0
  38. package/dist/lib/cjs/commitlint-spellcheck-header.cjs +126 -0
  39. package/dist/lib/cjs/commitlint-spellcheck-header.d.cts +40 -0
  40. package/dist/lib/cjs/env-toggle.cjs +133 -0
  41. package/dist/lib/cjs/env-toggle.d.cts +42 -0
  42. package/dist/lib/cjs/exec.cjs +455 -0
  43. package/dist/lib/cjs/exec.d.cts +162 -0
  44. package/dist/lib/cjs/forbidden-patterns.cjs +157 -0
  45. package/dist/lib/cjs/forbidden-patterns.d.cts +57 -0
  46. package/dist/lib/cjs/formatters/dprint.cjs +108 -0
  47. package/dist/lib/cjs/formatters/dprint.d.cts +33 -0
  48. package/dist/lib/cjs/formatters/index.cjs +99 -0
  49. package/dist/lib/cjs/formatters/index.d.cts +2 -0
  50. package/dist/lib/cjs/fs.cjs +123 -0
  51. package/dist/lib/cjs/fs.d.cts +80 -0
  52. package/dist/lib/cjs/gate.cjs +140 -0
  53. package/dist/lib/cjs/gate.d.cts +93 -0
  54. package/dist/lib/cjs/git.cjs +109 -0
  55. package/dist/lib/cjs/git.d.cts +37 -0
  56. package/dist/lib/cjs/index.cjs +186 -0
  57. package/dist/lib/cjs/index.d.cts +35 -0
  58. package/dist/lib/cjs/json.cjs +141 -0
  59. package/dist/lib/cjs/json.d.cts +102 -0
  60. package/dist/lib/cjs/library-build.cjs +475 -0
  61. package/dist/lib/cjs/library-build.d.cts +97 -0
  62. package/dist/lib/cjs/linters/cspell-content.cjs +124 -0
  63. package/dist/lib/cjs/linters/cspell-content.d.cts +46 -0
  64. package/dist/lib/cjs/linters/cspell.cjs +103 -0
  65. package/dist/lib/cjs/linters/cspell.d.cts +36 -0
  66. package/dist/lib/cjs/linters/eslint-agnostic-core-boundary.cjs +94 -0
  67. package/dist/lib/cjs/linters/eslint-agnostic-core-boundary.d.cts +49 -0
  68. package/dist/lib/cjs/linters/eslint-config.cjs +1068 -0
  69. package/dist/lib/cjs/linters/eslint-config.d.cts +123 -0
  70. package/dist/lib/cjs/linters/eslint-no-restricted-syntax.cjs +130 -0
  71. package/dist/lib/cjs/linters/eslint-no-restricted-syntax.d.cts +27 -0
  72. package/dist/lib/cjs/linters/eslint-rules/in-house-plugin.cjs +116 -0
  73. package/dist/lib/cjs/linters/eslint-rules/in-house-plugin.d.cts +26 -0
  74. package/dist/lib/cjs/linters/eslint-rules/index.cjs +132 -0
  75. package/dist/lib/cjs/linters/eslint-rules/index.d.cts +13 -0
  76. package/dist/lib/cjs/linters/eslint-rules/no-async-callback-to-unsafe-return.cjs +175 -0
  77. package/dist/lib/cjs/linters/eslint-rules/no-async-callback-to-unsafe-return.d.cts +10 -0
  78. package/dist/lib/cjs/linters/eslint-rules/no-unresolved-jsdoc-link.cjs +290 -0
  79. package/dist/lib/cjs/linters/eslint-rules/no-unresolved-jsdoc-link.d.cts +10 -0
  80. package/dist/lib/cjs/linters/eslint-rules/no-unused-params-members.cjs +265 -0
  81. package/dist/lib/cjs/linters/eslint-rules/no-unused-params-members.d.cts +41 -0
  82. package/dist/lib/cjs/linters/eslint-rules/no-used-underscore-variables.cjs +134 -0
  83. package/dist/lib/cjs/linters/eslint-rules/no-used-underscore-variables.d.cts +20 -0
  84. package/dist/lib/cjs/linters/eslint-rules/params-options-name-match.cjs +217 -0
  85. package/dist/lib/cjs/linters/eslint-rules/params-options-name-match.d.cts +36 -0
  86. package/dist/lib/cjs/linters/eslint-rules/prefer-noop-async.cjs +126 -0
  87. package/dist/lib/cjs/linters/eslint-rules/prefer-noop-async.d.cts +10 -0
  88. package/dist/lib/cjs/linters/eslint-rules/readonly-params-options-result-members.cjs +125 -0
  89. package/dist/lib/cjs/linters/eslint-rules/readonly-params-options-result-members.d.cts +20 -0
  90. package/dist/lib/cjs/linters/eslint-rules/require-method-template.cjs +181 -0
  91. package/dist/lib/cjs/linters/eslint-rules/require-method-template.d.cts +14 -0
  92. package/dist/lib/cjs/linters/eslint-rules/require-super-call.cjs +217 -0
  93. package/dist/lib/cjs/linters/eslint-rules/require-super-call.d.cts +10 -0
  94. package/dist/lib/cjs/linters/eslint-rules/rule-tester-helper.cjs +92 -0
  95. package/dist/lib/cjs/linters/eslint-rules/rule-tester-helper.d.cts +18 -0
  96. package/dist/lib/cjs/linters/eslint-rules/ts-estree-node.cjs +92 -0
  97. package/dist/lib/cjs/linters/eslint-rules/ts-estree-node.d.cts +23 -0
  98. package/dist/lib/cjs/linters/eslint-types/@types/@eslint-community__eslint-plugin-eslint-comments__configs.d.cts +20 -0
  99. package/dist/lib/cjs/linters/eslint-types/@types/eslint-plugin-verify-tsdoc.d.cts +17 -0
  100. package/dist/lib/cjs/linters/eslint.cjs +122 -0
  101. package/dist/lib/cjs/linters/eslint.d.cts +35 -0
  102. package/dist/lib/cjs/linters/index.cjs +138 -0
  103. package/dist/lib/cjs/linters/index.d.cts +15 -0
  104. package/dist/lib/cjs/linters/lint-ignores.cjs +91 -0
  105. package/dist/lib/cjs/linters/lint-ignores.d.cts +30 -0
  106. package/dist/lib/cjs/linters/markdownlint-cli2-config.cjs +169 -0
  107. package/dist/lib/cjs/linters/markdownlint-cli2-config.d.cts +11 -0
  108. package/dist/lib/cjs/linters/markdownlint-content.cjs +120 -0
  109. package/dist/lib/cjs/linters/markdownlint-content.d.cts +47 -0
  110. package/dist/lib/cjs/linters/markdownlint-ignores.cjs +95 -0
  111. package/dist/lib/cjs/linters/markdownlint-ignores.d.cts +35 -0
  112. package/dist/lib/cjs/linters/markdownlint-rules/index.cjs +99 -0
  113. package/dist/lib/cjs/linters/markdownlint-rules/index.d.cts +2 -0
  114. package/dist/lib/cjs/linters/markdownlint-rules/no-soft-break-in-paragraph.cjs +152 -0
  115. package/dist/lib/cjs/linters/markdownlint-rules/no-soft-break-in-paragraph.d.cts +35 -0
  116. package/dist/lib/cjs/linters/markdownlint-types/@types/markdownlint-cli2-config-schema.d.cts +1344 -0
  117. package/dist/lib/cjs/linters/markdownlint-types/@types/markdownlint-cli2.d.cts +67 -0
  118. package/dist/lib/cjs/linters/markdownlint.cjs +151 -0
  119. package/dist/lib/cjs/linters/markdownlint.d.cts +32 -0
  120. package/dist/lib/cjs/linters/over-exposure.cjs +685 -0
  121. package/dist/lib/cjs/linters/over-exposure.d.cts +357 -0
  122. package/dist/lib/cjs/nano-staged-config.cjs +148 -0
  123. package/dist/lib/cjs/nano-staged-config.d.cts +54 -0
  124. package/dist/lib/cjs/npm-publish.cjs +93 -0
  125. package/dist/lib/cjs/npm-publish.d.cts +19 -0
  126. package/dist/lib/cjs/npm-run.cjs +120 -0
  127. package/dist/lib/cjs/npm-run.d.cts +34 -0
  128. package/dist/lib/cjs/npm.cjs +200 -0
  129. package/dist/lib/cjs/npm.d.cts +168 -0
  130. package/dist/lib/cjs/package-lock-integrity.cjs +134 -0
  131. package/dist/lib/cjs/package-lock-integrity.d.cts +38 -0
  132. package/dist/lib/cjs/package-manager.cjs +291 -0
  133. package/dist/lib/cjs/package-manager.d.cts +93 -0
  134. package/dist/lib/cjs/released-issues.cjs +178 -0
  135. package/dist/lib/cjs/released-issues.d.cts +79 -0
  136. package/dist/lib/cjs/repo-paths.cjs +167 -0
  137. package/dist/lib/cjs/repo-paths.d.cts +318 -0
  138. package/dist/lib/cjs/root.cjs +150 -0
  139. package/dist/lib/cjs/root.d.cts +107 -0
  140. package/dist/lib/cjs/test-runners/index.cjs +102 -0
  141. package/dist/lib/cjs/test-runners/index.d.cts +3 -0
  142. package/dist/lib/cjs/test-runners/vitest-config.cjs +126 -0
  143. package/dist/lib/cjs/test-runners/vitest-config.d.cts +90 -0
  144. package/dist/lib/cjs/test-runners/vitest.cjs +115 -0
  145. package/dist/lib/cjs/test-runners/vitest.d.cts +52 -0
  146. package/dist/lib/cjs/validate-declarations.cjs +120 -0
  147. package/dist/lib/cjs/validate-declarations.d.cts +37 -0
  148. package/dist/lib/cjs/version.cjs +758 -0
  149. package/dist/lib/cjs/version.d.cts +418 -0
  150. package/dist/lib/esm/build.d.mts +59 -0
  151. package/dist/lib/esm/build.mjs +165 -0
  152. package/dist/lib/esm/bundlers/esbuild-impl/change-extension-plugin.d.mts +25 -0
  153. package/dist/lib/esm/bundlers/esbuild-impl/change-extension-plugin.mjs +101 -0
  154. package/dist/lib/esm/bundlers/esbuild-impl/custom-esbuild-options-plugin.d.mts +14 -0
  155. package/dist/lib/esm/bundlers/esbuild-impl/custom-esbuild-options-plugin.mjs +59 -0
  156. package/dist/lib/esm/bundlers/esbuild-impl/fix-esm-plugin.d.mts +13 -0
  157. package/dist/lib/esm/bundlers/esbuild-impl/fix-esm-plugin.mjs +69 -0
  158. package/dist/lib/esm/bundlers/esbuild-impl/index.d.mts +6 -0
  159. package/dist/lib/esm/bundlers/esbuild-impl/index.mjs +60 -0
  160. package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.d.mts +143 -0
  161. package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.mjs +176 -0
  162. package/dist/lib/esm/bundlers/esbuild-impl/svelte-wrapper-plugin.d.mts +14 -0
  163. package/dist/lib/esm/bundlers/esbuild-impl/svelte-wrapper-plugin.mjs +82 -0
  164. package/dist/lib/esm/bundlers/index.d.mts +2 -0
  165. package/dist/lib/esm/bundlers/index.mjs +52 -0
  166. package/dist/lib/esm/check-project-types.d.mts +92 -0
  167. package/dist/lib/esm/check-project-types.mjs +123 -0
  168. package/dist/lib/esm/cli-utils.d.mts +123 -0
  169. package/dist/lib/esm/cli-utils.mjs +225 -0
  170. package/dist/lib/esm/code-generator.d.mts +14 -0
  171. package/dist/lib/esm/code-generator.mjs +59 -0
  172. package/dist/lib/esm/commitlint-config.d.mts +14 -0
  173. package/dist/lib/esm/commitlint-config.mjs +79 -0
  174. package/dist/lib/esm/commitlint-forbidden-patterns.d.mts +37 -0
  175. package/dist/lib/esm/commitlint-forbidden-patterns.mjs +75 -0
  176. package/dist/lib/esm/commitlint-spellcheck-header.d.mts +40 -0
  177. package/dist/lib/esm/commitlint-spellcheck-header.mjs +87 -0
  178. package/dist/lib/esm/env-toggle.d.mts +42 -0
  179. package/dist/lib/esm/env-toggle.mjs +84 -0
  180. package/dist/lib/esm/exec.d.mts +162 -0
  181. package/dist/lib/esm/exec.mjs +410 -0
  182. package/dist/lib/esm/forbidden-patterns.d.mts +57 -0
  183. package/dist/lib/esm/forbidden-patterns.mjs +108 -0
  184. package/dist/lib/esm/formatters/dprint.d.mts +33 -0
  185. package/dist/lib/esm/formatters/dprint.mjs +75 -0
  186. package/dist/lib/esm/formatters/index.d.mts +2 -0
  187. package/dist/lib/esm/formatters/index.mjs +52 -0
  188. package/dist/lib/esm/fs.d.mts +80 -0
  189. package/dist/lib/esm/fs.mjs +89 -0
  190. package/dist/lib/esm/gate.d.mts +93 -0
  191. package/dist/lib/esm/gate.mjs +106 -0
  192. package/dist/lib/esm/git.d.mts +37 -0
  193. package/dist/lib/esm/git.mjs +72 -0
  194. package/dist/lib/esm/index.d.mts +35 -0
  195. package/dist/lib/esm/index.mjs +110 -0
  196. package/dist/lib/esm/json.d.mts +102 -0
  197. package/dist/lib/esm/json.mjs +106 -0
  198. package/dist/lib/esm/library-build.d.mts +97 -0
  199. package/dist/lib/esm/library-build.mjs +435 -0
  200. package/dist/lib/esm/linters/cspell-content.d.mts +46 -0
  201. package/dist/lib/esm/linters/cspell-content.mjs +87 -0
  202. package/dist/lib/esm/linters/cspell.d.mts +36 -0
  203. package/dist/lib/esm/linters/cspell.mjs +69 -0
  204. package/dist/lib/esm/linters/eslint-agnostic-core-boundary.d.mts +49 -0
  205. package/dist/lib/esm/linters/eslint-agnostic-core-boundary.mjs +57 -0
  206. package/dist/lib/esm/linters/eslint-config.d.mts +123 -0
  207. package/dist/lib/esm/linters/eslint-config.mjs +1022 -0
  208. package/dist/lib/esm/linters/eslint-no-restricted-syntax.d.mts +27 -0
  209. package/dist/lib/esm/linters/eslint-no-restricted-syntax.mjs +93 -0
  210. package/dist/lib/esm/linters/eslint-rules/in-house-plugin.d.mts +26 -0
  211. package/dist/lib/esm/linters/eslint-rules/in-house-plugin.mjs +77 -0
  212. package/dist/lib/esm/linters/eslint-rules/index.d.mts +13 -0
  213. package/dist/lib/esm/linters/eslint-rules/index.mjs +74 -0
  214. package/dist/lib/esm/linters/eslint-rules/no-async-callback-to-unsafe-return.d.mts +10 -0
  215. package/dist/lib/esm/linters/eslint-rules/no-async-callback-to-unsafe-return.mjs +144 -0
  216. package/dist/lib/esm/linters/eslint-rules/no-unresolved-jsdoc-link.d.mts +10 -0
  217. package/dist/lib/esm/linters/eslint-rules/no-unresolved-jsdoc-link.mjs +277 -0
  218. package/dist/lib/esm/linters/eslint-rules/no-unused-params-members.d.mts +41 -0
  219. package/dist/lib/esm/linters/eslint-rules/no-unused-params-members.mjs +227 -0
  220. package/dist/lib/esm/linters/eslint-rules/no-used-underscore-variables.d.mts +20 -0
  221. package/dist/lib/esm/linters/eslint-rules/no-used-underscore-variables.mjs +96 -0
  222. package/dist/lib/esm/linters/eslint-rules/params-options-name-match.d.mts +36 -0
  223. package/dist/lib/esm/linters/eslint-rules/params-options-name-match.mjs +179 -0
  224. package/dist/lib/esm/linters/eslint-rules/prefer-noop-async.d.mts +10 -0
  225. package/dist/lib/esm/linters/eslint-rules/prefer-noop-async.mjs +88 -0
  226. package/dist/lib/esm/linters/eslint-rules/readonly-params-options-result-members.d.mts +20 -0
  227. package/dist/lib/esm/linters/eslint-rules/readonly-params-options-result-members.mjs +87 -0
  228. package/dist/lib/esm/linters/eslint-rules/require-method-template.d.mts +14 -0
  229. package/dist/lib/esm/linters/eslint-rules/require-method-template.mjs +142 -0
  230. package/dist/lib/esm/linters/eslint-rules/require-super-call.d.mts +10 -0
  231. package/dist/lib/esm/linters/eslint-rules/require-super-call.mjs +183 -0
  232. package/dist/lib/esm/linters/eslint-rules/rule-tester-helper.d.mts +18 -0
  233. package/dist/lib/esm/linters/eslint-rules/rule-tester-helper.mjs +55 -0
  234. package/dist/lib/esm/linters/eslint-rules/ts-estree-node.d.mts +23 -0
  235. package/dist/lib/esm/linters/eslint-rules/ts-estree-node.mjs +55 -0
  236. package/dist/lib/esm/linters/eslint-types/@types/@eslint-community__eslint-plugin-eslint-comments__configs.d.mts +20 -0
  237. package/dist/lib/esm/linters/eslint-types/@types/eslint-plugin-verify-tsdoc.d.mts +17 -0
  238. package/dist/lib/esm/linters/eslint.d.mts +35 -0
  239. package/dist/lib/esm/linters/eslint.mjs +88 -0
  240. package/dist/lib/esm/linters/index.d.mts +15 -0
  241. package/dist/lib/esm/linters/index.mjs +78 -0
  242. package/dist/lib/esm/linters/lint-ignores.d.mts +30 -0
  243. package/dist/lib/esm/linters/lint-ignores.mjs +54 -0
  244. package/dist/lib/esm/linters/markdownlint-cli2-config.d.mts +11 -0
  245. package/dist/lib/esm/linters/markdownlint-cli2-config.mjs +122 -0
  246. package/dist/lib/esm/linters/markdownlint-content.d.mts +47 -0
  247. package/dist/lib/esm/linters/markdownlint-content.mjs +83 -0
  248. package/dist/lib/esm/linters/markdownlint-ignores.d.mts +35 -0
  249. package/dist/lib/esm/linters/markdownlint-ignores.mjs +57 -0
  250. package/dist/lib/esm/linters/markdownlint-rules/index.d.mts +2 -0
  251. package/dist/lib/esm/linters/markdownlint-rules/index.mjs +52 -0
  252. package/dist/lib/esm/linters/markdownlint-rules/no-soft-break-in-paragraph.d.mts +35 -0
  253. package/dist/lib/esm/linters/markdownlint-rules/no-soft-break-in-paragraph.mjs +114 -0
  254. package/dist/lib/esm/linters/markdownlint-types/@types/markdownlint-cli2-config-schema.d.mts +1344 -0
  255. package/dist/lib/esm/linters/markdownlint-types/@types/markdownlint-cli2.d.mts +67 -0
  256. package/dist/lib/esm/linters/markdownlint.d.mts +32 -0
  257. package/dist/lib/esm/linters/markdownlint.mjs +124 -0
  258. package/dist/lib/esm/linters/over-exposure.d.mts +357 -0
  259. package/dist/lib/esm/linters/over-exposure.mjs +672 -0
  260. package/dist/lib/esm/nano-staged-config.d.mts +54 -0
  261. package/dist/lib/esm/nano-staged-config.mjs +103 -0
  262. package/dist/lib/esm/npm-publish.d.mts +19 -0
  263. package/dist/lib/esm/npm-publish.mjs +56 -0
  264. package/dist/lib/esm/npm-run.d.mts +34 -0
  265. package/dist/lib/esm/npm-run.mjs +81 -0
  266. package/dist/lib/esm/npm.d.mts +168 -0
  267. package/dist/lib/esm/npm.mjs +155 -0
  268. package/dist/lib/esm/package-lock-integrity.d.mts +38 -0
  269. package/dist/lib/esm/package-lock-integrity.mjs +99 -0
  270. package/dist/lib/esm/package-manager.d.mts +93 -0
  271. package/dist/lib/esm/package-manager.mjs +245 -0
  272. package/dist/lib/esm/released-issues.d.mts +79 -0
  273. package/dist/lib/esm/released-issues.mjs +143 -0
  274. package/dist/lib/esm/repo-paths.d.mts +318 -0
  275. package/dist/lib/esm/repo-paths.mjs +130 -0
  276. package/dist/lib/esm/root.d.mts +107 -0
  277. package/dist/lib/esm/root.mjs +115 -0
  278. package/dist/lib/esm/test-runners/index.d.mts +3 -0
  279. package/dist/lib/esm/test-runners/index.mjs +54 -0
  280. package/dist/lib/esm/test-runners/vitest-config.d.mts +90 -0
  281. package/dist/lib/esm/test-runners/vitest-config.mjs +86 -0
  282. package/dist/lib/esm/test-runners/vitest.d.mts +52 -0
  283. package/dist/lib/esm/test-runners/vitest.mjs +76 -0
  284. package/dist/lib/esm/validate-declarations.d.mts +37 -0
  285. package/dist/lib/esm/validate-declarations.mjs +87 -0
  286. package/dist/lib/esm/version.d.mts +418 -0
  287. package/dist/lib/esm/version.mjs +723 -0
  288. package/formatters/dprint/package.json +6 -0
  289. package/formatters/index/package.json +6 -0
  290. package/formatters/package.json +6 -0
  291. package/linters/cspell/package.json +6 -0
  292. package/linters/cspell-content/package.json +6 -0
  293. package/linters/eslint/package.json +6 -0
  294. package/linters/eslint-agnostic-core-boundary/package.json +6 -0
  295. package/linters/eslint-config/package.json +6 -0
  296. package/linters/eslint-no-restricted-syntax/package.json +6 -0
  297. package/linters/eslint-rules/in-house-plugin/package.json +6 -0
  298. package/linters/eslint-rules/index/package.json +6 -0
  299. package/linters/eslint-rules/no-async-callback-to-unsafe-return/package.json +6 -0
  300. package/linters/eslint-rules/no-unresolved-jsdoc-link/package.json +6 -0
  301. package/linters/eslint-rules/no-unused-params-members/package.json +6 -0
  302. package/linters/eslint-rules/no-used-underscore-variables/package.json +6 -0
  303. package/linters/eslint-rules/package.json +6 -0
  304. package/linters/eslint-rules/params-options-name-match/package.json +6 -0
  305. package/linters/eslint-rules/prefer-noop-async/package.json +6 -0
  306. package/linters/eslint-rules/readonly-params-options-result-members/package.json +6 -0
  307. package/linters/eslint-rules/require-method-template/package.json +6 -0
  308. package/linters/eslint-rules/require-super-call/package.json +6 -0
  309. package/linters/eslint-rules/rule-tester-helper/package.json +6 -0
  310. package/linters/eslint-rules/ts-estree-node/package.json +6 -0
  311. package/linters/eslint-types/@types/@eslint-community__eslint-plugin-eslint-comments__configs/package.json +4 -0
  312. package/linters/eslint-types/@types/eslint-plugin-verify-tsdoc/package.json +4 -0
  313. package/linters/index/package.json +6 -0
  314. package/linters/lint-ignores/package.json +6 -0
  315. package/linters/markdownlint/package.json +6 -0
  316. package/linters/markdownlint-cli2-config/package.json +6 -0
  317. package/linters/markdownlint-content/package.json +6 -0
  318. package/linters/markdownlint-ignores/package.json +6 -0
  319. package/linters/markdownlint-rules/index/package.json +6 -0
  320. package/linters/markdownlint-rules/no-soft-break-in-paragraph/package.json +6 -0
  321. package/linters/markdownlint-rules/package.json +6 -0
  322. package/linters/markdownlint-types/@types/markdownlint-cli2/package.json +4 -0
  323. package/linters/markdownlint-types/@types/markdownlint-cli2-config-schema/package.json +4 -0
  324. package/linters/over-exposure/package.json +6 -0
  325. package/linters/package.json +6 -0
  326. package/package.json +329 -13
  327. package/test-runners/index/package.json +6 -0
  328. package/test-runners/package.json +6 -0
  329. package/test-runners/vitest/package.json +6 -0
  330. package/test-runners/vitest-config/package.json +6 -0
@@ -0,0 +1,143 @@
1
+ /// <reference path="../../index.d.cts" />
2
+ /**
3
+ * @file
4
+ *
5
+ * This module defines a custom esbuild plugin that preprocesses JavaScript and TypeScript files for any build target.
6
+ *
7
+ * @remarks
8
+ * We cannot use `.` instead of `(dot)` in the above description because the file itself is preprocessed with the same rule.
9
+ *
10
+ * `initCjs`, `initEsm` and the shims they call are stringified with `String(fn)` and injected into every
11
+ * built bundle as an esbuild banner, so they must be reachable from one another by BARE identifier. That is
12
+ * why they all live in this module: esbuild compiles a cross-module call to `(0, import_module.fn)(…)`,
13
+ * which would name a binding the emitted bundle does not have. Same-module references stay bare, and
14
+ * {@link makePreprocessBanner} serializes the shims alongside the `init` function so they are in scope there. A shim
15
+ * that is not serialized silently degrades to whatever the consumer's global scope holds under that name — which
16
+ * is how `__name` used to end up holding `window.name`.
17
+ *
18
+ * A caller that needs more in the banner (the Obsidian plugin builder patches `require`) hands in
19
+ * {@link PreprocessPluginOptions.additionalBannerInitFunctions}. Each one is serialized as its OWN immediately
20
+ * invoked function after the shared scope, so it must be self-contained: it cannot see the shims, and calling one
21
+ * from another module would hit exactly the cross-module trap above.
22
+ */
23
+ import type { Plugin } from 'esbuild' with { 'resolution-mode': 'import' };
24
+ /**
25
+ * Options for {@link makePreprocessBanner}.
26
+ */
27
+ export interface MakePreprocessBannerOptions {
28
+ /**
29
+ * Self-contained functions serialized after the shared shims, each invoked once.
30
+ */
31
+ readonly additionalBannerInitFunctions?: readonly (() => void)[];
32
+ /**
33
+ * Whether the build is for an ESM format.
34
+ */
35
+ readonly isEsm?: boolean;
36
+ }
37
+ /**
38
+ * Options for {@link preprocessPlugin}.
39
+ */
40
+ export interface PreprocessPluginOptions {
41
+ /**
42
+ * Self-contained functions serialized into the banner after the shared shims, each invoked once.
43
+ *
44
+ * @remarks
45
+ * Each function is emitted as `(${String(fn)})();`, so it may reference only globals and what it declares itself.
46
+ */
47
+ readonly additionalBannerInitFunctions?: readonly (() => void)[];
48
+ /**
49
+ * The self-contained function whose result replaces `import(dot)meta(dot)url` in a CommonJS build. Serialized into
50
+ * every file that reads it.
51
+ *
52
+ * @default A function returning the file URL of `__filename`, or `location.href` where there is no `__filename`.
53
+ */
54
+ readonly cjsImportMetaUrlProvider?: () => string;
55
+ /**
56
+ * Whether the build is for an ESM format.
57
+ */
58
+ readonly isEsm?: boolean;
59
+ }
60
+ /**
61
+ * The slice of the `Symbol` constructor {@link ensureDisposeSymbols} reads and writes, with the two dispose
62
+ * symbols optional because an engine without Explicit Resource Management does not have them.
63
+ */
64
+ interface DisposeSymbolHost {
65
+ asyncDispose?: symbol;
66
+ dispose?: symbol;
67
+ for: (key: string) => symbol;
68
+ }
69
+ /**
70
+ * Ensures the bundle runs against a `process` global that browser-targeting packages recognize.
71
+ *
72
+ * @remarks
73
+ * Serialized into the emitted banner, so it never runs in the builder process — but it is an ordinary
74
+ * function here, so it is unit-tested directly rather than by evaluating the banner text.
75
+ *
76
+ * Fills in the keys MISSING from a host-provided `process` rather than replacing or skipping it. Obsidian
77
+ * Mobile exposes a partial `process`, and the whole-object guards this replaced (`if (globalThis.process) {
78
+ * return; }` / `globalThisRecord['process'] ??= …`) took that as "already shimmed", so `browser` never
79
+ * landed. The bundled `debug` package then selected its Node entry point, which calls
80
+ * `require('util').deprecate()` at module top level, and on mobile the patched `require` returns `{}` — so
81
+ * the plugin threw before its `onload` ran.
82
+ *
83
+ * A real Node or Electron `process` is left completely untouched. `process.versions.node` is the signal for
84
+ * it, and it is self-contained, so it also holds in the Node CLI bundles this banner is emitted into.
85
+ */
86
+ export declare function ensureBrowserProcess(): void;
87
+ /**
88
+ * Makes `Symbol.dispose` and `Symbol.asyncDispose` exist, falling back to the registry symbols esbuild's
89
+ * `using` helpers look up.
90
+ *
91
+ * @param symbolConstructor - The `Symbol` constructor to patch. Defaults to the ambient one; the parameter
92
+ * exists so a test can hand in an engine that lacks the well-known symbols.
93
+ *
94
+ * @remarks
95
+ * Serialized into the emitted banner. A disposable declares its method under the LITERAL key
96
+ * `[Symbol.dispose]`, while esbuild lowers every `using` to a lookup through `__knownSymbol('dispose')`,
97
+ * which falls back to `Symbol.for('Symbol.dispose')` when the engine has no well-known symbol. On such an
98
+ * engine the literal key evaluates to `undefined`, the method lands under the string `"undefined"`, and
99
+ * every `using` of it throws `Object not disposable`. Filling the well-known slot with that same registry
100
+ * symbol makes both sides name one key on every engine. A host that already has the symbol is left
101
+ * untouched: `??=` never reaches the assignment, which the host's non-writable property would refuse.
102
+ *
103
+ * The default names `Symbol` bare on purpose: it exists on every engine this runs on, and a bare reference
104
+ * resolves against whatever scope the banner is evaluated in, exactly as the bundle's own
105
+ * `[Symbol.dispose]` keys do.
106
+ */
107
+ export declare function ensureDisposeSymbols(symbolConstructor?: DisposeSymbolHost): void;
108
+ /**
109
+ * Returns its argument unchanged.
110
+ *
111
+ * @param $unknown - The value to return.
112
+ * @returns The value passed in.
113
+ *
114
+ * @remarks
115
+ * Serialized into the emitted banner, where it stands in for esbuild's `__name` helper — which names a
116
+ * function and returns it — for bundles that reference the helper without emitting their own.
117
+ */
118
+ export declare function keepName($unknown: unknown): unknown;
119
+ /**
120
+ * Builds the banner injected at the top of every emitted bundle.
121
+ *
122
+ * `String(fn)` captures only the function's own body, so every shim the `init` function calls has to be
123
+ * serialized next to it and wrapped in one shared scope; otherwise the call it makes resolves against the
124
+ * consumer's global scope at runtime. See this file's `@file` remarks.
125
+ *
126
+ * @param options - The banner options.
127
+ * @returns The banner source to prepend to the emitted bundle.
128
+ */
129
+ export declare function makePreprocessBanner(options?: MakePreprocessBannerOptions): string;
130
+ /**
131
+ * Creates an esbuild plugin that preprocesses JavaScript and TypeScript files.
132
+ *
133
+ * This plugin performs the following tasks:
134
+ * - Replaces instances of `import(dot)meta(dot)url` with a CommonJS-compatible `__filename` alternative.
135
+ * - Modifies the `sourceMappingURL` comment so a template literal ending a file does not swallow it.
136
+ * - Adds a basic `process` object to the global scope if `process` is referenced but not defined.
137
+ * - Fills in `Symbol.dispose` / `Symbol.asyncDispose` on engines that lack them, so `using` works there.
138
+ *
139
+ * @param options - The plugin options.
140
+ * @returns An esbuild `Plugin` object that handles the preprocessing.
141
+ */
142
+ export declare function preprocessPlugin(options?: PreprocessPluginOptions): Plugin;
143
+ export {};
@@ -0,0 +1,129 @@
1
+ /*
2
+ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3
+ if you want to view the source, please visit the github repository of this plugin
4
+ */
5
+
6
+ (function () {
7
+ function ensureDisposeSymbols(symbolConstructor = Symbol) {
8
+ symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
9
+ symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
10
+ }
11
+
12
+ function ensureBrowserProcess() {
13
+ const browserProcess = {
14
+ browser: true,
15
+ cwd() {
16
+ return '/';
17
+ },
18
+ env: {},
19
+ platform: 'android'
20
+ };
21
+
22
+ const existingProcess = globalThis.process;
23
+
24
+ if (!existingProcess) {
25
+ globalThis.process = browserProcess;
26
+ return;
27
+ }
28
+
29
+ if (existingProcess.versions?.node) {
30
+ return;
31
+ }
32
+
33
+ const existingProcessRecord = existingProcess;
34
+
35
+ for (const [key, value] of Object.entries(browserProcess)) {
36
+ existingProcessRecord[key] ??= value;
37
+ }
38
+
39
+ existingProcessRecord['browser'] = true;
40
+ }
41
+
42
+ function keepName($unknown) {
43
+ return $unknown;
44
+ }
45
+
46
+ (function initCjs() {
47
+ const globalThisRecord = globalThis;
48
+ ensureDisposeSymbols();
49
+ globalThisRecord['__name'] ??= keepName;
50
+ globalThisRecord['__extractDefault'] ??= extractDefault;
51
+
52
+ ensureBrowserProcess();
53
+
54
+ // eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
55
+ function extractDefault(module) {
56
+ return module && module.__esModule && 'default' in module ? module.default : module;
57
+ }
58
+ })();
59
+ })();
60
+
61
+ "use strict";
62
+ var __create = Object.create;
63
+ var __defProp = Object.defineProperty;
64
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
65
+ var __getOwnPropNames = Object.getOwnPropertyNames;
66
+ var __getProtoOf = Object.getPrototypeOf;
67
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
68
+ var __export = (target, all) => {
69
+ for (var name in all)
70
+ __defProp(target, name, { get: all[name], enumerable: true });
71
+ };
72
+ var __copyProps = (to, from, except, desc) => {
73
+ if (from && typeof from === "object" || typeof from === "function") {
74
+ for (let key of __getOwnPropNames(from))
75
+ if (!__hasOwnProp.call(to, key) && key !== except)
76
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
77
+ }
78
+ return to;
79
+ };
80
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
81
+ // If the importer is in node compatibility mode or this is not an ESM
82
+ // file that has been converted to a CommonJS file using a Babel-
83
+ // compatible transform (i.e. "__esModule" has not been set), then set
84
+ // "default" to the CommonJS "module.exports" for node compatibility.
85
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
86
+ mod
87
+ ));
88
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
89
+ var svelte_wrapper_plugin_exports = {};
90
+ __export(svelte_wrapper_plugin_exports, {
91
+ svelteWrapperPlugin: () => svelteWrapperPlugin
92
+ });
93
+ module.exports = __toCommonJS(svelte_wrapper_plugin_exports);
94
+ var import_object_utils = require('@mnaoumov/typescript-lib/object-utils');
95
+ var import_esbuild_svelte = __toESM(__extractDefault(require('esbuild-svelte')), 1);
96
+ var import_svelte_preprocess = require('svelte-preprocess');
97
+ var import_npm = require('../../npm.cjs');
98
+ const esbuildSvelte = (0, import_object_utils.extractDefaultExportInterop)(import_esbuild_svelte.default);
99
+ function svelteWrapperPlugin(isProductionBuild) {
100
+ const esbuildSveltePlugin = esbuildSvelte({
101
+ compilerOptions: {
102
+ css: "injected",
103
+ dev: !isProductionBuild
104
+ },
105
+ moduleCompilerOptions: {
106
+ dev: !isProductionBuild
107
+ },
108
+ preprocess: (0, import_svelte_preprocess.sveltePreprocess)()
109
+ });
110
+ return {
111
+ name: "svelte-wrapper",
112
+ async setup(build) {
113
+ const packageJson = await (0, import_npm.readPackageJson)();
114
+ const format = packageJson.type === "module" ? "esm" : "cjs";
115
+ await esbuildSveltePlugin.setup({
116
+ ...build,
117
+ initialOptions: {
118
+ ...build.initialOptions,
119
+ format
120
+ }
121
+ });
122
+ }
123
+ };
124
+ }
125
+ // Annotate the CommonJS export names for ESM import in node:
126
+ 0 && (module.exports = {
127
+ svelteWrapperPlugin
128
+ });
129
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vLi4vc3JjL2J1bmRsZXJzL2VzYnVpbGQtaW1wbC9zdmVsdGUtd3JhcHBlci1wbHVnaW4udHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qKlxuICogQGZpbGVcbiAqXG4gKiBTdmVsdGUgd3JhcHBlciBlc2J1aWxkIHBsdWdpbi5cbiAqL1xuXG4vKiB2OCBpZ25vcmUgc3RhcnQgLS0gZXNidWlsZCBwbHVnaW4gd3JhcHBpbmcgZXNidWlsZC1zdmVsdGUgd2l0aCBzdmVsdGUtcHJlcHJvY2VzczsgcmVxdWlyZXMgYSBsaXZlIGVzYnVpbGQgY29udGV4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FBLE1BQ2YsS0FBSztBQUFBLE1BQ0wsS0FBSyxDQUFDO0FBQUEsSUFDUjtBQUFBLElBQ0EsdUJBQXVCO0FBQUEsTUFDckIsS0FBSyxDQUFDO0FBQUEsSUFDUjtBQUFBLElBQ0EsZ0JBQVksMkNBQWlCO0FBQUEsRUFDL0IsQ0FBQztBQUVELFNBQU87QUFBQSxJQUNMLE1BQU07QUFBQSxJQUNOLE1BQU0sTUFBTSxPQUFzQjtBQUNoQyxZQUFNLGNBQWMsVUFBTSw0QkFBZ0I7QUFDMUMsWUFBTSxTQUFTLFlBQVksU0FBUyxXQUFXLFFBQVE7QUFDdkQsWUFBTSxvQkFBb0IsTUFBTTtBQUFBLFFBQzlCLEdBQUc7QUFBQSxRQUNILGdCQUFnQjtBQUFBLFVBQ2QsR0FBRyxNQUFNO0FBQUEsVUFDVDtBQUFBLFFBQ0Y7QUFBQSxNQUNGLENBQUM7QUFBQSxJQUNIO0FBQUEsRUFDRjtBQUNGOyIsCiAgIm5hbWVzIjogWyJlc2J1aWxkU3ZlbHRlXyJdCn0K
@@ -0,0 +1,14 @@
1
+ /// <reference path="../../index.d.cts" />
2
+ /**
3
+ * @file
4
+ *
5
+ * Svelte wrapper esbuild plugin.
6
+ */
7
+ import type { Plugin } from 'esbuild' with { 'resolution-mode': 'import' };
8
+ /**
9
+ * Wraps the esbuild-svelte plugin to ensure that the correct format is used.
10
+ *
11
+ * @param isProductionBuild - Whether the build is a production build.
12
+ * @returns The esbuild plugin.
13
+ */
14
+ export declare function svelteWrapperPlugin(isProductionBuild: boolean): Plugin;
@@ -0,0 +1,99 @@
1
+ /*
2
+ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3
+ if you want to view the source, please visit the github repository of this plugin
4
+ */
5
+
6
+ (function () {
7
+ function ensureDisposeSymbols(symbolConstructor = Symbol) {
8
+ symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
9
+ symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
10
+ }
11
+
12
+ function ensureBrowserProcess() {
13
+ const browserProcess = {
14
+ browser: true,
15
+ cwd() {
16
+ return '/';
17
+ },
18
+ env: {},
19
+ platform: 'android'
20
+ };
21
+
22
+ const existingProcess = globalThis.process;
23
+
24
+ if (!existingProcess) {
25
+ globalThis.process = browserProcess;
26
+ return;
27
+ }
28
+
29
+ if (existingProcess.versions?.node) {
30
+ return;
31
+ }
32
+
33
+ const existingProcessRecord = existingProcess;
34
+
35
+ for (const [key, value] of Object.entries(browserProcess)) {
36
+ existingProcessRecord[key] ??= value;
37
+ }
38
+
39
+ existingProcessRecord['browser'] = true;
40
+ }
41
+
42
+ function keepName($unknown) {
43
+ return $unknown;
44
+ }
45
+
46
+ (function initCjs() {
47
+ const globalThisRecord = globalThis;
48
+ ensureDisposeSymbols();
49
+ globalThisRecord['__name'] ??= keepName;
50
+ globalThisRecord['__extractDefault'] ??= extractDefault;
51
+
52
+ ensureBrowserProcess();
53
+
54
+ // eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
55
+ function extractDefault(module) {
56
+ return module && module.__esModule && 'default' in module ? module.default : module;
57
+ }
58
+ })();
59
+ })();
60
+
61
+ "use strict";
62
+ var __create = Object.create;
63
+ var __defProp = Object.defineProperty;
64
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
65
+ var __getOwnPropNames = Object.getOwnPropertyNames;
66
+ var __getProtoOf = Object.getPrototypeOf;
67
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
68
+ var __export = (target, all) => {
69
+ for (var name in all)
70
+ __defProp(target, name, { get: all[name], enumerable: true });
71
+ };
72
+ var __copyProps = (to, from, except, desc) => {
73
+ if (from && typeof from === "object" || typeof from === "function") {
74
+ for (let key of __getOwnPropNames(from))
75
+ if (!__hasOwnProp.call(to, key) && key !== except)
76
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
77
+ }
78
+ return to;
79
+ };
80
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
81
+ // If the importer is in node compatibility mode or this is not an ESM
82
+ // file that has been converted to a CommonJS file using a Babel-
83
+ // compatible transform (i.e. "__esModule" has not been set), then set
84
+ // "default" to the CommonJS "module.exports" for node compatibility.
85
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
86
+ mod
87
+ ));
88
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
89
+ var bundlers_exports = {};
90
+ __export(bundlers_exports, {
91
+ "esbuild-impl": () => esbuild_impl
92
+ });
93
+ module.exports = __toCommonJS(bundlers_exports);
94
+ var esbuild_impl = __toESM(__extractDefault(require('./esbuild-impl/index.cjs')), 1);
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ "esbuild-impl": null
98
+ });
99
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL2J1bmRsZXJzL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKiBUSElTIElTIEEgR0VORVJBVEVEL0JVTkRMRUQgRklMRSBCWSBCVUlMRCBTQ1JJUFQgKi9cblxuZXhwb3J0ICogYXMgJ2VzYnVpbGQtaW1wbCcgZnJvbSAnLi9lc2J1aWxkLWltcGwvaW5kZXgudHMnO1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQSx3QkFBQUE7QUFBQTtBQUFBO0FBRUEsSUFBQUEsZUFBZ0M7IiwKICAibmFtZXMiOiBbImVzYnVpbGQtaW1wbCJdCn0K
@@ -0,0 +1,2 @@
1
+ /// <reference path="../index.d.cts" />
2
+ export * as 'esbuild-impl' from './esbuild-impl/index.cjs';
@@ -0,0 +1,163 @@
1
+ /*
2
+ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3
+ if you want to view the source, please visit the github repository of this plugin
4
+ */
5
+
6
+ (function () {
7
+ function ensureDisposeSymbols(symbolConstructor = Symbol) {
8
+ symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
9
+ symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
10
+ }
11
+
12
+ function ensureBrowserProcess() {
13
+ const browserProcess = {
14
+ browser: true,
15
+ cwd() {
16
+ return '/';
17
+ },
18
+ env: {},
19
+ platform: 'android'
20
+ };
21
+
22
+ const existingProcess = globalThis.process;
23
+
24
+ if (!existingProcess) {
25
+ globalThis.process = browserProcess;
26
+ return;
27
+ }
28
+
29
+ if (existingProcess.versions?.node) {
30
+ return;
31
+ }
32
+
33
+ const existingProcessRecord = existingProcess;
34
+
35
+ for (const [key, value] of Object.entries(browserProcess)) {
36
+ existingProcessRecord[key] ??= value;
37
+ }
38
+
39
+ existingProcessRecord['browser'] = true;
40
+ }
41
+
42
+ function keepName($unknown) {
43
+ return $unknown;
44
+ }
45
+
46
+ (function initCjs() {
47
+ const globalThisRecord = globalThis;
48
+ ensureDisposeSymbols();
49
+ globalThisRecord['__name'] ??= keepName;
50
+ globalThisRecord['__extractDefault'] ??= extractDefault;
51
+
52
+ ensureBrowserProcess();
53
+
54
+ // eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
55
+ function extractDefault(module) {
56
+ return module && module.__esModule && 'default' in module ? module.default : module;
57
+ }
58
+ })();
59
+ })();
60
+
61
+ "use strict";
62
+ var __create = Object.create;
63
+ var __defProp = Object.defineProperty;
64
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
65
+ var __getOwnPropNames = Object.getOwnPropertyNames;
66
+ var __getProtoOf = Object.getPrototypeOf;
67
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
68
+ var __export = (target, all) => {
69
+ for (var name in all)
70
+ __defProp(target, name, { get: all[name], enumerable: true });
71
+ };
72
+ var __copyProps = (to, from, except, desc) => {
73
+ if (from && typeof from === "object" || typeof from === "function") {
74
+ for (let key of __getOwnPropNames(from))
75
+ if (!__hasOwnProp.call(to, key) && key !== except)
76
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
77
+ }
78
+ return to;
79
+ };
80
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
81
+ // If the importer is in node compatibility mode or this is not an ESM
82
+ // file that has been converted to a CommonJS file using a Babel-
83
+ // compatible transform (i.e. "__esModule" has not been set), then set
84
+ // "default" to the CommonJS "module.exports" for node compatibility.
85
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
86
+ mod
87
+ ));
88
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
89
+ var check_project_types_exports = {};
90
+ __export(check_project_types_exports, {
91
+ checkProjectTypes: () => checkProjectTypes,
92
+ parseTsConfig: () => parseTsConfig,
93
+ toCanonical: () => toCanonical
94
+ });
95
+ module.exports = __toCommonJS(check_project_types_exports);
96
+ var import_node_process = __toESM(__extractDefault(require('node:process')), 1);
97
+ var import_typescript = require('typescript');
98
+ const FORMAT_HOST = {
99
+ getCanonicalFileName: (fileName) => fileName,
100
+ getCurrentDirectory: () => import_typescript.sys.getCurrentDirectory(),
101
+ getNewLine: () => import_typescript.sys.newLine
102
+ };
103
+ function checkProjectTypes(params) {
104
+ const options = {
105
+ ...params.options,
106
+ skipLibCheck: false
107
+ };
108
+ const program = (0, import_typescript.createProgram)({
109
+ options,
110
+ rootNames: [...params.rootNames]
111
+ });
112
+ const allDiagnostics = (0, import_typescript.getPreEmitDiagnostics)(program);
113
+ const keptDiagnostics = allDiagnostics.filter((diagnostic) => shouldKeepDiagnosticByFile(diagnostic, params.shouldKeepFile) && (params.shouldKeepDiagnostic?.(diagnostic) ?? true));
114
+ const ignoredCount = allDiagnostics.length - keptDiagnostics.length;
115
+ if (keptDiagnostics.length > 0) {
116
+ import_node_process.default.stdout.write((0, import_typescript.formatDiagnosticsWithColorAndContext)(keptDiagnostics, FORMAT_HOST));
117
+ }
118
+ import_node_process.default.stdout.write(`Ignored ${String(ignoredCount)} diagnostic(s) outside the validated set.
119
+ `);
120
+ if (params.isVerbose && ignoredCount > 0) {
121
+ const ignoredDiagnostics = allDiagnostics.filter((diagnostic) => !keptDiagnostics.includes(diagnostic));
122
+ import_node_process.default.stdout.write((0, import_typescript.formatDiagnosticsWithColorAndContext)(ignoredDiagnostics, FORMAT_HOST));
123
+ }
124
+ return keptDiagnostics.every((diagnostic) => diagnostic.category !== import_typescript.DiagnosticCategory.Error);
125
+ }
126
+ function parseTsConfig(tsConfigPath) {
127
+ const host = {
128
+ fileExists: (path) => import_typescript.sys.fileExists(path),
129
+ getCurrentDirectory: () => import_typescript.sys.getCurrentDirectory(),
130
+ onUnRecoverableConfigFileDiagnostic: (diagnostic) => {
131
+ throw new Error((0, import_typescript.formatDiagnostic)(diagnostic, FORMAT_HOST));
132
+ },
133
+ readDirectory: (rootDirectory, extensions, excludes, includes, depth) => import_typescript.sys.readDirectory(rootDirectory, extensions, excludes, includes, depth),
134
+ readFile: (path) => import_typescript.sys.readFile(path),
135
+ useCaseSensitiveFileNames: import_typescript.sys.useCaseSensitiveFileNames
136
+ };
137
+ const parsed = (0, import_typescript.getParsedCommandLineOfConfigFile)(tsConfigPath, void 0, host);
138
+ if (!parsed) {
139
+ throw new Error(`Failed to parse TypeScript config: ${tsConfigPath}`);
140
+ }
141
+ if (parsed.errors.length > 0) {
142
+ throw new Error(`Errors while parsing TypeScript config ${tsConfigPath}:
143
+ ${(0, import_typescript.formatDiagnostics)(parsed.errors, FORMAT_HOST)}`);
144
+ }
145
+ return {
146
+ fileNames: parsed.fileNames,
147
+ options: parsed.options
148
+ };
149
+ }
150
+ function toCanonical(fileName) {
151
+ const normalized = fileName.replaceAll("\\", "/");
152
+ return import_typescript.sys.useCaseSensitiveFileNames ? normalized : normalized.toLowerCase();
153
+ }
154
+ function shouldKeepDiagnosticByFile(diagnostic, shouldKeepFile) {
155
+ return !diagnostic.file || shouldKeepFile(toCanonical(diagnostic.file.fileName));
156
+ }
157
+ // Annotate the CommonJS export names for ESM import in node:
158
+ 0 && (module.exports = {
159
+ checkProjectTypes,
160
+ parseTsConfig,
161
+ toCanonical
162
+ });
163
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vc3JjL2NoZWNrLXByb2plY3QtdHlwZXMudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qKlxuICogQGZpbGVcbiAqXG4gKiBUeXBlLWNoZWNrcyBhIHNldCBvZiBUeXBlU2NyaXB0IGZpbGVzIHdpdGggYHNraXBMaWJDaGVja2AgZGlzYWJsZWQsIGJ1dCByZXBvcnRzIG9ubHkgdGhlXG4gKiBkaWFnbm9zdGljcyB3aG9zZSBzb3VyY2UgZmlsZSB3ZSBvd24uIFRoaXMgbGV0cyB0aGUgZ2VuZXJhbCBidWlsZCBydW4gd2l0aCBgc2tpcExpYkNoZWNrOiB0cnVlYFxuICogKHNvIGl0IGRvZXMgbm90IGZhaWwgb24gYnJva2VuIHVwc3RyZWFtIGAuZC50c2AgZmlsZXMgd2UgZG8gbm90IGNvbnRyb2wsIHN1Y2ggYXMgYSBnaXZlblxuICogdmVyc2lvbidzIGBvYnNpZGlhbi5kLnRzYCkgd2hpbGUgc3RpbGwgZnVsbHkgdmFsaWRhdGluZyB0aGUgZGVjbGFyYXRpb25zIHdlIGF1dGhvci5cbiAqXG4gKiBXaGVuIHVwc3RyZWFtIHR5c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NQUFNLDBDQUEwQyxZQUFZO0FBQUEsTUFBTSxxQ0FBa0IsT0FBTyxRQUFRLFdBQVcsQ0FBQyxFQUFFO0FBQUEsRUFDN0g7QUFFQSxTQUFPO0FBQUEsSUFDTCxXQUFXLE9BQU87QUFBQSxJQUNsQixTQUFTLE9BQU87QUFBQSxFQUNsQjtBQUNGO0FBU08sU0FBUyxZQUFZLFVBQTBCO0FBQ3BELFFBQU0sYUFBYSxTQUFTLFdBQVcsTUFBTSxHQUFHO0FBQ2hELFNBQU8sc0JBQUksNEJBQTRCLGFBQWEsV0FBVyxZQUFZO0FBQzdFO0FBRUEsU0FBUywyQkFBMkIsWUFBd0IsZ0JBQXdEO0FBQ2xILFNBQU8sQ0FBQyxXQUFXLFFBQVEsZUFBZSxZQUFZLFdBQVcsS0FBSyxRQUFRLENBQUM7QUFDakY7IiwKICAibmFtZXMiOiBbInByb2Nlc3MiXQp9Cg==
@@ -0,0 +1,92 @@
1
+ /// <reference path="./index.d.cts" />
2
+ /**
3
+ * @file
4
+ *
5
+ * Type-checks a set of TypeScript files with `skipLibCheck` disabled, but reports only the
6
+ * diagnostics whose source file we own. This lets the general build run with `skipLibCheck: true`
7
+ * (so it does not fail on broken upstream `.d.ts` files we do not control, such as a given
8
+ * version's `obsidian.d.ts`) while still fully validating the declarations we author.
9
+ *
10
+ * When upstream types are fixed, the `Ignored N diagnostic(s)` count drops to `0`, signalling the
11
+ * workaround is no longer doing anything.
12
+ */
13
+ import type { CompilerOptions, Diagnostic } from 'typescript' with { 'resolution-mode': 'import' };
14
+ /**
15
+ * Parameters for {@link checkProjectTypes}.
16
+ */
17
+ export interface CheckProjectTypesParams {
18
+ /**
19
+ * When `true`, the ignored diagnostics (those dropped by {@link CheckProjectTypesParams.shouldKeepFile}
20
+ * or {@link CheckProjectTypesParams.shouldKeepDiagnostic}) are printed in full after the ignored
21
+ * count, so they can be inspected. When omitted or `false`, only the count is printed.
22
+ *
23
+ * @default `false`
24
+ */
25
+ readonly isVerbose?: boolean;
26
+ /**
27
+ Compiler options for the program. `skipLibCheck` is always forced to `false`.
28
+ */
29
+ readonly options: CompilerOptions;
30
+ /**
31
+ The root files to type-check.
32
+ */
33
+ readonly rootNames: readonly string[];
34
+ /**
35
+ * Decides whether a diagnostic should be reported, based on the diagnostic itself rather than its
36
+ * source file. Runs in addition to {@link CheckProjectTypesParams.shouldKeepFile} — a diagnostic is
37
+ * reported only when both predicates keep it. Use this to drop diagnostics that are reported in a
38
+ * file we own but are caused by something we do not control (e.g. a cross-module-format interop
39
+ * complaint about a third-party import). When omitted, no diagnostic is dropped on this basis.
40
+ *
41
+ * @param diagnostic - The diagnostic to evaluate.
42
+ * @returns `true` to report the diagnostic, `false` to ignore it.
43
+ */
44
+ readonly shouldKeepDiagnostic?: (diagnostic: Diagnostic) => boolean;
45
+ /**
46
+ * Decides whether a diagnostic's source file is one we care about.
47
+ *
48
+ * @param fileName - The diagnostic's source file, already passed through {@link toCanonical}.
49
+ * @returns `true` to report the diagnostic, `false` to ignore it.
50
+ */
51
+ readonly shouldKeepFile: (fileName: string) => boolean;
52
+ }
53
+ /**
54
+ * The resolved result of {@link parseTsConfig}.
55
+ */
56
+ export interface ParsedTsConfig {
57
+ /**
58
+ The resolved list of files the config includes (absolute paths).
59
+ */
60
+ readonly fileNames: readonly string[];
61
+ /**
62
+ The resolved compiler options (with `extends` applied).
63
+ */
64
+ readonly options: CompilerOptions;
65
+ }
66
+ /**
67
+ * Type-checks a set of files with `skipLibCheck: false`, but reports only the diagnostics whose
68
+ * source file passes `shouldKeepFile`. Diagnostics from files we do not control (e.g. broken
69
+ * third-party `.d.ts` pulled in transitively) are dropped, while still being counted for
70
+ * visibility. When `isVerbose` is set, the dropped diagnostics are also printed in full.
71
+ *
72
+ * @param params - The program inputs and the keep predicate.
73
+ * @returns `true` when no reported diagnostic is an error, `false` otherwise.
74
+ */
75
+ export declare function checkProjectTypes(params: CheckProjectTypesParams): boolean;
76
+ /**
77
+ * Parses a `tsconfig.json` (resolving `extends`, `include`, `exclude`) into the resolved file list
78
+ * and compiler options.
79
+ *
80
+ * @param tsConfigPath - Absolute path to the config file.
81
+ * @returns The resolved file names and options.
82
+ * @throws If the config cannot be parsed or contains errors.
83
+ */
84
+ export declare function parseTsConfig(tsConfigPath: string): ParsedTsConfig;
85
+ /**
86
+ * Normalizes a file path for comparison: forward slashes everywhere, lower-cased on a
87
+ * case-insensitive file system.
88
+ *
89
+ * @param fileName - The path to normalize.
90
+ * @returns The canonical path.
91
+ */
92
+ export declare function toCanonical(fileName: string): string;