pr-checkmate 3.0.4 → 3.1.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 (378) hide show
  1. package/dist/{cli.js → cjs/cli.js} +30 -30
  2. package/dist/{config → cjs/config}/index.d.ts +2 -2
  3. package/dist/{config → cjs/config}/index.js +8 -7
  4. package/dist/{config → cjs/config}/loader.d.ts +1 -1
  5. package/dist/{config → cjs/config}/loader.js +8 -8
  6. package/dist/{core → cjs/core}/checks/dependencies/banned-imports.d.ts +1 -1
  7. package/dist/{core → cjs/core}/checks/dependencies/banned-imports.js +10 -10
  8. package/dist/{core → cjs/core}/checks/dependencies/circular-deps.d.ts +1 -1
  9. package/dist/{core → cjs/core}/checks/dependencies/circular-deps.js +27 -27
  10. package/dist/{core → cjs/core}/checks/dependencies/dependency-check.d.ts +1 -1
  11. package/dist/{core → cjs/core}/checks/dependencies/dependency-check.js +17 -17
  12. package/dist/{core → cjs/core}/checks/dependencies/grype-scan.d.ts +1 -1
  13. package/dist/{core → cjs/core}/checks/dependencies/grype-scan.js +18 -18
  14. package/dist/{core → cjs/core}/checks/dependencies/license-check.d.ts +1 -1
  15. package/dist/{core → cjs/core}/checks/dependencies/license-check.js +12 -12
  16. package/dist/{core → cjs/core}/checks/dependencies/npm-audit.d.ts +1 -1
  17. package/dist/{core → cjs/core}/checks/dependencies/npm-audit.js +14 -14
  18. package/dist/{core → cjs/core}/checks/dependencies/outdated-deps.d.ts +1 -1
  19. package/dist/{core → cjs/core}/checks/dependencies/outdated-deps.js +14 -14
  20. package/dist/{core → cjs/core}/checks/dependencies/vuln-scan.d.ts +1 -1
  21. package/dist/{core → cjs/core}/checks/dependencies/vuln-scan.js +14 -14
  22. package/dist/{core → cjs/core}/checks/findings.d.ts +1 -1
  23. package/dist/{core → cjs/core}/checks/findings.js +16 -16
  24. package/dist/{core → cjs/core}/checks/git/custom-rules.d.ts +1 -1
  25. package/dist/{core → cjs/core}/checks/git/custom-rules.js +19 -19
  26. package/dist/{core → cjs/core}/checks/git/diff-smell.d.ts +2 -2
  27. package/dist/{core → cjs/core}/checks/git/diff-smell.js +13 -13
  28. package/dist/{core → cjs/core}/checks/git/large-files.d.ts +1 -1
  29. package/dist/{core → cjs/core}/checks/git/large-files.js +15 -15
  30. package/dist/{core → cjs/core}/checks/git/leftover-debug.d.ts +1 -1
  31. package/dist/{core → cjs/core}/checks/git/leftover-debug.js +13 -13
  32. package/dist/{core → cjs/core}/checks/git/lockfile-drift.d.ts +1 -1
  33. package/dist/{core → cjs/core}/checks/git/lockfile-drift.js +12 -12
  34. package/dist/{core → cjs/core}/checks/git/merge-conflict.d.ts +1 -1
  35. package/dist/{core → cjs/core}/checks/git/merge-conflict.js +15 -15
  36. package/dist/{core → cjs/core}/checks/git/missing-tests.d.ts +1 -1
  37. package/dist/{core → cjs/core}/checks/git/missing-tests.js +15 -15
  38. package/dist/{core → cjs/core}/checks/git/todo-fixme.d.ts +1 -1
  39. package/dist/{core → cjs/core}/checks/git/todo-fixme.js +11 -11
  40. package/dist/{core → cjs/core}/checks/languages/cpp-format.d.ts +1 -1
  41. package/dist/{core → cjs/core}/checks/languages/cpp-format.js +18 -18
  42. package/dist/{core → cjs/core}/checks/languages/external-checks.d.ts +9 -9
  43. package/dist/{core → cjs/core}/checks/languages/external-checks.js +10 -10
  44. package/dist/{core → cjs/core}/checks/languages/external-runner.d.ts +2 -2
  45. package/dist/{core → cjs/core}/checks/languages/external-runner.js +21 -21
  46. package/dist/{core → cjs/core}/checks/languages/go-format.d.ts +1 -1
  47. package/dist/cjs/core/checks/languages/go-format.js +202 -0
  48. package/dist/cjs/core/checks/languages/lint.d.ts +2 -0
  49. package/dist/{core → cjs/core}/checks/languages/lint.js +21 -21
  50. package/dist/{core → cjs/core}/checks/languages/prettier.d.ts +1 -1
  51. package/dist/{core → cjs/core}/checks/languages/prettier.js +18 -18
  52. package/dist/{core → cjs/core}/checks/languages/python-format.d.ts +1 -1
  53. package/dist/{core → cjs/core}/checks/languages/python-format.js +14 -14
  54. package/dist/{core → cjs/core}/checks/languages/python-lint.d.ts +1 -1
  55. package/dist/{core → cjs/core}/checks/languages/python-lint.js +13 -13
  56. package/dist/{core → cjs/core}/checks/languages/python-typecheck.d.ts +1 -1
  57. package/dist/{core → cjs/core}/checks/languages/python-typecheck.js +29 -29
  58. package/dist/{core → cjs/core}/checks/languages/typecheck.d.ts +1 -1
  59. package/dist/{core → cjs/core}/checks/languages/typecheck.js +13 -13
  60. package/dist/{core → cjs/core}/checks/pr/commitlint.d.ts +1 -1
  61. package/dist/{core → cjs/core}/checks/pr/commitlint.js +12 -12
  62. package/dist/{core → cjs/core}/checks/pr/pr-body.d.ts +1 -1
  63. package/dist/{core → cjs/core}/checks/pr/pr-body.js +8 -8
  64. package/dist/{core → cjs/core}/checks/pr/pr-size-check.d.ts +1 -1
  65. package/dist/{core → cjs/core}/checks/pr/pr-size-check.js +10 -10
  66. package/dist/{core → cjs/core}/checks/pr/pr-title-lint.d.ts +1 -1
  67. package/dist/{core → cjs/core}/checks/pr/pr-title-lint.js +8 -8
  68. package/dist/{core → cjs/core}/checks/quality/case-collision.d.ts +1 -1
  69. package/dist/{core → cjs/core}/checks/quality/case-collision.js +7 -7
  70. package/dist/{core → cjs/core}/checks/quality/config-validation.d.ts +1 -1
  71. package/dist/{core → cjs/core}/checks/quality/config-validation.js +9 -9
  72. package/dist/{core → cjs/core}/checks/quality/coverage.d.ts +1 -1
  73. package/dist/{core → cjs/core}/checks/quality/coverage.js +4 -4
  74. package/dist/{core → cjs/core}/checks/quality/dead-code.d.ts +1 -1
  75. package/dist/{core → cjs/core}/checks/quality/dead-code.js +23 -23
  76. package/dist/{core → cjs/core}/checks/quality/duplicate-check.d.ts +1 -1
  77. package/dist/{core → cjs/core}/checks/quality/duplicate-check.js +22 -22
  78. package/dist/{core → cjs/core}/checks/quality/license-header.d.ts +1 -1
  79. package/dist/{core → cjs/core}/checks/quality/license-header.js +16 -16
  80. package/dist/{core → cjs/core}/checks/quality/markdown-lint.d.ts +1 -1
  81. package/dist/{core → cjs/core}/checks/quality/markdown-lint.js +17 -17
  82. package/dist/{core → cjs/core}/checks/quality/package-size.d.ts +1 -1
  83. package/dist/{core → cjs/core}/checks/quality/package-size.js +12 -12
  84. package/dist/{core → cjs/core}/checks/quality/spellcheck.d.ts +2 -2
  85. package/dist/{core → cjs/core}/checks/quality/spellcheck.js +18 -18
  86. package/dist/{core → cjs/core}/checks/quality/symlinks.d.ts +1 -1
  87. package/dist/{core → cjs/core}/checks/quality/symlinks.js +8 -8
  88. package/dist/{core → cjs/core}/checks/quality/yaml-lint.d.ts +1 -1
  89. package/dist/{core → cjs/core}/checks/quality/yaml-lint.js +12 -12
  90. package/dist/{core → cjs/core}/checks/security/diff-security.d.ts +1 -1
  91. package/dist/{core → cjs/core}/checks/security/diff-security.js +15 -15
  92. package/dist/{core → cjs/core}/checks/security/dockerfile-security.d.ts +1 -1
  93. package/dist/{core → cjs/core}/checks/security/dockerfile-security.js +16 -16
  94. package/dist/{core → cjs/core}/checks/security/migration-safety.d.ts +1 -1
  95. package/dist/{core → cjs/core}/checks/security/migration-safety.js +17 -17
  96. package/dist/{core → cjs/core}/checks/security/security.d.ts +1 -1
  97. package/dist/{core → cjs/core}/checks/security/security.js +21 -21
  98. package/dist/{core → cjs/core}/checks/security/sensitive-file-guard.d.ts +1 -1
  99. package/dist/{core → cjs/core}/checks/security/sensitive-file-guard.js +14 -14
  100. package/dist/{core → cjs/core}/checks/security/workflow-security.d.ts +2 -2
  101. package/dist/{core → cjs/core}/checks/security/workflow-security.js +14 -14
  102. package/dist/{core → cjs/core}/checks/tool-install.d.ts +1 -1
  103. package/dist/{core → cjs/core}/checks/tool-install.js +2 -2
  104. package/dist/{core → cjs/core}/context.d.ts +1 -1
  105. package/dist/{core → cjs/core}/context.js +16 -16
  106. package/dist/cjs/core/index.d.ts +4 -0
  107. package/dist/{core → cjs/core}/index.js +7 -7
  108. package/dist/{core → cjs/core}/install/cache.js +2 -2
  109. package/dist/{core → cjs/core}/install/doctor.d.ts +4 -4
  110. package/dist/{core → cjs/core}/install/doctor.js +34 -34
  111. package/dist/{core → cjs/core}/install/ensure.d.ts +2 -2
  112. package/dist/{core → cjs/core}/install/ensure.js +15 -14
  113. package/dist/{core → cjs/core}/install/lock.js +4 -4
  114. package/dist/{core → cjs/core}/install/prepare.d.ts +4 -4
  115. package/dist/{core → cjs/core}/install/prepare.js +13 -13
  116. package/dist/{core → cjs/core}/install/profiles.d.ts +2 -2
  117. package/dist/{core → cjs/core}/install/reuse.d.ts +1 -1
  118. package/dist/{core → cjs/core}/install/reuse.js +4 -4
  119. package/dist/{core → cjs/core}/registry.d.ts +1 -1
  120. package/dist/cjs/core/registry.js +112 -0
  121. package/dist/{core → cjs/core}/reporters.d.ts +1 -1
  122. package/dist/{core → cjs/core}/reporters.js +28 -28
  123. package/dist/{core → cjs/core}/run-checks.d.ts +2 -2
  124. package/dist/{core → cjs/core}/run-checks.js +31 -31
  125. package/dist/{core → cjs/core}/targets.d.ts +1 -1
  126. package/dist/{core → cjs/core}/targets.js +20 -20
  127. package/dist/{core → cjs/core}/types.d.ts +3 -3
  128. package/dist/cjs/index.d.ts +12 -0
  129. package/dist/{index.js → cjs/index.js} +18 -18
  130. package/dist/{init.js → cjs/init.js} +68 -56
  131. package/dist/{interfaces → cjs/interfaces}/index.d.ts +3 -3
  132. package/dist/cjs/package.json +1 -0
  133. package/dist/{scripts → cjs/scripts}/copy-configs.js +22 -7
  134. package/dist/{scripts → cjs/scripts}/generate-install-manifests.js +2 -2
  135. package/dist/{scripts → cjs/scripts}/publish-github.js +4 -4
  136. package/dist/{utils → cjs/utils}/detect-language.js +12 -12
  137. package/dist/cjs/utils/execa.js +46 -0
  138. package/dist/{utils → cjs/utils}/git.js +2 -2
  139. package/dist/{utils → cjs/utils}/http.js +2 -2
  140. package/dist/cjs/utils/index.d.ts +15 -0
  141. package/dist/{utils → cjs/utils}/index.js +13 -13
  142. package/dist/{utils → cjs/utils}/own-deps.d.ts +2 -0
  143. package/dist/{utils → cjs/utils}/own-deps.js +1 -0
  144. package/dist/{utils → cjs/utils}/package-version.js +2 -1
  145. package/dist/{utils → cjs/utils}/resolve-bin.js +2 -1
  146. package/dist/{utils → cjs/utils}/update-notifier.js +4 -4
  147. package/dist/esm/cli.d.ts +2 -0
  148. package/dist/esm/cli.js +137 -0
  149. package/dist/esm/config/constants.d.ts +153 -0
  150. package/dist/esm/config/constants.js +360 -0
  151. package/dist/esm/config/index.d.ts +40 -0
  152. package/dist/esm/config/index.js +60 -0
  153. package/dist/esm/config/loader.d.ts +6 -0
  154. package/dist/esm/config/loader.js +191 -0
  155. package/dist/esm/config/pr-checkmate-workflow-docker.yml +79 -0
  156. package/dist/esm/config/pr-checkmate-workflow.yml +92 -0
  157. package/dist/esm/core/checks/dependencies/banned-imports.d.ts +2 -0
  158. package/dist/esm/core/checks/dependencies/banned-imports.js +70 -0
  159. package/dist/esm/core/checks/dependencies/circular-deps.d.ts +2 -0
  160. package/dist/esm/core/checks/dependencies/circular-deps.js +155 -0
  161. package/dist/esm/core/checks/dependencies/dependency-check.d.ts +43 -0
  162. package/dist/esm/core/checks/dependencies/dependency-check.js +174 -0
  163. package/dist/esm/core/checks/dependencies/grype-scan.d.ts +22 -0
  164. package/dist/esm/core/checks/dependencies/grype-scan.js +112 -0
  165. package/dist/esm/core/checks/dependencies/license-check.d.ts +2 -0
  166. package/dist/esm/core/checks/dependencies/license-check.js +61 -0
  167. package/dist/esm/core/checks/dependencies/npm-audit.d.ts +6 -0
  168. package/dist/esm/core/checks/dependencies/npm-audit.js +80 -0
  169. package/dist/esm/core/checks/dependencies/outdated-deps.d.ts +2 -0
  170. package/dist/esm/core/checks/dependencies/outdated-deps.js +66 -0
  171. package/dist/esm/core/checks/dependencies/vuln-scan.d.ts +2 -0
  172. package/dist/esm/core/checks/dependencies/vuln-scan.js +54 -0
  173. package/dist/esm/core/checks/findings.d.ts +299 -0
  174. package/dist/esm/core/checks/findings.js +701 -0
  175. package/dist/esm/core/checks/git/custom-rules.d.ts +2 -0
  176. package/dist/esm/core/checks/git/custom-rules.js +106 -0
  177. package/dist/esm/core/checks/git/diff-smell.d.ts +19 -0
  178. package/dist/esm/core/checks/git/diff-smell.js +69 -0
  179. package/dist/esm/core/checks/git/large-files.d.ts +2 -0
  180. package/dist/esm/core/checks/git/large-files.js +112 -0
  181. package/dist/esm/core/checks/git/leftover-debug.d.ts +2 -0
  182. package/dist/esm/core/checks/git/leftover-debug.js +89 -0
  183. package/dist/esm/core/checks/git/lockfile-drift.d.ts +2 -0
  184. package/dist/esm/core/checks/git/lockfile-drift.js +114 -0
  185. package/dist/esm/core/checks/git/merge-conflict.d.ts +2 -0
  186. package/dist/esm/core/checks/git/merge-conflict.js +117 -0
  187. package/dist/esm/core/checks/git/missing-tests.d.ts +2 -0
  188. package/dist/esm/core/checks/git/missing-tests.js +105 -0
  189. package/dist/esm/core/checks/git/todo-fixme.d.ts +7 -0
  190. package/dist/esm/core/checks/git/todo-fixme.js +80 -0
  191. package/dist/esm/core/checks/languages/cpp-format.d.ts +7 -0
  192. package/dist/esm/core/checks/languages/cpp-format.js +91 -0
  193. package/dist/esm/core/checks/languages/external-checks.d.ts +77 -0
  194. package/dist/esm/core/checks/languages/external-checks.js +197 -0
  195. package/dist/esm/core/checks/languages/external-runner.d.ts +119 -0
  196. package/dist/esm/core/checks/languages/external-runner.js +138 -0
  197. package/dist/esm/core/checks/languages/go-format.d.ts +8 -0
  198. package/dist/{core → esm/core}/checks/languages/go-format.js +29 -35
  199. package/dist/esm/core/checks/languages/lint.d.ts +2 -0
  200. package/dist/esm/core/checks/languages/lint.js +92 -0
  201. package/dist/esm/core/checks/languages/prettier.d.ts +2 -0
  202. package/dist/esm/core/checks/languages/prettier.js +85 -0
  203. package/dist/esm/core/checks/languages/python-format.d.ts +7 -0
  204. package/dist/esm/core/checks/languages/python-format.js +61 -0
  205. package/dist/esm/core/checks/languages/python-lint.d.ts +9 -0
  206. package/dist/esm/core/checks/languages/python-lint.js +55 -0
  207. package/dist/esm/core/checks/languages/python-typecheck.d.ts +14 -0
  208. package/dist/esm/core/checks/languages/python-typecheck.js +184 -0
  209. package/dist/esm/core/checks/languages/ruff-shared.d.ts +10 -0
  210. package/dist/esm/core/checks/languages/ruff-shared.js +35 -0
  211. package/dist/esm/core/checks/languages/typecheck.d.ts +2 -0
  212. package/dist/esm/core/checks/languages/typecheck.js +61 -0
  213. package/dist/esm/core/checks/pr/commitlint.d.ts +2 -0
  214. package/dist/esm/core/checks/pr/commitlint.js +102 -0
  215. package/dist/esm/core/checks/pr/pr-body.d.ts +2 -0
  216. package/dist/esm/core/checks/pr/pr-body.js +43 -0
  217. package/dist/esm/core/checks/pr/pr-size-check.d.ts +2 -0
  218. package/dist/esm/core/checks/pr/pr-size-check.js +42 -0
  219. package/dist/esm/core/checks/pr/pr-title-lint.d.ts +2 -0
  220. package/dist/esm/core/checks/pr/pr-title-lint.js +31 -0
  221. package/dist/esm/core/checks/quality/case-collision.d.ts +8 -0
  222. package/dist/esm/core/checks/quality/case-collision.js +39 -0
  223. package/dist/esm/core/checks/quality/config-validation.d.ts +11 -0
  224. package/dist/esm/core/checks/quality/config-validation.js +188 -0
  225. package/dist/esm/core/checks/quality/coverage.d.ts +2 -0
  226. package/dist/esm/core/checks/quality/coverage.js +62 -0
  227. package/dist/esm/core/checks/quality/dead-code.d.ts +2 -0
  228. package/dist/esm/core/checks/quality/dead-code.js +124 -0
  229. package/dist/esm/core/checks/quality/duplicate-check.d.ts +2 -0
  230. package/dist/esm/core/checks/quality/duplicate-check.js +141 -0
  231. package/dist/esm/core/checks/quality/license-header.d.ts +7 -0
  232. package/dist/esm/core/checks/quality/license-header.js +81 -0
  233. package/dist/esm/core/checks/quality/markdown-lint.d.ts +2 -0
  234. package/dist/esm/core/checks/quality/markdown-lint.js +104 -0
  235. package/dist/esm/core/checks/quality/package-size.d.ts +36 -0
  236. package/dist/esm/core/checks/quality/package-size.js +196 -0
  237. package/dist/esm/core/checks/quality/spellcheck.d.ts +77 -0
  238. package/dist/esm/core/checks/quality/spellcheck.js +296 -0
  239. package/dist/esm/core/checks/quality/symlinks.d.ts +16 -0
  240. package/dist/esm/core/checks/quality/symlinks.js +57 -0
  241. package/dist/esm/core/checks/quality/yaml-lint.d.ts +20 -0
  242. package/dist/esm/core/checks/quality/yaml-lint.js +116 -0
  243. package/dist/esm/core/checks/security/diff-security.d.ts +2 -0
  244. package/dist/esm/core/checks/security/diff-security.js +354 -0
  245. package/dist/esm/core/checks/security/dockerfile-security.d.ts +2 -0
  246. package/dist/esm/core/checks/security/dockerfile-security.js +98 -0
  247. package/dist/esm/core/checks/security/migration-safety.d.ts +2 -0
  248. package/dist/esm/core/checks/security/migration-safety.js +137 -0
  249. package/dist/esm/core/checks/security/security.d.ts +63 -0
  250. package/dist/esm/core/checks/security/security.js +201 -0
  251. package/dist/esm/core/checks/security/sensitive-file-guard.d.ts +2 -0
  252. package/dist/esm/core/checks/security/sensitive-file-guard.js +160 -0
  253. package/dist/esm/core/checks/security/workflow-security.d.ts +12 -0
  254. package/dist/esm/core/checks/security/workflow-security.js +100 -0
  255. package/dist/esm/core/checks/tool-install.d.ts +102 -0
  256. package/dist/esm/core/checks/tool-install.js +66 -0
  257. package/dist/esm/core/commands.d.ts +27 -0
  258. package/dist/esm/core/commands.js +89 -0
  259. package/dist/esm/core/context.d.ts +62 -0
  260. package/dist/esm/core/context.js +241 -0
  261. package/dist/esm/core/index.d.ts +4 -0
  262. package/dist/esm/core/index.js +4 -0
  263. package/dist/esm/core/install/cache.d.ts +58 -0
  264. package/dist/esm/core/install/cache.js +142 -0
  265. package/dist/esm/core/install/doctor.d.ts +35 -0
  266. package/dist/esm/core/install/doctor.js +164 -0
  267. package/dist/esm/core/install/ensure.d.ts +77 -0
  268. package/dist/esm/core/install/ensure.js +269 -0
  269. package/dist/esm/core/install/lock.d.ts +34 -0
  270. package/dist/esm/core/install/lock.js +92 -0
  271. package/dist/esm/core/install/merge.d.ts +47 -0
  272. package/dist/esm/core/install/merge.js +85 -0
  273. package/dist/esm/core/install/prepare.d.ts +76 -0
  274. package/dist/esm/core/install/prepare.js +142 -0
  275. package/dist/esm/core/install/profiles.d.ts +78 -0
  276. package/dist/esm/core/install/profiles.js +192 -0
  277. package/dist/esm/core/install/reuse.d.ts +41 -0
  278. package/dist/esm/core/install/reuse.js +100 -0
  279. package/dist/esm/core/registry.d.ts +6 -0
  280. package/dist/esm/core/registry.js +109 -0
  281. package/dist/esm/core/reporters.d.ts +18 -0
  282. package/dist/esm/core/reporters.js +266 -0
  283. package/dist/esm/core/run-checks.d.ts +33 -0
  284. package/dist/esm/core/run-checks.js +293 -0
  285. package/dist/esm/core/targets.d.ts +140 -0
  286. package/dist/esm/core/targets.js +213 -0
  287. package/dist/esm/core/types.d.ts +195 -0
  288. package/dist/esm/core/types.js +38 -0
  289. package/dist/esm/index.d.ts +12 -0
  290. package/dist/esm/index.js +15 -0
  291. package/dist/esm/init.d.ts +38 -0
  292. package/dist/esm/init.js +421 -0
  293. package/dist/esm/interfaces/index.d.ts +432 -0
  294. package/dist/esm/interfaces/index.js +2 -0
  295. package/dist/esm/package.json +1 -0
  296. package/dist/esm/scripts/copy-configs.d.ts +1 -0
  297. package/dist/esm/scripts/copy-configs.js +64 -0
  298. package/dist/esm/scripts/generate-install-manifests.d.ts +39 -0
  299. package/dist/esm/scripts/generate-install-manifests.js +115 -0
  300. package/dist/esm/scripts/publish-github.d.ts +1 -0
  301. package/dist/esm/scripts/publish-github.js +45 -0
  302. package/dist/esm/utils/ci.d.ts +11 -0
  303. package/dist/esm/utils/ci.js +40 -0
  304. package/dist/esm/utils/detect-language.d.ts +48 -0
  305. package/dist/esm/utils/detect-language.js +234 -0
  306. package/dist/esm/utils/direct-deps.d.ts +21 -0
  307. package/dist/esm/utils/direct-deps.js +220 -0
  308. package/dist/esm/utils/execa.d.ts +22 -0
  309. package/dist/{utils → esm/utils}/execa.js +1 -4
  310. package/dist/esm/utils/git.d.ts +14 -0
  311. package/dist/esm/utils/git.js +21 -0
  312. package/dist/esm/utils/glob.d.ts +24 -0
  313. package/dist/esm/utils/glob.js +40 -0
  314. package/dist/esm/utils/http.d.ts +59 -0
  315. package/dist/esm/utils/http.js +115 -0
  316. package/dist/esm/utils/index.d.ts +15 -0
  317. package/dist/esm/utils/index.js +26 -0
  318. package/dist/esm/utils/logger.d.ts +65 -0
  319. package/dist/esm/utils/logger.js +157 -0
  320. package/dist/esm/utils/own-deps.d.ts +16 -0
  321. package/dist/esm/utils/own-deps.js +107 -0
  322. package/dist/esm/utils/package-version.d.ts +4 -0
  323. package/dist/esm/utils/package-version.js +38 -0
  324. package/dist/esm/utils/pool.d.ts +49 -0
  325. package/dist/esm/utils/pool.js +113 -0
  326. package/dist/esm/utils/resolve-bin.d.ts +67 -0
  327. package/dist/esm/utils/resolve-bin.js +156 -0
  328. package/dist/esm/utils/result-collector.d.ts +33 -0
  329. package/dist/esm/utils/result-collector.js +44 -0
  330. package/dist/esm/utils/update-notifier.d.ts +19 -0
  331. package/dist/esm/utils/update-notifier.js +108 -0
  332. package/install-manifests/core/package-lock.json +4 -4
  333. package/install-manifests/core/package.json +1 -1
  334. package/package.json +15 -13
  335. package/dist/core/checks/languages/lint.d.ts +0 -2
  336. package/dist/core/index.d.ts +0 -4
  337. package/dist/core/registry.js +0 -112
  338. package/dist/index.d.ts +0 -12
  339. package/dist/utils/index.d.ts +0 -15
  340. /package/dist/{cli.d.ts → cjs/cli.d.ts} +0 -0
  341. /package/dist/{config → cjs/config}/constants.d.ts +0 -0
  342. /package/dist/{config → cjs/config}/constants.js +0 -0
  343. /package/dist/{config → cjs/config}/pr-checkmate-workflow-docker.yml +0 -0
  344. /package/dist/{config → cjs/config}/pr-checkmate-workflow.yml +0 -0
  345. /package/dist/{core → cjs/core}/checks/languages/ruff-shared.d.ts +0 -0
  346. /package/dist/{core → cjs/core}/checks/languages/ruff-shared.js +0 -0
  347. /package/dist/{core → cjs/core}/commands.d.ts +0 -0
  348. /package/dist/{core → cjs/core}/commands.js +0 -0
  349. /package/dist/{core → cjs/core}/install/cache.d.ts +0 -0
  350. /package/dist/{core → cjs/core}/install/lock.d.ts +0 -0
  351. /package/dist/{core → cjs/core}/install/merge.d.ts +0 -0
  352. /package/dist/{core → cjs/core}/install/merge.js +0 -0
  353. /package/dist/{core → cjs/core}/install/profiles.js +0 -0
  354. /package/dist/{core → cjs/core}/types.js +0 -0
  355. /package/dist/{init.d.ts → cjs/init.d.ts} +0 -0
  356. /package/dist/{interfaces → cjs/interfaces}/index.js +0 -0
  357. /package/dist/{scripts → cjs/scripts}/copy-configs.d.ts +0 -0
  358. /package/dist/{scripts → cjs/scripts}/generate-install-manifests.d.ts +0 -0
  359. /package/dist/{scripts → cjs/scripts}/publish-github.d.ts +0 -0
  360. /package/dist/{utils → cjs/utils}/ci.d.ts +0 -0
  361. /package/dist/{utils → cjs/utils}/ci.js +0 -0
  362. /package/dist/{utils → cjs/utils}/detect-language.d.ts +0 -0
  363. /package/dist/{utils → cjs/utils}/direct-deps.d.ts +0 -0
  364. /package/dist/{utils → cjs/utils}/direct-deps.js +0 -0
  365. /package/dist/{utils → cjs/utils}/execa.d.ts +0 -0
  366. /package/dist/{utils → cjs/utils}/git.d.ts +0 -0
  367. /package/dist/{utils → cjs/utils}/glob.d.ts +0 -0
  368. /package/dist/{utils → cjs/utils}/glob.js +0 -0
  369. /package/dist/{utils → cjs/utils}/http.d.ts +0 -0
  370. /package/dist/{utils → cjs/utils}/logger.d.ts +0 -0
  371. /package/dist/{utils → cjs/utils}/logger.js +0 -0
  372. /package/dist/{utils → cjs/utils}/package-version.d.ts +0 -0
  373. /package/dist/{utils → cjs/utils}/pool.d.ts +0 -0
  374. /package/dist/{utils → cjs/utils}/pool.js +0 -0
  375. /package/dist/{utils → cjs/utils}/resolve-bin.d.ts +0 -0
  376. /package/dist/{utils → cjs/utils}/result-collector.d.ts +0 -0
  377. /package/dist/{utils → cjs/utils}/result-collector.js +0 -0
  378. /package/dist/{utils → cjs/utils}/update-notifier.d.ts +0 -0
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.pythonFormatCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
- const utils_1 = require("../../../utils");
10
- const targets_1 = require("../../targets");
11
- const types_1 = require("../../types");
12
- const ruff_shared_1 = require("./ruff-shared");
9
+ const index_js_1 = require("../../../utils/index.js");
10
+ const targets_js_1 = require("../../targets.js");
11
+ const types_js_1 = require("../../types.js");
12
+ const ruff_shared_js_1 = require("./ruff-shared.js");
13
13
  /**
14
14
  * Formats changed Python files with Ruff's formatter (WASM, no Python/pip needed).
15
15
  * Read-only in check mode (`warn` when files differ from formatted output); rewrites
@@ -24,12 +24,12 @@ exports.pythonFormatCheck = {
24
24
  ctx.languages.includes('python'));
25
25
  },
26
26
  async run(ctx) {
27
- const targets = await (0, targets_1.resolveTargetFiles)(ctx, ruff_shared_1.PY_GLOBS);
27
+ const targets = await (0, targets_js_1.resolveTargetFiles)(ctx, ruff_shared_js_1.PY_GLOBS);
28
28
  if (targets === null)
29
- return (0, types_1.skip)('git unavailable');
29
+ return (0, types_js_1.skip)('git unavailable');
30
30
  if (targets.length === 0)
31
- return (0, types_1.pass)('no Python files changed');
32
- const workspace = (0, ruff_shared_1.createRuffWorkspace)();
31
+ return (0, types_js_1.pass)('no Python files changed');
32
+ const workspace = (0, ruff_shared_js_1.createRuffWorkspace)();
33
33
  let unformatted = 0;
34
34
  for (const rel of targets) {
35
35
  const abs = node_path_1.default.join(ctx.cwd, rel);
@@ -46,7 +46,7 @@ exports.pythonFormatCheck = {
46
46
  }
47
47
  catch (err) {
48
48
  // A syntax error makes Ruff throw — that's a lint concern, not a format failure.
49
- utils_1.logger.warn(`[Ruff Format]: ⚠️ Could not format ${rel} (syntax error?)\n${err}`);
49
+ index_js_1.logger.warn(`[Ruff Format]: ⚠️ Could not format ${rel} (syntax error?)\n${err}`);
50
50
  continue;
51
51
  }
52
52
  if (formatted === content)
@@ -56,12 +56,12 @@ exports.pythonFormatCheck = {
56
56
  node_fs_1.default.writeFileSync(abs, formatted);
57
57
  }
58
58
  if (unformatted === 0)
59
- return (0, types_1.pass)();
59
+ return (0, types_js_1.pass)();
60
60
  if (!ctx.write) {
61
- utils_1.logger.warn(`[Ruff Format]: ⚠️ ${unformatted} Python file(s) need formatting`);
62
- return (0, types_1.warn)(`${unformatted} file(s) need formatting (run with write to fix)`);
61
+ index_js_1.logger.warn(`[Ruff Format]: ⚠️ ${unformatted} Python file(s) need formatting`);
62
+ return (0, types_js_1.warn)(`${unformatted} file(s) need formatting (run with write to fix)`);
63
63
  }
64
- utils_1.logger.info(`[Ruff Format]: ✅ Reformatted ${unformatted} Python file(s)`);
65
- return (0, types_1.pass)(`reformatted ${unformatted} file(s)`);
64
+ index_js_1.logger.info(`[Ruff Format]: ✅ Reformatted ${unformatted} Python file(s)`);
65
+ return (0, types_js_1.pass)(`reformatted ${unformatted} file(s)`);
66
66
  },
67
67
  };
@@ -1,4 +1,4 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  /**
3
3
  * Lints changed Python files with Ruff, bundled as a self-contained WASM module
4
4
  * (`@astral-sh/ruff-wasm-nodejs`) so it runs on a bare Node image with no Python
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.pythonLintCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
- const utils_1 = require("../../../utils");
10
- const targets_1 = require("../../targets");
11
- const types_1 = require("../../types");
12
- const ruff_shared_1 = require("./ruff-shared");
9
+ const index_js_1 = require("../../../utils/index.js");
10
+ const targets_js_1 = require("../../targets.js");
11
+ const types_js_1 = require("../../types.js");
12
+ const ruff_shared_js_1 = require("./ruff-shared.js");
13
13
  /**
14
14
  * Lints changed Python files with Ruff, bundled as a self-contained WASM module
15
15
  * (`@astral-sh/ruff-wasm-nodejs`) so it runs on a bare Node image with no Python
@@ -26,12 +26,12 @@ exports.pythonLintCheck = {
26
26
  ctx.languages.includes('python'));
27
27
  },
28
28
  async run(ctx) {
29
- const targets = await (0, targets_1.resolveTargetFiles)(ctx, ruff_shared_1.PY_GLOBS);
29
+ const targets = await (0, targets_js_1.resolveTargetFiles)(ctx, ruff_shared_js_1.PY_GLOBS);
30
30
  if (targets === null)
31
- return (0, types_1.skip)('git unavailable');
31
+ return (0, types_js_1.skip)('git unavailable');
32
32
  if (targets.length === 0)
33
- return (0, types_1.pass)('no Python files changed');
34
- const workspace = (0, ruff_shared_1.createRuffWorkspace)();
33
+ return (0, types_js_1.pass)('no Python files changed');
34
+ const workspace = (0, ruff_shared_js_1.createRuffWorkspace)();
35
35
  let totalIssues = 0;
36
36
  let filesWithIssues = 0;
37
37
  for (const rel of targets) {
@@ -47,15 +47,15 @@ exports.pythonLintCheck = {
47
47
  continue;
48
48
  filesWithIssues += 1;
49
49
  totalIssues += diagnostics.length;
50
- utils_1.logger.warn(`[Ruff Lint]: ⚠️ ${rel}: ${diagnostics.length} issue(s)`);
50
+ index_js_1.logger.warn(`[Ruff Lint]: ⚠️ ${rel}: ${diagnostics.length} issue(s)`);
51
51
  diagnostics
52
52
  .slice(0, 5)
53
- .forEach((d) => utils_1.logger.warn(` ${rel}:${d.start_location.row} ${d.code ?? '?'} ${d.message}`));
53
+ .forEach((d) => index_js_1.logger.warn(` ${rel}:${d.start_location.row} ${d.code ?? '?'} ${d.message}`));
54
54
  if (diagnostics.length > 5)
55
- utils_1.logger.warn(` ... and ${diagnostics.length - 5} more`);
55
+ index_js_1.logger.warn(` ... and ${diagnostics.length - 5} more`);
56
56
  }
57
57
  if (totalIssues === 0)
58
- return (0, types_1.pass)();
59
- return (0, types_1.warn)(`${totalIssues} issue(s) in ${filesWithIssues} file(s)`);
58
+ return (0, types_js_1.pass)();
59
+ return (0, types_js_1.warn)(`${totalIssues} issue(s) in ${filesWithIssues} file(s)`);
60
60
  },
61
61
  };
@@ -1,4 +1,4 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  /**
3
3
  * Type-checks changed Python files — the Python analogue of `tsc --noEmit`.
4
4
  *
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.pythonTypecheckCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
- const utils_1 = require("../../../utils");
10
- const targets_1 = require("../../targets");
11
- const types_1 = require("../../types");
12
- const findings_1 = require("../findings");
13
- const tool_install_1 = require("../tool-install");
14
- const external_runner_1 = require("./external-runner");
15
- const ruff_shared_1 = require("./ruff-shared");
9
+ const index_js_1 = require("../../../utils/index.js");
10
+ const targets_js_1 = require("../../targets.js");
11
+ const types_js_1 = require("../../types.js");
12
+ const findings_js_1 = require("../findings.js");
13
+ const tool_install_js_1 = require("../tool-install.js");
14
+ const external_runner_js_1 = require("./external-runner.js");
15
+ const ruff_shared_js_1 = require("./ruff-shared.js");
16
16
  /** How many diagnostics reach the log before the rest are counted instead. */
17
17
  const MAX_LOGGED = 10;
18
18
  /** The check's display name — the log prefix, and the row in the report. */
@@ -64,7 +64,7 @@ function hasOwnPyrightConfig(cwd) {
64
64
  /** Where our copy of pyright lives — bundled, or in a fetched profile. */
65
65
  function resolvePyright() {
66
66
  try {
67
- return (0, utils_1.resolvePackageBin)('pyright', 'index.js');
67
+ return (0, index_js_1.resolvePackageBin)('pyright', 'index.js');
68
68
  }
69
69
  catch {
70
70
  return null;
@@ -74,12 +74,12 @@ function resolvePyright() {
74
74
  function reportMypy(output) {
75
75
  const lines = output.split('\n').filter(line => /\berror\b|\bwarning\b/i.test(line));
76
76
  if (lines.length === 0)
77
- return (0, types_1.pass)();
77
+ return (0, types_js_1.pass)();
78
78
  // "Found 3 errors in 1 file (checked 12 source files)" — mypy's own count says
79
79
  // more than a tally of lines that merely contained the word.
80
80
  const summary = lines.find(line => /found\s+\d+\s+error/i.test(line))?.trim();
81
- (0, findings_1.logSample)(NAME, 'type issues (mypy):', lines);
82
- return (0, types_1.warn)(summary ?? `${lines.length} type issue(s)`);
81
+ (0, findings_js_1.logSample)(NAME, 'type issues (mypy):', lines);
82
+ return (0, types_js_1.warn)(summary ?? `${lines.length} type issue(s)`);
83
83
  }
84
84
  /**
85
85
  * Type-check with our own pyright, and report only what the client can act on.
@@ -95,8 +95,8 @@ function reportPyright(ctx, stdout) {
95
95
  catch {
96
96
  // Pyright exits non-zero for a bad invocation too, and calling that a type
97
97
  // error would put a finding in the report that is really our own bug.
98
- utils_1.logger.warn(`[${NAME}]: ⚠️ pyright produced no readable report`);
99
- return (0, types_1.skip)('pyright produced no readable report');
98
+ index_js_1.logger.warn(`[${NAME}]: ⚠️ pyright produced no readable report`);
99
+ return (0, types_js_1.skip)('pyright produced no readable report');
100
100
  }
101
101
  const diagnostics = (report.generalDiagnostics ?? []).filter(diagnostic => diagnostic.severity !== 'information');
102
102
  // Nothing downstream of an unresolved import can be trusted, so this is
@@ -116,24 +116,24 @@ function reportPyright(ctx, stdout) {
116
116
  ];
117
117
  const named = modules.slice(0, NAMED_IMPORTS).join(', ');
118
118
  const rest = modules.length > NAMED_IMPORTS ? ` and ${modules.length - NAMED_IMPORTS} more` : '';
119
- utils_1.logger.warn(`[${NAME}]: ⚠️ ${unresolved.length} import(s) could not be resolved — not type-checking`);
120
- return (0, types_1.skip)(`project dependencies not installed (${named || `${unresolved.length} import(s)`}${rest}) ` +
119
+ index_js_1.logger.warn(`[${NAME}]: ⚠️ ${unresolved.length} import(s) could not be resolved — not type-checking`);
120
+ return (0, types_js_1.skip)(`project dependencies not installed (${named || `${unresolved.length} import(s)`}${rest}) ` +
121
121
  '— run `pip install` before typecheck');
122
122
  }
123
123
  if (diagnostics.length === 0) {
124
- utils_1.logger.info(`[${NAME}]: ✅ No type errors (pyright)`);
125
- return (0, types_1.pass)();
124
+ index_js_1.logger.info(`[${NAME}]: ✅ No type errors (pyright)`);
125
+ return (0, types_js_1.pass)();
126
126
  }
127
127
  const errors = diagnostics.filter(diagnostic => diagnostic.severity === 'error').length;
128
128
  const summary = `${errors} error(s), ${diagnostics.length - errors} warning(s)`;
129
- (0, findings_1.logSample)(NAME, `type issues (pyright): ${summary}`, diagnostics.slice(0, MAX_LOGGED).map(diagnostic => {
129
+ (0, findings_js_1.logSample)(NAME, `type issues (pyright): ${summary}`, diagnostics.slice(0, MAX_LOGGED).map(diagnostic => {
130
130
  const rel = node_path_1.default.relative(ctx.cwd, diagnostic.file) || diagnostic.file;
131
131
  // Pyright counts lines from zero; every other tool in the report counts
132
132
  // from one, and a line number that is off by one is worse than none.
133
133
  const line = (diagnostic.range?.start?.line ?? 0) + 1;
134
134
  return `${rel}:${line} ${diagnostic.severity}: ${diagnostic.message.split('\n')[0]}`;
135
135
  }));
136
- return (0, types_1.warn)(summary);
136
+ return (0, types_js_1.warn)(summary);
137
137
  }
138
138
  /**
139
139
  * Type-checks changed Python files — the Python analogue of `tsc --noEmit`.
@@ -156,35 +156,35 @@ exports.pythonTypecheckCheck = {
156
156
  ctx.languages.includes('python'));
157
157
  },
158
158
  async run(ctx) {
159
- const targets = await (0, targets_1.resolveTargetFiles)(ctx, ruff_shared_1.PY_GLOBS);
159
+ const targets = await (0, targets_js_1.resolveTargetFiles)(ctx, ruff_shared_js_1.PY_GLOBS);
160
160
  if (targets === null)
161
- return (0, types_1.skip)('git unavailable');
161
+ return (0, types_js_1.skip)('git unavailable');
162
162
  if (targets.length === 0)
163
- return (0, types_1.pass)('no Python files changed');
163
+ return (0, types_js_1.pass)('no Python files changed');
164
164
  const forced = ctx.config.python?.typeChecker;
165
165
  if (forced !== 'pyright') {
166
- const mypy = await (0, external_runner_1.runTool)(ctx, 'mypy', targets);
166
+ const mypy = await (0, external_runner_js_1.runTool)(ctx, 'mypy', targets);
167
167
  if (!mypy.missing) {
168
168
  if (mypy.exitCode === 0) {
169
- utils_1.logger.info(`[${NAME}]: ✅ No type errors (mypy)`);
170
- return (0, types_1.pass)();
169
+ index_js_1.logger.info(`[${NAME}]: ✅ No type errors (mypy)`);
170
+ return (0, types_js_1.pass)();
171
171
  }
172
172
  return reportMypy([mypy.stdout, mypy.stderr].filter(Boolean).join('\n'));
173
173
  }
174
174
  // Asking for mypy by name and not having it is a configuration error the
175
175
  // client meant to make visible; falling back to pyright would hide it.
176
176
  if (forced === 'mypy')
177
- return (0, tool_install_1.notInstalled)('mypy', 'mypy');
177
+ return (0, tool_install_js_1.notInstalled)('mypy', 'mypy');
178
178
  }
179
179
  const entry = resolvePyright();
180
180
  if (!entry)
181
- return (0, tool_install_1.notInstalled)('pyright', 'pyright');
182
- const result = await (0, external_runner_1.runTool)(ctx, process.execPath, [entry, '--outputjson', ...targets]);
181
+ return (0, tool_install_js_1.notInstalled)('pyright', 'pyright');
182
+ const result = await (0, external_runner_js_1.runTool)(ctx, process.execPath, [entry, '--outputjson', ...targets]);
183
183
  // The binary here is the Node running this process, so `missing` is not a
184
184
  // reachable state — it is a case of the type, folded in rather than asserted
185
185
  // away.
186
186
  if (result.missing)
187
- return (0, tool_install_1.notInstalled)('pyright', 'pyright');
187
+ return (0, tool_install_js_1.notInstalled)('pyright', 'pyright');
188
188
  return reportPyright(ctx, result.stdout);
189
189
  },
190
190
  };
@@ -1,2 +1,2 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  export declare const typecheckCheck: Check;
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.typecheckCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
- const utils_1 = require("../../../utils");
10
- const execa_1 = require("../../../utils/execa");
11
- const reuse_1 = require("../../install/reuse");
12
- const types_1 = require("../../types");
9
+ const execa_js_1 = require("../../../utils/execa.js");
10
+ const index_js_1 = require("../../../utils/index.js");
11
+ const reuse_js_1 = require("../../install/reuse.js");
12
+ const types_js_1 = require("../../types.js");
13
13
  /**
14
14
  * Prefer the consumer project's own TypeScript so its tsconfig is compiled by the
15
15
  * version it was written for; fall back to the compiler bundled with pr-checkmate.
@@ -19,8 +19,8 @@ function resolveTsc(ctx) {
19
19
  // `tsconfig.json` in the repository, so the compiler their config was written
20
20
  // for is always theirs. `install.reuseLocal: "off"` still overrides, for a
21
21
  // client who wants our pinned compiler for reproducibility.
22
- return (0, utils_1.resolvePackageBin)('typescript', 'bin/tsc', {
23
- paths: (0, reuse_1.clientToolPaths)('typescript', ctx, { clientOwnsConfig: true }),
22
+ return (0, index_js_1.resolvePackageBin)('typescript', 'bin/tsc', {
23
+ paths: (0, reuse_js_1.clientToolPaths)('typescript', ctx, { clientOwnsConfig: true }),
24
24
  });
25
25
  }
26
26
  exports.typecheckCheck = {
@@ -42,26 +42,26 @@ exports.typecheckCheck = {
42
42
  // "cannot find type definition file" errors that look like code problems but are
43
43
  // really a setup gap. Skip with an actionable message instead of failing the PR.
44
44
  if (!node_fs_1.default.existsSync(node_path_1.default.join(ctx.cwd, 'node_modules'))) {
45
- return (0, types_1.skip)('project dependencies not installed (no node_modules) — run `npm ci` before typecheck');
45
+ return (0, types_js_1.skip)('project dependencies not installed (no node_modules) — run `npm ci` before typecheck');
46
46
  }
47
47
  const tscBin = resolveTsc(ctx);
48
- const result = await (0, execa_1.execa)(process.execPath, [tscBin, '--noEmit'], {
48
+ const result = await (0, execa_js_1.execa)(process.execPath, [tscBin, '--noEmit'], {
49
49
  cwd: ctx.cwd,
50
50
  reject: false,
51
51
  });
52
52
  if (result.exitCode === 0)
53
- return (0, types_1.pass)();
53
+ return (0, types_js_1.pass)();
54
54
  const output = [result.stdout, result.stderr].filter(Boolean).join('\n');
55
55
  const errorCount = (output.match(/error TS\d+/g) ?? []).length;
56
56
  if (output)
57
- utils_1.logger.warn(output);
57
+ index_js_1.logger.warn(output);
58
58
  // A non-zero exit with no diagnostic in it is not a type error — tsc was
59
59
  // killed (OOM on a large project), crashed, or never started. Reporting that
60
60
  // as `0 type error(s)` blocked PRs with a message naming nothing to fix.
61
61
  if (errorCount === 0) {
62
- utils_1.logger.warn(`[TypeScript]: ⚠️ tsc exited ${result.exitCode ?? 'abnormally'} without reporting a type error — treating as a tooling failure, not a type error`);
63
- return (0, types_1.warn)(`tsc failed to run (exit ${result.exitCode ?? 'killed'})`);
62
+ index_js_1.logger.warn(`[TypeScript]: ⚠️ tsc exited ${result.exitCode ?? 'abnormally'} without reporting a type error — treating as a tooling failure, not a type error`);
63
+ return (0, types_js_1.warn)(`tsc failed to run (exit ${result.exitCode ?? 'killed'})`);
64
64
  }
65
- return (0, types_1.fail)(`${errorCount} type error(s)`);
65
+ return (0, types_js_1.fail)(`${errorCount} type error(s)`);
66
66
  },
67
67
  };
@@ -1,2 +1,2 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  export declare const commitlintCheck: Check;
@@ -7,10 +7,10 @@ exports.commitlintCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_os_1 = __importDefault(require("node:os"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
- const config_1 = require("../../../config");
11
- const utils_1 = require("../../../utils");
12
- const execa_1 = require("../../../utils/execa");
13
- const types_1 = require("../../types");
10
+ const index_js_1 = require("../../../config/index.js");
11
+ const execa_js_1 = require("../../../utils/execa.js");
12
+ const index_js_2 = require("../../../utils/index.js");
13
+ const types_js_1 = require("../../types.js");
14
14
  const LOCAL_CONFIG_FILES = [
15
15
  'commitlint.config.cjs',
16
16
  'commitlint.config.js',
@@ -64,10 +64,10 @@ exports.commitlintCheck = {
64
64
  // none, commitlint prints nothing and exits 0, and we reported `pass` — a
65
65
  // verdict on a commit message that does not exist. Ticket 072: a check that
66
66
  // examined nothing must not read as a check that found nothing.
67
- if (!(await (0, utils_1.resolveGitRef)(ctx.cwd, 'HEAD')))
68
- return (0, types_1.skip)('git unavailable');
69
- const commitlintBin = (0, utils_1.resolvePackageBin)('@commitlint/cli', 'cli.js');
70
- const hasLocal = (0, config_1.hasLocalConfig)(LOCAL_CONFIG_FILES, ctx.cwd);
67
+ if (!(await (0, index_js_2.resolveGitRef)(ctx.cwd, 'HEAD')))
68
+ return (0, types_js_1.skip)('git unavailable');
69
+ const commitlintBin = (0, index_js_2.resolvePackageBin)('@commitlint/cli', 'cli.js');
70
+ const hasLocal = (0, index_js_1.hasLocalConfig)(LOCAL_CONFIG_FILES, ctx.cwd);
71
71
  let tempConfigFile = null;
72
72
  // With no diff range (a full-repo review, or `--full`) the check still has a
73
73
  // meaningful subject: the newest commit message. `HEAD~1` cannot be assumed to
@@ -79,13 +79,13 @@ exports.commitlintCheck = {
79
79
  // `--last` lints exactly the newest commit and needs no ancestor.
80
80
  const range = ctx.baseSha
81
81
  ? ['--from', ctx.baseSha, '--to', ctx.headSha ?? 'HEAD']
82
- : (await (0, utils_1.resolveGitRef)(ctx.cwd, 'HEAD~1'))
82
+ : (await (0, index_js_2.resolveGitRef)(ctx.cwd, 'HEAD~1'))
83
83
  ? ['--from', 'HEAD~1', '--to', ctx.headSha ?? 'HEAD']
84
84
  : ['--last'];
85
85
  const args = [...range, '--verbose'];
86
86
  try {
87
87
  if (hasLocal) {
88
- utils_1.logger.info('[Commitlint]: Using local config');
88
+ index_js_2.logger.info('[Commitlint]: Using local config');
89
89
  }
90
90
  else {
91
91
  const types = ctx.config.commitlint?.types ?? DEFAULT_TYPES;
@@ -93,12 +93,12 @@ exports.commitlintCheck = {
93
93
  tempConfigFile = buildTempConfig(types, ignores);
94
94
  args.push('--config', tempConfigFile);
95
95
  }
96
- const result = await (0, execa_1.execa)(process.execPath, [commitlintBin, ...args], {
96
+ const result = await (0, execa_js_1.execa)(process.execPath, [commitlintBin, ...args], {
97
97
  cwd: ctx.cwd,
98
98
  reject: false,
99
99
  stdio: 'inherit',
100
100
  });
101
- return result.exitCode === 0 ? (0, types_1.pass)() : (0, types_1.warn)('commit message violations found');
101
+ return result.exitCode === 0 ? (0, types_js_1.pass)() : (0, types_js_1.warn)('commit message violations found');
102
102
  }
103
103
  finally {
104
104
  if (tempConfigFile && node_fs_1.default.existsSync(tempConfigFile))
@@ -1,2 +1,2 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  export declare const prBodyCheck: Check;
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.prBodyCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
- const utils_1 = require("../../../utils");
9
- const types_1 = require("../../types");
8
+ const index_js_1 = require("../../../utils/index.js");
9
+ const types_js_1 = require("../../types.js");
10
10
  // Matches "Closes #123", "Fixes #45", "Resolves #7" or JIRA-style "PROJ-456".
11
11
  const TICKET_PATTERN = /(?:closes?|fixes?|resolves?)\s+#\d+|[A-Z][A-Z0-9]+-\d+/i;
12
12
  exports.prBodyCheck = {
@@ -26,12 +26,12 @@ exports.prBodyCheck = {
26
26
  event = JSON.parse(node_fs_1.default.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf-8'));
27
27
  }
28
28
  catch (err) {
29
- utils_1.logger.warn(`[PR Body]: ⚠️ Could not read GitHub event\n${err}`);
30
- return (0, types_1.skip)('event unreadable');
29
+ index_js_1.logger.warn(`[PR Body]: ⚠️ Could not read GitHub event\n${err}`);
30
+ return (0, types_js_1.skip)('event unreadable');
31
31
  }
32
32
  const pr = event.pull_request;
33
33
  if (!pr)
34
- return (0, types_1.skip)('no PR data');
34
+ return (0, types_js_1.skip)('no PR data');
35
35
  const trimmed = (pr.body ?? '').trim();
36
36
  const issues = [];
37
37
  if (trimmed.length < minLength) {
@@ -41,9 +41,9 @@ exports.prBodyCheck = {
41
41
  issues.push('no ticket reference (e.g. "Closes #123" or "PROJ-456")');
42
42
  }
43
43
  if (issues.length > 0) {
44
- issues.forEach(i => utils_1.logger.warn(`[PR Body]: ⚠️ ${i}`));
45
- return (0, types_1.warn)(issues.join('; '));
44
+ issues.forEach(i => index_js_1.logger.warn(`[PR Body]: ⚠️ ${i}`));
45
+ return (0, types_js_1.warn)(issues.join('; '));
46
46
  }
47
- return (0, types_1.pass)();
47
+ return (0, types_js_1.pass)();
48
48
  },
49
49
  };
@@ -1,2 +1,2 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  export declare const prSizeCheck: Check;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prSizeCheck = void 0;
4
- const utils_1 = require("../../../utils");
5
- const execa_1 = require("../../../utils/execa");
6
- const types_1 = require("../../types");
4
+ const execa_js_1 = require("../../../utils/execa.js");
5
+ const index_js_1 = require("../../../utils/index.js");
6
+ const types_js_1 = require("../../types.js");
7
7
  const DEFAULT_MAX_FILES = 50;
8
8
  const DEFAULT_MAX_LINES = 1000;
9
9
  exports.prSizeCheck = {
@@ -17,7 +17,7 @@ exports.prSizeCheck = {
17
17
  const maxFiles = ctx.config.prSize?.maxFiles ?? DEFAULT_MAX_FILES;
18
18
  const maxLines = ctx.config.prSize?.maxLines ?? DEFAULT_MAX_LINES;
19
19
  try {
20
- const { stdout } = await (0, execa_1.execa)('git', ['diff', '--shortstat', ctx.baseSha, ctx.headSha ?? 'HEAD'], {
20
+ const { stdout } = await (0, execa_js_1.execa)('git', ['diff', '--shortstat', ctx.baseSha, ctx.headSha ?? 'HEAD'], {
21
21
  cwd: ctx.cwd,
22
22
  });
23
23
  // "5 files changed, 123 insertions(+), 45 deletions(-)"
@@ -25,21 +25,21 @@ exports.prSizeCheck = {
25
25
  const insertions = parseInt(stdout.match(/(\d+) insertion/)?.[1] ?? '0', 10);
26
26
  const deletions = parseInt(stdout.match(/(\d+) deletion/)?.[1] ?? '0', 10);
27
27
  const lines = insertions + deletions;
28
- utils_1.logger.info(`[PR Size]: ${fileCount} files changed, ${lines} lines`);
28
+ index_js_1.logger.info(`[PR Size]: ${fileCount} files changed, ${lines} lines`);
29
29
  const issues = [];
30
30
  if (fileCount > maxFiles)
31
31
  issues.push(`${fileCount} files (recommended < ${maxFiles})`);
32
32
  if (lines > maxLines)
33
33
  issues.push(`${lines} lines (recommended < ${maxLines})`);
34
34
  if (issues.length > 0) {
35
- issues.forEach(i => utils_1.logger.warn(`[PR Size]: ⚠️ Large PR: ${i}`));
36
- return (0, types_1.warn)(issues.join(', '));
35
+ issues.forEach(i => index_js_1.logger.warn(`[PR Size]: ⚠️ Large PR: ${i}`));
36
+ return (0, types_js_1.warn)(issues.join(', '));
37
37
  }
38
- return (0, types_1.pass)();
38
+ return (0, types_js_1.pass)();
39
39
  }
40
40
  catch (err) {
41
- utils_1.logger.warn(`[PR Size]: ⚠️ Could not measure PR size\n${err}`);
42
- return (0, types_1.skip)('diff unavailable');
41
+ index_js_1.logger.warn(`[PR Size]: ⚠️ Could not measure PR size\n${err}`);
42
+ return (0, types_js_1.skip)('diff unavailable');
43
43
  }
44
44
  },
45
45
  };
@@ -1,2 +1,2 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  export declare const prTitleLintCheck: Check;
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.prTitleLintCheck = void 0;
7
7
  const node_fs_1 = __importDefault(require("node:fs"));
8
- const utils_1 = require("../../../utils");
9
- const types_1 = require("../../types");
8
+ const index_js_1 = require("../../../utils/index.js");
9
+ const types_js_1 = require("../../types.js");
10
10
  const CONVENTIONAL_PREFIX = /^(feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert)(\(.+\))?!?: .+/;
11
11
  exports.prTitleLintCheck = {
12
12
  name: 'PR Title',
@@ -21,17 +21,17 @@ exports.prTitleLintCheck = {
21
21
  event = JSON.parse(node_fs_1.default.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf-8'));
22
22
  }
23
23
  catch (err) {
24
- utils_1.logger.warn(`[PR Title]: ⚠️ Could not read GitHub event\n${err}`);
25
- return (0, types_1.skip)('event unreadable');
24
+ index_js_1.logger.warn(`[PR Title]: ⚠️ Could not read GitHub event\n${err}`);
25
+ return (0, types_js_1.skip)('event unreadable');
26
26
  }
27
27
  const pr = event.pull_request;
28
28
  if (!pr?.title)
29
- return (0, types_1.skip)('no PR title');
29
+ return (0, types_js_1.skip)('no PR title');
30
30
  const title = pr.title;
31
31
  if (!CONVENTIONAL_PREFIX.test(title)) {
32
- utils_1.logger.warn(`[PR Title]: ⚠️ Not Conventional Commits: "${title}"`);
33
- return (0, types_1.warn)('title does not follow Conventional Commits');
32
+ index_js_1.logger.warn(`[PR Title]: ⚠️ Not Conventional Commits: "${title}"`);
33
+ return (0, types_js_1.warn)('title does not follow Conventional Commits');
34
34
  }
35
- return (0, types_1.pass)();
35
+ return (0, types_js_1.pass)();
36
36
  },
37
37
  };
@@ -1,4 +1,4 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  /**
3
3
  * Flags tracked files whose paths differ only by case (e.g. `Foo.ts` vs
4
4
  * `foo.ts`). Such pairs coexist on Linux (case-sensitive) but collide on macOS/
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.caseCollisionCheck = void 0;
4
- const utils_1 = require("../../../utils");
5
- const targets_1 = require("../../targets");
6
- const types_1 = require("../../types");
4
+ const index_js_1 = require("../../../utils/index.js");
5
+ const targets_js_1 = require("../../targets.js");
6
+ const types_js_1 = require("../../types.js");
7
7
  /**
8
8
  * Flags tracked files whose paths differ only by case (e.g. `Foo.ts` vs
9
9
  * `foo.ts`). Such pairs coexist on Linux (case-sensitive) but collide on macOS/
@@ -17,7 +17,7 @@ exports.caseCollisionCheck = {
17
17
  return ctx.config.caseCollision?.enabled !== false;
18
18
  },
19
19
  async run(ctx) {
20
- const files = await (0, targets_1.resolveTargets)(ctx, ['*'], {
20
+ const files = await (0, targets_js_1.resolveTargets)(ctx, ['*'], {
21
21
  wholeTree: true,
22
22
  onEmpty: { skip: 'no tracked files' },
23
23
  });
@@ -35,8 +35,8 @@ exports.caseCollisionCheck = {
35
35
  }
36
36
  const collisions = [...byLower.values()].filter(set => set.size > 1);
37
37
  if (collisions.length === 0)
38
- return (0, types_1.pass)();
39
- collisions.forEach(set => utils_1.logger.warn(`[Case Collision]: ⚠️ ${[...set].join(' ↔ ')}`));
40
- return (0, types_1.warn)(`${collisions.length} case-collision(s) — paths differing only by case`);
38
+ return (0, types_js_1.pass)();
39
+ collisions.forEach(set => index_js_1.logger.warn(`[Case Collision]: ⚠️ ${[...set].join(' ↔ ')}`));
40
+ return (0, types_js_1.warn)(`${collisions.length} case-collision(s) — paths differing only by case`);
41
41
  },
42
42
  };
@@ -1,4 +1,4 @@
1
- import { Check } from '../../types';
1
+ import { Check } from '../../types.js';
2
2
  /**
3
3
  * The closest real name to `input`, when one is close enough to be a typo.
4
4
  *