skuba 14.0.0-replace-global-vars-20251121010036 → 14.0.0-rfc-pnpm-config-skuba-20260106120954

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 (414) hide show
  1. package/config/eslint.js +1 -1
  2. package/config/jest.js +1 -0
  3. package/config/prettier.d.ts +4 -8
  4. package/config/prettier.js +2 -10
  5. package/jest/moduleNameMapper.js +64 -0
  6. package/jest/transform.js +62 -0
  7. package/jest/tsConfig.js +26 -0
  8. package/jest-preset.js +37 -0
  9. package/lib/api/jest/index.d.ts +15 -0
  10. package/lib/api/jest/index.js +59 -0
  11. package/lib/api/jest/index.js.map +7 -0
  12. package/lib/cli/adapter/eslint.js +45 -11
  13. package/lib/cli/adapter/eslint.js.map +2 -2
  14. package/lib/cli/adapter/prettier.js +67 -39
  15. package/lib/cli/adapter/prettier.js.map +2 -2
  16. package/lib/cli/build/args.js +42 -8
  17. package/lib/cli/build/args.js.map +2 -2
  18. package/lib/cli/build/assets.js +60 -28
  19. package/lib/cli/build/assets.js.map +2 -2
  20. package/lib/cli/build/esbuild.js +45 -21
  21. package/lib/cli/build/esbuild.js.map +2 -2
  22. package/lib/cli/build/index.js +45 -21
  23. package/lib/cli/build/index.js.map +1 -1
  24. package/lib/cli/build/tsc.js +59 -22
  25. package/lib/cli/build/tsc.js.map +2 -2
  26. package/lib/cli/buildPackage/index.js +32 -8
  27. package/lib/cli/buildPackage/index.js.map +1 -1
  28. package/lib/cli/configure/analyseConfiguration.js +50 -16
  29. package/lib/cli/configure/analyseConfiguration.js.map +2 -2
  30. package/lib/cli/configure/analyseDependencies.d.ts +1 -1
  31. package/lib/cli/configure/analyseDependencies.js +59 -25
  32. package/lib/cli/configure/analyseDependencies.js.map +3 -3
  33. package/lib/cli/configure/analysis/diff.js +29 -5
  34. package/lib/cli/configure/analysis/diff.js.map +1 -1
  35. package/lib/cli/configure/analysis/files.js +42 -8
  36. package/lib/cli/configure/analysis/files.js.map +2 -2
  37. package/lib/cli/configure/analysis/git.js +46 -12
  38. package/lib/cli/configure/analysis/git.js.map +2 -2
  39. package/lib/cli/configure/analysis/package.d.ts +3 -2
  40. package/lib/cli/configure/analysis/package.js +45 -10
  41. package/lib/cli/configure/analysis/package.js.map +3 -3
  42. package/lib/cli/configure/analysis/project.js +50 -18
  43. package/lib/cli/configure/analysis/project.js.map +2 -2
  44. package/lib/cli/configure/dependencies/index.js +35 -7
  45. package/lib/cli/configure/dependencies/index.js.map +1 -1
  46. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +28 -4
  47. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
  48. package/lib/cli/configure/dependencies/seekKoala.js +28 -4
  49. package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
  50. package/lib/cli/configure/dependencies/skuba.js +28 -4
  51. package/lib/cli/configure/dependencies/skuba.js.map +1 -1
  52. package/lib/cli/configure/dependencies/skubaDeps.js +26 -2
  53. package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
  54. package/lib/cli/configure/dependencies/skubaDive.js +29 -4
  55. package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
  56. package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
  57. package/lib/cli/configure/ensureTemplateCompletion.js +61 -33
  58. package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
  59. package/lib/cli/configure/getEntryPoint.d.ts +1 -1
  60. package/lib/cli/configure/getEntryPoint.js +48 -14
  61. package/lib/cli/configure/getEntryPoint.js.map +3 -3
  62. package/lib/cli/configure/getProjectType.d.ts +1 -1
  63. package/lib/cli/configure/getProjectType.js +35 -14
  64. package/lib/cli/configure/getProjectType.js.map +2 -2
  65. package/lib/cli/configure/index.js +84 -50
  66. package/lib/cli/configure/index.js.map +2 -2
  67. package/lib/cli/configure/modules/eslint.js +34 -10
  68. package/lib/cli/configure/modules/eslint.js.map +1 -1
  69. package/lib/cli/configure/modules/ignore.js +32 -8
  70. package/lib/cli/configure/modules/ignore.js.map +1 -1
  71. package/lib/cli/configure/modules/index.js +44 -18
  72. package/lib/cli/configure/modules/index.js.map +2 -2
  73. package/lib/cli/configure/modules/jest.d.ts +2 -0
  74. package/lib/cli/configure/modules/jest.js +86 -0
  75. package/lib/cli/configure/modules/jest.js.map +7 -0
  76. package/lib/cli/configure/modules/nodemon.js +28 -4
  77. package/lib/cli/configure/modules/nodemon.js.map +1 -1
  78. package/lib/cli/configure/modules/package.js +34 -10
  79. package/lib/cli/configure/modules/package.js.map +1 -1
  80. package/lib/cli/configure/modules/prettier.js +35 -11
  81. package/lib/cli/configure/modules/prettier.js.map +1 -1
  82. package/lib/cli/configure/modules/renovate.js +40 -17
  83. package/lib/cli/configure/modules/renovate.js.map +2 -2
  84. package/lib/cli/configure/modules/serverless.js +26 -2
  85. package/lib/cli/configure/modules/serverless.js.map +1 -1
  86. package/lib/cli/configure/modules/tslint.js +28 -4
  87. package/lib/cli/configure/modules/tslint.js.map +1 -1
  88. package/lib/cli/configure/processing/configFile.d.ts +1 -1
  89. package/lib/cli/configure/processing/configFile.js +34 -43
  90. package/lib/cli/configure/processing/configFile.js.map +2 -2
  91. package/lib/cli/configure/processing/deleteFiles.js +26 -2
  92. package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
  93. package/lib/cli/configure/processing/javascript.js +27 -2
  94. package/lib/cli/configure/processing/javascript.js.map +1 -1
  95. package/lib/cli/configure/processing/json.js +31 -6
  96. package/lib/cli/configure/processing/json.js.map +1 -1
  97. package/lib/cli/configure/processing/loadFiles.js +26 -2
  98. package/lib/cli/configure/processing/loadFiles.js.map +1 -1
  99. package/lib/cli/configure/processing/module.js +28 -4
  100. package/lib/cli/configure/processing/module.js.map +1 -1
  101. package/lib/cli/configure/processing/package.d.ts +67 -1
  102. package/lib/cli/configure/processing/package.js +45 -8
  103. package/lib/cli/configure/processing/package.js.map +3 -3
  104. package/lib/cli/configure/processing/prettier.js +38 -4
  105. package/lib/cli/configure/processing/prettier.js.map +2 -2
  106. package/lib/cli/configure/processing/record.js +41 -5
  107. package/lib/cli/configure/processing/record.js.map +2 -2
  108. package/lib/cli/configure/processing/typescript.js +63 -26
  109. package/lib/cli/configure/processing/typescript.js.map +2 -2
  110. package/lib/cli/configure/types.d.ts +4 -15
  111. package/lib/cli/configure/types.js +16 -0
  112. package/lib/cli/configure/types.js.map +3 -3
  113. package/lib/cli/format/index.js +44 -20
  114. package/lib/cli/format/index.js.map +1 -1
  115. package/lib/cli/help/index.js +30 -6
  116. package/lib/cli/help/index.js.map +1 -1
  117. package/lib/cli/init/getConfig.d.ts +1 -1
  118. package/lib/cli/init/getConfig.js +100 -74
  119. package/lib/cli/init/getConfig.js.map +3 -3
  120. package/lib/cli/init/git.js +51 -16
  121. package/lib/cli/init/git.js.map +2 -2
  122. package/lib/cli/init/index.js +117 -68
  123. package/lib/cli/init/index.js.map +3 -3
  124. package/lib/cli/init/prompts.d.ts +4 -4
  125. package/lib/cli/init/prompts.js +48 -27
  126. package/lib/cli/init/prompts.js.map +2 -2
  127. package/lib/cli/init/types.js +41 -7
  128. package/lib/cli/init/types.js.map +1 -1
  129. package/lib/cli/init/validation.js +30 -2
  130. package/lib/cli/init/validation.js.map +1 -1
  131. package/lib/cli/init/writePackageJson.js +42 -8
  132. package/lib/cli/init/writePackageJson.js.map +2 -2
  133. package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
  134. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  135. package/lib/cli/lint/annotate/buildkite/index.js +45 -11
  136. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  137. package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
  138. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  139. package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
  140. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  141. package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
  142. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  143. package/lib/cli/lint/annotate/github/eslint.js +26 -2
  144. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  145. package/lib/cli/lint/annotate/github/index.js +45 -11
  146. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  147. package/lib/cli/lint/annotate/github/internal.js +26 -2
  148. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  149. package/lib/cli/lint/annotate/github/prettier.js +26 -2
  150. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  151. package/lib/cli/lint/annotate/github/tsc.js +28 -4
  152. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  153. package/lib/cli/lint/annotate/index.js +30 -6
  154. package/lib/cli/lint/annotate/index.js.map +1 -1
  155. package/lib/cli/lint/autofix.js +73 -37
  156. package/lib/cli/lint/autofix.js.map +1 -1
  157. package/lib/cli/lint/eslint.js +51 -16
  158. package/lib/cli/lint/eslint.js.map +3 -3
  159. package/lib/cli/lint/external.js +51 -19
  160. package/lib/cli/lint/external.js.map +2 -2
  161. package/lib/cli/lint/index.js +49 -25
  162. package/lib/cli/lint/index.js.map +1 -1
  163. package/lib/cli/lint/internal.js +42 -18
  164. package/lib/cli/lint/internal.js.map +1 -1
  165. package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
  166. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  167. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +45 -11
  168. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
  169. package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
  170. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  171. package/lib/cli/lint/internalLints/refreshConfigFiles.d.ts +1 -1
  172. package/lib/cli/lint/internalLints/refreshConfigFiles.js +65 -42
  173. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
  174. package/lib/cli/lint/internalLints/upgrade/index.d.ts +1 -1
  175. package/lib/cli/lint/internalLints/upgrade/index.js +53 -22
  176. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  177. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
  178. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  179. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +45 -11
  180. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  181. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +30 -6
  182. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  183. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +65 -34
  184. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
  185. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +46 -11
  186. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +59 -23
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +46 -11
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +46 -11
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +46 -11
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  209. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +45 -11
  210. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  211. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -4
  212. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -18
  213. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  214. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
  215. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  216. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +45 -0
  217. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
  218. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/migrateToPnpmConfig.d.ts +3 -0
  219. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/migrateToPnpmConfig.js +139 -0
  220. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/migrateToPnpmConfig.js.map +7 -0
  221. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
  222. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
  223. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
  224. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
  225. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
  226. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
  227. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  228. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +34 -10
  229. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  230. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +44 -10
  231. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  232. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +46 -12
  233. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  234. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +28 -4
  235. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  236. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +49 -15
  237. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  238. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +45 -11
  239. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  240. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +34 -10
  241. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
  242. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +45 -11
  243. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  244. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +45 -11
  245. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  246. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +47 -13
  247. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  248. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
  249. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  250. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +45 -11
  251. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  252. package/lib/cli/lint/prettier.js +50 -15
  253. package/lib/cli/lint/prettier.js.map +3 -3
  254. package/lib/cli/lint/tsc.js +28 -4
  255. package/lib/cli/lint/tsc.js.map +1 -1
  256. package/lib/cli/lint/types.js +16 -0
  257. package/lib/cli/lint/types.js.map +3 -3
  258. package/lib/cli/migrate/index.d.ts +5 -0
  259. package/lib/cli/migrate/index.js +79 -15
  260. package/lib/cli/migrate/index.js.map +2 -2
  261. package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
  262. package/lib/cli/migrate/nodeVersion/checks.js +51 -120
  263. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  264. package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
  265. package/lib/cli/migrate/nodeVersion/index.js +239 -65
  266. package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
  267. package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
  268. package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
  269. package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
  270. package/lib/cli/node/index.js +57 -20
  271. package/lib/cli/node/index.js.map +3 -3
  272. package/lib/cli/release/index.js +28 -4
  273. package/lib/cli/release/index.js.map +1 -1
  274. package/lib/cli/start/index.js +50 -16
  275. package/lib/cli/start/index.js.map +3 -3
  276. package/lib/cli/test/index.js +44 -4
  277. package/lib/cli/test/index.js.map +2 -2
  278. package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
  279. package/lib/cli/test/reporters/github/annotations.js +102 -0
  280. package/lib/cli/test/reporters/github/annotations.js.map +7 -0
  281. package/lib/cli/test/reporters/github/index.d.ts +5 -0
  282. package/lib/cli/test/reporters/github/index.js +74 -0
  283. package/lib/cli/test/reporters/github/index.js.map +7 -0
  284. package/lib/cli/version/index.js +30 -6
  285. package/lib/cli/version/index.js.map +1 -1
  286. package/lib/index.d.ts +1 -0
  287. package/lib/index.js +46 -6
  288. package/lib/index.js.map +2 -2
  289. package/lib/skuba.js +45 -26
  290. package/lib/skuba.js.map +3 -3
  291. package/lib/utils/args.js +43 -6
  292. package/lib/utils/args.js.map +2 -2
  293. package/lib/utils/command.js +42 -4
  294. package/lib/utils/command.js.map +3 -3
  295. package/lib/utils/copy.js +57 -20
  296. package/lib/utils/copy.js.map +2 -2
  297. package/lib/utils/dir.js +72 -32
  298. package/lib/utils/dir.js.map +2 -2
  299. package/lib/utils/env.js +26 -2
  300. package/lib/utils/env.js.map +1 -1
  301. package/lib/utils/error.js +47 -10
  302. package/lib/utils/error.js.map +1 -1
  303. package/lib/utils/exec.js +61 -23
  304. package/lib/utils/exec.js.map +3 -3
  305. package/lib/utils/fs.js +40 -6
  306. package/lib/utils/fs.js.map +2 -2
  307. package/lib/utils/help.js +30 -6
  308. package/lib/utils/help.js.map +1 -1
  309. package/lib/utils/logging.js +38 -11
  310. package/lib/utils/logging.js.map +1 -1
  311. package/lib/utils/logo.js +48 -24
  312. package/lib/utils/logo.js.map +1 -1
  313. package/lib/utils/manifest.d.ts +2 -3
  314. package/lib/utils/manifest.js +48 -8
  315. package/lib/utils/manifest.js.map +3 -3
  316. package/lib/utils/npmrc.js +26 -2
  317. package/lib/utils/npmrc.js.map +1 -1
  318. package/lib/utils/packageManager.js +49 -12
  319. package/lib/utils/packageManager.js.map +2 -2
  320. package/lib/utils/port.js +39 -4
  321. package/lib/utils/port.js.map +2 -2
  322. package/lib/utils/sleep.js +26 -2
  323. package/lib/utils/sleep.js.map +1 -1
  324. package/lib/utils/template.js +55 -18
  325. package/lib/utils/template.js.map +3 -3
  326. package/lib/utils/validation.js +31 -2
  327. package/lib/utils/validation.js.map +1 -1
  328. package/lib/utils/version.js +46 -9
  329. package/lib/utils/version.js.map +2 -2
  330. package/lib/utils/wait.js +32 -7
  331. package/lib/utils/wait.js.map +1 -1
  332. package/lib/utils/worker.js +35 -10
  333. package/lib/utils/worker.js.map +1 -1
  334. package/lib/wrapper/function-arguments.d.js +1 -0
  335. package/lib/wrapper/functionHandler.js +49 -18
  336. package/lib/wrapper/functionHandler.js.map +2 -2
  337. package/lib/wrapper/http.js +43 -8
  338. package/lib/wrapper/http.js.map +2 -2
  339. package/lib/wrapper/index.js +7 -6
  340. package/lib/wrapper/index.js.map +1 -1
  341. package/lib/wrapper/main.js +42 -8
  342. package/lib/wrapper/main.js.map +3 -3
  343. package/lib/wrapper/requestListener.js +47 -13
  344. package/lib/wrapper/requestListener.js.map +2 -2
  345. package/lib/wrapper/server.js +28 -4
  346. package/lib/wrapper/server.js.map +1 -1
  347. package/package.json +45 -45
  348. package/template/base/_.prettierrc.js +1 -1
  349. package/template/base/_eslint.config.js +1 -1
  350. package/template/base/_pnpm-workspace.yaml +0 -23
  351. package/template/base/jest.config.ts +19 -0
  352. package/template/base/jest.setup.ts +3 -0
  353. package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
  354. package/template/express-rest-api/.nvmrc +1 -1
  355. package/template/express-rest-api/package.json +8 -9
  356. package/template/express-rest-api/skuba.template.js +1 -1
  357. package/template/express-rest-api/src/app.test.ts +0 -1
  358. package/template/greeter/.buildkite/pipeline.yml +1 -1
  359. package/template/greeter/.nvmrc +1 -1
  360. package/template/greeter/package.json +4 -5
  361. package/template/greeter/skuba.template.js +1 -1
  362. package/template/greeter/src/app.test.ts +1 -3
  363. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
  364. package/template/koa-rest-api/.nvmrc +1 -1
  365. package/template/koa-rest-api/package.json +9 -11
  366. package/template/koa-rest-api/skuba.template.js +1 -1
  367. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
  368. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
  369. package/template/koa-rest-api/src/app.test.ts +0 -2
  370. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  371. package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
  372. package/template/koa-rest-api/src/testing/metrics.ts +0 -2
  373. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
  374. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  375. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -19
  376. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
  377. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  378. package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
  379. package/template/lambda-sqs-worker-cdk/package.json +9 -9
  380. package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
  381. package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
  382. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
  383. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
  384. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
  385. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
  386. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
  387. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  388. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  389. package/template/oss-npm-package/.nvmrc +1 -1
  390. package/template/oss-npm-package/_package.json +1 -2
  391. package/template/oss-npm-package/skuba.template.js +1 -1
  392. package/template/oss-npm-package/src/index.test.ts +0 -2
  393. package/template/private-npm-package/.nvmrc +1 -1
  394. package/template/private-npm-package/_package.json +2 -3
  395. package/template/private-npm-package/skuba.template.js +2 -2
  396. package/template/private-npm-package/src/index.test.ts +0 -2
  397. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.d.ts +0 -6
  398. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js +0 -86
  399. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js.map +0 -7
  400. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +0 -16
  401. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +0 -7
  402. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +0 -7
  403. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +0 -76
  404. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +0 -7
  405. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -2
  406. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
  407. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
  408. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
  409. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
  410. package/lib/eslint.d.js +0 -1
  411. package/lib/eslint.d.js.map +0 -7
  412. package/template/base/vitest.config.ts +0 -25
  413. /package/lib/cli/lint/internalLints/upgrade/patches/{12.5.0 → 13.1.1}/index.d.ts +0 -0
  414. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
@@ -1,4 +1,27 @@
1
- import { stripVTControlCharacters as stripAnsi } from "util";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var tsc_exports = {};
20
+ __export(tsc_exports, {
21
+ createTscAnnotations: () => createTscAnnotations
22
+ });
23
+ module.exports = __toCommonJS(tsc_exports);
24
+ var import_util = require("util");
2
25
  const tscOutputRegex = /([^\s].*)[\(:](\d+)[,:](\d+)(?:\):\s+|\s+-\s+)(error|warning|info)\s+TS(\d+)\s*:\s*([\s\S]*?)(?=\n\S)(?=\n\D)/g;
3
26
  const annotationLevelMap = {
4
27
  error: "failure",
@@ -9,7 +32,7 @@ const createTscAnnotations = (tscOk, tscOutputStream) => {
9
32
  if (tscOk) {
10
33
  return [];
11
34
  }
12
- const matches = stripAnsi(tscOutputStream.output()).matchAll(tscOutputRegex);
35
+ const matches = (0, import_util.stripVTControlCharacters)(tscOutputStream.output()).matchAll(tscOutputRegex);
13
36
  return Array.from(matches).flatMap(
14
37
  (match) => match?.length === 7 && match[1] && match[4] && match[5] && match[6] ? {
15
38
  annotation_level: annotationLevelMap[match[4]],
@@ -23,7 +46,8 @@ const createTscAnnotations = (tscOk, tscOutputStream) => {
23
46
  } : []
24
47
  );
25
48
  };
26
- export {
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
27
51
  createTscAnnotations
28
- };
52
+ });
29
53
  //# sourceMappingURL=tsc.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/cli/lint/annotate/github/tsc.ts"],
4
4
  "sourcesContent": ["import { stripVTControlCharacters as stripAnsi } from 'util';\n\nimport type { StreamInterceptor } from '../../../lint/external.js';\n\nimport type * as GitHub from '@skuba-lib/api/github';\n\ntype TscLevel = 'error' | 'warning' | 'info';\n\n/**\n * Matches the `tsc \u2502` prefix on each `tsc` log.\n */\n\n/**\n * Matches regular and pretty `tsc` output.\n *\n * For example, given the following input string:\n *\n * ```console\n * src/skuba.ts:43:7 - error TS2769: No overload matches this call.\n * Overload 1 of 2, '(obj: LogContext, msg?: string | undefined, ...args: any[]): void', gave the following error.\n * Argument of type 'unknown' is not assignable to parameter of type 'LogContext'.\n * Overload 2 of 2, '(msg?: string | undefined, ...args: any[]): void', gave the following error.\n * Argument of type 'unknown' is not assignable to parameter of type 'string | undefined'.\n * Type 'unknown' is not assignable to type 'string'.\n * ```\n *\n * This pattern will produce the following matches:\n *\n * 1. src/skuba.ts\n * 2. 43\n * 3. 7\n * 4. error\n * 5. 2769\n * 6. No overload matches this call [...] not assignable to type 'string'.\n */\nconst tscOutputRegex =\n /([^\\s].*)[\\(:](\\d+)[,:](\\d+)(?:\\):\\s+|\\s+-\\s+)(error|warning|info)\\s+TS(\\d+)\\s*:\\s*([\\s\\S]*?)(?=\\n\\S)(?=\\n\\D)/g;\n\nconst annotationLevelMap: Record<\n TscLevel,\n GitHub.Annotation['annotation_level']\n> = {\n error: 'failure',\n warning: 'warning',\n info: 'notice',\n};\n\nexport const createTscAnnotations = (\n tscOk: boolean,\n tscOutputStream: StreamInterceptor,\n): GitHub.Annotation[] => {\n if (tscOk) {\n return [];\n }\n\n const matches = stripAnsi(tscOutputStream.output()).matchAll(tscOutputRegex);\n return Array.from(matches).flatMap<GitHub.Annotation>((match) =>\n match?.length === 7 && match[1] && match[4] && match[5] && match[6]\n ? {\n annotation_level: annotationLevelMap[match[4] as TscLevel],\n path: match[1],\n start_line: Number(match[2]),\n end_line: Number(match[2]),\n start_column: Number(match[3]),\n end_column: Number(match[3]),\n message: match[6].trim(),\n title: `tsc (TS${match[5]})`,\n }\n : [],\n );\n};\n"],
5
- "mappings": "AAAA,SAAS,4BAA4B,iBAAiB;AAmCtD,MAAM,iBACJ;AAEF,MAAM,qBAGF;AAAA,EACF,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,uBAAuB,CAClC,OACA,oBACwB;AACxB,MAAI,OAAO;AACT,WAAO,CAAC;AAAA,EACV;AAEA,QAAM,UAAU,UAAU,gBAAgB,OAAO,CAAC,EAAE,SAAS,cAAc;AAC3E,SAAO,MAAM,KAAK,OAAO,EAAE;AAAA,IAA2B,CAAC,UACrD,OAAO,WAAW,KAAK,MAAM,CAAC,KAAK,MAAM,CAAC,KAAK,MAAM,CAAC,KAAK,MAAM,CAAC,IAC9D;AAAA,MACE,kBAAkB,mBAAmB,MAAM,CAAC,CAAa;AAAA,MACzD,MAAM,MAAM,CAAC;AAAA,MACb,YAAY,OAAO,MAAM,CAAC,CAAC;AAAA,MAC3B,UAAU,OAAO,MAAM,CAAC,CAAC;AAAA,MACzB,cAAc,OAAO,MAAM,CAAC,CAAC;AAAA,MAC7B,YAAY,OAAO,MAAM,CAAC,CAAC;AAAA,MAC3B,SAAS,MAAM,CAAC,EAAE,KAAK;AAAA,MACvB,OAAO,UAAU,MAAM,CAAC,CAAC;AAAA,IAC3B,IACA,CAAC;AAAA,EACP;AACF;",
6
- "names": []
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAsD;AAmCtD,MAAM,iBACJ;AAEF,MAAM,qBAGF;AAAA,EACF,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AACR;AAEO,MAAM,uBAAuB,CAClC,OACA,oBACwB;AACxB,MAAI,OAAO;AACT,WAAO,CAAC;AAAA,EACV;AAEA,QAAM,cAAU,YAAAA,0BAAU,gBAAgB,OAAO,CAAC,EAAE,SAAS,cAAc;AAC3E,SAAO,MAAM,KAAK,OAAO,EAAE;AAAA,IAA2B,CAAC,UACrD,OAAO,WAAW,KAAK,MAAM,CAAC,KAAK,MAAM,CAAC,KAAK,MAAM,CAAC,KAAK,MAAM,CAAC,IAC9D;AAAA,MACE,kBAAkB,mBAAmB,MAAM,CAAC,CAAa;AAAA,MACzD,MAAM,MAAM,CAAC;AAAA,MACb,YAAY,OAAO,MAAM,CAAC,CAAC;AAAA,MAC3B,UAAU,OAAO,MAAM,CAAC,CAAC;AAAA,MACzB,cAAc,OAAO,MAAM,CAAC,CAAC;AAAA,MAC7B,YAAY,OAAO,MAAM,CAAC,CAAC;AAAA,MAC3B,SAAS,MAAM,CAAC,EAAE,KAAK;AAAA,MACvB,OAAO,UAAU,MAAM,CAAC,CAAC;AAAA,IAC3B,IACA,CAAC;AAAA,EACP;AACF;",
6
+ "names": ["stripAnsi"]
7
7
  }
@@ -1,9 +1,32 @@
1
- import { createBuildkiteAnnotations } from "./buildkite/index.js";
2
- import { createGitHubAnnotations } from "./github/index.js";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var annotate_exports = {};
20
+ __export(annotate_exports, {
21
+ createAnnotations: () => createAnnotations
22
+ });
23
+ module.exports = __toCommonJS(annotate_exports);
24
+ var import_buildkite = require("./buildkite/index.js");
25
+ var import_github = require("./github/index.js");
3
26
  const createAnnotations = async (internal, eslint, prettier, tscOk, tscOutputStream) => {
4
27
  await Promise.all([
5
- createGitHubAnnotations(internal, eslint, prettier, tscOk, tscOutputStream),
6
- createBuildkiteAnnotations(
28
+ (0, import_github.createGitHubAnnotations)(internal, eslint, prettier, tscOk, tscOutputStream),
29
+ (0, import_buildkite.createBuildkiteAnnotations)(
7
30
  internal,
8
31
  eslint,
9
32
  prettier,
@@ -12,7 +35,8 @@ const createAnnotations = async (internal, eslint, prettier, tscOk, tscOutputStr
12
35
  )
13
36
  ]);
14
37
  };
15
- export {
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
16
40
  createAnnotations
17
- };
41
+ });
18
42
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cli/lint/annotate/index.ts"],
4
4
  "sourcesContent": ["import type { ESLintOutput } from '../../../cli/adapter/eslint.js';\nimport type { PrettierOutput } from '../../../cli/adapter/prettier.js';\nimport type { StreamInterceptor } from '../external.js';\nimport type { InternalLintResult } from '../internal.js';\n\nimport { createBuildkiteAnnotations } from './buildkite/index.js';\nimport { createGitHubAnnotations } from './github/index.js';\n\nexport const createAnnotations = async (\n internal: InternalLintResult,\n eslint: ESLintOutput,\n prettier: PrettierOutput,\n tscOk: boolean,\n tscOutputStream: StreamInterceptor,\n): Promise<void> => {\n await Promise.all([\n createGitHubAnnotations(internal, eslint, prettier, tscOk, tscOutputStream),\n createBuildkiteAnnotations(\n internal,\n eslint,\n prettier,\n tscOk,\n tscOutputStream,\n ),\n ]);\n};\n"],
5
- "mappings": "AAKA,SAAS,kCAAkC;AAC3C,SAAS,+BAA+B;AAEjC,MAAM,oBAAoB,OAC/B,UACA,QACA,UACA,OACA,oBACkB;AAClB,QAAM,QAAQ,IAAI;AAAA,IAChB,wBAAwB,UAAU,QAAQ,UAAU,OAAO,eAAe;AAAA,IAC1E;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,uBAA2C;AAC3C,oBAAwC;AAEjC,MAAM,oBAAoB,OAC/B,UACA,QACA,UACA,OACA,oBACkB;AAClB,QAAM,QAAQ,IAAI;AAAA,QAChB,uCAAwB,UAAU,QAAQ,UAAU,OAAO,eAAe;AAAA,QAC1E;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,16 +1,51 @@
1
- import { inspect } from "util";
2
- import { simpleGit } from "simple-git";
3
- import { isCiEnv } from "../../utils/env.js";
4
- import { createLogger, log } from "../../utils/logging.js";
5
- import { hasNpmrcSecret } from "../../utils/npmrc.js";
6
- import { throwOnTimeout } from "../../utils/wait.js";
7
- import { runESLint } from "../adapter/eslint.js";
8
- import { runPrettier } from "../adapter/prettier.js";
9
- import { createDestinationFileReader } from "../configure/analysis/project.js";
10
- import { internalLint } from "./internal.js";
11
- import * as Buildkite from "@skuba-lib/api/buildkite";
12
- import * as Git from "@skuba-lib/api/git";
13
- import * as GitHub from "@skuba-lib/api/github";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var autofix_exports = {};
30
+ __export(autofix_exports, {
31
+ AUTOFIX_IGNORE_FILES_BASE: () => AUTOFIX_IGNORE_FILES_BASE,
32
+ AUTOFIX_IGNORE_FILES_NPMRC: () => AUTOFIX_IGNORE_FILES_NPMRC,
33
+ autofix: () => autofix
34
+ });
35
+ module.exports = __toCommonJS(autofix_exports);
36
+ var import_util = require("util");
37
+ var import_simple_git = require("simple-git");
38
+ var import_env = require("../../utils/env.js");
39
+ var import_logging = require("../../utils/logging.js");
40
+ var import_npmrc = require("../../utils/npmrc.js");
41
+ var import_wait = require("../../utils/wait.js");
42
+ var import_eslint = require("../adapter/eslint.js");
43
+ var import_prettier = require("../adapter/prettier.js");
44
+ var import_project = require("../configure/analysis/project.js");
45
+ var import_internal = require("./internal.js");
46
+ var Buildkite = __toESM(require("@skuba-lib/api/buildkite"));
47
+ var Git = __toESM(require("@skuba-lib/api/git"));
48
+ var GitHub = __toESM(require("@skuba-lib/api/github"));
14
49
  const RENOVATE_DEFAULT_PREFIX = "renovate";
15
50
  const AUTOFIX_COMMIT_MESSAGE = "Run `skuba format`";
16
51
  const AUTOFIX_IGNORE_FILES_BASE = [
@@ -33,7 +68,7 @@ const shouldPush = async ({
33
68
  currentBranch,
34
69
  dir
35
70
  }) => {
36
- if (!isCiEnv()) {
71
+ if (!(0, import_env.isCiEnv)()) {
37
72
  return false;
38
73
  }
39
74
  const isDefaultBuildkiteBranch = currentBranch && [process.env.BUILDKITE_PIPELINE_DEFAULT_BRANCH, "master", "main"].includes(
@@ -48,7 +83,7 @@ const shouldPush = async ({
48
83
  await GitHub.getPullRequestNumber();
49
84
  } catch {
50
85
  const warning = "An autofix is available, but it was not pushed because an open pull request for this Renovate branch could not be found. If a pull request has since been created, retry the lint step to push the fix.";
51
- log.warn(warning);
86
+ import_logging.log.warn(warning);
52
87
  try {
53
88
  await Buildkite.annotate(Buildkite.md.terminal(warning));
54
89
  } catch {
@@ -67,8 +102,8 @@ const shouldPush = async ({
67
102
  return true;
68
103
  };
69
104
  const getIgnores = async (dir) => {
70
- const contents = await createDestinationFileReader(dir)(".npmrc");
71
- if (hasNpmrcSecret(contents ?? "")) {
105
+ const contents = await (0, import_project.createDestinationFileReader)(dir)(".npmrc");
106
+ if ((0, import_npmrc.hasNpmrcSecret)(contents ?? "")) {
72
107
  return [...AUTOFIX_IGNORE_FILES_BASE, ...AUTOFIX_IGNORE_FILES_NPMRC];
73
108
  }
74
109
  return AUTOFIX_IGNORE_FILES_BASE;
@@ -87,8 +122,8 @@ const autofix = async (params) => {
87
122
  return;
88
123
  }
89
124
  try {
90
- log.newline();
91
- log.warn(
125
+ import_logging.log.newline();
126
+ import_logging.log.warn(
92
127
  `Attempting to autofix issues (${[
93
128
  params.internal ? "skuba" : void 0,
94
129
  params.internal || params.eslint ? "ESLint" : void 0,
@@ -96,14 +131,14 @@ const autofix = async (params) => {
96
131
  // Prettier is always run
97
132
  ].filter((s) => s !== void 0).join(", ")})...`
98
133
  );
99
- const logger = createLogger({ debug: params.debug });
134
+ const logger = (0, import_logging.createLogger)({ debug: params.debug });
100
135
  if (params.internal) {
101
- await internalLint("format");
136
+ await (0, import_internal.internalLint)("format");
102
137
  }
103
138
  if (params.internal || params.eslint) {
104
- await runESLint("format", logger, params.eslintConfigFile);
139
+ await (0, import_eslint.runESLint)("format", logger, params.eslintConfigFile);
105
140
  }
106
- await runPrettier("format", logger);
141
+ await (0, import_prettier.runPrettier)("format", logger);
107
142
  if (process.env.GITHUB_ACTIONS) {
108
143
  const ref2 = await Git.commitAllChanges({
109
144
  dir,
@@ -111,20 +146,20 @@ const autofix = async (params) => {
111
146
  ignore: await getIgnores(dir)
112
147
  });
113
148
  if (!ref2) {
114
- return log.warn("No autofixes detected.");
149
+ return import_logging.log.warn("No autofixes detected.");
115
150
  }
116
- await throwOnTimeout(simpleGit().push(), { s: 30 });
117
- log.warn(`Pushed fix commit ${ref2}.`);
151
+ await (0, import_wait.throwOnTimeout)((0, import_simple_git.simpleGit)().push(), { s: 30 });
152
+ import_logging.log.warn(`Pushed fix commit ${ref2}.`);
118
153
  return;
119
154
  }
120
155
  if (!currentBranch) {
121
- log.warn("Could not determine the current branch.");
122
- log.warn(
156
+ import_logging.log.warn("Could not determine the current branch.");
157
+ import_logging.log.warn(
123
158
  "Please propagate BUILDKITE_BRANCH, GITHUB_HEAD_REF, GITHUB_REF_NAME, or the .git directory to your container."
124
159
  );
125
160
  return;
126
161
  }
127
- const ref = await throwOnTimeout(
162
+ const ref = await (0, import_wait.throwOnTimeout)(
128
163
  GitHub.uploadAllFileChanges({
129
164
  branch: currentBranch,
130
165
  dir,
@@ -134,22 +169,23 @@ const autofix = async (params) => {
134
169
  { s: 30 }
135
170
  );
136
171
  if (!ref) {
137
- return log.warn("No autofixes detected.");
172
+ return import_logging.log.warn("No autofixes detected.");
138
173
  }
139
- log.warn(`Pushed fix commit ${ref}.`);
174
+ import_logging.log.warn(`Pushed fix commit ${ref}.`);
140
175
  } catch (err) {
141
- log.warn(log.bold("Failed to push fix commit."));
142
- log.warn(
143
- log.bold(
176
+ import_logging.log.warn(import_logging.log.bold("Failed to push fix commit."));
177
+ import_logging.log.warn(
178
+ import_logging.log.bold(
144
179
  "Does your CI environment have write access to your Git repository?"
145
180
  )
146
181
  );
147
- log.subtle(inspect(err));
182
+ import_logging.log.subtle((0, import_util.inspect)(err));
148
183
  }
149
184
  };
150
- export {
185
+ // Annotate the CommonJS export names for ESM import in node:
186
+ 0 && (module.exports = {
151
187
  AUTOFIX_IGNORE_FILES_BASE,
152
188
  AUTOFIX_IGNORE_FILES_NPMRC,
153
189
  autofix
154
- };
190
+ });
155
191
  //# sourceMappingURL=autofix.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/lint/autofix.ts"],
4
4
  "sourcesContent": ["import { inspect } from 'util';\n\nimport { simpleGit } from 'simple-git';\n\nimport { isCiEnv } from '../../utils/env.js';\nimport { createLogger, log } from '../../utils/logging.js';\nimport { hasNpmrcSecret } from '../../utils/npmrc.js';\nimport { throwOnTimeout } from '../../utils/wait.js';\nimport { runESLint } from '../adapter/eslint.js';\nimport { runPrettier } from '../adapter/prettier.js';\nimport { createDestinationFileReader } from '../configure/analysis/project.js';\n\nimport { internalLint } from './internal.js';\nimport type { Input } from './types.js';\n\nimport * as Buildkite from '@skuba-lib/api/buildkite';\nimport * as Git from '@skuba-lib/api/git';\nimport * as GitHub from '@skuba-lib/api/github';\n\nconst RENOVATE_DEFAULT_PREFIX = 'renovate';\n\nconst AUTOFIX_COMMIT_MESSAGE = 'Run `skuba format`';\n\nexport const AUTOFIX_IGNORE_FILES_BASE: Git.ChangedFile[] = [\n {\n path: 'Dockerfile-incunabulum',\n state: 'added',\n },\n];\n\nexport const AUTOFIX_IGNORE_FILES_NPMRC: Git.ChangedFile[] = [\n {\n path: '.npmrc',\n state: 'added',\n },\n {\n path: '.npmrc',\n state: 'modified',\n },\n];\n\nconst shouldPush = async ({\n currentBranch,\n dir,\n}: {\n currentBranch?: string;\n dir: string;\n}) => {\n if (!isCiEnv()) {\n // We're not running in a CI environment so we don't need to push autofixes.\n // Ideally we'd drive this off of repository write permissions, but that is\n // non-trivial to infer without attempting an actual write.\n return false;\n }\n\n const isDefaultBuildkiteBranch =\n currentBranch &&\n [process.env.BUILDKITE_PIPELINE_DEFAULT_BRANCH, 'master', 'main'].includes(\n currentBranch,\n );\n\n const isProtectedGitHubBranch = process.env.GITHUB_REF_PROTECTED === 'true';\n\n if (isDefaultBuildkiteBranch || isProtectedGitHubBranch) {\n // The current branch is a protected branch.\n // We respect GitHub Flow; avoid pushing directly to the default branch.\n return false;\n }\n\n if (currentBranch?.startsWith(RENOVATE_DEFAULT_PREFIX)) {\n try {\n await GitHub.getPullRequestNumber();\n } catch {\n const warning =\n 'An autofix is available, but it was not pushed because an open pull request for this Renovate branch could not be found. If a pull request has since been created, retry the lint step to push the fix.';\n log.warn(warning);\n try {\n await Buildkite.annotate(Buildkite.md.terminal(warning));\n } catch {}\n\n return false;\n }\n }\n\n let headCommitMessage;\n try {\n headCommitMessage = await Git.getHeadCommitMessage({ dir });\n } catch {}\n\n if (headCommitMessage?.startsWith(AUTOFIX_COMMIT_MESSAGE)) {\n // Short circuit when the head commit appears to be one of our autofixes.\n // Repeating the same operation is unlikely to correct outstanding issues.\n return false;\n }\n\n // Allow the push attempt to go ahead if our guards have been cleared.\n return true;\n};\n\nconst getIgnores = async (dir: string): Promise<Git.ChangedFile[]> => {\n const contents = await createDestinationFileReader(dir)('.npmrc');\n\n // If an .npmrc has secrets, we need to ignore it\n if (hasNpmrcSecret(contents ?? '')) {\n return [...AUTOFIX_IGNORE_FILES_BASE, ...AUTOFIX_IGNORE_FILES_NPMRC];\n }\n\n return AUTOFIX_IGNORE_FILES_BASE;\n};\n\ninterface AutofixParameters {\n debug: Input['debug'];\n\n eslint: boolean;\n prettier: boolean;\n internal: boolean;\n\n eslintConfigFile?: string;\n}\n\nexport const autofix = async (params: AutofixParameters): Promise<void> => {\n const dir = process.cwd();\n\n if (!params.eslint && !params.prettier && !params.internal) {\n return;\n }\n\n let currentBranch;\n try {\n currentBranch = await Git.currentBranch({ dir });\n } catch {}\n\n if (!(await shouldPush({ currentBranch, dir }))) {\n return;\n }\n\n try {\n log.newline();\n\n log.warn(\n `Attempting to autofix issues (${[\n params.internal ? 'skuba' : undefined,\n params.internal || params.eslint ? 'ESLint' : undefined,\n 'Prettier', // Prettier is always run\n ]\n .filter((s) => s !== undefined)\n .join(', ')})...`,\n );\n\n const logger = createLogger({ debug: params.debug });\n\n if (params.internal) {\n await internalLint('format');\n }\n\n if (params.internal || params.eslint) {\n await runESLint('format', logger, params.eslintConfigFile);\n }\n\n // Unconditionally re-run Prettier; reaching here means we have pre-existing\n // format violations or may have created new ones through ESLint/internal fixes.\n await runPrettier('format', logger);\n\n if (process.env.GITHUB_ACTIONS) {\n // GitHub runners have Git installed locally\n const ref = await Git.commitAllChanges({\n dir,\n message: AUTOFIX_COMMIT_MESSAGE,\n\n ignore: await getIgnores(dir),\n });\n\n if (!ref) {\n return log.warn('No autofixes detected.');\n }\n\n await throwOnTimeout(simpleGit().push(), { s: 30 });\n log.warn(`Pushed fix commit ${ref}.`);\n return;\n }\n\n // Other CI Environments, use GitHub API\n if (!currentBranch) {\n log.warn('Could not determine the current branch.');\n log.warn(\n 'Please propagate BUILDKITE_BRANCH, GITHUB_HEAD_REF, GITHUB_REF_NAME, or the .git directory to your container.',\n );\n return;\n }\n\n const ref = await throwOnTimeout(\n GitHub.uploadAllFileChanges({\n branch: currentBranch,\n dir,\n messageHeadline: AUTOFIX_COMMIT_MESSAGE,\n\n ignore: await getIgnores(dir),\n }),\n { s: 30 },\n );\n\n if (!ref) {\n return log.warn('No autofixes detected.');\n }\n\n log.warn(`Pushed fix commit ${ref}.`);\n } catch (err) {\n log.warn(log.bold('Failed to push fix commit.'));\n log.warn(\n log.bold(\n 'Does your CI environment have write access to your Git repository?',\n ),\n );\n log.subtle(inspect(err));\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAExB,SAAS,iBAAiB;AAE1B,SAAS,eAAe;AACxB,SAAS,cAAc,WAAW;AAClC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,mCAAmC;AAE5C,SAAS,oBAAoB;AAG7B,YAAY,eAAe;AAC3B,YAAY,SAAS;AACrB,YAAY,YAAY;AAExB,MAAM,0BAA0B;AAEhC,MAAM,yBAAyB;AAExB,MAAM,4BAA+C;AAAA,EAC1D;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF;AAEO,MAAM,6BAAgD;AAAA,EAC3D;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF;AAEA,MAAM,aAAa,OAAO;AAAA,EACxB;AAAA,EACA;AACF,MAGM;AACJ,MAAI,CAAC,QAAQ,GAAG;AAId,WAAO;AAAA,EACT;AAEA,QAAM,2BACJ,iBACA,CAAC,QAAQ,IAAI,mCAAmC,UAAU,MAAM,EAAE;AAAA,IAChE;AAAA,EACF;AAEF,QAAM,0BAA0B,QAAQ,IAAI,yBAAyB;AAErE,MAAI,4BAA4B,yBAAyB;AAGvD,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,WAAW,uBAAuB,GAAG;AACtD,QAAI;AACF,YAAM,OAAO,qBAAqB;AAAA,IACpC,QAAQ;AACN,YAAM,UACJ;AACF,UAAI,KAAK,OAAO;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AAAA,IACF;AAGA,QAAI,CAAC,eAAe;AAClB,yBAAI,KAAK,yCAAyC;AAClD,yBAAI;AAAA,QACF;AAAA,MACF;AACA;AAAA,IACF;AAEA,UAAM,MAAM,UAAM;AAAA,MAChB,OAAO,qBAAqB;AAAA,QAC1B,QAAQ;AAAA,QACR;AAAA,QACA,iBAAiB;AAAA,QAEjB,QAAQ,MAAM,WAAW,GAAG;AAAA,MAC9B,CAAC;AAAA,MACD,EAAE,GAAG,GAAG;AAAA,IACV;AAEA,QAAI,CAAC,KAAK;AACR,aAAO,mBAAI,KAAK,wBAAwB;AAAA,IAC1C;AAEA,uBAAI,KAAK,qBAAqB,GAAG,GAAG;AAAA,EACtC,SAAS,KAAK;AACZ,uBAAI,KAAK,mBAAI,KAAK,4BAA4B,CAAC;AAC/C,uBAAI;AAAA,MACF,mBAAI;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AAAA,EACzB;AACF;",
6
6
  "names": ["ref"]
7
7
  }
@@ -1,27 +1,62 @@
1
- import { styleText } from "node:util";
2
- import path from "path";
3
- import { isMainThread } from "worker_threads";
4
- import { createLogger } from "../../utils/logging.js";
5
- import { execWorkerThread, postWorkerOutput } from "../../utils/worker.js";
6
- import { runESLint } from "../adapter/eslint.js";
7
- const LOG_PREFIX = styleText("magenta", "ESLint \u2502");
8
- const runESLintInCurrentThread = ({ debug, eslintConfigFile }) => runESLint(
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var eslint_exports = {};
30
+ __export(eslint_exports, {
31
+ runESLintInCurrentThread: () => runESLintInCurrentThread,
32
+ runESLintInWorkerThread: () => runESLintInWorkerThread
33
+ });
34
+ module.exports = __toCommonJS(eslint_exports);
35
+ var import_node_util = require("node:util");
36
+ var import_path = __toESM(require("path"));
37
+ var import_worker_threads = require("worker_threads");
38
+ var import_logging = require("../../utils/logging.js");
39
+ var import_worker = require("../../utils/worker.js");
40
+ var import_eslint = require("../adapter/eslint.js");
41
+ const LOG_PREFIX = (0, import_node_util.styleText)("magenta", "ESLint \u2502");
42
+ const runESLintInCurrentThread = ({ debug, eslintConfigFile }) => (0, import_eslint.runESLint)(
9
43
  "lint",
10
- createLogger({ debug, prefixes: [LOG_PREFIX] }),
44
+ (0, import_logging.createLogger)({ debug, prefixes: [LOG_PREFIX] }),
11
45
  eslintConfigFile
12
46
  );
13
- const runESLintInWorkerThread = (input) => execWorkerThread(
14
- path.posix.join(import.meta.dirname, "eslint.js"),
47
+ const runESLintInWorkerThread = (input) => (0, import_worker.execWorkerThread)(
48
+ import_path.default.posix.join(__dirname, "eslint.js"),
15
49
  input
16
50
  );
17
- if (!isMainThread) {
18
- postWorkerOutput(
51
+ if (!import_worker_threads.isMainThread) {
52
+ (0, import_worker.postWorkerOutput)(
19
53
  runESLintInCurrentThread,
20
- createLogger({ debug: false, prefixes: [LOG_PREFIX] })
54
+ (0, import_logging.createLogger)({ debug: false, prefixes: [LOG_PREFIX] })
21
55
  );
22
56
  }
23
- export {
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
24
59
  runESLintInCurrentThread,
25
60
  runESLintInWorkerThread
26
- };
61
+ });
27
62
  //# sourceMappingURL=eslint.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/lint/eslint.ts"],
4
- "sourcesContent": ["import { styleText } from 'node:util';\nimport path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport { createLogger } from '../../utils/logging.js';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker.js';\nimport { type ESLintOutput, runESLint } from '../adapter/eslint.js';\n\nimport type { Input } from './types.js';\n\nconst LOG_PREFIX = styleText('magenta', 'ESLint \u2502');\n\nexport const runESLintInCurrentThread = ({ debug, eslintConfigFile }: Input) =>\n runESLint(\n 'lint',\n createLogger({ debug, prefixes: [LOG_PREFIX] }),\n eslintConfigFile,\n );\n\nexport const runESLintInWorkerThread = (input: Input) =>\n execWorkerThread<Input, ESLintOutput>(\n path.posix.join(import.meta.dirname, 'eslint.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(\n runESLintInCurrentThread,\n createLogger({ debug: false, prefixes: [LOG_PREFIX] }),\n );\n}\n"],
5
- "mappings": "AAAA,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AACjB,SAAS,oBAAoB;AAE7B,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB,wBAAwB;AACnD,SAA4B,iBAAiB;AAI7C,MAAM,aAAa,UAAU,WAAW,iBAAY;AAE7C,MAAM,2BAA2B,CAAC,EAAE,OAAO,iBAAiB,MACjE;AAAA,EACE;AAAA,EACA,aAAa,EAAE,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EAC9C;AACF;AAEK,MAAM,0BAA0B,CAAC,UACtC;AAAA,EACE,KAAK,MAAM,KAAK,YAAY,SAAS,WAAW;AAAA,EAChD;AACF;AAEF,IAAI,CAAC,cAAc;AACjB;AAAA,IACE;AAAA,IACA,aAAa,EAAE,OAAO,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EACvD;AACF;",
6
- "names": []
4
+ "sourcesContent": ["import { styleText } from 'node:util';\nimport path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport { createLogger } from '../../utils/logging.js';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker.js';\nimport { type ESLintOutput, runESLint } from '../adapter/eslint.js';\n\nimport type { Input } from './types.js';\n\nconst LOG_PREFIX = styleText('magenta', 'ESLint \u2502');\n\nexport const runESLintInCurrentThread = ({ debug, eslintConfigFile }: Input) =>\n runESLint(\n 'lint',\n createLogger({ debug, prefixes: [LOG_PREFIX] }),\n eslintConfigFile,\n );\n\nexport const runESLintInWorkerThread = (input: Input) =>\n execWorkerThread<Input, ESLintOutput>(\n path.posix.join(__dirname, 'eslint.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(\n runESLintInCurrentThread,\n createLogger({ debug: false, prefixes: [LOG_PREFIX] }),\n );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAC1B,kBAAiB;AACjB,4BAA6B;AAE7B,qBAA6B;AAC7B,oBAAmD;AACnD,oBAA6C;AAI7C,MAAM,iBAAa,4BAAU,WAAW,iBAAY;AAE7C,MAAM,2BAA2B,CAAC,EAAE,OAAO,iBAAiB,UACjE;AAAA,EACE;AAAA,MACA,6BAAa,EAAE,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EAC9C;AACF;AAEK,MAAM,0BAA0B,CAAC,cACtC;AAAA,EACE,YAAAA,QAAK,MAAM,KAAK,WAAW,WAAW;AAAA,EACtC;AACF;AAEF,IAAI,CAAC,oCAAc;AACjB;AAAA,IACE;AAAA,QACA,6BAAa,EAAE,OAAO,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EACvD;AACF;",
6
+ "names": ["path"]
7
7
  }
@@ -1,12 +1,43 @@
1
- import stream from "stream";
2
- import { runESLintInCurrentThread, runESLintInWorkerThread } from "./eslint.js";
3
- import {
4
- runPrettierInCurrentThread,
5
- runPrettierInWorkerThread
6
- } from "./prettier.js";
7
- import { runTscInNewProcess } from "./tsc.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var external_exports = {};
30
+ __export(external_exports, {
31
+ StreamInterceptor: () => StreamInterceptor,
32
+ externalLint: () => externalLint
33
+ });
34
+ module.exports = __toCommonJS(external_exports);
35
+ var import_stream = __toESM(require("stream"));
36
+ var import_eslint = require("./eslint.js");
37
+ var import_prettier = require("./prettier.js");
38
+ var import_tsc = require("./tsc.js");
8
39
  const tscPrefixRegex = /^(.*?tsc\s+│.*?\s)/gm;
9
- class StreamInterceptor extends stream.Transform {
40
+ class StreamInterceptor extends import_stream.default.Transform {
10
41
  chunks = [];
11
42
  output() {
12
43
  return Buffer.concat(this.chunks).toString().replace(tscPrefixRegex, "");
@@ -18,22 +49,22 @@ class StreamInterceptor extends stream.Transform {
18
49
  }
19
50
  const lintConcurrently = async ({ tscOutputStream, ...input }) => {
20
51
  const [eslint, prettier, tscOk] = await Promise.all([
21
- runESLintInWorkerThread(input),
22
- runPrettierInWorkerThread(input),
23
- runTscInNewProcess({ ...input, tscOutputStream })
52
+ (0, import_eslint.runESLintInWorkerThread)(input),
53
+ (0, import_prettier.runPrettierInWorkerThread)(input),
54
+ (0, import_tsc.runTscInNewProcess)({ ...input, tscOutputStream })
24
55
  ]);
25
56
  return { eslint, prettier, tscOk };
26
57
  };
27
58
  const lintSerially = async ({ tscOutputStream, ...input }) => {
28
- const eslint = await runESLintInWorkerThread(input);
29
- const prettier = await runPrettierInWorkerThread(input);
30
- const tscOk = await runTscInNewProcess({ ...input, tscOutputStream });
59
+ const eslint = await (0, import_eslint.runESLintInWorkerThread)(input);
60
+ const prettier = await (0, import_prettier.runPrettierInWorkerThread)(input);
61
+ const tscOk = await (0, import_tsc.runTscInNewProcess)({ ...input, tscOutputStream });
31
62
  return { eslint, prettier, tscOk };
32
63
  };
33
64
  const lintSeriallyWithoutWorkerThreads = async (input) => {
34
- const eslint = await runESLintInCurrentThread(input);
35
- const prettier = await runPrettierInCurrentThread(input);
36
- const tscOk = await runTscInNewProcess(input);
65
+ const eslint = await (0, import_eslint.runESLintInCurrentThread)(input);
66
+ const prettier = await (0, import_prettier.runPrettierInCurrentThread)(input);
67
+ const tscOk = await (0, import_tsc.runTscInNewProcess)(input);
37
68
  return { eslint, prettier, tscOk };
38
69
  };
39
70
  const selectLintFunction = (input) => {
@@ -55,8 +86,9 @@ const externalLint = async (input) => {
55
86
  tscOutputStream
56
87
  };
57
88
  };
58
- export {
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
59
91
  StreamInterceptor,
60
92
  externalLint
61
- };
93
+ });
62
94
  //# sourceMappingURL=external.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/lint/external.ts"],
4
4
  "sourcesContent": ["import stream from 'stream';\n\nimport { runESLintInCurrentThread, runESLintInWorkerThread } from './eslint.js';\nimport {\n runPrettierInCurrentThread,\n runPrettierInWorkerThread,\n} from './prettier.js';\nimport { runTscInNewProcess } from './tsc.js';\nimport type { Input } from './types.js';\n\nconst tscPrefixRegex = /^(.*?tsc\\s+\u2502.*?\\s)/gm;\n\nexport class StreamInterceptor extends stream.Transform {\n private chunks: Uint8Array[] = [];\n\n public output() {\n return Buffer.concat(this.chunks).toString().replace(tscPrefixRegex, '');\n }\n\n _transform(\n chunk: Uint8Array,\n _encoding: BufferEncoding,\n callback: stream.TransformCallback,\n ) {\n this.chunks.push(chunk);\n\n callback(null, chunk);\n }\n}\n\nconst lintConcurrently = async ({ tscOutputStream, ...input }: Input) => {\n const [eslint, prettier, tscOk] = await Promise.all([\n runESLintInWorkerThread(input),\n runPrettierInWorkerThread(input),\n runTscInNewProcess({ ...input, tscOutputStream }),\n ]);\n\n return { eslint, prettier, tscOk };\n};\n\n/**\n * Run linting tools `--serial`ly for resource-constrained environments.\n *\n * Note that we still run ESLint and Prettier in worker threads as a\n * counterintuitive optimisation. Memory can be more readily freed on worker\n * thread exit, which isn't as easy with a monolithic main thread.\n */\nconst lintSerially = async ({ tscOutputStream, ...input }: Input) => {\n const eslint = await runESLintInWorkerThread(input);\n const prettier = await runPrettierInWorkerThread(input);\n const tscOk = await runTscInNewProcess({ ...input, tscOutputStream });\n\n return { eslint, prettier, tscOk };\n};\n\nconst lintSeriallyWithoutWorkerThreads = async (input: Input) => {\n const eslint = await runESLintInCurrentThread(input);\n const prettier = await runPrettierInCurrentThread(input);\n const tscOk = await runTscInNewProcess(input);\n\n return { eslint, prettier, tscOk };\n};\n\nconst selectLintFunction = (input: Input) => {\n if (!input.workerThreads) {\n return lintSeriallyWithoutWorkerThreads;\n }\n\n // `--debug` implies `--serial`.\n const isSerial = input.debug || input.serial;\n\n return isSerial ? lintSerially : lintConcurrently;\n};\n\nexport const externalLint = async (input: Input) => {\n const lint = selectLintFunction(input);\n\n const tscOutputStream = new StreamInterceptor();\n tscOutputStream.pipe(input.tscOutputStream ?? process.stdout);\n\n const { eslint, prettier, tscOk } = await lint({ ...input, tscOutputStream });\n\n return {\n eslint,\n prettier,\n tscOk,\n tscOutputStream,\n };\n};\n"],
5
- "mappings": "AAAA,OAAO,YAAY;AAEnB,SAAS,0BAA0B,+BAA+B;AAClE;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AAGnC,MAAM,iBAAiB;AAEhB,MAAM,0BAA0B,OAAO,UAAU;AAAA,EAC9C,SAAuB,CAAC;AAAA,EAEzB,SAAS;AACd,WAAO,OAAO,OAAO,KAAK,MAAM,EAAE,SAAS,EAAE,QAAQ,gBAAgB,EAAE;AAAA,EACzE;AAAA,EAEA,WACE,OACA,WACA,UACA;AACA,SAAK,OAAO,KAAK,KAAK;AAEtB,aAAS,MAAM,KAAK;AAAA,EACtB;AACF;AAEA,MAAM,mBAAmB,OAAO,EAAE,iBAAiB,GAAG,MAAM,MAAa;AACvE,QAAM,CAAC,QAAQ,UAAU,KAAK,IAAI,MAAM,QAAQ,IAAI;AAAA,IAClD,wBAAwB,KAAK;AAAA,IAC7B,0BAA0B,KAAK;AAAA,IAC/B,mBAAmB,EAAE,GAAG,OAAO,gBAAgB,CAAC;AA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