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,10 +1,45 @@
1
- import path from "path";
2
- import { inspect } from "util";
3
- import { glob } from "fast-glob";
4
- import fs from "fs-extra";
5
- import { isErrorWithCode } from "../../../../../../utils/error.js";
6
- import { log } from "../../../../../../utils/logging.js";
7
- import { formatPrettier } from "../../../../../configure/processing/prettier.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var unhandledRejections_exports = {};
30
+ __export(unhandledRejections_exports, {
31
+ IMPORT_REGEX: () => IMPORT_REGEX,
32
+ NAMED_EXPORT_REGEX: () => NAMED_EXPORT_REGEX,
33
+ tryPatchUnhandledRejections: () => tryPatchUnhandledRejections
34
+ });
35
+ module.exports = __toCommonJS(unhandledRejections_exports);
36
+ var import_path = __toESM(require("path"));
37
+ var import_util = require("util");
38
+ var import_fast_glob = require("fast-glob");
39
+ var import_fs_extra = __toESM(require("fs-extra"));
40
+ var import_error = require("../../../../../../utils/error.js");
41
+ var import_logging = require("../../../../../../utils/logging.js");
42
+ var import_prettier = require("../../../../../configure/processing/prettier.js");
8
43
  const addListener = (identifier) => `
9
44
  // Report unhandled rejections instead of crashing the process
10
45
  // Make sure to monitor these reports and alert as appropriate
@@ -15,10 +50,10 @@ process.on('unhandledRejection', (err) =>
15
50
  const tryReadFilesSequentially = async (filepaths) => {
16
51
  for (const filepath of filepaths) {
17
52
  try {
18
- const contents = await fs.promises.readFile(filepath, "utf8");
53
+ const contents = await import_fs_extra.default.promises.readFile(filepath, "utf8");
19
54
  return { contents, filepath };
20
55
  } catch (err) {
21
- if (isErrorWithCode(err, "ENOENT")) {
56
+ if ((0, import_error.isErrorWithCode)(err, "ENOENT")) {
22
57
  continue;
23
58
  }
24
59
  throw err;
@@ -39,7 +74,7 @@ const findLogger = async ({
39
74
  return { identifier };
40
75
  }
41
76
  }
42
- const loggerPaths = await glob("**/{logger,logging}.ts", {
77
+ const loggerPaths = await (0, import_fast_glob.glob)("**/{logger,logging}.ts", {
43
78
  cwd: root,
44
79
  ignore: ["**/.git", "**/node_modules"]
45
80
  });
@@ -47,8 +82,8 @@ const findLogger = async ({
47
82
  if (!loggingModule) {
48
83
  return { identifier: "console" };
49
84
  }
50
- const parsedPath = path.parse(path.relative(root, loggingModule.filepath));
51
- const importPath = path.join(parsedPath.dir, parsedPath.name);
85
+ const parsedPath = import_path.default.parse(import_path.default.relative(root, loggingModule.filepath));
86
+ const importPath = import_path.default.join(parsedPath.dir, parsedPath.name);
52
87
  const namedExportResult = NAMED_EXPORT_REGEX.exec(loggingModule.contents);
53
88
  if (namedExportResult?.[1]) {
54
89
  const identifier = namedExportResult[1];
@@ -66,22 +101,22 @@ const findLogger = async ({
66
101
  return { identifier: "console" };
67
102
  };
68
103
  const patchUnhandledRejections = async (mode) => {
69
- const filepaths = await glob("**/src/listen.ts", {
104
+ const filepaths = await (0, import_fast_glob.glob)("**/src/listen.ts", {
70
105
  ignore: ["**/.git", "**/node_modules"]
71
106
  });
72
107
  let hasPatched = false;
73
108
  for (const filepath of filepaths) {
74
- const contents = await fs.promises.readFile(filepath, "utf8");
109
+ const contents = await import_fs_extra.default.promises.readFile(filepath, "utf8");
75
110
  if (contents.includes("unhandledRejection")) {
76
- log.subtle(
111
+ import_logging.log.subtle(
77
112
  "Skipping entry point that appears to have an unhandled rejection listener:",
78
113
  filepath
79
114
  );
80
115
  continue;
81
116
  }
82
- const root = path.dirname(path.dirname(filepath));
117
+ const root = import_path.default.dirname(import_path.default.dirname(filepath));
83
118
  const logger = await findLogger({ contents, root });
84
- log.subtle(
119
+ import_logging.log.subtle(
85
120
  "Logging unhandled rejections to",
86
121
  logger.identifier,
87
122
  "in file:",
@@ -92,11 +127,11 @@ const patchUnhandledRejections = async (mode) => {
92
127
  ...[logger.import ? [logger.import] : []],
93
128
  addListener(logger.identifier)
94
129
  ].join("\n\n");
95
- const newContents = await formatPrettier(patched, { parser: "typescript" });
130
+ const newContents = await (0, import_prettier.formatPrettier)(patched, { parser: "typescript" });
96
131
  if (mode === "lint") {
97
132
  return { result: "apply" };
98
133
  }
99
- await fs.promises.writeFile(filepath, newContents);
134
+ await import_fs_extra.default.promises.writeFile(filepath, newContents);
100
135
  hasPatched = true;
101
136
  }
102
137
  if (hasPatched) {
@@ -113,14 +148,15 @@ const tryPatchUnhandledRejections = async ({
113
148
  try {
114
149
  return await patchUnhandledRejections(mode);
115
150
  } catch (err) {
116
- log.warn("Failed to patch listeners for unhandled promise rejections");
117
- log.subtle(inspect(err));
151
+ import_logging.log.warn("Failed to patch listeners for unhandled promise rejections");
152
+ import_logging.log.subtle((0, import_util.inspect)(err));
118
153
  return { result: "skip", reason: "due to an error" };
119
154
  }
120
155
  };
121
- export {
156
+ // Annotate the CommonJS export names for ESM import in node:
157
+ 0 && (module.exports = {
122
158
  IMPORT_REGEX,
123
159
  NAMED_EXPORT_REGEX,
124
160
  tryPatchUnhandledRejections
125
- };
161
+ });
126
162
  //# sourceMappingURL=unhandledRejections.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.ts"],
4
4
  "sourcesContent": ["import path from 'path';\nimport { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { isErrorWithCode } from '../../../../../../utils/error.js';\nimport { log } from '../../../../../../utils/logging.js';\nimport { formatPrettier } from '../../../../../configure/processing/prettier.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst addListener = (identifier: string) =>\n `\n// Report unhandled rejections instead of crashing the process\n// Make sure to monitor these reports and alert as appropriate\nprocess.on('unhandledRejection', (err) =>\n ${identifier}.error(err, 'Unhandled promise rejection'),\n);\n`.trim();\n\nconst tryReadFilesSequentially = async (\n filepaths: string[],\n): Promise<{ contents: string; filepath: string } | undefined> => {\n for (const filepath of filepaths) {\n try {\n const contents = await fs.promises.readFile(filepath, 'utf8');\n\n return { contents, filepath };\n } catch (err) {\n if (isErrorWithCode(err, 'ENOENT')) {\n continue;\n }\n\n throw err;\n }\n }\n\n return;\n};\n\nexport const IMPORT_REGEX =\n /import\\s+(?:\\{\\s*(\\w*[Ll]ogger)(?:\\s+as\\s+(\\w*[Ll]ogger))?\\s*\\}|(\\w*[Ll]ogger))\\s+from\\s+['\"][^'\"]+\\/(?:logger|logging)(?:\\/index)?(?:\\.[jt]s)?['\"]/u;\n\nexport const NAMED_EXPORT_REGEX =\n /export\\s+(?:const\\s+|\\{[^{}]*)\\b(\\w*[Ll]ogger)\\b/u;\n\nconst findLogger = async ({\n contents,\n root,\n}: {\n contents: string;\n root: string;\n}): Promise<{ identifier: string; import?: string }> => {\n const importResult = IMPORT_REGEX.exec(contents);\n\n {\n const identifier =\n importResult?.[3] ?? importResult?.[2] ?? importResult?.[1];\n\n if (identifier) {\n return { identifier };\n }\n }\n\n const loggerPaths = await glob('**/{logger,logging}.ts', {\n cwd: root,\n ignore: ['**/.git', '**/node_modules'],\n });\n\n const loggingModule = await tryReadFilesSequentially(loggerPaths);\n\n if (!loggingModule) {\n return { identifier: 'console' };\n }\n\n const parsedPath = path.parse(path.relative(root, loggingModule.filepath));\n\n const importPath = path.join(parsedPath.dir, parsedPath.name);\n\n const namedExportResult = NAMED_EXPORT_REGEX.exec(loggingModule.contents);\n\n if (namedExportResult?.[1]) {\n const identifier = namedExportResult[1];\n\n return {\n identifier: namedExportResult[1],\n import: `import { ${identifier} } from '${importPath}';`,\n };\n }\n\n if (loggingModule.contents.includes('export default')) {\n return {\n identifier: 'logger',\n import: `import logger from '${importPath}';`,\n };\n }\n\n return { identifier: 'console' };\n};\n\nconst patchUnhandledRejections = async (\n mode: 'format' | 'lint',\n): Promise<PatchReturnType> => {\n const filepaths = await glob('**/src/listen.ts', {\n ignore: ['**/.git', '**/node_modules'],\n });\n\n let hasPatched = false;\n\n for (const filepath of filepaths) {\n const contents = await fs.promises.readFile(filepath, 'utf8');\n\n if (contents.includes('unhandledRejection')) {\n log.subtle(\n 'Skipping entry point that appears to have an unhandled rejection listener:',\n filepath,\n );\n continue;\n }\n\n const root = path.dirname(path.dirname(filepath));\n\n const logger = await findLogger({ contents, root });\n\n log.subtle(\n 'Logging unhandled rejections to',\n logger.identifier,\n 'in file:',\n filepath,\n );\n\n const patched = [\n contents,\n\n ...[logger.import ? [logger.import] : []],\n\n addListener(logger.identifier),\n ].join('\\n\\n');\n\n const newContents = await formatPrettier(patched, { parser: 'typescript' });\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n await fs.promises.writeFile(filepath, newContents);\n\n hasPatched = true;\n }\n\n if (hasPatched) {\n return { result: 'apply' };\n }\n\n return {\n result: 'skip',\n reason: 'no applicable src/listen.ts entry points found',\n };\n};\n\nexport const tryPatchUnhandledRejections: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n try {\n return await patchUnhandledRejections(mode);\n } catch (err) {\n log.warn('Failed to patch listeners for unhandled promise rejections');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": "AAAA,OAAO,UAAU;AACjB,SAAS,eAAe;AAExB,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C,OAAO,SAAS,CAAC,OAAO,MAAM,IAAI,CAAC,CAAC;AAAA,MAExC,YAAY,OAAO,UAAU;AAAA,IAC/B,EAAE,KAAK,MAAM;AAEb,UAAM,cAAc,UAAM,gCAAe,SAAS,EAAE,QAAQ,aAAa,CAAC;AAE1E,QAAI,SAAS,QAAQ;AACnB,aAAO,EAAE,QAAQ,QAAQ;AAAA,IAC3B;AAEA,UAAM,gBAAAD,QAAG,SAAS,UAAU,UAAU,WAAW;AAEjD,iBAAa;AAAA,EACf;AAEA,MAAI,YAAY;AACd,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,SAAO;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF;AAEO,MAAM,8BAA6C,OAAO;AAAA,EAC/D;AACF,MAAgC;AAC9B,MAAI;AACF,WAAO,MAAM,yBAAyB,IAAI;AAAA,EAC5C,SAAS,KAAK;AACZ,uBAAI,KAAK,4DAA4D;AACrE,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
6
+ "names": ["fs", "path"]
7
7
  }
@@ -1,11 +1,35 @@
1
- import { tryPatchJestSnapshots } from "./patchJestSnapshots.js";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var __exports = {};
20
+ __export(__exports, {
21
+ patches: () => patches
22
+ });
23
+ module.exports = __toCommonJS(__exports);
24
+ var import_patchJestSnapshots = require("./patchJestSnapshots.js");
2
25
  const patches = [
3
26
  {
4
- apply: tryPatchJestSnapshots,
27
+ apply: import_patchJestSnapshots.tryPatchJestSnapshots,
5
28
  description: "Update Jest snapshot URLs to the new documentation site"
6
29
  }
7
30
  ];
8
- export {
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
9
33
  patches
10
- };
34
+ });
11
35
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.1.1/index.ts"],
4
4
  "sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryPatchJestSnapshots } from './patchJestSnapshots.js';\n\nexport const patches: Patches = [\n {\n apply: tryPatchJestSnapshots,\n description: 'Update Jest snapshot URLs to the new documentation site',\n },\n];\n"],
5
- "mappings": "AAEA,SAAS,6BAA6B;AAE/B,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,gCAAsC;AAE/B,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,45 @@
1
- import { inspect } from "util";
2
- import fg from "fast-glob";
3
- import fs from "fs-extra";
4
- import { log } from "../../../../../../utils/logging.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var patchJestSnapshots_exports = {};
30
+ __export(patchJestSnapshots_exports, {
31
+ patchJestSnapshots: () => patchJestSnapshots,
32
+ tryPatchJestSnapshots: () => tryPatchJestSnapshots
33
+ });
34
+ module.exports = __toCommonJS(patchJestSnapshots_exports);
35
+ var import_util = require("util");
36
+ var import_fast_glob = __toESM(require("fast-glob"));
37
+ var import_fs_extra = __toESM(require("fs-extra"));
38
+ var import_logging = require("../../../../../../utils/logging.js");
5
39
  const JEST_SNAPSHOT_OLD_URL = "https://goo.gl/fbAQLP";
6
40
  const JEST_SNAPSHOT_NEW_URL = "https://jestjs.io/docs/snapshot-testing";
7
41
  const patchJestSnapshots = async (mode) => {
8
- const testFilePaths = await fg(["**/*.test.ts", "**/*.test.ts.snap"], {
42
+ const testFilePaths = await (0, import_fast_glob.default)(["**/*.test.ts", "**/*.test.ts.snap"], {
9
43
  ignore: [
10
44
  "**/.git",
11
45
  "**/node_modules",
@@ -20,7 +54,7 @@ const patchJestSnapshots = async (mode) => {
20
54
  }
21
55
  const testsFiles = await Promise.all(
22
56
  testFilePaths.map(async (file) => {
23
- const contents = await fs.readFile(file, "utf8");
57
+ const contents = await import_fs_extra.default.readFile(file, "utf8");
24
58
  return {
25
59
  file,
26
60
  contents
@@ -47,7 +81,7 @@ const patchJestSnapshots = async (mode) => {
47
81
  JEST_SNAPSHOT_OLD_URL,
48
82
  JEST_SNAPSHOT_NEW_URL
49
83
  );
50
- await fs.writeFile(file, updatedContents, "utf8");
84
+ await import_fs_extra.default.writeFile(file, updatedContents, "utf8");
51
85
  })
52
86
  );
53
87
  return {
@@ -58,13 +92,14 @@ const tryPatchJestSnapshots = async ({ mode }) => {
58
92
  try {
59
93
  return await patchJestSnapshots(mode);
60
94
  } catch (err) {
61
- log.warn("Failed to apply Jest snapshot URL patch.");
62
- log.subtle(inspect(err));
95
+ import_logging.log.warn("Failed to apply Jest snapshot URL patch.");
96
+ import_logging.log.subtle((0, import_util.inspect)(err));
63
97
  return { result: "skip", reason: "due to an error" };
64
98
  }
65
99
  };
66
- export {
100
+ // Annotate the CommonJS export names for ESM import in node:
101
+ 0 && (module.exports = {
67
102
  patchJestSnapshots,
68
103
  tryPatchJestSnapshots
69
- };
104
+ });
70
105
  //# sourceMappingURL=patchJestSnapshots.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.ts"],
4
4
  "sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst JEST_SNAPSHOT_OLD_URL = 'https://goo.gl/fbAQLP';\nconst JEST_SNAPSHOT_NEW_URL = 'https://jestjs.io/docs/snapshot-testing';\n\nexport const patchJestSnapshots = async (\n mode: 'lint' | 'format',\n): Promise<PatchReturnType> => {\n const testFilePaths = await fg(['**/*.test.ts', '**/*.test.ts.snap'], {\n ignore: [\n '**/.git',\n '**/node_modules',\n 'src/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.test.ts',\n ],\n });\n\n if (testFilePaths.length === 0) {\n return {\n result: 'skip',\n reason: 'no test files found',\n };\n }\n\n const testsFiles = await Promise.all(\n testFilePaths.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\n const testFilesToPatch = testsFiles.filter(({ contents }) =>\n contents.includes(JEST_SNAPSHOT_OLD_URL),\n );\n\n if (testFilesToPatch.length === 0) {\n return {\n result: 'skip',\n reason: 'no test files to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n testFilesToPatch.map(async ({ file, contents }) => {\n const updatedContents = contents.replaceAll(\n JEST_SNAPSHOT_OLD_URL,\n JEST_SNAPSHOT_NEW_URL,\n );\n await fs.writeFile(file, updatedContents, 'utf8');\n }),\n );\n\n return {\n result: 'apply',\n };\n};\n\nexport const tryPatchJestSnapshots: PatchFunction = async ({ mode }) => {\n try {\n return await patchJestSnapshots(mode);\n } catch (err) {\n log.warn('Failed to apply Jest snapshot URL patch.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,wBAAwB;AAC9B,MAAM,wBAAwB;AAEvB,MAAM,qBAAqB,OAChC,SAC6B;AAC7B,QAAM,gBAAgB,MAAM,GAAG,CAAC,gBAAgB,mBAAmB,GAAG;AAAA,IACpE,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AAED,MAAI,cAAc,WAAW,GAAG;AAC9B,WAAO;AAAA,MACL,QAA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
+ "names": ["fg", "fs"]
7
7
  }
@@ -1,16 +1,40 @@
1
- import { tryPatchApiTokenFromEnvironment } from "./patchApiTokenFromEnvironment.js";
2
- import { tryPatchDockerfileSyntaxDirective } from "./patchDockerfileSyntaxDirective.js";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var __exports = {};
20
+ __export(__exports, {
21
+ patches: () => patches
22
+ });
23
+ module.exports = __toCommonJS(__exports);
24
+ var import_patchApiTokenFromEnvironment = require("./patchApiTokenFromEnvironment.js");
25
+ var import_patchDockerfileSyntaxDirective = require("./patchDockerfileSyntaxDirective.js");
3
26
  const patches = [
4
27
  {
5
- apply: tryPatchDockerfileSyntaxDirective,
28
+ apply: import_patchDockerfileSyntaxDirective.tryPatchDockerfileSyntaxDirective,
6
29
  description: "Remove Dockerfile syntax directives"
7
30
  },
8
31
  {
9
- apply: tryPatchApiTokenFromEnvironment,
32
+ apply: import_patchApiTokenFromEnvironment.tryPatchApiTokenFromEnvironment,
10
33
  description: "Update import for `apiTokenFromEnvironment`"
11
34
  }
12
35
  ];
13
- export {
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
14
38
  patches
15
- };
39
+ });
16
40
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.3.0/index.ts"],
4
4
  "sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryPatchApiTokenFromEnvironment } from './patchApiTokenFromEnvironment.js';\nimport { tryPatchDockerfileSyntaxDirective } from './patchDockerfileSyntaxDirective.js';\n\nexport const patches: Patches = [\n {\n apply: tryPatchDockerfileSyntaxDirective,\n description: 'Remove Dockerfile syntax directives',\n },\n {\n apply: tryPatchApiTokenFromEnvironment,\n description: 'Update import for `apiTokenFromEnvironment`',\n },\n];\n"],
5
- "mappings": "AAEA,SAAS,uCAAuC;AAChD,SAAS,yCAAyC;AAE3C,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0CAAgD;AAChD,4CAAkD;AAE3C,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,45 @@
1
- import { inspect } from "util";
2
- import fg from "fast-glob";
3
- import fs from "fs-extra";
4
- import { log } from "../../../../../../utils/logging.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var patchApiTokenFromEnvironment_exports = {};
30
+ __export(patchApiTokenFromEnvironment_exports, {
31
+ patchApiTokenFromEnvironment: () => patchApiTokenFromEnvironment,
32
+ tryPatchApiTokenFromEnvironment: () => tryPatchApiTokenFromEnvironment
33
+ });
34
+ module.exports = __toCommonJS(patchApiTokenFromEnvironment_exports);
35
+ var import_util = require("util");
36
+ var import_fast_glob = __toESM(require("fast-glob"));
37
+ var import_fs_extra = __toESM(require("fs-extra"));
38
+ var import_logging = require("../../../../../../utils/logging.js");
5
39
  const importRegex = /import { apiTokenFromEnvironment } from 'skuba\/lib\/api\/github\/environment';\n/;
6
40
  const usageRegex = /apiTokenFromEnvironment\(\)/;
7
41
  const patchApiTokenFromEnvironment = async (mode) => {
8
- const scriptPaths = await fg(["scripts/**/*.ts"], {
42
+ const scriptPaths = await (0, import_fast_glob.default)(["scripts/**/*.ts"], {
9
43
  ignore: ["**/.git", "**/node_modules"]
10
44
  });
11
45
  if (scriptPaths.length === 0) {
@@ -16,7 +50,7 @@ const patchApiTokenFromEnvironment = async (mode) => {
16
50
  }
17
51
  const scripts = await Promise.all(
18
52
  scriptPaths.map(async (file) => {
19
- const contents = await fs.readFile(file, "utf8");
53
+ const contents = await import_fs_extra.default.readFile(file, "utf8");
20
54
  return {
21
55
  file,
22
56
  contents
@@ -40,7 +74,7 @@ const patchApiTokenFromEnvironment = async (mode) => {
40
74
  await Promise.all(
41
75
  scriptsToPatch.map(async ({ file, contents }) => {
42
76
  const updatedContents = contents.replace(importRegex, "import { GitHub } from 'skuba';\n").replace(usageRegex, "GitHub.apiTokenFromEnvironment()");
43
- await fs.writeFile(file, updatedContents, "utf8");
77
+ await import_fs_extra.default.writeFile(file, updatedContents, "utf8");
44
78
  })
45
79
  );
46
80
  return {
@@ -53,13 +87,14 @@ const tryPatchApiTokenFromEnvironment = async ({
53
87
  try {
54
88
  return await patchApiTokenFromEnvironment(mode);
55
89
  } catch (err) {
56
- log.warn("Failed to apply apiTokenFromEnvironment patch.");
57
- log.subtle(inspect(err));
90
+ import_logging.log.warn("Failed to apply apiTokenFromEnvironment patch.");
91
+ import_logging.log.subtle((0, import_util.inspect)(err));
58
92
  return { result: "skip", reason: "due to an error" };
59
93
  }
60
94
  };
61
- export {
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
62
97
  patchApiTokenFromEnvironment,
63
98
  tryPatchApiTokenFromEnvironment
64
- };
99
+ });
65
100
  //# sourceMappingURL=patchApiTokenFromEnvironment.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.ts"],
4
4
  "sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst importRegex =\n /import { apiTokenFromEnvironment } from 'skuba\\/lib\\/api\\/github\\/environment';\\n/;\nconst usageRegex = /apiTokenFromEnvironment\\(\\)/;\n\nexport const patchApiTokenFromEnvironment = async (\n mode: 'lint' | 'format',\n): Promise<PatchReturnType> => {\n const scriptPaths = await fg(['scripts/**/*.ts'], {\n ignore: ['**/.git', '**/node_modules'],\n });\n\n if (scriptPaths.length === 0) {\n return {\n result: 'skip',\n reason: 'no scripts found',\n };\n }\n\n const scripts = await Promise.all(\n scriptPaths.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\n const scriptsToPatch = scripts.filter(\n ({ contents }) => importRegex.exec(contents) ?? usageRegex.exec(contents),\n );\n\n if (scriptsToPatch.length === 0) {\n return {\n result: 'skip',\n reason: 'no scripts to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n scriptsToPatch.map(async ({ file, contents }) => {\n const updatedContents = contents\n .replace(importRegex, \"import { GitHub } from 'skuba';\\n\")\n .replace(usageRegex, 'GitHub.apiTokenFromEnvironment()');\n await fs.writeFile(file, updatedContents, 'utf8');\n }),\n );\n\n return {\n result: 'apply',\n };\n};\n\nexport const tryPatchApiTokenFromEnvironment: PatchFunction = async ({\n mode,\n}) => {\n try {\n return await patchApiTokenFromEnvironment(mode);\n } catch (err) {\n log.warn('Failed to apply apiTokenFromEnvironment patch.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,cACJ;AACF,MAAM,aAAa;AAEZ,MAAM,+BAA+B,OAC1C,SAC6B;AAC7B,QAAM,cAAc,MAAM,GAAG,CAAC,iBAAiB,GAAG;AAAA,IAChD,QAAQ,CAAC,WAAW,iBAAiB;AAAA,EACvC,CAAC;AAED,MAAI,YAAY,WAAW,GAAG;AAC5B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,UAAU,MAAM,QAAQ;AAA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7
  }
@@ -1,10 +1,44 @@
1
- import { inspect } from "util";
2
- import fg from "fast-glob";
3
- import fs from "fs-extra";
4
- import { log } from "../../../../../../utils/logging.js";
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var patchDockerfileSyntaxDirective_exports = {};
30
+ __export(patchDockerfileSyntaxDirective_exports, {
31
+ patchDockerfileSyntaxDirective: () => patchDockerfileSyntaxDirective,
32
+ tryPatchDockerfileSyntaxDirective: () => tryPatchDockerfileSyntaxDirective
33
+ });
34
+ module.exports = __toCommonJS(patchDockerfileSyntaxDirective_exports);
35
+ var import_util = require("util");
36
+ var import_fast_glob = __toESM(require("fast-glob"));
37
+ var import_fs_extra = __toESM(require("fs-extra"));
38
+ var import_logging = require("../../../../../../utils/logging.js");
5
39
  const dockerSyntaxRegex = /^#\s*syntax=\s*docker\/dockerfile:\S+\n+/;
6
40
  const patchDockerfileSyntaxDirective = async (mode) => {
7
- const dockerfilePaths = await fg(["**/Dockerfile*"], {
41
+ const dockerfilePaths = await (0, import_fast_glob.default)(["**/Dockerfile*"], {
8
42
  ignore: ["**/.git", "**/node_modules"]
9
43
  });
10
44
  if (dockerfilePaths.length === 0) {
@@ -15,7 +49,7 @@ const patchDockerfileSyntaxDirective = async (mode) => {
15
49
  }
16
50
  const dockerfiles = await Promise.all(
17
51
  dockerfilePaths.map(async (file) => {
18
- const contents = await fs.readFile(file, "utf8");
52
+ const contents = await import_fs_extra.default.readFile(file, "utf8");
19
53
  return {
20
54
  file,
21
55
  contents
@@ -39,7 +73,7 @@ const patchDockerfileSyntaxDirective = async (mode) => {
39
73
  await Promise.all(
40
74
  dockerfilesToPatch.map(async ({ file, contents }) => {
41
75
  const updatedContents = contents.replace(dockerSyntaxRegex, "");
42
- await fs.writeFile(file, updatedContents, "utf8");
76
+ await import_fs_extra.default.writeFile(file, updatedContents, "utf8");
43
77
  })
44
78
  );
45
79
  return {
@@ -52,13 +86,14 @@ const tryPatchDockerfileSyntaxDirective = async ({
52
86
  try {
53
87
  return await patchDockerfileSyntaxDirective(mode);
54
88
  } catch (err) {
55
- log.warn("Failed to apply Dockerfile syntax directive patch.");
56
- log.subtle(inspect(err));
89
+ import_logging.log.warn("Failed to apply Dockerfile syntax directive patch.");
90
+ import_logging.log.subtle((0, import_util.inspect)(err));
57
91
  return { result: "skip", reason: "due to an error" };
58
92
  }
59
93
  };
60
- export {
94
+ // Annotate the CommonJS export names for ESM import in node:
95
+ 0 && (module.exports = {
61
96
  patchDockerfileSyntaxDirective,
62
97
  tryPatchDockerfileSyntaxDirective
63
- };
98
+ });
64
99
  //# sourceMappingURL=patchDockerfileSyntaxDirective.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.ts"],
4
4
  "sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst dockerSyntaxRegex = /^#\\s*syntax=\\s*docker\\/dockerfile:\\S+\\n+/;\n\nexport const patchDockerfileSyntaxDirective = async (\n mode: 'lint' | 'format',\n): Promise<PatchReturnType> => {\n const dockerfilePaths = await fg(['**/Dockerfile*'], {\n ignore: ['**/.git', '**/node_modules'],\n });\n\n if (dockerfilePaths.length === 0) {\n return {\n result: 'skip',\n reason: 'no dockerfiles found',\n };\n }\n\n const dockerfiles = await Promise.all(\n dockerfilePaths.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\n const dockerfilesToPatch = dockerfiles.filter(({ contents }) =>\n dockerSyntaxRegex.test(contents),\n );\n\n if (dockerfilesToPatch.length === 0) {\n return {\n result: 'skip',\n reason: 'no dockerfiles to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n dockerfilesToPatch.map(async ({ file, contents }) => {\n const updatedContents = contents.replace(dockerSyntaxRegex, '');\n await fs.writeFile(file, updatedContents, 'utf8');\n }),\n );\n\n return {\n result: 'apply',\n };\n};\n\nexport const tryPatchDockerfileSyntaxDirective: PatchFunction = async ({\n mode,\n}) => {\n try {\n return await patchDockerfileSyntaxDirective(mode);\n } catch (err) {\n log.warn('Failed to apply Dockerfile syntax directive patch.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAExB,OAAO,QAAQ;AACf,OAAO,QAAQ;AAEf,SAAS,WAAW;AAGpB,MAAM,oBAAoB;AAEnB,MAAM,iCAAiC,OAC5C,SAC6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