skuba 14.0.0-migrate-to-inquirer-20251031055743 → 14.0.0-replace-global-vars-20251117052457

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 (384) hide show
  1. package/config/eslint.js +1 -1
  2. package/config/prettier.d.ts +8 -4
  3. package/config/prettier.js +10 -2
  4. package/lib/cli/adapter/eslint.js +11 -45
  5. package/lib/cli/adapter/eslint.js.map +3 -3
  6. package/lib/cli/adapter/prettier.js +39 -67
  7. package/lib/cli/adapter/prettier.js.map +2 -2
  8. package/lib/cli/build/args.js +8 -42
  9. package/lib/cli/build/args.js.map +2 -2
  10. package/lib/cli/build/assets.d.ts +3 -2
  11. package/lib/cli/build/assets.js +28 -60
  12. package/lib/cli/build/assets.js.map +3 -3
  13. package/lib/cli/build/esbuild.js +21 -45
  14. package/lib/cli/build/esbuild.js.map +2 -2
  15. package/lib/cli/build/index.js +21 -55
  16. package/lib/cli/build/index.js.map +3 -3
  17. package/lib/cli/build/tsc.js +23 -61
  18. package/lib/cli/build/tsc.js.map +3 -3
  19. package/lib/cli/buildPackage/index.js +8 -32
  20. package/lib/cli/buildPackage/index.js.map +1 -1
  21. package/lib/cli/configure/analyseConfiguration.js +16 -50
  22. package/lib/cli/configure/analyseConfiguration.js.map +2 -2
  23. package/lib/cli/configure/analyseDependencies.d.ts +1 -1
  24. package/lib/cli/configure/analyseDependencies.js +25 -59
  25. package/lib/cli/configure/analyseDependencies.js.map +3 -3
  26. package/lib/cli/configure/analysis/diff.js +5 -39
  27. package/lib/cli/configure/analysis/diff.js.map +3 -3
  28. package/lib/cli/configure/analysis/files.js +8 -42
  29. package/lib/cli/configure/analysis/files.js.map +2 -2
  30. package/lib/cli/configure/analysis/git.js +12 -46
  31. package/lib/cli/configure/analysis/git.js.map +2 -2
  32. package/lib/cli/configure/analysis/package.d.ts +2 -3
  33. package/lib/cli/configure/analysis/package.js +10 -45
  34. package/lib/cli/configure/analysis/package.js.map +3 -3
  35. package/lib/cli/configure/analysis/project.js +18 -50
  36. package/lib/cli/configure/analysis/project.js.map +2 -2
  37. package/lib/cli/configure/dependencies/index.js +7 -35
  38. package/lib/cli/configure/dependencies/index.js.map +1 -1
  39. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +4 -28
  40. package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
  41. package/lib/cli/configure/dependencies/seekKoala.js +4 -28
  42. package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
  43. package/lib/cli/configure/dependencies/skuba.js +4 -28
  44. package/lib/cli/configure/dependencies/skuba.js.map +1 -1
  45. package/lib/cli/configure/dependencies/skubaDeps.js +2 -26
  46. package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
  47. package/lib/cli/configure/dependencies/skubaDive.js +4 -29
  48. package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
  49. package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
  50. package/lib/cli/configure/ensureTemplateCompletion.js +35 -60
  51. package/lib/cli/configure/ensureTemplateCompletion.js.map +3 -3
  52. package/lib/cli/configure/getEntryPoint.d.ts +1 -1
  53. package/lib/cli/configure/getEntryPoint.js +14 -48
  54. package/lib/cli/configure/getEntryPoint.js.map +3 -3
  55. package/lib/cli/configure/getProjectType.d.ts +1 -1
  56. package/lib/cli/configure/getProjectType.js +14 -35
  57. package/lib/cli/configure/getProjectType.js.map +2 -2
  58. package/lib/cli/configure/index.js +50 -84
  59. package/lib/cli/configure/index.js.map +3 -3
  60. package/lib/cli/configure/modules/eslint.js +10 -34
  61. package/lib/cli/configure/modules/eslint.js.map +1 -1
  62. package/lib/cli/configure/modules/ignore.js +8 -32
  63. package/lib/cli/configure/modules/ignore.js.map +1 -1
  64. package/lib/cli/configure/modules/index.js +18 -44
  65. package/lib/cli/configure/modules/index.js.map +2 -2
  66. package/lib/cli/configure/modules/nodemon.js +4 -28
  67. package/lib/cli/configure/modules/nodemon.js.map +1 -1
  68. package/lib/cli/configure/modules/package.js +10 -34
  69. package/lib/cli/configure/modules/package.js.map +1 -1
  70. package/lib/cli/configure/modules/prettier.js +11 -35
  71. package/lib/cli/configure/modules/prettier.js.map +1 -1
  72. package/lib/cli/configure/modules/renovate.js +17 -40
  73. package/lib/cli/configure/modules/renovate.js.map +2 -2
  74. package/lib/cli/configure/modules/serverless.js +2 -26
  75. package/lib/cli/configure/modules/serverless.js.map +1 -1
  76. package/lib/cli/configure/modules/tslint.js +4 -28
  77. package/lib/cli/configure/modules/tslint.js.map +1 -1
  78. package/lib/cli/configure/processing/configFile.js +3 -39
  79. package/lib/cli/configure/processing/configFile.js.map +1 -1
  80. package/lib/cli/configure/processing/deleteFiles.js +2 -26
  81. package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
  82. package/lib/cli/configure/processing/javascript.js +2 -27
  83. package/lib/cli/configure/processing/javascript.js.map +1 -1
  84. package/lib/cli/configure/processing/json.js +6 -31
  85. package/lib/cli/configure/processing/json.js.map +1 -1
  86. package/lib/cli/configure/processing/loadFiles.js +2 -26
  87. package/lib/cli/configure/processing/loadFiles.js.map +1 -1
  88. package/lib/cli/configure/processing/module.js +4 -28
  89. package/lib/cli/configure/processing/module.js.map +1 -1
  90. package/lib/cli/configure/processing/package.d.ts +1 -67
  91. package/lib/cli/configure/processing/package.js +8 -45
  92. package/lib/cli/configure/processing/package.js.map +3 -3
  93. package/lib/cli/configure/processing/prettier.js +4 -38
  94. package/lib/cli/configure/processing/prettier.js.map +2 -2
  95. package/lib/cli/configure/processing/record.js +5 -41
  96. package/lib/cli/configure/processing/record.js.map +2 -2
  97. package/lib/cli/configure/processing/typescript.js +26 -63
  98. package/lib/cli/configure/processing/typescript.js.map +2 -2
  99. package/lib/cli/configure/types.d.ts +15 -4
  100. package/lib/cli/configure/types.js +0 -16
  101. package/lib/cli/configure/types.js.map +3 -3
  102. package/lib/cli/format/index.js +20 -54
  103. package/lib/cli/format/index.js.map +3 -3
  104. package/lib/cli/help/index.js +6 -30
  105. package/lib/cli/help/index.js.map +1 -1
  106. package/lib/cli/init/getConfig.d.ts +1 -1
  107. package/lib/cli/init/getConfig.js +89 -118
  108. package/lib/cli/init/getConfig.js.map +3 -3
  109. package/lib/cli/init/git.js +16 -51
  110. package/lib/cli/init/git.js.map +2 -2
  111. package/lib/cli/init/index.js +67 -98
  112. package/lib/cli/init/index.js.map +2 -2
  113. package/lib/cli/init/prompts.js +21 -42
  114. package/lib/cli/init/prompts.js.map +1 -1
  115. package/lib/cli/init/types.js +7 -41
  116. package/lib/cli/init/types.js.map +1 -1
  117. package/lib/cli/init/validation.js +2 -30
  118. package/lib/cli/init/validation.js.map +1 -1
  119. package/lib/cli/init/writePackageJson.js +8 -42
  120. package/lib/cli/init/writePackageJson.js.map +2 -2
  121. package/lib/cli/lint/annotate/buildkite/eslint.js +3 -37
  122. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  123. package/lib/cli/lint/annotate/buildkite/index.js +11 -45
  124. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  125. package/lib/cli/lint/annotate/buildkite/internal.js +3 -37
  126. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  127. package/lib/cli/lint/annotate/buildkite/prettier.js +3 -37
  128. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  129. package/lib/cli/lint/annotate/buildkite/tsc.js +3 -37
  130. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  131. package/lib/cli/lint/annotate/github/eslint.js +2 -26
  132. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  133. package/lib/cli/lint/annotate/github/index.js +11 -45
  134. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  135. package/lib/cli/lint/annotate/github/internal.js +2 -26
  136. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  137. package/lib/cli/lint/annotate/github/prettier.js +2 -26
  138. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  139. package/lib/cli/lint/annotate/github/tsc.js +4 -28
  140. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  141. package/lib/cli/lint/annotate/index.js +6 -30
  142. package/lib/cli/lint/annotate/index.js.map +1 -1
  143. package/lib/cli/lint/autofix.js +37 -73
  144. package/lib/cli/lint/autofix.js.map +1 -1
  145. package/lib/cli/lint/eslint.js +16 -51
  146. package/lib/cli/lint/eslint.js.map +3 -3
  147. package/lib/cli/lint/external.js +19 -51
  148. package/lib/cli/lint/external.js.map +2 -2
  149. package/lib/cli/lint/index.js +26 -52
  150. package/lib/cli/lint/index.js.map +2 -2
  151. package/lib/cli/lint/internal.js +20 -52
  152. package/lib/cli/lint/internal.js.map +3 -3
  153. package/lib/cli/lint/internalLints/detectBadCodeowners.js +8 -33
  154. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  155. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +12 -48
  156. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +3 -3
  157. package/lib/cli/lint/internalLints/patchRenovateConfig.js +21 -55
  158. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  159. package/lib/cli/lint/internalLints/refreshConfigFiles.js +33 -66
  160. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
  161. package/lib/cli/lint/internalLints/upgrade/index.d.ts +1 -1
  162. package/lib/cli/lint/internalLints/upgrade/index.js +23 -56
  163. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  164. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +4 -28
  165. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  166. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +11 -45
  167. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  168. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +6 -30
  169. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  170. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +37 -65
  171. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +3 -3
  172. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +11 -46
  173. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  174. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +4 -28
  175. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  176. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +23 -59
  177. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  178. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +4 -28
  179. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  180. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +11 -46
  181. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  182. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +6 -30
  183. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  184. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +11 -46
  185. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +11 -46
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +4 -28
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +11 -46
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +29 -67
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +10 -34
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +11 -45
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +4 -0
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +18 -63
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +15 -50
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.d.ts +2 -0
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +11 -0
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +7 -0
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +5 -0
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +72 -0
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +7 -0
  209. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +17 -51
  210. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  211. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +10 -34
  212. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  213. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +10 -44
  214. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  215. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +12 -46
  216. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  217. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +4 -28
  218. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  219. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +15 -49
  220. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  221. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +11 -45
  222. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  223. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +10 -39
  224. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
  225. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +11 -45
  226. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  227. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +11 -45
  228. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  229. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +13 -47
  230. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  231. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +4 -28
  232. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  233. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +11 -45
  234. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  235. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +4 -28
  236. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +1 -1
  237. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +8 -32
  238. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +1 -1
  239. package/lib/cli/lint/prettier.js +15 -50
  240. package/lib/cli/lint/prettier.js.map +3 -3
  241. package/lib/cli/lint/tsc.js +4 -28
  242. package/lib/cli/lint/tsc.js.map +1 -1
  243. package/lib/cli/lint/types.js +0 -16
  244. package/lib/cli/lint/types.js.map +3 -3
  245. package/lib/cli/migrate/index.js +10 -34
  246. package/lib/cli/migrate/index.js.map +1 -1
  247. package/lib/cli/migrate/nodeVersion/checks.js +24 -61
  248. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  249. package/lib/cli/migrate/nodeVersion/index.js +25 -55
  250. package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
  251. package/lib/cli/node/index.js +20 -57
  252. package/lib/cli/node/index.js.map +3 -3
  253. package/lib/cli/release/index.js +4 -28
  254. package/lib/cli/release/index.js.map +1 -1
  255. package/lib/cli/start/index.js +16 -50
  256. package/lib/cli/start/index.js.map +3 -3
  257. package/lib/cli/test/index.js +4 -44
  258. package/lib/cli/test/index.js.map +2 -2
  259. package/lib/cli/version/index.js +6 -30
  260. package/lib/cli/version/index.js.map +1 -1
  261. package/lib/eslint.d.js +0 -1
  262. package/lib/index.d.ts +0 -1
  263. package/lib/index.js +6 -46
  264. package/lib/index.js.map +2 -2
  265. package/lib/skuba.js +26 -45
  266. package/lib/skuba.js.map +3 -3
  267. package/lib/utils/args.js +6 -43
  268. package/lib/utils/args.js.map +2 -2
  269. package/lib/utils/command.js +4 -42
  270. package/lib/utils/command.js.map +3 -3
  271. package/lib/utils/copy.js +20 -57
  272. package/lib/utils/copy.js.map +2 -2
  273. package/lib/utils/dir.js +32 -72
  274. package/lib/utils/dir.js.map +2 -2
  275. package/lib/utils/env.js +2 -26
  276. package/lib/utils/env.js.map +1 -1
  277. package/lib/utils/error.js +10 -47
  278. package/lib/utils/error.js.map +1 -1
  279. package/lib/utils/exec.d.ts +3 -2
  280. package/lib/utils/exec.js +24 -62
  281. package/lib/utils/exec.js.map +3 -3
  282. package/lib/utils/fs.js +6 -40
  283. package/lib/utils/fs.js.map +3 -3
  284. package/lib/utils/help.js +6 -30
  285. package/lib/utils/help.js.map +1 -1
  286. package/lib/utils/logging.d.ts +9 -10
  287. package/lib/utils/logging.js +11 -48
  288. package/lib/utils/logging.js.map +3 -3
  289. package/lib/utils/logo.js +28 -59
  290. package/lib/utils/logo.js.map +3 -3
  291. package/lib/utils/manifest.d.ts +3 -2
  292. package/lib/utils/manifest.js +8 -48
  293. package/lib/utils/manifest.js.map +3 -3
  294. package/lib/utils/npmrc.js +2 -26
  295. package/lib/utils/npmrc.js.map +1 -1
  296. package/lib/utils/packageManager.js +12 -49
  297. package/lib/utils/packageManager.js.map +2 -2
  298. package/lib/utils/port.js +4 -39
  299. package/lib/utils/port.js.map +2 -2
  300. package/lib/utils/sleep.js +2 -26
  301. package/lib/utils/sleep.js.map +1 -1
  302. package/lib/utils/template.js +18 -55
  303. package/lib/utils/template.js.map +3 -3
  304. package/lib/utils/validation.js +2 -31
  305. package/lib/utils/validation.js.map +1 -1
  306. package/lib/utils/version.js +9 -46
  307. package/lib/utils/version.js.map +2 -2
  308. package/lib/utils/wait.js +7 -32
  309. package/lib/utils/wait.js.map +1 -1
  310. package/lib/utils/worker.d.ts +3 -3
  311. package/lib/utils/worker.js +10 -35
  312. package/lib/utils/worker.js.map +1 -1
  313. package/lib/wrapper/function-arguments.d.js +0 -1
  314. package/lib/wrapper/functionHandler.js +18 -49
  315. package/lib/wrapper/functionHandler.js.map +2 -2
  316. package/lib/wrapper/http.d.ts +0 -6
  317. package/lib/wrapper/http.js +8 -51
  318. package/lib/wrapper/http.js.map +3 -3
  319. package/lib/wrapper/index.js +6 -7
  320. package/lib/wrapper/index.js.map +1 -1
  321. package/lib/wrapper/main.js +8 -42
  322. package/lib/wrapper/main.js.map +3 -3
  323. package/lib/wrapper/requestListener.js +13 -46
  324. package/lib/wrapper/requestListener.js.map +3 -3
  325. package/lib/wrapper/server.d.ts +7 -0
  326. package/lib/wrapper/server.js +11 -0
  327. package/lib/wrapper/server.js.map +7 -0
  328. package/package.json +17 -24
  329. package/template/base/_.prettierrc.js +1 -1
  330. package/template/base/_eslint.config.js +1 -1
  331. package/template/base/_pnpm-workspace.yaml +3 -2
  332. package/template/base/vitest.config.ts +25 -0
  333. package/template/express-rest-api/package.json +2 -1
  334. package/template/express-rest-api/skuba.template.js +1 -1
  335. package/template/express-rest-api/src/app.test.ts +1 -0
  336. package/template/greeter/package.json +4 -3
  337. package/template/greeter/skuba.template.js +1 -1
  338. package/template/greeter/src/app.test.ts +3 -1
  339. package/template/koa-rest-api/package.json +2 -1
  340. package/template/koa-rest-api/skuba.template.js +1 -1
  341. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -0
  342. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +2 -0
  343. package/template/koa-rest-api/src/app.test.ts +2 -0
  344. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  345. package/template/koa-rest-api/src/framework/validation.test.ts +2 -0
  346. package/template/koa-rest-api/src/testing/metrics.ts +2 -0
  347. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +15 -3
  348. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +11 -9
  349. package/template/lambda-sqs-worker-cdk/package.json +6 -5
  350. package/template/lambda-sqs-worker-cdk/skuba.template.js +1 -1
  351. package/template/lambda-sqs-worker-cdk/src/app.test.ts +22 -13
  352. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +1 -0
  353. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +33 -31
  354. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +8 -2
  355. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -2
  356. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +4 -3
  357. package/template/oss-npm-package/_package.json +1 -0
  358. package/template/oss-npm-package/skuba.template.js +1 -1
  359. package/template/oss-npm-package/src/index.test.ts +2 -0
  360. package/template/private-npm-package/_package.json +1 -0
  361. package/template/private-npm-package/skuba.template.js +1 -1
  362. package/template/private-npm-package/src/index.test.ts +2 -0
  363. package/config/jest.js +0 -1
  364. package/jest/moduleNameMapper.js +0 -64
  365. package/jest/transform.js +0 -62
  366. package/jest/tsConfig.js +0 -26
  367. package/jest-preset.js +0 -37
  368. package/lib/api/jest/index.d.ts +0 -15
  369. package/lib/api/jest/index.js +0 -59
  370. package/lib/api/jest/index.js.map +0 -7
  371. package/lib/cli/configure/modules/jest.d.ts +0 -2
  372. package/lib/cli/configure/modules/jest.js +0 -86
  373. package/lib/cli/configure/modules/jest.js.map +0 -7
  374. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +0 -2
  375. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +0 -144
  376. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +0 -7
  377. package/lib/cli/test/reporters/github/annotations.d.ts +0 -9
  378. package/lib/cli/test/reporters/github/annotations.js +0 -102
  379. package/lib/cli/test/reporters/github/annotations.js.map +0 -7
  380. package/lib/cli/test/reporters/github/index.d.ts +0 -5
  381. package/lib/cli/test/reporters/github/index.js +0 -74
  382. package/lib/cli/test/reporters/github/index.js.map +0 -7
  383. package/template/base/jest.config.ts +0 -19
  384. package/template/base/jest.setup.ts +0 -3
@@ -1,86 +0,0 @@
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 jest_exports = {};
20
- __export(jest_exports, {
21
- jestModule: () => jestModule
22
- });
23
- module.exports = __toCommonJS(jest_exports);
24
- var import_template = require("../../../utils/template.js");
25
- var import_deleteFiles = require("../processing/deleteFiles.js");
26
- var import_package = require("../processing/package.js");
27
- var import_typescript = require("../processing/typescript.js");
28
- const OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [
29
- `
30
- globals: {
31
- 'ts-jest': {
32
- // seek-oss/skuba#626
33
- isolatedModules: true,
34
- },
35
- },`,
36
- `
37
- globals: {
38
- 'ts-jest': {
39
- isolatedModules: true,
40
- },
41
- },`
42
- ];
43
- const filterProps = (0, import_typescript.createPropFilter)([
44
- "collectCoverageFrom",
45
- "coverageThreshold",
46
- "globalSetup",
47
- "globalTeardown",
48
- "setupFiles",
49
- "setupFilesAfterEnv"
50
- ]);
51
- const jestModule = async () => {
52
- const [configFile, setupFile] = await Promise.all([
53
- (0, import_template.readBaseTemplateFile)("jest.config.ts"),
54
- (0, import_template.readBaseTemplateFile)("jest.setup.ts")
55
- ]);
56
- return {
57
- ...(0, import_deleteFiles.deleteFiles)("jest.config.js", "jest.setup.js"),
58
- "jest.config.ts": async (tsFile, currentFiles, initialFiles) => {
59
- if (tsFile?.includes("skuba")) {
60
- return OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS.reduce(
61
- (acc, snippet) => acc.replace(snippet, ""),
62
- tsFile
63
- );
64
- }
65
- const jsFile = initialFiles["jest.config.js"];
66
- if (jsFile?.includes("skuba")) {
67
- return (0, import_typescript.transformModuleImportsAndExports)(jsFile, (_, p) => p);
68
- }
69
- currentFiles["jest.setup.ts"] ??= initialFiles["jest.setup.js"] ?? setupFile;
70
- const inputFile = tsFile ?? jsFile;
71
- const props = inputFile === void 0 ? void 0 : await (0, import_typescript.readModuleExports)(inputFile);
72
- if (props === void 0) {
73
- return configFile;
74
- }
75
- const filteredProps = filterProps(null, props);
76
- const appendProps = (0, import_typescript.createPropAppender)(filteredProps);
77
- return (0, import_typescript.transformModuleImportsAndExports)(configFile, appendProps);
78
- },
79
- "package.json": (0, import_package.withPackage)(({ jest, ...data }) => data)
80
- };
81
- };
82
- // Annotate the CommonJS export names for ESM import in node:
83
- 0 && (module.exports = {
84
- jestModule
85
- });
86
- //# sourceMappingURL=jest.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/cli/configure/modules/jest.ts"],
4
- "sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport {\n createPropAppender,\n createPropFilter,\n readModuleExports,\n transformModuleImportsAndExports,\n} from '../processing/typescript.js';\nimport type { Module } from '../types.js';\n\nconst OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [\n `\n globals: {\n 'ts-jest': {\n // seek-oss/skuba#626\n isolatedModules: true,\n },\n },`,\n `\n globals: {\n 'ts-jest': {\n isolatedModules: true,\n },\n },`,\n];\n\n// Jest options to preserve during migration\nconst filterProps = createPropFilter([\n 'collectCoverageFrom',\n 'coverageThreshold',\n 'globalSetup',\n 'globalTeardown',\n 'setupFiles',\n 'setupFilesAfterEnv',\n]);\n\nexport const jestModule = async (): Promise<Module> => {\n const [configFile, setupFile] = await Promise.all([\n readBaseTemplateFile('jest.config.ts'),\n readBaseTemplateFile('jest.setup.ts'),\n ]);\n\n return {\n ...deleteFiles('jest.config.js', 'jest.setup.js'),\n\n 'jest.config.ts': async (tsFile, currentFiles, initialFiles) => {\n // Allow customised TS Jest config that extends skuba\n if (tsFile?.includes('skuba')) {\n return OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS.reduce(\n (acc, snippet) => acc.replace(snippet, ''),\n tsFile,\n );\n }\n\n const jsFile = initialFiles['jest.config.js'];\n\n // Migrate a JS config that extends skuba, retaining all existing props\n if (jsFile?.includes('skuba')) {\n return transformModuleImportsAndExports(jsFile, (_, p) => p);\n }\n\n currentFiles['jest.setup.ts'] ??=\n initialFiles['jest.setup.js'] ?? setupFile;\n\n const inputFile = tsFile ?? jsFile;\n\n const props =\n inputFile === undefined\n ? undefined\n : await readModuleExports(inputFile);\n\n if (props === undefined) {\n return configFile;\n }\n\n const filteredProps = filterProps(null, props);\n\n const appendProps = createPropAppender(filteredProps);\n\n // Append a subset of custom props to our base `jest.config.ts`\n return transformModuleImportsAndExports(configFile, appendProps);\n },\n\n 'package.json': withPackage(({ jest, ...data }) => data),\n };\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,wBAKO;AAGP,MAAM,4CAA4C;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMF;AAGA,MAAM,kBAAc,oCAAiB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,MAAM,aAAa,YAA6B;AACrD,QAAM,CAAC,YAAY,SAAS,IAAI,MAAM,QAAQ,IAAI;AAAA,QAChD,sCAAqB,gBAAgB;AAAA,QACrC,sCAAqB,eAAe;AAAA,EACtC,CAAC;AAED,SAAO;AAAA,IACL,OAAG,gCAAY,kBAAkB,eAAe;AAAA,IAEhD,kBAAkB,OAAO,QAAQ,cAAc,iBAAiB;AAE9D,UAAI,QAAQ,SAAS,OAAO,GAAG;AAC7B,eAAO,0CAA0C;AAAA,UAC/C,CAAC,KAAK,YAAY,IAAI,QAAQ,SAAS,EAAE;AAAA,UACzC;AAAA,QACF;AAAA,MACF;AAEA,YAAM,SAAS,aAAa,gBAAgB;AAG5C,UAAI,QAAQ,SAAS,OAAO,GAAG;AAC7B,mBAAO,oDAAiC,QAAQ,CAAC,GAAG,MAAM,CAAC;AAAA,MAC7D;AAEA,mBAAa,eAAe,MAC1B,aAAa,eAAe,KAAK;AAEnC,YAAM,YAAY,UAAU;AAE5B,YAAM,QACJ,cAAc,SACV,SACA,UAAM,qCAAkB,SAAS;AAEvC,UAAI,UAAU,QAAW;AACvB,eAAO;AAAA,MACT;AAEA,YAAM,gBAAgB,YAAY,MAAM,KAAK;AAE7C,YAAM,kBAAc,sCAAmB,aAAa;AAGpD,iBAAO,oDAAiC,YAAY,WAAW;AAAA,IACjE;AAAA,IAEA,oBAAgB,4BAAY,CAAC,EAAE,MAAM,GAAG,KAAK,MAAM,IAAI;AAAA,EACzD;AACF;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- import type { PatchFunction } from '../../index.js';
2
- export declare const tryUpgradeESLint: PatchFunction;
@@ -1,144 +0,0 @@
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 upgradeESLint_exports = {};
30
- __export(upgradeESLint_exports, {
31
- tryUpgradeESLint: () => tryUpgradeESLint
32
- });
33
- module.exports = __toCommonJS(upgradeESLint_exports);
34
- var fsp = __toESM(require("fs/promises"));
35
- var import_path = __toESM(require("path"));
36
- var import_util = require("util");
37
- var import_fs_extra = __toESM(require("fs-extra"));
38
- var import_exec = require("../../../../../../utils/exec.js");
39
- var import_logging = require("../../../../../../utils/logging.js");
40
- var import_project = require("../../../../../configure/analysis/project.js");
41
- var import_configFile = require("../../../../../configure/processing/configFile.js");
42
- var import_prettier = require("../../../../../configure/processing/prettier.js");
43
- const IGNORE_FILE = ".eslintignore";
44
- const OLD_CONFIG_FILE = ".eslintrc.js";
45
- const NEW_CONFIG_FILE_CJS = "eslint.config.cjs";
46
- const NEW_CONFIG_FILE_JS = "eslint.config.js";
47
- const upgradeESLint = async ({
48
- mode,
49
- dir: cwd = process.cwd()
50
- }) => {
51
- const readFile = (0, import_project.createDestinationFileReader)(cwd);
52
- const [ignoreFileContents, oldConfig] = await Promise.all([
53
- readFile(IGNORE_FILE),
54
- readFile(OLD_CONFIG_FILE)
55
- ]);
56
- if (oldConfig === void 0) {
57
- return {
58
- result: "skip",
59
- reason: `no ${OLD_CONFIG_FILE} - have you already migrated?`
60
- };
61
- }
62
- if (mode === "lint") {
63
- return { result: "apply" };
64
- }
65
- const ignoreContentsWithoutSkubaManaged = (0, import_configFile.mergeWithConfigFile)(
66
- "",
67
- "ignore"
68
- )(ignoreFileContents);
69
- const exec = (0, import_exec.createExec)({
70
- cwd: process.cwd(),
71
- stdio: "ignore"
72
- });
73
- const dir = await writeTemporaryFiles({
74
- [OLD_CONFIG_FILE]: oldConfig,
75
- ...ignoreContentsWithoutSkubaManaged.trim().length > 0 ? { [IGNORE_FILE]: ignoreContentsWithoutSkubaManaged } : {}
76
- });
77
- try {
78
- await exec(
79
- "eslint-migrate-config",
80
- import_path.default.join(dir, OLD_CONFIG_FILE),
81
- "--commonjs"
82
- );
83
- const output = fiddleWithOutput(
84
- await fsp.readFile(import_path.default.join(dir, NEW_CONFIG_FILE_CJS), "utf-8")
85
- );
86
- await import_fs_extra.default.promises.writeFile(
87
- NEW_CONFIG_FILE_JS,
88
- await (0, import_prettier.formatPrettier)(output, { filepath: NEW_CONFIG_FILE_JS })
89
- );
90
- await Promise.all([
91
- ignoreFileContents === void 0 ? Promise.resolve() : import_fs_extra.default.promises.rm(IGNORE_FILE),
92
- import_fs_extra.default.promises.rm(OLD_CONFIG_FILE)
93
- ]);
94
- return { result: "apply" };
95
- } finally {
96
- await fsp.rm(dir, { recursive: true });
97
- }
98
- };
99
- const writeTemporaryFiles = async (contents) => {
100
- const dir = await fsp.mkdtemp("eslint-migrate-config");
101
- await Promise.all(
102
- Object.entries(contents).map(
103
- async ([file, content]) => fsp.writeFile(import_path.default.join(dir, file), content)
104
- )
105
- );
106
- return dir;
107
- };
108
- const fiddleWithOutput = (input) => {
109
- let output = input.replace(/compat.extends\(["']skuba["']\)/, "skuba");
110
- if (!output.includes("eslint-config-skuba")) {
111
- output = `const skuba = require('eslint-config-skuba');
112
-
113
- ${output}`;
114
- }
115
- if (!output.includes("compat.")) {
116
- output = output.replace(/const compat = new FlatCompat\(\{[^}]+\}\);/m, "");
117
- output = output.replace(
118
- /const \{\s*FlatCompat,?\s*\}\s*=\s*require\(["']@eslint\/eslintrc["']\);/m,
119
- ""
120
- );
121
- }
122
- if (!output.includes("js.")) {
123
- output = output.replace(/const js = require\(['"]@eslint\/js['"]\);/, "");
124
- }
125
- output = output.replace(
126
- /^const skuba = require\('eslint-config-skuba'\);\s*module.exports = \[...skuba\];$/m,
127
- "module.exports = require('eslint-config-skuba');"
128
- );
129
- return output;
130
- };
131
- const tryUpgradeESLint = async (config) => {
132
- try {
133
- return await upgradeESLint(config);
134
- } catch (err) {
135
- import_logging.log.warn("Failed to upgrade ESLint to flat config.");
136
- import_logging.log.subtle((0, import_util.inspect)(err));
137
- return { result: "skip", reason: "due to an error" };
138
- }
139
- };
140
- // Annotate the CommonJS export names for ESM import in node:
141
- 0 && (module.exports = {
142
- tryUpgradeESLint
143
- });
144
- //# sourceMappingURL=upgradeESLint.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.ts"],
4
- "sourcesContent": ["// eslint-disable-next-line no-restricted-imports -- fs-extra is mocked\nimport * as fsp from 'fs/promises';\nimport path from 'path';\nimport { inspect } from 'util';\n\nimport fs from 'fs-extra';\n\nimport { createExec } from '../../../../../../utils/exec.js';\nimport { log } from '../../../../../../utils/logging.js';\nimport { createDestinationFileReader } from '../../../../../configure/analysis/project.js';\nimport { mergeWithConfigFile } from '../../../../../configure/processing/configFile.js';\nimport { formatPrettier } from '../../../../../configure/processing/prettier.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst IGNORE_FILE = '.eslintignore';\nconst OLD_CONFIG_FILE = '.eslintrc.js';\nconst NEW_CONFIG_FILE_CJS = 'eslint.config.cjs';\nconst NEW_CONFIG_FILE_JS = 'eslint.config.js';\n\nconst upgradeESLint: PatchFunction = async ({\n mode,\n dir: cwd = process.cwd(),\n}): Promise<PatchReturnType> => {\n const readFile = createDestinationFileReader(cwd);\n const [ignoreFileContents, oldConfig] = await Promise.all([\n readFile(IGNORE_FILE),\n readFile(OLD_CONFIG_FILE),\n ]);\n\n if (oldConfig === undefined) {\n return {\n result: 'skip',\n reason: `no ${OLD_CONFIG_FILE} - have you already migrated?`,\n };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n const ignoreContentsWithoutSkubaManaged = mergeWithConfigFile(\n '',\n 'ignore',\n )(ignoreFileContents);\n\n const exec = createExec({\n cwd: process.cwd(),\n stdio: 'ignore',\n });\n\n // eslint-migrate-config require()s the file, so for testability, put it in a temporary location\n const dir = await writeTemporaryFiles({\n [OLD_CONFIG_FILE]: oldConfig,\n ...(ignoreContentsWithoutSkubaManaged.trim().length > 0\n ? { [IGNORE_FILE]: ignoreContentsWithoutSkubaManaged }\n : {}),\n });\n try {\n await exec(\n 'eslint-migrate-config',\n path.join(dir, OLD_CONFIG_FILE),\n '--commonjs',\n );\n\n const output = fiddleWithOutput(\n await fsp.readFile(path.join(dir, NEW_CONFIG_FILE_CJS), 'utf-8'),\n );\n await fs.promises.writeFile(\n NEW_CONFIG_FILE_JS,\n await formatPrettier(output, { filepath: NEW_CONFIG_FILE_JS }),\n );\n\n await Promise.all([\n ignoreFileContents === undefined\n ? Promise.resolve()\n : fs.promises.rm(IGNORE_FILE),\n fs.promises.rm(OLD_CONFIG_FILE),\n ]);\n\n return { result: 'apply' };\n } finally {\n await fsp.rm(dir, { recursive: true });\n }\n};\n\nconst writeTemporaryFiles = async (contents: Record<string, string>) => {\n const dir = await fsp.mkdtemp('eslint-migrate-config');\n\n await Promise.all(\n Object.entries(contents).map(async ([file, content]) =>\n fsp.writeFile(path.join(dir, file), content),\n ),\n );\n\n return dir;\n};\n\nconst fiddleWithOutput = (input: string) => {\n let output = input.replace(/compat.extends\\([\"']skuba[\"']\\)/, 'skuba');\n\n if (!output.includes('eslint-config-skuba')) {\n output = `const skuba = require('eslint-config-skuba');\\n\\n${output}`;\n }\n\n if (!output.includes('compat.')) {\n output = output.replace(/const compat = new FlatCompat\\(\\{[^}]+\\}\\);/m, '');\n output = output.replace(\n /const \\{\\s*FlatCompat,?\\s*\\}\\s*=\\s*require\\([\"']@eslint\\/eslintrc[\"']\\);/m,\n '',\n );\n }\n\n if (!output.includes('js.')) {\n output = output.replace(/const js = require\\(['\"]@eslint\\/js['\"]\\);/, '');\n }\n\n output = output.replace(\n /^const skuba = require\\('eslint-config-skuba'\\);\\s*module.exports = \\[...skuba\\];$/m,\n \"module.exports = require('eslint-config-skuba');\",\n );\n\n return output;\n};\n\nexport const tryUpgradeESLint: PatchFunction = async (config) => {\n try {\n return await upgradeESLint(config);\n } catch (err) {\n log.warn('Failed to upgrade ESLint to flat config.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,UAAqB;AACrB,kBAAiB;AACjB,kBAAwB;AAExB,sBAAe;AAEf,kBAA2B;AAC3B,qBAAoB;AACpB,qBAA4C;AAC5C,wBAAoC;AACpC,sBAA+B;AAG/B,MAAM,cAAc;AACpB,MAAM,kBAAkB;AACxB,MAAM,sBAAsB;AAC5B,MAAM,qBAAqB;AAE3B,MAAM,gBAA+B,OAAO;AAAA,EAC1C;AAAA,EACA,KAAK,MAAM,QAAQ,IAAI;AACzB,MAAgC;AAC9B,QAAM,eAAW,4CAA4B,GAAG;AAChD,QAAM,CAAC,oBAAoB,SAAS,IAAI,MAAM,QAAQ,IAAI;AAAA,IACxD,SAAS,WAAW;AAAA,IACpB,SAAS,eAAe;AAAA,EAC1B,CAAC;AAED,MAAI,cAAc,QAAW;AAC3B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ,MAAM,eAAe;AAAA,IAC/B;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,QAAM,wCAAoC;AAAA,IACxC;AAAA,IACA;AAAA,EACF,EAAE,kBAAkB;AAEpB,QAAM,WAAO,wBAAW;AAAA,IACtB,KAAK,QAAQ,IAAI;AAAA,IACjB,OAAO;AAAA,EACT,CAAC;AAGD,QAAM,MAAM,MAAM,oBAAoB;AAAA,IACpC,CAAC,eAAe,GAAG;AAAA,IACnB,GAAI,kCAAkC,KAAK,EAAE,SAAS,IAClD,EAAE,CAAC,WAAW,GAAG,kCAAkC,IACnD,CAAC;AAAA,EACP,CAAC;AACD,MAAI;AACF,UAAM;AAAA,MACJ;AAAA,MACA,YAAAA,QAAK,KAAK,KAAK,eAAe;AAAA,MAC9B;AAAA,IACF;AAEA,UAAM,SAAS;AAAA,MACb,MAAM,IAAI,SAAS,YAAAA,QAAK,KAAK,KAAK,mBAAmB,GAAG,OAAO;AAAA,IACjE;AACA,UAAM,gBAAAC,QAAG,SAAS;AAAA,MAChB;AAAA,MACA,UAAM,gCAAe,QAAQ,EAAE,UAAU,mBAAmB,CAAC;AAAA,IAC/D;AAEA,UAAM,QAAQ,IAAI;AAAA,MAChB,uBAAuB,SACnB,QAAQ,QAAQ,IAChB,gBAAAA,QAAG,SAAS,GAAG,WAAW;AAAA,MAC9B,gBAAAA,QAAG,SAAS,GAAG,eAAe;AAAA,IAChC,CAAC;AAED,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B,UAAE;AACA,UAAM,IAAI,GAAG,KAAK,EAAE,WAAW,KAAK,CAAC;AAAA,EACvC;AACF;AAEA,MAAM,sBAAsB,OAAO,aAAqC;AACtE,QAAM,MAAM,MAAM,IAAI,QAAQ,uBAAuB;AAErD,QAAM,QAAQ;AAAA,IACZ,OAAO,QAAQ,QAAQ,EAAE;AAAA,MAAI,OAAO,CAAC,MAAM,OAAO,MAChD,IAAI,UAAU,YAAAD,QAAK,KAAK,KAAK,IAAI,GAAG,OAAO;AAAA,IAC7C;AAAA,EACF;AAEA,SAAO;AACT;AAEA,MAAM,mBAAmB,CAAC,UAAkB;AAC1C,MAAI,SAAS,MAAM,QAAQ,mCAAmC,OAAO;AAErE,MAAI,CAAC,OAAO,SAAS,qBAAqB,GAAG;AAC3C,aAAS;AAAA;AAAA,EAAoD,MAAM;AAAA,EACrE;AAEA,MAAI,CAAC,OAAO,SAAS,SAAS,GAAG;AAC/B,aAAS,OAAO,QAAQ,gDAAgD,EAAE;AAC1E,aAAS,OAAO;AAAA,MACd;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAAC,OAAO,SAAS,KAAK,GAAG;AAC3B,aAAS,OAAO,QAAQ,8CAA8C,EAAE;AAAA,EAC1E;AAEA,WAAS,OAAO;AAAA,IACd;AAAA,IACA;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,mBAAkC,OAAO,WAAW;AAC/D,MAAI;AACF,WAAO,MAAM,cAAc,MAAM;AAAA,EACnC,SAAS,KAAK;AACZ,uBAAI,KAAK,0CAA0C;AACnD,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
6
- "names": ["path", "fs"]
7
- }
@@ -1,9 +0,0 @@
1
- import type { TestResult } from '@jest/test-result';
2
- import type * as GitHub from '@skuba-lib/api/github';
3
- export declare const createAnnotations: (testResults: TestResult[]) => GitHub.Annotation[];
4
- interface AnnotationEntry {
5
- annotations: GitHub.Annotation[];
6
- displayName: string | undefined;
7
- }
8
- export declare const generateAnnotationEntries: (testResults: TestResult[]) => AnnotationEntry[];
9
- export {};
@@ -1,102 +0,0 @@
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 annotations_exports = {};
30
- __export(annotations_exports, {
31
- createAnnotations: () => createAnnotations,
32
- generateAnnotationEntries: () => generateAnnotationEntries
33
- });
34
- module.exports = __toCommonJS(annotations_exports);
35
- var import_path = __toESM(require("path"));
36
- var import_util = require("util");
37
- var import_ts_dedent = __toESM(require("ts-dedent"));
38
- const JEST_LOCATION_REGEX = /\n +at (.+\()?(.+?):(\d+):(\d+)/;
39
- const createAnnotations = (testResults) => {
40
- const cwd = process.cwd();
41
- return testResults.flatMap((testResult) => {
42
- if (testResult.testExecError) {
43
- return {
44
- annotation_level: "failure",
45
- path: import_path.default.relative(cwd, testResult.testFilePath),
46
- start_line: 1,
47
- end_line: 1,
48
- message: (0, import_util.stripVTControlCharacters)(
49
- testResult.failureMessage ? (0, import_ts_dedent.default)(testResult.failureMessage) : testResult.testExecError.message
50
- ),
51
- title: "Jest"
52
- };
53
- }
54
- if (testResult.numFailingTests > 0) {
55
- return testResult.testResults.flatMap(
56
- (assertionResult) => assertionResult.failureMessages.flatMap((failureMessage) => {
57
- const match = JEST_LOCATION_REGEX.exec(failureMessage);
58
- if (match?.length === 5 && match[2]) {
59
- return {
60
- annotation_level: "failure",
61
- path: import_path.default.relative(cwd, match[2]),
62
- start_line: Number(match[3]),
63
- end_line: Number(match[3]),
64
- start_column: Number(match[4]),
65
- end_column: Number(match[4]),
66
- message: (0, import_util.stripVTControlCharacters)(failureMessage),
67
- title: "Jest"
68
- };
69
- }
70
- return [];
71
- })
72
- );
73
- }
74
- return [];
75
- });
76
- };
77
- const DEFAULT_DISPLAY_NAME = Symbol("DEFAULT_DISPLAY_NAME");
78
- const generateAnnotationEntries = (testResults) => {
79
- const resultsByDisplayName = testResults.reduce(
80
- (acc, result) => {
81
- const displayName = result.displayName?.name ?? DEFAULT_DISPLAY_NAME;
82
- (acc[displayName] ??= []).push(result);
83
- return acc;
84
- },
85
- {}
86
- );
87
- const defaultResults = resultsByDisplayName[DEFAULT_DISPLAY_NAME];
88
- const entries = [
89
- ...defaultResults?.length ? [[void 0, defaultResults]] : [],
90
- ...Object.entries(resultsByDisplayName)
91
- ];
92
- return entries.map(([displayName, results]) => ({
93
- annotations: createAnnotations(results),
94
- displayName
95
- }));
96
- };
97
- // Annotate the CommonJS export names for ESM import in node:
98
- 0 && (module.exports = {
99
- createAnnotations,
100
- generateAnnotationEntries
101
- });
102
- //# sourceMappingURL=annotations.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/cli/test/reporters/github/annotations.ts"],
4
- "sourcesContent": ["import path from 'path';\nimport { stripVTControlCharacters as stripAnsi } from 'util';\n\nimport type { TestResult } from '@jest/test-result';\nimport dedent from 'ts-dedent';\n\nimport type * as GitHub from '@skuba-lib/api/github';\n\n/**\n * Matches the first stack trace location in a Jest failure message.\n *\n * For example, given the following input message:\n *\n * ```console\n * Error: expect(received).toBe(expected) // Object.is equality\n *\n * Expected: \"a\"\n * Received: \"b\"\n * at Object.<anonymous> (/workdir/skuba/src/test.test.ts:2:15)\n * at Promise.then.completed (/workdir/skuba/node_modules/jest-circus/build/utils.js:390:28)\n * ...\n * ```\n *\n * or:\n *\n * ```console\n * Error: expect(received).toBe(expected) // Object.is equality\n *\n * Expected: \"a\"\n * Received: \"b\"\n * at /workdir/skuba/src/test.test.ts:2:15\n * at Promise.then.completed (/workdir/skuba/node_modules/jest-circus/build/utils.js:390:28)\n * ...\n * ```\n *\n * This pattern will produce the following matches:\n *\n * 1. /workdir/skuba/src/test.test.ts\n * 2. 2\n * 2. 15\n */\nconst JEST_LOCATION_REGEX = /\\n +at (.+\\()?(.+?):(\\d+):(\\d+)/;\n\nexport const createAnnotations = (\n testResults: TestResult[],\n): GitHub.Annotation[] => {\n const cwd = process.cwd();\n\n return testResults.flatMap((testResult) => {\n if (testResult.testExecError) {\n return {\n annotation_level: 'failure',\n path: path.relative(cwd, testResult.testFilePath),\n start_line: 1,\n end_line: 1,\n message: stripAnsi(\n testResult.failureMessage\n ? dedent(testResult.failureMessage)\n : testResult.testExecError.message,\n ),\n title: 'Jest',\n };\n }\n\n if (testResult.numFailingTests > 0) {\n return testResult.testResults.flatMap((assertionResult) =>\n assertionResult.failureMessages.flatMap((failureMessage) => {\n const match = JEST_LOCATION_REGEX.exec(failureMessage);\n if (match?.length === 5 && match[2]) {\n return {\n annotation_level: 'failure',\n path: path.relative(cwd, match[2]),\n start_line: Number(match[3]),\n end_line: Number(match[3]),\n start_column: Number(match[4]),\n end_column: Number(match[4]),\n message: stripAnsi(failureMessage),\n title: 'Jest',\n };\n }\n\n return [];\n }),\n );\n }\n\n return [];\n });\n};\n\nconst DEFAULT_DISPLAY_NAME = Symbol('DEFAULT_DISPLAY_NAME');\n\ninterface AnnotationEntry {\n annotations: GitHub.Annotation[];\n displayName: string | undefined;\n}\n\nexport const generateAnnotationEntries = (\n testResults: TestResult[],\n): AnnotationEntry[] => {\n type ResultsByDisplayName = Record<string | symbol, TestResult[]>;\n\n // Group test results by display name.\n const resultsByDisplayName = testResults.reduce<ResultsByDisplayName>(\n (acc, result) => {\n const displayName = result.displayName?.name ?? DEFAULT_DISPLAY_NAME;\n\n (acc[displayName] ??= []).push(result);\n\n return acc;\n },\n {},\n );\n\n const defaultResults = resultsByDisplayName[DEFAULT_DISPLAY_NAME];\n\n const entries = [\n ...(defaultResults?.length ? ([[undefined, defaultResults]] as const) : []),\n ...Object.entries(resultsByDisplayName),\n ];\n\n // Create annotations for each display name.\n return entries.map<AnnotationEntry>(([displayName, results]) => ({\n annotations: createAnnotations(results),\n displayName,\n }));\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAsD;AAGtD,uBAAmB;AAqCnB,MAAM,sBAAsB;AAErB,MAAM,oBAAoB,CAC/B,gBACwB;AACxB,QAAM,MAAM,QAAQ,IAAI;AAExB,SAAO,YAAY,QAAQ,CAAC,eAAe;AACzC,QAAI,WAAW,eAAe;AAC5B,aAAO;AAAA,QACL,kBAAkB;AAAA,QAClB,MAAM,YAAAA,QAAK,SAAS,KAAK,WAAW,YAAY;AAAA,QAChD,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,aAAS,YAAAC;AAAA,UACP,WAAW,qBACP,iBAAAC,SAAO,WAAW,cAAc,IAChC,WAAW,cAAc;AAAA,QAC/B;AAAA,QACA,OAAO;AAAA,MACT;AAAA,IACF;AAEA,QAAI,WAAW,kBAAkB,GAAG;AAClC,aAAO,WAAW,YAAY;AAAA,QAAQ,CAAC,oBACrC,gBAAgB,gBAAgB,QAAQ,CAAC,mBAAmB;AAC1D,gBAAM,QAAQ,oBAAoB,KAAK,cAAc;AACrD,cAAI,OAAO,WAAW,KAAK,MAAM,CAAC,GAAG;AACnC,mBAAO;AAAA,cACL,kBAAkB;AAAA,cAClB,MAAM,YAAAF,QAAK,SAAS,KAAK,MAAM,CAAC,CAAC;AAAA,cACjC,YAAY,OAAO,MAAM,CAAC,CAAC;AAAA,cAC3B,UAAU,OAAO,MAAM,CAAC,CAAC;AAAA,cACzB,cAAc,OAAO,MAAM,CAAC,CAAC;AAAA,cAC7B,YAAY,OAAO,MAAM,CAAC,CAAC;AAAA,cAC3B,aAAS,YAAAC,0BAAU,cAAc;AAAA,cACjC,OAAO;AAAA,YACT;AAAA,UACF;AAEA,iBAAO,CAAC;AAAA,QACV,CAAC;AAAA,MACH;AAAA,IACF;AAEA,WAAO,CAAC;AAAA,EACV,CAAC;AACH;AAEA,MAAM,uBAAuB,OAAO,sBAAsB;AAOnD,MAAM,4BAA4B,CACvC,gBACsB;AAItB,QAAM,uBAAuB,YAAY;AAAA,IACvC,CAAC,KAAK,WAAW;AACf,YAAM,cAAc,OAAO,aAAa,QAAQ;AAEhD,OAAC,IAAI,WAAW,MAAM,CAAC,GAAG,KAAK,MAAM;AAErC,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AAEA,QAAM,iBAAiB,qBAAqB,oBAAoB;AAEhE,QAAM,UAAU;AAAA,IACd,GAAI,gBAAgB,SAAU,CAAC,CAAC,QAAW,cAAc,CAAC,IAAc,CAAC;AAAA,IACzE,GAAG,OAAO,QAAQ,oBAAoB;AAAA,EACxC;AAGA,SAAO,QAAQ,IAAqB,CAAC,CAAC,aAAa,OAAO,OAAO;AAAA,IAC/D,aAAa,kBAAkB,OAAO;AAAA,IACtC;AAAA,EACF,EAAE;AACJ;",
6
- "names": ["path", "stripAnsi", "dedent"]
7
- }
@@ -1,5 +0,0 @@
1
- import type { Reporter, TestContext } from '@jest/reporters';
2
- import type { AggregatedResult } from '@jest/test-result';
3
- export default class GitHubReporter implements Pick<Reporter, 'onRunComplete'> {
4
- onRunComplete(_contexts: Set<TestContext>, { testResults }: AggregatedResult): Promise<void>;
5
- }
@@ -1,74 +0,0 @@
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 github_exports = {};
30
- __export(github_exports, {
31
- default: () => GitHubReporter
32
- });
33
- module.exports = __toCommonJS(github_exports);
34
- var import_util = require("util");
35
- var import_logging = require("../../../../utils/logging.js");
36
- var import_wait = require("../../../../utils/wait.js");
37
- var import_annotations = require("./annotations.js");
38
- var GitHub = __toESM(require("@skuba-lib/api/github"));
39
- class GitHubReporter {
40
- async onRunComplete(_contexts, { testResults }) {
41
- if (!GitHub.enabledFromEnvironment()) {
42
- return;
43
- }
44
- let lastCheckRun;
45
- try {
46
- const entries = (0, import_annotations.generateAnnotationEntries)(testResults);
47
- const build = GitHub.buildNameFromEnvironment();
48
- for (const { displayName, annotations } of entries) {
49
- const name = `skuba/test${displayName ? ` (${displayName})` : ""}`;
50
- const isOk = !annotations.length;
51
- const summary = isOk ? "`skuba test` passed." : "`skuba test` found issues that require triage.";
52
- const checkRun = {
53
- name,
54
- annotations,
55
- conclusion: isOk ? "success" : "failure",
56
- summary,
57
- title: `${build} ${isOk ? "passed" : "failed"}`
58
- };
59
- lastCheckRun = checkRun;
60
- await (0, import_wait.throwOnTimeout)(GitHub.createCheckRun(checkRun), {
61
- s: 30
62
- });
63
- }
64
- } catch (err) {
65
- import_logging.log.warn("Failed to report test results to GitHub.");
66
- import_logging.log.subtle((0, import_util.inspect)(err));
67
- if (lastCheckRun) {
68
- import_logging.log.subtle("Last request:");
69
- import_logging.log.subtle(JSON.stringify(lastCheckRun));
70
- }
71
- }
72
- }
73
- }
74
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/cli/test/reporters/github/index.ts"],
4
- "sourcesContent": ["import { inspect } from 'util';\n\nimport type { Reporter, TestContext } from '@jest/reporters';\nimport type { AggregatedResult } from '@jest/test-result';\n\nimport { log } from '../../../../utils/logging.js';\nimport { throwOnTimeout } from '../../../../utils/wait.js';\n\nimport { generateAnnotationEntries } from './annotations.js';\n\nimport * as GitHub from '@skuba-lib/api/github';\n\nexport default class GitHubReporter implements Pick<Reporter, 'onRunComplete'> {\n async onRunComplete(\n _contexts: Set<TestContext>,\n { testResults }: AggregatedResult,\n ): Promise<void> {\n if (!GitHub.enabledFromEnvironment()) {\n return;\n }\n\n type CheckRun = Parameters<typeof GitHub.createCheckRun>[0];\n\n let lastCheckRun: CheckRun | undefined;\n\n try {\n const entries = generateAnnotationEntries(testResults);\n\n const build = GitHub.buildNameFromEnvironment();\n\n // Create a check run per display name.\n // Run in series to reduce the likelihood of exceeding GitHub rate limits.\n for (const { displayName, annotations } of entries) {\n const name = `skuba/test${displayName ? ` (${displayName})` : ''}`;\n\n const isOk = !annotations.length;\n\n const summary = isOk\n ? '`skuba test` passed.'\n : '`skuba test` found issues that require triage.';\n\n const checkRun: CheckRun = {\n name,\n annotations,\n conclusion: isOk ? 'success' : 'failure',\n summary,\n title: `${build} ${isOk ? 'passed' : 'failed'}`,\n };\n\n lastCheckRun = checkRun;\n\n await throwOnTimeout(GitHub.createCheckRun(checkRun), {\n s: 30,\n });\n }\n } catch (err) {\n log.warn('Failed to report test results to GitHub.');\n log.subtle(inspect(err));\n\n if (lastCheckRun) {\n log.subtle('Last request:');\n log.subtle(JSON.stringify(lastCheckRun));\n }\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAKxB,qBAAoB;AACpB,kBAA+B;AAE/B,yBAA0C;AAE1C,aAAwB;AAExB,MAAO,eAAwE;AAAA,EAC7E,MAAM,cACJ,WACA,EAAE,YAAY,GACC;AACf,QAAI,CAAC,OAAO,uBAAuB,GAAG;AACpC;AAAA,IACF;AAIA,QAAI;AAEJ,QAAI;AACF,YAAM,cAAU,8CAA0B,WAAW;AAErD,YAAM,QAAQ,OAAO,yBAAyB;AAI9C,iBAAW,EAAE,aAAa,YAAY,KAAK,SAAS;AAClD,cAAM,OAAO,aAAa,cAAc,KAAK,WAAW,MAAM,EAAE;AAEhE,cAAM,OAAO,CAAC,YAAY;AAE1B,cAAM,UAAU,OACZ,yBACA;AAEJ,cAAM,WAAqB;AAAA,UACzB;AAAA,UACA;AAAA,UACA,YAAY,OAAO,YAAY;AAAA,UAC/B;AAAA,UACA,OAAO,GAAG,KAAK,IAAI,OAAO,WAAW,QAAQ;AAAA,QAC/C;AAEA,uBAAe;AAEf,kBAAM,4BAAe,OAAO,eAAe,QAAQ,GAAG;AAAA,UACpD,GAAG;AAAA,QACL,CAAC;AAAA,MACH;AAAA,IACF,SAAS,KAAK;AACZ,yBAAI,KAAK,0CAA0C;AACnD,yBAAI,WAAO,qBAAQ,GAAG,CAAC;AAEvB,UAAI,cAAc;AAChB,2BAAI,OAAO,eAAe;AAC1B,2BAAI,OAAO,KAAK,UAAU,YAAY,CAAC;AAAA,MACzC;AAAA,IACF;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1,19 +0,0 @@
1
- import { Jest } from 'skuba';
2
-
3
- export default Jest.mergePreset({
4
- coveragePathIgnorePatterns: ['src/testing'],
5
- coverageThreshold: {
6
- global: {
7
- branches: 0,
8
- functions: 0,
9
- lines: 0,
10
- statements: 0,
11
- },
12
- },
13
- setupFiles: ['<rootDir>/jest.setup.ts'],
14
- testPathIgnorePatterns: ['/test\\.ts'],
15
- moduleNameMapper: {
16
- '^#src/(.*)\\.js$': ['<rootDir>/src/$1'],
17
- '^#src/(.*)$': ['<rootDir>/src/$1'],
18
- },
19
- });
@@ -1,3 +0,0 @@
1
- process.env.DEPLOYMENT = 'test';
2
-
3
- export {};