skuba 14.0.0-replace-global-vars-20251117052457 → 14.0.0-rfc-upgrade-on-test-20251217012156

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 (406) 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.js +39 -3
  89. package/lib/cli/configure/processing/configFile.js.map +1 -1
  90. package/lib/cli/configure/processing/deleteFiles.js +26 -2
  91. package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
  92. package/lib/cli/configure/processing/javascript.js +27 -2
  93. package/lib/cli/configure/processing/javascript.js.map +1 -1
  94. package/lib/cli/configure/processing/json.js +31 -6
  95. package/lib/cli/configure/processing/json.js.map +1 -1
  96. package/lib/cli/configure/processing/loadFiles.js +26 -2
  97. package/lib/cli/configure/processing/loadFiles.js.map +1 -1
  98. package/lib/cli/configure/processing/module.js +28 -4
  99. package/lib/cli/configure/processing/module.js.map +1 -1
  100. package/lib/cli/configure/processing/package.d.ts +67 -1
  101. package/lib/cli/configure/processing/package.js +45 -8
  102. package/lib/cli/configure/processing/package.js.map +3 -3
  103. package/lib/cli/configure/processing/prettier.js +38 -4
  104. package/lib/cli/configure/processing/prettier.js.map +2 -2
  105. package/lib/cli/configure/processing/record.js +41 -5
  106. package/lib/cli/configure/processing/record.js.map +2 -2
  107. package/lib/cli/configure/processing/typescript.js +63 -26
  108. package/lib/cli/configure/processing/typescript.js.map +2 -2
  109. package/lib/cli/configure/types.d.ts +4 -15
  110. package/lib/cli/configure/types.js +16 -0
  111. package/lib/cli/configure/types.js.map +3 -3
  112. package/lib/cli/format/index.js +44 -20
  113. package/lib/cli/format/index.js.map +1 -1
  114. package/lib/cli/help/index.js +30 -6
  115. package/lib/cli/help/index.js.map +1 -1
  116. package/lib/cli/init/getConfig.d.ts +1 -1
  117. package/lib/cli/init/getConfig.js +100 -74
  118. package/lib/cli/init/getConfig.js.map +3 -3
  119. package/lib/cli/init/git.js +51 -16
  120. package/lib/cli/init/git.js.map +2 -2
  121. package/lib/cli/init/index.js +98 -67
  122. package/lib/cli/init/index.js.map +2 -2
  123. package/lib/cli/init/prompts.d.ts +4 -4
  124. package/lib/cli/init/prompts.js +48 -27
  125. package/lib/cli/init/prompts.js.map +2 -2
  126. package/lib/cli/init/types.js +41 -7
  127. package/lib/cli/init/types.js.map +1 -1
  128. package/lib/cli/init/validation.js +30 -2
  129. package/lib/cli/init/validation.js.map +1 -1
  130. package/lib/cli/init/writePackageJson.js +42 -8
  131. package/lib/cli/init/writePackageJson.js.map +2 -2
  132. package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
  133. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  134. package/lib/cli/lint/annotate/buildkite/index.js +45 -11
  135. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  136. package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
  137. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  138. package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
  139. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  140. package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
  141. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  142. package/lib/cli/lint/annotate/github/eslint.js +26 -2
  143. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  144. package/lib/cli/lint/annotate/github/index.js +45 -11
  145. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  146. package/lib/cli/lint/annotate/github/internal.js +26 -2
  147. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  148. package/lib/cli/lint/annotate/github/prettier.js +26 -2
  149. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  150. package/lib/cli/lint/annotate/github/tsc.js +28 -4
  151. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  152. package/lib/cli/lint/annotate/index.js +30 -6
  153. package/lib/cli/lint/annotate/index.js.map +1 -1
  154. package/lib/cli/lint/autofix.js +73 -37
  155. package/lib/cli/lint/autofix.js.map +1 -1
  156. package/lib/cli/lint/eslint.js +51 -16
  157. package/lib/cli/lint/eslint.js.map +3 -3
  158. package/lib/cli/lint/external.js +51 -19
  159. package/lib/cli/lint/external.js.map +2 -2
  160. package/lib/cli/lint/index.js +49 -25
  161. package/lib/cli/lint/index.js.map +1 -1
  162. package/lib/cli/lint/internal.js +42 -18
  163. package/lib/cli/lint/internal.js.map +1 -1
  164. package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
  165. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  166. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +45 -11
  167. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
  168. package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
  169. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  170. package/lib/cli/lint/internalLints/refreshConfigFiles.js +63 -32
  171. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
  172. package/lib/cli/lint/internalLints/upgrade/index.d.ts +6 -2
  173. package/lib/cli/lint/internalLints/upgrade/index.js +55 -23
  174. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  175. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
  176. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  177. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +45 -11
  178. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  179. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +30 -6
  180. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  181. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +65 -34
  182. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
  183. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +46 -11
  184. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  185. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +59 -23
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +46 -11
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +46 -11
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +46 -11
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +45 -11
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  209. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -4
  210. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -18
  211. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  212. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
  213. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  214. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +40 -0
  215. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
  216. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
  217. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
  218. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
  219. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
  220. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
  221. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
  222. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  223. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +34 -10
  224. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  225. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +44 -10
  226. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  227. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +46 -12
  228. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  229. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +28 -4
  230. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  231. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +49 -15
  232. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  233. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +45 -11
  234. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  235. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +34 -10
  236. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
  237. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +45 -11
  238. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  239. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +45 -11
  240. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  241. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +47 -13
  242. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  243. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
  244. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  245. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +45 -11
  246. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  247. package/lib/cli/lint/prettier.js +50 -15
  248. package/lib/cli/lint/prettier.js.map +3 -3
  249. package/lib/cli/lint/tsc.js +28 -4
  250. package/lib/cli/lint/tsc.js.map +1 -1
  251. package/lib/cli/lint/types.js +16 -0
  252. package/lib/cli/lint/types.js.map +3 -3
  253. package/lib/cli/migrate/index.d.ts +5 -0
  254. package/lib/cli/migrate/index.js +79 -15
  255. package/lib/cli/migrate/index.js.map +2 -2
  256. package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
  257. package/lib/cli/migrate/nodeVersion/checks.js +51 -120
  258. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  259. package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
  260. package/lib/cli/migrate/nodeVersion/index.js +239 -65
  261. package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
  262. package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
  263. package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
  264. package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
  265. package/lib/cli/node/index.js +57 -20
  266. package/lib/cli/node/index.js.map +3 -3
  267. package/lib/cli/release/index.js +28 -4
  268. package/lib/cli/release/index.js.map +1 -1
  269. package/lib/cli/start/index.js +50 -16
  270. package/lib/cli/start/index.js.map +3 -3
  271. package/lib/cli/test/index.js +65 -4
  272. package/lib/cli/test/index.js.map +2 -2
  273. package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
  274. package/lib/cli/test/reporters/github/annotations.js +102 -0
  275. package/lib/cli/test/reporters/github/annotations.js.map +7 -0
  276. package/lib/cli/test/reporters/github/index.d.ts +5 -0
  277. package/lib/cli/test/reporters/github/index.js +74 -0
  278. package/lib/cli/test/reporters/github/index.js.map +7 -0
  279. package/lib/cli/version/index.js +30 -6
  280. package/lib/cli/version/index.js.map +1 -1
  281. package/lib/index.d.ts +1 -0
  282. package/lib/index.js +46 -6
  283. package/lib/index.js.map +2 -2
  284. package/lib/skuba.js +45 -26
  285. package/lib/skuba.js.map +3 -3
  286. package/lib/utils/args.js +43 -6
  287. package/lib/utils/args.js.map +2 -2
  288. package/lib/utils/command.js +42 -4
  289. package/lib/utils/command.js.map +3 -3
  290. package/lib/utils/copy.js +57 -20
  291. package/lib/utils/copy.js.map +2 -2
  292. package/lib/utils/dir.js +72 -32
  293. package/lib/utils/dir.js.map +2 -2
  294. package/lib/utils/env.js +26 -2
  295. package/lib/utils/env.js.map +1 -1
  296. package/lib/utils/error.js +47 -10
  297. package/lib/utils/error.js.map +1 -1
  298. package/lib/utils/exec.js +61 -23
  299. package/lib/utils/exec.js.map +3 -3
  300. package/lib/utils/fs.js +40 -6
  301. package/lib/utils/fs.js.map +2 -2
  302. package/lib/utils/help.js +30 -6
  303. package/lib/utils/help.js.map +1 -1
  304. package/lib/utils/logging.js +38 -11
  305. package/lib/utils/logging.js.map +1 -1
  306. package/lib/utils/logo.js +48 -24
  307. package/lib/utils/logo.js.map +1 -1
  308. package/lib/utils/manifest.d.ts +2 -3
  309. package/lib/utils/manifest.js +48 -8
  310. package/lib/utils/manifest.js.map +3 -3
  311. package/lib/utils/npmrc.js +26 -2
  312. package/lib/utils/npmrc.js.map +1 -1
  313. package/lib/utils/packageManager.js +49 -12
  314. package/lib/utils/packageManager.js.map +2 -2
  315. package/lib/utils/port.js +39 -4
  316. package/lib/utils/port.js.map +2 -2
  317. package/lib/utils/sleep.js +26 -2
  318. package/lib/utils/sleep.js.map +1 -1
  319. package/lib/utils/template.js +55 -18
  320. package/lib/utils/template.js.map +3 -3
  321. package/lib/utils/validation.js +31 -2
  322. package/lib/utils/validation.js.map +1 -1
  323. package/lib/utils/version.js +46 -9
  324. package/lib/utils/version.js.map +2 -2
  325. package/lib/utils/wait.js +32 -7
  326. package/lib/utils/wait.js.map +1 -1
  327. package/lib/utils/worker.js +35 -10
  328. package/lib/utils/worker.js.map +1 -1
  329. package/lib/wrapper/function-arguments.d.js +1 -0
  330. package/lib/wrapper/functionHandler.js +49 -18
  331. package/lib/wrapper/functionHandler.js.map +2 -2
  332. package/lib/wrapper/http.js +43 -8
  333. package/lib/wrapper/http.js.map +2 -2
  334. package/lib/wrapper/index.js +7 -6
  335. package/lib/wrapper/index.js.map +1 -1
  336. package/lib/wrapper/main.js +42 -8
  337. package/lib/wrapper/main.js.map +3 -3
  338. package/lib/wrapper/requestListener.js +47 -13
  339. package/lib/wrapper/requestListener.js.map +2 -2
  340. package/lib/wrapper/server.js +28 -4
  341. package/lib/wrapper/server.js.map +1 -1
  342. package/package.json +42 -43
  343. package/template/base/_.prettierrc.js +1 -1
  344. package/template/base/_eslint.config.js +1 -1
  345. package/template/base/_pnpm-workspace.yaml +4 -3
  346. package/template/base/jest.config.ts +19 -0
  347. package/template/base/jest.setup.ts +3 -0
  348. package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
  349. package/template/express-rest-api/.nvmrc +1 -1
  350. package/template/express-rest-api/package.json +7 -8
  351. package/template/express-rest-api/skuba.template.js +1 -1
  352. package/template/express-rest-api/src/app.test.ts +0 -1
  353. package/template/greeter/.buildkite/pipeline.yml +1 -1
  354. package/template/greeter/.nvmrc +1 -1
  355. package/template/greeter/package.json +4 -5
  356. package/template/greeter/skuba.template.js +1 -1
  357. package/template/greeter/src/app.test.ts +1 -3
  358. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
  359. package/template/koa-rest-api/.nvmrc +1 -1
  360. package/template/koa-rest-api/package.json +8 -10
  361. package/template/koa-rest-api/skuba.template.js +1 -1
  362. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
  363. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
  364. package/template/koa-rest-api/src/app.test.ts +0 -2
  365. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  366. package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
  367. package/template/koa-rest-api/src/testing/metrics.ts +0 -2
  368. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
  369. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  370. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -21
  371. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
  372. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  373. package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
  374. package/template/lambda-sqs-worker-cdk/package.json +9 -9
  375. package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
  376. package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
  377. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
  378. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
  379. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
  380. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
  381. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
  382. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  383. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  384. package/template/oss-npm-package/.nvmrc +1 -1
  385. package/template/oss-npm-package/_package.json +0 -1
  386. package/template/oss-npm-package/skuba.template.js +1 -1
  387. package/template/oss-npm-package/src/index.test.ts +0 -2
  388. package/template/private-npm-package/.nvmrc +1 -1
  389. package/template/private-npm-package/_package.json +1 -2
  390. package/template/private-npm-package/skuba.template.js +2 -2
  391. package/template/private-npm-package/src/index.test.ts +0 -2
  392. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +0 -11
  393. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +0 -7
  394. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +0 -5
  395. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +0 -72
  396. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +0 -7
  397. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -2
  398. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
  399. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
  400. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
  401. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
  402. package/lib/eslint.d.js +0 -1
  403. package/lib/eslint.d.js.map +0 -7
  404. package/template/base/vitest.config.ts +0 -25
  405. /package/lib/cli/lint/internalLints/upgrade/patches/{12.5.0 → 13.1.1}/index.d.ts +0 -0
  406. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`returns expected CloudFormation stack for dev 1`] = `
4
4
  {
@@ -184,7 +184,6 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
184
184
  "DD_LAMBDA_HANDLER": "index.handler",
185
185
  "DD_LOGS_INJECTION": "false",
186
186
  "DD_MERGE_XRAY_TRACES": "false",
187
- "DD_SERVERLESS_APPSEC_ENABLED": "false",
188
187
  "DD_SERVERLESS_LOGS_ENABLED": "false",
189
188
  "DD_SERVICE": "serviceName",
190
189
  "DD_SITE": "datadoghq.com",
@@ -217,7 +216,7 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
217
216
  {
218
217
  "Ref": "AWS::Region",
219
218
  },
220
- ":464622532012:layer:Datadog-Node22-x:x",
219
+ ":464622532012:layer:Datadog-Node24-x:x",
221
220
  ],
222
221
  ],
223
222
  },
@@ -242,7 +241,7 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
242
241
  "Arn",
243
242
  ],
244
243
  },
245
- "Runtime": "nodejs22.x",
244
+ "Runtime": "nodejs24.x",
246
245
  "Tags": [
247
246
  {
248
247
  "Key": "aws-codedeploy-hooks",
@@ -763,14 +762,6 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
763
762
  },
764
763
  },
765
764
  "Resources": {
766
- "datadogapikeysecret046FEF06": {
767
- "DeletionPolicy": "Delete",
768
- "Properties": {
769
- "GenerateSecretString": {},
770
- },
771
- "Type": "AWS::SecretsManager::Secret",
772
- "UpdateReplacePolicy": "Delete",
773
- },
774
765
  "destinationtopicDCE2E0B8": {
775
766
  "Properties": {
776
767
  "KmsMasterKeyId": {
@@ -928,16 +919,13 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
928
919
  },
929
920
  "Environment": {
930
921
  "Variables": {
931
- "DD_API_KEY_SECRET_ARN": {
932
- "Ref": "datadogapikeysecret046FEF06",
933
- },
922
+ "DD_API_KEY_SECRET_ARN": "arn:aws:secretsmanager:<Region>:<AccountId>:secret:datadog-api-key",
934
923
  "DD_CAPTURE_LAMBDA_PAYLOAD": "false",
935
924
  "DD_ENV": "production",
936
925
  "DD_FLUSH_TO_LOG": "false",
937
926
  "DD_LAMBDA_HANDLER": "index.handler",
938
927
  "DD_LOGS_INJECTION": "false",
939
928
  "DD_MERGE_XRAY_TRACES": "false",
940
- "DD_SERVERLESS_APPSEC_ENABLED": "false",
941
929
  "DD_SERVERLESS_LOGS_ENABLED": "false",
942
930
  "DD_SERVICE": "serviceName",
943
931
  "DD_SITE": "datadoghq.com",
@@ -970,7 +958,7 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
970
958
  {
971
959
  "Ref": "AWS::Region",
972
960
  },
973
- ":464622532012:layer:Datadog-Node22-x:x",
961
+ ":464622532012:layer:Datadog-Node24-x:x",
974
962
  ],
975
963
  ],
976
964
  },
@@ -995,7 +983,7 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
995
983
  "Arn",
996
984
  ],
997
985
  },
998
- "Runtime": "nodejs22.x",
986
+ "Runtime": "nodejs24.x",
999
987
  "Tags": [
1000
988
  {
1001
989
  "Key": "aws-codedeploy-hooks",
@@ -1394,9 +1382,7 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
1394
1382
  "secretsmanager:DescribeSecret",
1395
1383
  ],
1396
1384
  "Effect": "Allow",
1397
- "Resource": {
1398
- "Ref": "datadogapikeysecret046FEF06",
1399
- },
1385
+ "Resource": "arn:aws:secretsmanager:<Region>:<AccountId>:secret:datadog-api-key-??????",
1400
1386
  },
1401
1387
  {
1402
1388
  "Action": [
@@ -1,6 +1,5 @@
1
1
  import { App, aws_secretsmanager, aws_sns } from 'aws-cdk-lib';
2
2
  import { Template } from 'aws-cdk-lib/assertions';
3
- import { afterAll, afterEach, expect, it, vi } from 'vitest';
4
3
 
5
4
  const originalDeployment = process.env.DEPLOYMENT;
6
5
  const originalVersion = process.env.VERSION;
@@ -11,7 +10,7 @@ afterAll(() => {
11
10
  });
12
11
 
13
12
  afterEach(() => {
14
- vi.resetModules();
13
+ jest.resetModules();
15
14
  });
16
15
 
17
16
  it.each(['dev', 'prod'])(
@@ -22,16 +21,15 @@ it.each(['dev', 'prod'])(
22
21
 
23
22
  const { AppStack } = await import('./appStack.js');
24
23
 
25
- vi.spyOn(aws_sns.Topic, 'fromTopicArn').mockImplementation(
26
- (scope, id) => new aws_sns.Topic(scope, id),
27
- );
24
+ jest
25
+ .spyOn(aws_sns.Topic, 'fromTopicArn')
26
+ .mockImplementation((scope, id) => new aws_sns.Topic(scope, id));
28
27
 
29
- vi.spyOn(
30
- aws_secretsmanager.Secret,
31
- 'fromSecretPartialArn',
32
- ).mockImplementation(
33
- (scope, id) => new aws_secretsmanager.Secret(scope, id),
34
- );
28
+ jest
29
+ .spyOn(aws_secretsmanager.Secret, 'fromSecretPartialArn')
30
+ .mockImplementation(
31
+ (scope, id) => new aws_secretsmanager.Secret(scope, id),
32
+ );
35
33
 
36
34
  const app = new App({ context: { 'aws:cdk:bundling-stacks': [] } });
37
35
 
@@ -19,7 +19,7 @@ import { DatadogLambda } from 'datadog-cdk-constructs-v2';
19
19
  import { config } from './config.js';
20
20
 
21
21
  // Updated by https://github.com/seek-oss/rynovate
22
- const DATADOG_EXTENSION_LAYER_VERSION = 88;
22
+ const DATADOG_EXTENSION_LAYER_VERSION = 90;
23
23
 
24
24
  // Updated by https://github.com/seek-oss/rynovate
25
25
  const DATADOG_NODE_LAYER_VERSION = 126;
@@ -86,7 +86,7 @@ export class AppStack extends Stack {
86
86
 
87
87
  const worker = new aws_lambda_nodejs.NodejsFunction(this, 'worker', {
88
88
  architecture: aws_lambda.Architecture[architecture],
89
- runtime: aws_lambda.Runtime.NODEJS_22_X,
89
+ runtime: aws_lambda.Runtime.NODEJS_24_X,
90
90
  memorySize: 512,
91
91
  environmentEncryption: kmsKey,
92
92
  // aws-sdk-v3 sets this to true by default, so it is not necessary to set the environment variable
@@ -96,7 +96,7 @@ export class AppStack extends Stack {
96
96
  timeout: Duration.seconds(30),
97
97
  bundling: {
98
98
  sourceMap: true,
99
- target: 'node22',
99
+ target: 'node24',
100
100
  // aws-sdk-v3 is set as an external module by default, but we want it to be bundled with the function
101
101
  externalModules: [],
102
102
  esbuildArgs: {
@@ -40,8 +40,7 @@ const configs: Record<Deployment, Config> = {
40
40
  },
41
41
  },
42
42
 
43
- datadogApiKeySecretArn:
44
- 'arn:aws:secretsmanager:<Region>:<AccountId>:secret:TODO_SECRET_NAME',
43
+ datadogApiKeySecretArn: '<%- devDataDogApiKeySecretArn %>',
45
44
  sourceSnsTopicArn: 'TODO: sourceSnsTopicArn',
46
45
  },
47
46
  prod: {
@@ -57,8 +56,7 @@ const configs: Record<Deployment, Config> = {
57
56
  },
58
57
  },
59
58
 
60
- datadogApiKeySecretArn:
61
- 'arn:aws:secretsmanager:<Region>:<AccountId>:secret:TODO_SECRET_NAME',
59
+ datadogApiKeySecretArn: '<%- prodDataDogApiKeySecretArn %>',
62
60
  sourceSnsTopicArn: 'TODO: sourceSnsTopicArn',
63
61
  },
64
62
  };
@@ -2,7 +2,6 @@
2
2
  "name": "@seek/<%- serviceName %>",
3
3
  "private": true,
4
4
  "license": "UNLICENSED",
5
- "type": "module",
6
5
  "imports": {
7
6
  "#src/*": {
8
7
  "@seek/<%- serviceName %>/source": "./src/*",
@@ -21,10 +20,11 @@
21
20
  "dependencies": {
22
21
  "@aws-sdk/client-codedeploy": "^3.363.0",
23
22
  "@aws-sdk/client-lambda": "^3.363.0",
23
+ "@aws-sdk/client-secrets-manager": "^3.363.0",
24
24
  "@aws-sdk/client-sns": "^3.363.0",
25
25
  "@seek/aws-codedeploy-hooks": "^2.0.0",
26
26
  "@seek/logger": "^11.1.0",
27
- "skuba-dive": "3.0.0-replace-global-vars-20251117052457",
27
+ "skuba-dive": "4.0.0-rfc-upgrade-on-test-20251217012156",
28
28
  "zod": "^4.0.0"
29
29
  },
30
30
  "devDependencies": {
@@ -33,19 +33,19 @@
33
33
  "@types/chance": "^1.1.3",
34
34
  "@types/node": "^22.13.10",
35
35
  "aws-cdk": "^2.1010.0",
36
- "aws-cdk-lib": "^2.190.0",
37
- "aws-sdk-client-mock": "^4.1.0",
38
- "aws-sdk-client-mock-vitest": "^6.2.1",
36
+ "aws-cdk-lib": "^2.232.1",
37
+ "aws-sdk-client-mock": "^4.0.0",
38
+ "aws-sdk-client-mock-jest": "^4.0.0",
39
39
  "chance": "^1.1.8",
40
40
  "constructs": "^10.0.17",
41
- "datadog-cdk-constructs-v2": "^3.0.0",
41
+ "datadog-cdk-constructs-v2": "^3.4.0",
42
42
  "datadog-lambda-js": "^12.0.0",
43
43
  "dd-trace": "^5.0.0",
44
44
  "pino-pretty": "^13.0.0",
45
- "skuba": "14.0.0-replace-global-vars-20251117052457"
45
+ "skuba": "14.0.0-rfc-upgrade-on-test-20251217012156"
46
46
  },
47
- "packageManager": "pnpm@10.20.0",
47
+ "packageManager": "pnpm@10.25.0",
48
48
  "engines": {
49
- "node": ">=22"
49
+ "node": ">=24"
50
50
  }
51
51
  }
@@ -2,7 +2,7 @@
2
2
  * Run `skuba configure` to finish templating and remove this file.
3
3
  */
4
4
 
5
- export default {
5
+ module.exports = {
6
6
  entryPoint: 'src/app.ts#handler',
7
7
  fields: [
8
8
  {
@@ -22,6 +22,18 @@ export default {
22
22
  initial: 'my-team-aws-account-prod:cicd',
23
23
  validate: (value) => /^.+:.+$/.test(value),
24
24
  },
25
+ {
26
+ name: 'devDataDogApiKeySecretArn',
27
+ message: 'Dev DataDog API Key Secret ARN',
28
+ initial:
29
+ 'arn:aws:secretsmanager:<Region>:<AccountId>:secret:datadog-api-key',
30
+ },
31
+ {
32
+ name: 'prodDataDogApiKeySecretArn',
33
+ message: 'Prod DataDog API Key Secret ARN',
34
+ initial:
35
+ 'arn:aws:secretsmanager:<Region>:<AccountId>:secret:datadog-api-key',
36
+ },
25
37
  ],
26
38
  packageManager: 'pnpm',
27
39
  type: 'application',
@@ -1,14 +1,5 @@
1
1
  import { PublishCommand } from '@aws-sdk/client-sns';
2
2
  import type { SQSBatchResponse } from 'aws-lambda';
3
- import {
4
- afterEach,
5
- beforeAll,
6
- beforeEach,
7
- describe,
8
- expect,
9
- it,
10
- vi,
11
- } from 'vitest';
12
3
 
13
4
  import * as app from './app.js';
14
5
  import { stdoutMock } from './framework/logging.js';
@@ -29,7 +20,7 @@ describe('handler', () => {
29
20
 
30
21
  const score = chance.floating({ max: 1, min: 0 });
31
22
 
32
- const distribution = vi
23
+ const distribution = jest
33
24
  .spyOn(metricsClient, 'distribution')
34
25
  .mockReturnValue();
35
26
 
@@ -50,9 +41,9 @@ describe('handler', () => {
50
41
  it('handles one record', async () => {
51
42
  const event = createSqsEvent([JSON.stringify(jobPublished)]);
52
43
 
53
- await expect(app.handler(event, ctx)).resolves.toEqual({
44
+ await expect(app.handler(event, ctx)).resolves.toEqual<SQSBatchResponse>({
54
45
  batchItemFailures: [],
55
- } satisfies SQSBatchResponse);
46
+ });
56
47
 
57
48
  expect(scoringService.request).toHaveBeenCalledTimes(1);
58
49
 
@@ -81,9 +72,9 @@ describe('handler', () => {
81
72
  JSON.stringify(jobPublished),
82
73
  ]);
83
74
 
84
- await expect(app.handler(event, ctx)).resolves.toEqual({
75
+ await expect(app.handler(event, ctx)).resolves.toEqual<SQSBatchResponse>({
85
76
  batchItemFailures: [],
86
- } satisfies SQSBatchResponse);
77
+ });
87
78
 
88
79
  expect(stdoutMock.calls).toMatchObject([
89
80
  { count: 2, level: 20, msg: 'Received jobs' },
@@ -109,9 +100,9 @@ describe('handler', () => {
109
100
  JSON.stringify(jobPublished),
110
101
  ]);
111
102
 
112
- await expect(app.handler(event, ctx)).resolves.toEqual({
103
+ await expect(app.handler(event, ctx)).resolves.toEqual<SQSBatchResponse>({
113
104
  batchItemFailures: [{ itemIdentifier: event.Records[0]!.messageId }],
114
- } satisfies SQSBatchResponse);
105
+ });
115
106
 
116
107
  expect(stdoutMock.calls).toMatchObject([
117
108
  { count: 2, level: 20, msg: 'Received jobs' },
@@ -137,13 +128,13 @@ describe('handler', () => {
137
128
  it('returns a batchItemFailure on invalid input', () => {
138
129
  const event = createSqsEvent(['}']);
139
130
 
140
- return expect(app.handler(event, ctx)).resolves.toEqual({
131
+ return expect(app.handler(event, ctx)).resolves.toEqual<SQSBatchResponse>({
141
132
  batchItemFailures: [
142
133
  {
143
134
  itemIdentifier: event.Records[0]!.messageId,
144
135
  },
145
136
  ],
146
- } satisfies SQSBatchResponse);
137
+ });
147
138
  });
148
139
 
149
140
  it('bubbles up scoring service error', async () => {
@@ -153,9 +144,9 @@ describe('handler', () => {
153
144
 
154
145
  const event = createSqsEvent([JSON.stringify(jobPublished)]);
155
146
 
156
- await expect(app.handler(event, ctx)).resolves.toEqual({
147
+ await expect(app.handler(event, ctx)).resolves.toEqual<SQSBatchResponse>({
157
148
  batchItemFailures: [{ itemIdentifier: event.Records[0]!.messageId }],
158
- } satisfies SQSBatchResponse);
149
+ });
159
150
 
160
151
  expect(stdoutMock.calls).toMatchObject([
161
152
  { count: 1, level: 20, msg: 'Received jobs' },
@@ -179,9 +170,9 @@ describe('handler', () => {
179
170
 
180
171
  const event = createSqsEvent([JSON.stringify(jobPublished)]);
181
172
 
182
- await expect(app.handler(event, ctx)).resolves.toEqual({
173
+ await expect(app.handler(event, ctx)).resolves.toEqual<SQSBatchResponse>({
183
174
  batchItemFailures: [{ itemIdentifier: event.Records[0]!.messageId }],
184
- } satisfies SQSBatchResponse);
175
+ });
185
176
 
186
177
  expect(stdoutMock.calls).toMatchObject([
187
178
  {
@@ -1,5 +1,4 @@
1
1
  import type { SQSEvent } from 'aws-lambda';
2
- import { afterEach, describe, expect, it } from 'vitest';
3
2
 
4
3
  import { createHandler } from './handler.js';
5
4
  import { logger, stdoutMock } from './logging.js';
@@ -1,5 +1,3 @@
1
- import { describe, expect, it } from 'vitest';
2
-
3
1
  import { validateJson } from './validation.js';
4
2
 
5
3
  import {
@@ -32,17 +30,17 @@ describe('validateJson', () => {
32
30
 
33
31
  expect(() => validateJson(input, IdDescriptionSchema))
34
32
  .toThrowErrorMatchingInlineSnapshot(`
35
- [ZodError: [
36
- {
37
- "expected": "string",
38
- "code": "invalid_type",
39
- "path": [
40
- "id"
41
- ],
42
- "message": "Invalid input: expected string, received null"
43
- }
44
- ]]
45
- `);
33
+ "[
34
+ {
35
+ "expected": "string",
36
+ "code": "invalid_type",
37
+ "path": [
38
+ "id"
39
+ ],
40
+ "message": "Invalid input: expected string, received null"
41
+ }
42
+ ]"
43
+ `);
46
44
  });
47
45
 
48
46
  it('blocks missing prop', () => {
@@ -50,25 +48,25 @@ describe('validateJson', () => {
50
48
 
51
49
  expect(() => validateJson(input, IdDescriptionSchema))
52
50
  .toThrowErrorMatchingInlineSnapshot(`
53
- [ZodError: [
54
- {
55
- "expected": "string",
56
- "code": "invalid_type",
57
- "path": [
58
- "id"
59
- ],
60
- "message": "Invalid input: expected string, received undefined"
61
- },
62
- {
63
- "expected": "string",
64
- "code": "invalid_type",
65
- "path": [
66
- "description"
67
- ],
68
- "message": "Invalid input: expected string, received undefined"
69
- }
70
- ]]
71
- `);
51
+ "[
52
+ {
53
+ "expected": "string",
54
+ "code": "invalid_type",
55
+ "path": [
56
+ "id"
57
+ ],
58
+ "message": "Invalid input: expected string, received undefined"
59
+ },
60
+ {
61
+ "expected": "string",
62
+ "code": "invalid_type",
63
+ "path": [
64
+ "description"
65
+ ],
66
+ "message": "Invalid input: expected string, received undefined"
67
+ }
68
+ ]"
69
+ `);
72
70
  });
73
71
 
74
72
  it('blocks invalid JSON', () => {
@@ -77,7 +75,7 @@ describe('validateJson', () => {
77
75
  expect(() =>
78
76
  validateJson(input, IdDescriptionSchema),
79
77
  ).toThrowErrorMatchingInlineSnapshot(
80
- `[SyntaxError: Unexpected token '}', "}" is not valid JSON]`,
78
+ `"Unexpected token '}', "}" is not valid JSON"`,
81
79
  );
82
80
  });
83
81
  });
@@ -1,18 +1,12 @@
1
- import { afterEach, beforeAll, describe, expect, it } from 'vitest';
2
-
3
1
  import * as jobScorer from './jobScorer.js';
4
2
 
5
3
  import { scoringService } from '#src/testing/services.js';
6
4
  import { chance, mockJobPublishedEvent } from '#src/testing/types.js';
7
5
 
8
6
  describe('scoreJobPublishedEvent', () => {
9
- beforeAll(() => {
10
- scoringService.spy();
11
- });
7
+ beforeAll(scoringService.spy);
12
8
 
13
- afterEach(() => {
14
- scoringService.clear();
15
- });
9
+ afterEach(scoringService.clear);
16
10
 
17
11
  it('scores an event', async () => {
18
12
  const score = chance.floating({ max: 1, min: 0 });
@@ -1,5 +1,4 @@
1
1
  import { PublishCommand } from '@aws-sdk/client-sns';
2
- import { afterEach, describe, expect, it, vi } from 'vitest';
3
2
 
4
3
  import { sendPipelineEvent } from './pipelineEventSender.js';
5
4
 
@@ -8,7 +7,7 @@ import { chance } from '#src/testing/types.js';
8
7
 
9
8
  describe('sendPipelineEvent', () => {
10
9
  afterEach(() => {
11
- vi.clearAllMocks();
10
+ jest.clearAllMocks();
12
11
  });
13
12
 
14
13
  it('handles happy path', async () => {
@@ -35,7 +34,7 @@ describe('sendPipelineEvent', () => {
35
34
  return expect(
36
35
  sendPipelineEvent({}),
37
36
  ).rejects.toThrowErrorMatchingInlineSnapshot(
38
- `[Error: SNS did not return a message ID]`,
37
+ `"SNS did not return a message ID"`,
39
38
  );
40
39
  });
41
40
  });
@@ -1,19 +1,18 @@
1
- import 'aws-sdk-client-mock-vitest/extend';
1
+ import 'aws-sdk-client-mock-jest';
2
2
 
3
3
  import { PublishCommand } from '@aws-sdk/client-sns';
4
4
  import { mockClient } from 'aws-sdk-client-mock';
5
- import { vi } from 'vitest';
6
5
 
7
6
  import { sns as snsClient } from '#src/services/aws.js';
8
7
  import * as jobScorer from '#src/services/jobScorer.js';
9
8
 
10
9
  export const scoringService = {
11
- request: vi.fn(),
10
+ request: jest.fn(),
12
11
 
13
12
  clear: () => scoringService.request.mockClear(),
14
13
 
15
14
  spy: () =>
16
- vi
15
+ jest
17
16
  .spyOn(jobScorer.scoringService, 'request')
18
17
  .mockImplementation(scoringService.request),
19
18
  };
@@ -18,7 +18,7 @@ jobs:
18
18
  timeout-minutes: 20
19
19
  steps:
20
20
  - name: Check out repo
21
- uses: actions/checkout@v5
21
+ uses: actions/checkout@v6
22
22
  with:
23
23
  fetch-depth: 0
24
24
 
@@ -16,7 +16,7 @@ jobs:
16
16
  timeout-minutes: 20
17
17
  steps:
18
18
  - name: Check out repo
19
- uses: actions/checkout@v5
19
+ uses: actions/checkout@v6
20
20
 
21
21
  - name: Set up pnpm
22
22
  uses: pnpm/action-setup@v4
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -14,7 +14,6 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "sideEffects": false,
17
- "type": "module",
18
17
  "main": "./lib-commonjs/index.js",
19
18
  "module": "./lib-es2015/index.js",
20
19
  "types": "./lib-types/index.d.ts",
@@ -2,7 +2,7 @@
2
2
  * Run `skuba configure` to finish templating and remove this file.
3
3
  */
4
4
 
5
- export default {
5
+ module.exports = {
6
6
  entryPoint: 'src/index.ts',
7
7
  fields: [
8
8
  {
@@ -1,5 +1,3 @@
1
- import { describe, expect, it } from 'vitest';
2
-
3
1
  import { log } from './index.js';
4
2
 
5
3
  describe('app', () => {
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -14,7 +14,6 @@
14
14
  },
15
15
  "license": "UNLICENSED",
16
16
  "sideEffects": false,
17
- "type": "module",
18
17
  "main": "./lib-commonjs/index.js",
19
18
  "module": "./lib-es2015/index.js",
20
19
  "types": "./lib-types/index.d.ts",
@@ -47,6 +46,6 @@
47
46
  },
48
47
  "packageManager": "pnpm@10.7.0",
49
48
  "engines": {
50
- "node": ">=22"
49
+ "node": ">=20"
51
50
  }
52
51
  }
@@ -2,7 +2,7 @@
2
2
  * Run `skuba configure` to finish templating and remove this file.
3
3
  */
4
4
 
5
- export default {
5
+ module.exports = {
6
6
  entryPoint: 'src/index.ts',
7
7
  fields: [
8
8
  {
@@ -10,7 +10,7 @@ export default {
10
10
  message: 'Module name',
11
11
  initial: '@seek/my-first-module',
12
12
  validate: (value) =>
13
- /^@seek\/.+$/.test(value) || 'must start with an @seek/ scope',
13
+ /^@seek\/.+$/.test(value) || 'Must start with @seek/ scope',
14
14
  },
15
15
  {
16
16
  name: 'description',
@@ -1,5 +1,3 @@
1
- import { describe, expect, it } from 'vitest';
2
-
3
1
  import { log } from './index.js';
4
2
 
5
3
  describe('app', () => {
@@ -1,11 +0,0 @@
1
- import { rewriteGlobalVars } from "./rewriteGlobalVars.js";
2
- const patches = [
3
- {
4
- apply: rewriteGlobalVars,
5
- description: "Replace __dirname and __filename with import.meta equivalents"
6
- }
7
- ];
8
- export {
9
- patches
10
- };
11
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.5.0/index.ts"],
4
- "sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { rewriteGlobalVars } from './rewriteGlobalVars.js';\n\nexport const patches: Patches = [\n {\n apply: rewriteGlobalVars,\n description:\n 'Replace __dirname and __filename with import.meta equivalents',\n },\n];\n"],
5
- "mappings": "AAEA,SAAS,yBAAyB;AAE3B,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aACE;AAAA,EACJ;AACF;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- import type { PatchFunction } from '../../index.js';
2
- export declare const hasDirNameRegex: RegExp;
3
- export declare const hasFileNameRegex: RegExp;
4
- export declare const tryRewriteGlobalVars: PatchFunction;
5
- export declare const rewriteGlobalVars: PatchFunction;