skuba 14.0.0-replace-global-vars-20251121010036 → 14.0.0-test-private-templates-20260103062459

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 (411) 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 +111 -76
  118. package/lib/cli/init/getConfig.js.map +3 -3
  119. package/lib/cli/init/git.d.ts +1 -0
  120. package/lib/cli/init/git.js +88 -16
  121. package/lib/cli/init/git.js.map +3 -3
  122. package/lib/cli/init/index.js +98 -67
  123. package/lib/cli/init/index.js.map +2 -2
  124. package/lib/cli/init/prompts.d.ts +6 -5
  125. package/lib/cli/init/prompts.js +54 -27
  126. package/lib/cli/init/prompts.js.map +2 -2
  127. package/lib/cli/init/types.js +41 -7
  128. package/lib/cli/init/types.js.map +1 -1
  129. package/lib/cli/init/validation.js +30 -2
  130. package/lib/cli/init/validation.js.map +1 -1
  131. package/lib/cli/init/writePackageJson.js +42 -8
  132. package/lib/cli/init/writePackageJson.js.map +2 -2
  133. package/lib/cli/lint/annotate/buildkite/eslint.js +37 -3
  134. package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
  135. package/lib/cli/lint/annotate/buildkite/index.js +45 -11
  136. package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
  137. package/lib/cli/lint/annotate/buildkite/internal.js +37 -3
  138. package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
  139. package/lib/cli/lint/annotate/buildkite/prettier.js +37 -3
  140. package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
  141. package/lib/cli/lint/annotate/buildkite/tsc.js +37 -3
  142. package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
  143. package/lib/cli/lint/annotate/github/eslint.js +26 -2
  144. package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
  145. package/lib/cli/lint/annotate/github/index.js +45 -11
  146. package/lib/cli/lint/annotate/github/index.js.map +1 -1
  147. package/lib/cli/lint/annotate/github/internal.js +26 -2
  148. package/lib/cli/lint/annotate/github/internal.js.map +1 -1
  149. package/lib/cli/lint/annotate/github/prettier.js +26 -2
  150. package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
  151. package/lib/cli/lint/annotate/github/tsc.js +28 -4
  152. package/lib/cli/lint/annotate/github/tsc.js.map +2 -2
  153. package/lib/cli/lint/annotate/index.js +30 -6
  154. package/lib/cli/lint/annotate/index.js.map +1 -1
  155. package/lib/cli/lint/autofix.js +73 -37
  156. package/lib/cli/lint/autofix.js.map +1 -1
  157. package/lib/cli/lint/eslint.js +51 -16
  158. package/lib/cli/lint/eslint.js.map +3 -3
  159. package/lib/cli/lint/external.js +51 -19
  160. package/lib/cli/lint/external.js.map +2 -2
  161. package/lib/cli/lint/index.js +49 -25
  162. package/lib/cli/lint/index.js.map +1 -1
  163. package/lib/cli/lint/internal.js +42 -18
  164. package/lib/cli/lint/internal.js.map +1 -1
  165. package/lib/cli/lint/internalLints/detectBadCodeowners.js +33 -8
  166. package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
  167. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +45 -11
  168. package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +2 -2
  169. package/lib/cli/lint/internalLints/patchRenovateConfig.js +55 -21
  170. package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +2 -2
  171. package/lib/cli/lint/internalLints/refreshConfigFiles.js +63 -32
  172. package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +2 -2
  173. package/lib/cli/lint/internalLints/upgrade/index.d.ts +1 -1
  174. package/lib/cli/lint/internalLints/upgrade/index.js +53 -22
  175. package/lib/cli/lint/internalLints/upgrade/index.js.map +3 -3
  176. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +28 -4
  177. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
  178. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +45 -11
  179. package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
  180. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +30 -6
  181. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
  182. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +65 -34
  183. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
  184. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +46 -11
  185. package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
  186. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js +28 -4
  187. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/index.js.map +1 -1
  188. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js +59 -23
  189. package/lib/cli/lint/internalLints/upgrade/patches/12.0.2/unhandledRejections.js.map +2 -2
  190. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js +28 -4
  191. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/index.js.map +1 -1
  192. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js +46 -11
  193. package/lib/cli/lint/internalLints/upgrade/patches/12.1.1/patchJestSnapshots.js.map +2 -2
  194. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js +30 -6
  195. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/index.js.map +1 -1
  196. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js +46 -11
  197. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchApiTokenFromEnvironment.js.map +2 -2
  198. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js +46 -11
  199. package/lib/cli/lint/internalLints/upgrade/patches/12.3.0/patchDockerfileSyntaxDirective.js.map +2 -2
  200. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js +28 -4
  201. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/index.js.map +1 -1
  202. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js +46 -11
  203. package/lib/cli/lint/internalLints/upgrade/patches/12.4.0/patchDockerfileCIVariable.js.map +2 -2
  204. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js +67 -29
  205. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/configureTsConfigForESM.js.map +2 -2
  206. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js +34 -10
  207. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/index.js.map +1 -1
  208. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js +45 -11
  209. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/patchApiDockerfiles.js.map +2 -2
  210. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.d.ts +0 -4
  211. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js +63 -18
  212. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/rewriteSrcImports.js.map +3 -3
  213. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js +50 -15
  214. package/lib/cli/lint/internalLints/upgrade/patches/12.4.1/updateLambdaConfigs.js.map +2 -2
  215. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js +40 -0
  216. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
  217. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
  218. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
  219. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
  220. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js +55 -0
  221. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
  222. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +51 -17
  223. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
  224. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +34 -10
  225. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +1 -1
  226. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +44 -10
  227. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
  228. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +46 -12
  229. package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
  230. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +28 -4
  231. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
  232. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +49 -15
  233. package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
  234. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +45 -11
  235. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  236. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +34 -10
  237. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
  238. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +45 -11
  239. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
  240. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +45 -11
  241. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
  242. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +47 -13
  243. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
  244. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +28 -4
  245. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
  246. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +45 -11
  247. package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
  248. package/lib/cli/lint/prettier.js +50 -15
  249. package/lib/cli/lint/prettier.js.map +3 -3
  250. package/lib/cli/lint/tsc.js +28 -4
  251. package/lib/cli/lint/tsc.js.map +1 -1
  252. package/lib/cli/lint/types.js +16 -0
  253. package/lib/cli/lint/types.js.map +3 -3
  254. package/lib/cli/migrate/index.d.ts +5 -0
  255. package/lib/cli/migrate/index.js +79 -15
  256. package/lib/cli/migrate/index.js.map +2 -2
  257. package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
  258. package/lib/cli/migrate/nodeVersion/checks.js +51 -120
  259. package/lib/cli/migrate/nodeVersion/checks.js.map +2 -2
  260. package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
  261. package/lib/cli/migrate/nodeVersion/index.js +239 -65
  262. package/lib/cli/migrate/nodeVersion/index.js.map +3 -3
  263. package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
  264. package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
  265. package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
  266. package/lib/cli/node/index.js +57 -20
  267. package/lib/cli/node/index.js.map +3 -3
  268. package/lib/cli/release/index.js +28 -4
  269. package/lib/cli/release/index.js.map +1 -1
  270. package/lib/cli/start/index.js +50 -16
  271. package/lib/cli/start/index.js.map +3 -3
  272. package/lib/cli/test/index.js +44 -4
  273. package/lib/cli/test/index.js.map +2 -2
  274. package/lib/cli/test/reporters/github/annotations.d.ts +9 -0
  275. package/lib/cli/test/reporters/github/annotations.js +102 -0
  276. package/lib/cli/test/reporters/github/annotations.js.map +7 -0
  277. package/lib/cli/test/reporters/github/index.d.ts +5 -0
  278. package/lib/cli/test/reporters/github/index.js +74 -0
  279. package/lib/cli/test/reporters/github/index.js.map +7 -0
  280. package/lib/cli/version/index.js +30 -6
  281. package/lib/cli/version/index.js.map +1 -1
  282. package/lib/index.d.ts +1 -0
  283. package/lib/index.js +46 -6
  284. package/lib/index.js.map +2 -2
  285. package/lib/skuba.js +45 -26
  286. package/lib/skuba.js.map +3 -3
  287. package/lib/utils/args.js +43 -6
  288. package/lib/utils/args.js.map +2 -2
  289. package/lib/utils/command.js +42 -4
  290. package/lib/utils/command.js.map +3 -3
  291. package/lib/utils/copy.js +57 -20
  292. package/lib/utils/copy.js.map +2 -2
  293. package/lib/utils/dir.js +72 -32
  294. package/lib/utils/dir.js.map +2 -2
  295. package/lib/utils/env.js +26 -2
  296. package/lib/utils/env.js.map +1 -1
  297. package/lib/utils/error.js +47 -10
  298. package/lib/utils/error.js.map +1 -1
  299. package/lib/utils/exec.js +61 -23
  300. package/lib/utils/exec.js.map +3 -3
  301. package/lib/utils/fs.js +40 -6
  302. package/lib/utils/fs.js.map +2 -2
  303. package/lib/utils/help.js +30 -6
  304. package/lib/utils/help.js.map +1 -1
  305. package/lib/utils/logging.js +38 -11
  306. package/lib/utils/logging.js.map +1 -1
  307. package/lib/utils/logo.js +48 -24
  308. package/lib/utils/logo.js.map +1 -1
  309. package/lib/utils/manifest.d.ts +2 -3
  310. package/lib/utils/manifest.js +48 -8
  311. package/lib/utils/manifest.js.map +3 -3
  312. package/lib/utils/npmrc.js +26 -2
  313. package/lib/utils/npmrc.js.map +1 -1
  314. package/lib/utils/packageManager.js +49 -12
  315. package/lib/utils/packageManager.js.map +2 -2
  316. package/lib/utils/port.js +39 -4
  317. package/lib/utils/port.js.map +2 -2
  318. package/lib/utils/sleep.js +26 -2
  319. package/lib/utils/sleep.js.map +1 -1
  320. package/lib/utils/template.d.ts +1 -1
  321. package/lib/utils/template.js +60 -19
  322. package/lib/utils/template.js.map +3 -3
  323. package/lib/utils/validation.js +31 -2
  324. package/lib/utils/validation.js.map +1 -1
  325. package/lib/utils/version.js +46 -9
  326. package/lib/utils/version.js.map +2 -2
  327. package/lib/utils/wait.js +32 -7
  328. package/lib/utils/wait.js.map +1 -1
  329. package/lib/utils/worker.js +35 -10
  330. package/lib/utils/worker.js.map +1 -1
  331. package/lib/wrapper/function-arguments.d.js +1 -0
  332. package/lib/wrapper/functionHandler.js +49 -18
  333. package/lib/wrapper/functionHandler.js.map +2 -2
  334. package/lib/wrapper/http.js +43 -8
  335. package/lib/wrapper/http.js.map +2 -2
  336. package/lib/wrapper/index.js +7 -6
  337. package/lib/wrapper/index.js.map +1 -1
  338. package/lib/wrapper/main.js +42 -8
  339. package/lib/wrapper/main.js.map +3 -3
  340. package/lib/wrapper/requestListener.js +47 -13
  341. package/lib/wrapper/requestListener.js.map +2 -2
  342. package/lib/wrapper/server.js +28 -4
  343. package/lib/wrapper/server.js.map +1 -1
  344. package/package.json +42 -43
  345. package/template/base/_.prettierrc.js +1 -1
  346. package/template/base/_eslint.config.js +1 -1
  347. package/template/base/_pnpm-workspace.yaml +4 -3
  348. package/template/base/jest.config.ts +19 -0
  349. package/template/base/jest.setup.ts +3 -0
  350. package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
  351. package/template/express-rest-api/.nvmrc +1 -1
  352. package/template/express-rest-api/package.json +8 -9
  353. package/template/express-rest-api/skuba.template.js +1 -1
  354. package/template/express-rest-api/src/app.test.ts +0 -1
  355. package/template/greeter/.buildkite/pipeline.yml +1 -1
  356. package/template/greeter/.nvmrc +1 -1
  357. package/template/greeter/package.json +4 -5
  358. package/template/greeter/skuba.template.js +1 -1
  359. package/template/greeter/src/app.test.ts +1 -3
  360. package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
  361. package/template/koa-rest-api/.nvmrc +1 -1
  362. package/template/koa-rest-api/package.json +9 -11
  363. package/template/koa-rest-api/skuba.template.js +1 -1
  364. package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +0 -2
  365. package/template/koa-rest-api/src/api/jobs/postJob.test.ts +0 -2
  366. package/template/koa-rest-api/src/app.test.ts +0 -2
  367. package/template/koa-rest-api/src/framework/server.test.ts +2 -2
  368. package/template/koa-rest-api/src/framework/validation.test.ts +0 -2
  369. package/template/koa-rest-api/src/testing/metrics.ts +0 -2
  370. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
  371. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  372. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +7 -19
  373. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +9 -11
  374. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  375. package/template/lambda-sqs-worker-cdk/infra/config.ts +2 -4
  376. package/template/lambda-sqs-worker-cdk/package.json +9 -9
  377. package/template/lambda-sqs-worker-cdk/skuba.template.js +13 -1
  378. package/template/lambda-sqs-worker-cdk/src/app.test.ts +13 -22
  379. package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +0 -1
  380. package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +31 -33
  381. package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +2 -8
  382. package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +2 -3
  383. package/template/lambda-sqs-worker-cdk/src/testing/services.ts +3 -4
  384. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  385. package/template/oss-npm-package/.github/workflows/validate.yml +1 -1
  386. package/template/oss-npm-package/.nvmrc +1 -1
  387. package/template/oss-npm-package/_package.json +0 -1
  388. package/template/oss-npm-package/skuba.template.js +1 -1
  389. package/template/oss-npm-package/src/index.test.ts +0 -2
  390. package/template/private-npm-package/.nvmrc +1 -1
  391. package/template/private-npm-package/_package.json +1 -2
  392. package/template/private-npm-package/skuba.template.js +2 -2
  393. package/template/private-npm-package/src/index.test.ts +0 -2
  394. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.d.ts +0 -6
  395. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js +0 -86
  396. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/addTypeModuleToPackageJson.js.map +0 -7
  397. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js +0 -16
  398. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/index.js.map +0 -7
  399. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.d.ts +0 -7
  400. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js +0 -76
  401. package/lib/cli/lint/internalLints/upgrade/patches/12.5.0/rewriteGlobalVars.js.map +0 -7
  402. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +0 -2
  403. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +0 -11
  404. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
  405. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +0 -34
  406. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
  407. package/lib/eslint.d.js +0 -1
  408. package/lib/eslint.d.js.map +0 -7
  409. package/template/base/vitest.config.ts +0 -25
  410. /package/lib/cli/lint/internalLints/upgrade/patches/{12.5.0 → 13.1.1}/index.d.ts +0 -0
  411. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
package/config/eslint.js CHANGED
@@ -1 +1 @@
1
- export { default } from 'eslint-config-skuba';
1
+ module.exports = require('eslint-config-skuba');
package/config/jest.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('../jest-preset');
@@ -1,8 +1,4 @@
1
- declare const config: {
2
- singleQuote: boolean;
3
- tabWidth: number;
4
- trailingComma: 'all';
5
- plugins: ['prettier-plugin-packagejson'];
6
- };
7
-
8
- export default config;
1
+ export const singleQuote: boolean;
2
+ export const tabWidth: number;
3
+ export const trailingComma: 'all';
4
+ export const plugins: ['prettier-plugin-packagejson'];
@@ -1,14 +1,6 @@
1
- /**
2
- * @see https://prettier.io/docs/configuration
3
- * @satisfies {import('prettier').Config}
4
- */
5
- const config = {
1
+ module.exports = {
6
2
  singleQuote: true,
7
3
  tabWidth: 2,
8
4
  trailingComma: 'all',
9
- plugins: [
10
- new URL(import.meta.resolve('prettier-plugin-packagejson')).pathname,
11
- ],
5
+ plugins: [require.resolve('prettier-plugin-packagejson')],
12
6
  };
13
-
14
- export default config;
@@ -0,0 +1,64 @@
1
+ const path = require('path');
2
+
3
+ const { pathsToModuleNameMapper } = require('ts-jest');
4
+
5
+ const { tryParseTsConfig } = require('./tsConfig');
6
+
7
+ module.exports.createModuleNameMapper = (getConfig) => {
8
+ const maybeTsConfig = tryParseTsConfig(getConfig);
9
+
10
+ const paths = Object.fromEntries(
11
+ Object.entries(maybeTsConfig?.options.paths ?? {}).flatMap(
12
+ ([key, values]) => [
13
+ // Pass through the input path entry almost verbatim.
14
+ // We trim a trailing slash because TypeScript allows `import 'src'`
15
+ // to be resolved by the alias `src/`, but Jest's mapper does not.
16
+ [
17
+ key.replace(/\/$/, ''),
18
+ values.map((value) => value.replace(/\/$/, '')),
19
+ ],
20
+ // Append a variant of the input path entry.
21
+ // As TypeScript allows both `import 'src'` and `import 'src/nested'`
22
+ // to be resolved by the alias `src/*` (and likewise for plain `src`),
23
+ // we need to seed two Jest mappings per path.
24
+ ...(key.endsWith('/*')
25
+ ? [
26
+ [
27
+ // Given a path `src/*`, seed an extra `src`.
28
+ key.replace(/\/\*$/, ''),
29
+ values.map((value) => value.replace(/\/\*$/, '')),
30
+ ],
31
+ ]
32
+ : [
33
+ [
34
+ // Given a path `src`, seed an extra `src/*`.
35
+ path.join(key, '*'),
36
+ values.map((value) => path.join(value, '*')),
37
+ ],
38
+ ]),
39
+ ],
40
+ ),
41
+ );
42
+
43
+ const prefix = path.join('<rootDir>', maybeTsConfig?.options.baseUrl ?? '.');
44
+
45
+ const moduleNameMapper = pathsToModuleNameMapper(paths, {
46
+ prefix,
47
+ useESM: true,
48
+ });
49
+
50
+ // Always try finding the file with extension before trying without
51
+ moduleNameMapper['^(\\.{1,2}/.*)\\.js$'] = ['$1.js', '$1'];
52
+
53
+ // Normalise away any `..`s that may crop up from `baseUrl` usage.
54
+ // For example, a `baseUrl` of `src` and a path of `../cli` will result in
55
+ // `<rootDir>/src/../cli`, which can be normalised to `<rootDir>/cli`.
56
+ return Object.fromEntries(
57
+ Object.entries(moduleNameMapper).map(([key, values]) => [
58
+ key,
59
+ Array.isArray(values)
60
+ ? values.map((value) => path.normalize(value))
61
+ : path.normalize(values),
62
+ ]),
63
+ );
64
+ };
@@ -0,0 +1,62 @@
1
+ const { defaults } = require('ts-jest/presets');
2
+ const { ModuleResolutionKind } = require('typescript');
3
+
4
+ const { tryParseTsConfig } = require('./tsConfig');
5
+
6
+ const TS_JEST_NAME = 'ts-jest';
7
+
8
+ /**
9
+ * Resolved path of the `ts-jest` preset.
10
+ *
11
+ * This allows Jest to resolve the preset even if it is installed to a nested
12
+ * `./node_modules/skuba/node_modules/ts-jest` directory.
13
+ */
14
+ const TS_JEST_PATH = require.resolve(TS_JEST_NAME);
15
+
16
+ const maybeTsConfig = tryParseTsConfig();
17
+
18
+ const BROKEN_MODULE_RESOLUTIONS = new Set([
19
+ ModuleResolutionKind.Bundler,
20
+ ModuleResolutionKind.NodeNext,
21
+ ]);
22
+
23
+ /**
24
+ * Passing through these module resolutions seems to break `ts-jest`.
25
+ *
26
+ * ```
27
+ * error TS5110: Option 'module' must be set to 'NodeNext' when option 'moduleResolution' is set to 'NodeNext'.
28
+ * ```
29
+ *
30
+ * https://github.com/kulshekhar/ts-jest/issues/4198
31
+ */
32
+ const tsconfig = BROKEN_MODULE_RESOLUTIONS.has(
33
+ maybeTsConfig?.options.moduleResolution,
34
+ )
35
+ ? { tsconfig: { moduleResolution: 'Node' } }
36
+ : undefined;
37
+
38
+ /**
39
+ * Rewrite `ts-jest` transformations using our resolved `TS_JEST_PATH`.
40
+ *
41
+ * @type {import ('@jest/types').Config.InitialOptions['transform']}
42
+ */
43
+ module.exports.transform = Object.fromEntries(
44
+ Object.entries(defaults.transform).map(([key, value]) => {
45
+ if (typeof value === 'string') {
46
+ return [key, value === TS_JEST_NAME ? [TS_JEST_PATH, tsconfig] : value];
47
+ }
48
+
49
+ return [
50
+ key,
51
+ value[0] === TS_JEST_NAME
52
+ ? [
53
+ TS_JEST_PATH,
54
+ {
55
+ ...value[1],
56
+ ...tsconfig,
57
+ },
58
+ ]
59
+ : value,
60
+ ];
61
+ }),
62
+ );
@@ -0,0 +1,26 @@
1
+ const {
2
+ sys,
3
+ findConfigFile,
4
+ readConfigFile,
5
+ parseJsonConfigFileContent,
6
+ } = require('typescript');
7
+
8
+ /**
9
+ * @returns {unknown}
10
+ */
11
+ const getTsConfigFromDisk = () => {
12
+ const filename =
13
+ findConfigFile('.', sys.fileExists.bind(this)) ?? 'tsconfig.json';
14
+
15
+ return readConfigFile(filename, sys.readFile.bind(this)).config;
16
+ };
17
+
18
+ module.exports.tryParseTsConfig = (getConfig = getTsConfigFromDisk) => {
19
+ try {
20
+ const json = getConfig();
21
+
22
+ return parseJsonConfigFileContent(json, sys, '.');
23
+ } catch {
24
+ // Bail out here to support zero-config mode.
25
+ }
26
+ };
package/jest-preset.js ADDED
@@ -0,0 +1,37 @@
1
+ const { defaults } = require('ts-jest/presets');
2
+
3
+ const { createModuleNameMapper } = require('./jest/moduleNameMapper');
4
+ const { transform } = require('./jest/transform');
5
+
6
+ /** @type {import('@jest/types').Config.InitialOptions} */
7
+ module.exports = {
8
+ ...defaults,
9
+
10
+ moduleNameMapper: createModuleNameMapper(),
11
+ transform,
12
+
13
+ collectCoverageFrom: [
14
+ '**/*.ts',
15
+ '**/*.tsx',
16
+ '!**/node_modules*/**',
17
+ '!<rootDir>/coverage*/**',
18
+ '!<rootDir>/dist*/**',
19
+ '!<rootDir>/lib*/**',
20
+ '!<rootDir>/tmp*/**',
21
+ '!<rootDir>/jest.*.ts',
22
+ ],
23
+ coverageDirectory: 'coverage',
24
+ reporters: ['default', require.resolve('./lib/cli/test/reporters/github')],
25
+ testEnvironment: 'node',
26
+ testPathIgnorePatterns: [
27
+ '/node_modules.*/',
28
+ '<rootDir>/(coverage|dist|lib|tmp).*/',
29
+ ],
30
+ watchPlugins: [
31
+ require.resolve('jest-watch-typeahead/filename'),
32
+ require.resolve('jest-watch-typeahead/testname'),
33
+ ],
34
+ testEnvironmentOptions: {
35
+ globalsCleanup: 'on',
36
+ },
37
+ };
@@ -0,0 +1,15 @@
1
+ import type { Config } from '@jest/types';
2
+ export type { Config } from '@jest/types';
3
+ /**
4
+ * Set of Jest options that are recommended and supported for customisation.
5
+ *
6
+ * While we technically accept anything compatible with `Config.InitialOptions`,
7
+ * these are tacitly endorsed for our use cases and receive IntelliSense.
8
+ */
9
+ type DefaultOptions = 'collectCoverage' | 'collectCoverageFrom' | 'coveragePathIgnorePatterns' | 'coverageThreshold' | 'displayName' | 'globals' | 'globalSetup' | 'globalTeardown' | 'projects' | 'setupFiles' | 'setupFilesAfterEnv' | 'snapshotSerializers' | 'testEnvironment' | 'testPathIgnorePatterns' | 'testTimeout' | 'watchPathIgnorePatterns';
10
+ /**
11
+ * Merge additional Jest options into the **skuba** preset.
12
+ *
13
+ * This concatenates array options like `testPathIgnorePatterns`.
14
+ */
15
+ export declare const mergePreset: <AdditionalOptions extends keyof Config.InitialOptions>({ projects, ...options }: Pick<Config.InitialOptions, AdditionalOptions | DefaultOptions>) => Config.InitialOptions;
@@ -0,0 +1,59 @@
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 jest_exports = {};
30
+ __export(jest_exports, {
31
+ mergePreset: () => mergePreset
32
+ });
33
+ module.exports = __toCommonJS(jest_exports);
34
+ var import_jest_preset = __toESM(require("../../../jest-preset.js"));
35
+ var import_record = require("../../cli/configure/processing/record.js");
36
+ const mergePreset = ({
37
+ projects,
38
+ ...options
39
+ }) => {
40
+ const root = (0, import_record.mergeRaw)(import_jest_preset.default, options);
41
+ return {
42
+ ...root,
43
+ projects: projects?.map((project) => {
44
+ if (typeof project === "string") {
45
+ return project;
46
+ }
47
+ return {
48
+ moduleNameMapper: root.moduleNameMapper,
49
+ transform: root.transform,
50
+ ...project
51
+ };
52
+ })
53
+ };
54
+ };
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ mergePreset
58
+ });
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/api/jest/index.ts"],
4
+ "sourcesContent": ["import type { Config } from '@jest/types';\n\nimport jestPreset from '../../../jest-preset.js';\nimport { mergeRaw } from '../../cli/configure/processing/record.js';\n\n// Avoid TS4082 in Jest configuration files:\n// Default export of the module has or is using private name `ConfigGlobals`.\nexport type { Config } from '@jest/types';\n\n/**\n * Set of Jest options that are recommended and supported for customisation.\n *\n * While we technically accept anything compatible with `Config.InitialOptions`,\n * these are tacitly endorsed for our use cases and receive IntelliSense.\n */\ntype DefaultOptions =\n | 'collectCoverage'\n | 'collectCoverageFrom'\n | 'coveragePathIgnorePatterns'\n | 'coverageThreshold'\n | 'displayName'\n | 'globals'\n | 'globalSetup'\n | 'globalTeardown'\n | 'projects'\n | 'setupFiles'\n | 'setupFilesAfterEnv'\n | 'snapshotSerializers'\n | 'testEnvironment'\n | 'testPathIgnorePatterns'\n | 'testTimeout'\n | 'watchPathIgnorePatterns';\n\n/**\n * Merge additional Jest options into the **skuba** preset.\n *\n * This concatenates array options like `testPathIgnorePatterns`.\n */\nexport const mergePreset = <\n AdditionalOptions extends keyof Config.InitialOptions,\n>({\n projects,\n ...options\n}: Pick<\n Config.InitialOptions,\n AdditionalOptions | DefaultOptions\n>): Config.InitialOptions => {\n const root = mergeRaw(jestPreset, options);\n\n return {\n ...root,\n\n projects: projects?.map((project) => {\n if (typeof project === 'string') {\n return project;\n }\n\n return {\n moduleNameMapper: root.moduleNameMapper,\n transform: root.transform,\n ...project,\n };\n }),\n };\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,yBAAuB;AACvB,oBAAyB;AAmClB,MAAM,cAAc,CAEzB;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAG6B;AAC3B,QAAM,WAAO,wBAAS,mBAAAA,SAAY,OAAO;AAEzC,SAAO;AAAA,IACL,GAAG;AAAA,IAEH,UAAU,UAAU,IAAI,CAAC,YAAY;AACnC,UAAI,OAAO,YAAY,UAAU;AAC/B,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,QACL,kBAAkB,KAAK;AAAA,QACvB,WAAW,KAAK;AAAA,QAChB,GAAG;AAAA,MACL;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
6
+ "names": ["jestPreset"]
7
+ }
@@ -1,17 +1,50 @@
1
- import { styleText } from "node:util";
2
- import path from "path";
3
- import { loadESLint } from "eslint";
4
- import { pluralise } 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 eslint_exports = {};
30
+ __export(eslint_exports, {
31
+ runESLint: () => runESLint
32
+ });
33
+ module.exports = __toCommonJS(eslint_exports);
34
+ var import_node_util = require("node:util");
35
+ var import_path = __toESM(require("path"));
36
+ var import_eslint = require("eslint");
37
+ var import_logging = require("../../utils/logging.js");
5
38
  const symbolForResult = (result) => {
6
39
  if (result.errorCount) {
7
- return styleText("red", "\u25CB");
40
+ return (0, import_node_util.styleText)("red", "\u25CB");
8
41
  }
9
- return result.warningCount ? styleText("yellow", "\u25CD") : styleText("green", "\u25CB");
42
+ return result.warningCount ? (0, import_node_util.styleText)("yellow", "\u25CD") : (0, import_node_util.styleText)("green", "\u25CB");
10
43
  };
11
44
  const runESLint = async (mode, logger, overrideConfigFile) => {
12
45
  logger.debug("Initialising ESLint...");
13
46
  const cwd = process.cwd();
14
- const ESLint = await loadESLint({ useFlatConfig: true });
47
+ const ESLint = await (0, import_eslint.loadESLint)({ useFlatConfig: true });
15
48
  const engine = new ESLint({
16
49
  cache: true,
17
50
  fix: mode === "format",
@@ -36,7 +69,7 @@ const runESLint = async (mode, logger, overrideConfigFile) => {
36
69
  }
37
70
  const end = process.hrtime.bigint();
38
71
  logger.plain(
39
- `Processed ${pluralise(results.length, "file")} in ${logger.timing(
72
+ `Processed ${(0, import_logging.pluralise)(results.length, "file")} in ${logger.timing(
40
73
  start,
41
74
  end
42
75
  )}.`
@@ -45,7 +78,7 @@ const runESLint = async (mode, logger, overrideConfigFile) => {
45
78
  const warnings = [];
46
79
  let fixable = false;
47
80
  for (const result of results) {
48
- const relativePath = path.relative(cwd, result.filePath);
81
+ const relativePath = import_path.default.relative(cwd, result.filePath);
49
82
  if (result.fixableErrorCount + result.fixableWarningCount) {
50
83
  fixable = true;
51
84
  }
@@ -85,7 +118,8 @@ const lintFiles = async (engine) => {
85
118
  throw error;
86
119
  }
87
120
  };
88
- export {
121
+ // Annotate the CommonJS export names for ESM import in node:
122
+ 0 && (module.exports = {
89
123
  runESLint
90
- };
124
+ });
91
125
  //# sourceMappingURL=eslint.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cli/adapter/eslint.ts"],
4
4
  "sourcesContent": ["import { styleText } from 'node:util';\nimport path from 'path';\n\nimport { type ESLint, type Linter, loadESLint } from 'eslint';\n\nimport { type Logger, pluralise } from '../../utils/logging.js';\n\nconst symbolForResult = (result: ESLint.LintResult) => {\n if (result.errorCount) {\n return styleText('red', '\u25CB');\n }\n\n return result.warningCount\n ? styleText('yellow', '\u25CD')\n : styleText('green', '\u25CB');\n};\n\nexport interface ESLintResult {\n messages: Linter.LintMessage[];\n filePath: string;\n}\n\nexport interface ESLintOutput {\n errors: ESLintResult[];\n fixable: boolean;\n ok: boolean;\n output: string;\n warnings: ESLintResult[];\n}\n\nexport const runESLint = async (\n mode: 'format' | 'lint',\n logger: Logger,\n overrideConfigFile?: string,\n): Promise<ESLintOutput> => {\n logger.debug('Initialising ESLint...');\n\n const cwd = process.cwd();\n\n const ESLint = await loadESLint({ useFlatConfig: true });\n const engine = new ESLint({\n cache: true,\n fix: mode === 'format',\n overrideConfigFile,\n overrideConfig: {\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n },\n });\n\n logger.debug('Processing files...');\n\n const start = process.hrtime.bigint();\n\n const [formatter, { type, results }] = await Promise.all([\n engine.loadFormatter(),\n lintFiles(engine),\n ]);\n\n if (type === 'no-config') {\n logger.plain(\n 'skuba could not find an eslint config file. Do you need to run format or configure?',\n );\n return { ok: false, fixable: false, errors: [], warnings: [], output: '' };\n }\n\n const end = process.hrtime.bigint();\n\n logger.plain(\n `Processed ${pluralise(results.length, 'file')} in ${logger.timing(\n start,\n end,\n )}.`,\n );\n\n const errors: ESLintResult[] = [];\n const warnings: ESLintResult[] = [];\n let fixable = false;\n\n for (const result of results) {\n const relativePath = path.relative(cwd, result.filePath);\n if (result.fixableErrorCount + result.fixableWarningCount) {\n fixable = true;\n }\n\n if (result.errorCount) {\n errors.push({\n filePath: relativePath,\n messages: result.messages,\n });\n }\n\n if (result.warningCount) {\n warnings.push({\n filePath: relativePath,\n messages: result.messages,\n });\n }\n\n logger.debug(symbolForResult(result), relativePath);\n }\n\n const ok = errors.length === 0;\n\n await ESLint.outputFixes(results);\n\n const output = await formatter.format(\n results,\n engine.getRulesMetaForResults(results),\n );\n\n if (output) {\n logger.plain(output);\n }\n\n return { errors, fixable, ok, output, warnings };\n};\n\nconst lintFiles = async (engine: ESLint) => {\n try {\n const result = await engine.lintFiles([]);\n return { type: 'results', results: result } as const;\n } catch (error) {\n if (\n error instanceof Error &&\n error.message === 'Could not find config file.'\n ) {\n return { type: 'no-config', results: undefined } as const;\n }\n throw error;\n }\n};\n"],
5
- "mappings": "AAAA,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AAEjB,SAAmC,kBAAkB;AAErD,SAAsB,iBAAiB;AAEvC,MAAM,kBAAkB,CAAC,WAA8B;AACrD,MAAI,OAAO,YAAY;AACrB,WAAO,UAAU,OAAO,QAAG;AAAA,EAC7B;AAEA,SAAO,OAAO,eACV,UAAU,UAAU,QAAG,IACvB,UAAU,SAAS,QAAG;AAC5B;AAeO,MAAM,YAAY,OACvB,MACA,QACA,uBAC0B;AAC1B,SAAO,MAAM,wBAAwB;AAErC,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,SAAS,MAAM,WAAW,EAAE,eAAe,KAAK,CAAC;AACvD,QAAM,SAAS,IAAI,OAAO;AAAA,IACxB,OAAO;AAAA,IACP,KAAK,SAAS;AAAA,IACd;AAAA,IACA,gBAAgB;AAAA,MACd,eAAe;AAAA,QACb,+BAA+B;AAAA,MACjC;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO,MAAM,qBAAqB;AAElC,QAAM,QAAQ,QAAQ,OAAO,OAAO;AAEpC,QAAM,CAAC,WAAW,EAAE,MAAM,QAAQ,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACvD,OAAO,cAAc;AAAA,IACrB,UAAU,MAAM;AAAA,EAClB,CAAC;AAED,MAAI,SAAS,aAAa;AACxB,WAAO;AAAA,MACL;AAAA,IACF;AACA,WAAO,EAAE,IAAI,OAAO,SAAS,OAAO,QAAQ,CAAC,GAAG,UAAU,CAAC,GAAG,QAAQ,GAAG;AAAA,EAC3E;AAEA,QAAM,MAAM,QAAQ,OAAO,OAAO;AAElC,SAAO;AAAA,IACL,aAAa,UAAU,QAAQ,QAAQ,MAAM,CAAC,OAAO,OAAO;AAAA,MAC1D;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,SAAyB,CAAC;AAChC,QAAM,WAA2B,CAAC;AAClC,MAAI,UAAU;AAEd,aAAW,UAAU,SAAS;AAC5B,UAAM,eAAe,KAAK,SAAS,KAAK,OAAO,QAAQ;AACvD,QAAI,OAAO,oBAAoB,OAAO,qBAAqB;AACzD,gBAAU;AAAA,IACZ;AAEA,QAAI,OAAO,YAAY;AACrB,aAAO,KAAK;AAAA,QACV,UAAU;AAAA,QACV,UAAU,OAAO;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,QAAI,OAAO,cAAc;AACvB,eAAS,KAAK;AAAA,QACZ,UAAU;AAAA,QACV,UAAU,OAAO;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,WAAO,MAAM,gBAAgB,MAAM,GAAG,YAAY;AAAA,EACpD;AAEA,QAAM,KAAK,OAAO,WAAW;AAE7B,QAAM,OAAO,YAAY,OAAO;AAEhC,QAAM,SAAS,MAAM,UAAU;AAAA,IAC7B;AAAA,IACA,OAAO,uBAAuB,OAAO;AAAA,EACvC;AAEA,MAAI,QAAQ;AACV,WAAO,MAAM,MAAM;AAAA,EACrB;AAEA,SAAO,EAAE,QAAQ,SAAS,IAAI,QAAQ,SAAS;AACjD;AAEA,MAAM,YAAY,OAAO,WAAmB;AAC1C,MAAI;AACF,UAAM,SAAS,MAAM,OAAO,UAAU,CAAC,CAAC;AACxC,WAAO,EAAE,MAAM,WAAW,SAAS,OAAO;AAAA,EAC5C,SAAS,OAAO;AACd,QACE,iBAAiB,SACjB,MAAM,YAAY,+BAClB;AACA,aAAO,EAAE,MAAM,aAAa,SAAS,OAAU;AAAA,IACjD;AACA,UAAM;AAAA,EACR;AACF;",
6
- "names": []
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAC1B,kBAAiB;AAEjB,oBAAqD;AAErD,qBAAuC;AAEvC,MAAM,kBAAkB,CAAC,WAA8B;AACrD,MAAI,OAAO,YAAY;AACrB,eAAO,4BAAU,OAAO,QAAG;AAAA,EAC7B;AAEA,SAAO,OAAO,mBACV,4BAAU,UAAU,QAAG,QACvB,4BAAU,SAAS,QAAG;AAC5B;AAeO,MAAM,YAAY,OACvB,MACA,QACA,uBAC0B;AAC1B,SAAO,MAAM,wBAAwB;AAErC,QAAM,MAAM,QAAQ,IAAI;AAExB,QAAM,SAAS,UAAM,0BAAW,EAAE,eAAe,KAAK,CAAC;AACvD,QAAM,SAAS,IAAI,OAAO;AAAA,IACxB,OAAO;AAAA,IACP,KAAK,SAAS;AAAA,IACd;AAAA,IACA,gBAAgB;AAAA,MACd,eAAe;AAAA,QACb,+BAA+B;AAAA,MACjC;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO,MAAM,qBAAqB;AAElC,QAAM,QAAQ,QAAQ,OAAO,OAAO;AAEpC,QAAM,CAAC,WAAW,EAAE,MAAM,QAAQ,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACvD,OAAO,cAAc;AAAA,IACrB,UAAU,MAAM;AAAA,EAClB,CAAC;AAED,MAAI,SAAS,aAAa;AACxB,WAAO;AAAA,MACL;AAAA,IACF;AACA,WAAO,EAAE,IAAI,OAAO,SAAS,OAAO,QAAQ,CAAC,GAAG,UAAU,CAAC,GAAG,QAAQ,GAAG;AAAA,EAC3E;AAEA,QAAM,MAAM,QAAQ,OAAO,OAAO;AAElC,SAAO;AAAA,IACL,iBAAa,0BAAU,QAAQ,QAAQ,MAAM,CAAC,OAAO,OAAO;AAAA,MAC1D;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,SAAyB,CAAC;AAChC,QAAM,WAA2B,CAAC;AAClC,MAAI,UAAU;AAEd,aAAW,UAAU,SAAS;AAC5B,UAAM,eAAe,YAAAA,QAAK,SAAS,KAAK,OAAO,QAAQ;AACvD,QAAI,OAAO,oBAAoB,OAAO,qBAAqB;AACzD,gBAAU;AAAA,IACZ;AAEA,QAAI,OAAO,YAAY;AACrB,aAAO,KAAK;AAAA,QACV,UAAU;AAAA,QACV,UAAU,OAAO;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,QAAI,OAAO,cAAc;AACvB,eAAS,KAAK;AAAA,QACZ,UAAU;AAAA,QACV,UAAU,OAAO;AAAA,MACnB,CAAC;AAAA,IACH;AAEA,WAAO,MAAM,gBAAgB,MAAM,GAAG,YAAY;AAAA,EACpD;AAEA,QAAM,KAAK,OAAO,WAAW;AAE7B,QAAM,OAAO,YAAY,OAAO;AAEhC,QAAM,SAAS,MAAM,UAAU;AAAA,IAC7B;AAAA,IACA,OAAO,uBAAuB,OAAO;AAAA,EACvC;AAEA,MAAI,QAAQ;AACV,WAAO,MAAM,MAAM;AAAA,EACrB;AAEA,SAAO,EAAE,QAAQ,SAAS,IAAI,QAAQ,SAAS;AACjD;AAEA,MAAM,YAAY,OAAO,WAAmB;AAC1C,MAAI;AACF,UAAM,SAAS,MAAM,OAAO,UAAU,CAAC,CAAC;AACxC,WAAO,EAAE,MAAM,WAAW,SAAS,OAAO;AAAA,EAC5C,SAAS,OAAO;AACd,QACE,iBAAiB,SACjB,MAAM,YAAY,+BAClB;AACA,aAAO,EAAE,MAAM,aAAa,SAAS,OAAU;AAAA,IACjD;AACA,UAAM;AAAA,EACR;AACF;",
6
+ "names": ["path"]
7
7
  }
@@ -1,22 +1,49 @@
1
- import path from "path";
2
- import fs from "fs-extra";
3
- import {
4
- check,
5
- format,
6
- getSupportInfo,
7
- resolveConfig
8
- } from "prettier";
9
- import { crawlDirectory } from "../../utils/dir.js";
10
- import { pluralise } from "../../utils/logging.js";
11
- import { getConsumerManifest } from "../../utils/manifest.js";
12
- import {
13
- formatPackage,
14
- parsePackage
15
- } from "../configure/processing/package.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 prettier_exports = {};
30
+ __export(prettier_exports, {
31
+ formatOrLintFile: () => formatOrLintFile,
32
+ inferParser: () => inferParser,
33
+ runPrettier: () => runPrettier
34
+ });
35
+ module.exports = __toCommonJS(prettier_exports);
36
+ var import_path = __toESM(require("path"));
37
+ var import_fs_extra = __toESM(require("fs-extra"));
38
+ var import_prettier = require("prettier");
39
+ var import_dir = require("../../utils/dir.js");
40
+ var import_logging = require("../../utils/logging.js");
41
+ var import_manifest = require("../../utils/manifest.js");
42
+ var import_package = require("../configure/processing/package.js");
16
43
  let languages;
17
44
  const inferParser = async (filepath) => {
18
- const filename = path.basename(filepath).toLowerCase();
19
- languages ??= (await getSupportInfo()).languages;
45
+ const filename = import_path.default.basename(filepath).toLowerCase();
46
+ languages ??= (await (0, import_prettier.getSupportInfo)()).languages;
20
47
  const firstLanguage = languages.find(
21
48
  (language) => language.extensions?.some((extension) => filename.endsWith(extension)) || language.filenames?.some((name) => name.toLowerCase() === filename)
22
49
  );
@@ -26,12 +53,12 @@ const isPackageJsonOk = async ({
26
53
  data,
27
54
  filepath
28
55
  }) => {
29
- if (path.basename(filepath) !== "package.json") {
56
+ if (import_path.default.basename(filepath) !== "package.json") {
30
57
  return true;
31
58
  }
32
59
  try {
33
- const packageJson = parsePackage(data);
34
- return !packageJson || await formatPackage(packageJson) === data;
60
+ const packageJson = (0, import_package.parsePackage)(data);
61
+ return !packageJson || await (0, import_package.formatPackage)(packageJson) === data;
35
62
  } catch {
36
63
  }
37
64
  return true;
@@ -40,7 +67,7 @@ const formatOrLintFile = async ({ data, filepath, options }, mode, result) => {
40
67
  if (mode === "lint") {
41
68
  let ok;
42
69
  try {
43
- ok = await check(data, options) && await isPackageJsonOk({ data, filepath });
70
+ ok = await (0, import_prettier.check)(data, options) && await isPackageJsonOk({ data, filepath });
44
71
  } catch (err) {
45
72
  result?.errored.push({ err, filepath });
46
73
  return;
@@ -52,16 +79,16 @@ const formatOrLintFile = async ({ data, filepath, options }, mode, result) => {
52
79
  }
53
80
  let formatted;
54
81
  try {
55
- formatted = await format(data, options);
82
+ formatted = await (0, import_prettier.format)(data, options);
56
83
  } catch (err) {
57
84
  result?.errored.push({ err, filepath });
58
85
  return;
59
86
  }
60
87
  try {
61
- if (path.basename(filepath) === "package.json") {
62
- const packageJson = parsePackage(formatted);
88
+ if (import_path.default.basename(filepath) === "package.json") {
89
+ const packageJson = (0, import_package.parsePackage)(formatted);
63
90
  if (packageJson) {
64
- formatted = await formatPackage(packageJson);
91
+ formatted = await (0, import_package.formatPackage)(packageJson);
65
92
  }
66
93
  }
67
94
  } catch {
@@ -75,18 +102,18 @@ const formatOrLintFile = async ({ data, filepath, options }, mode, result) => {
75
102
  const runPrettier = async (mode, logger, cwd = process.cwd()) => {
76
103
  logger.debug("Initialising Prettier...");
77
104
  const start = process.hrtime.bigint();
78
- const manifest = await getConsumerManifest(cwd);
79
- const directory = manifest ? path.dirname(manifest.path) : cwd;
105
+ const manifest = await (0, import_manifest.getConsumerManifest)(cwd);
106
+ const directory = manifest ? import_path.default.dirname(manifest.path) : cwd;
80
107
  logger.debug(
81
108
  manifest ? "Detected project root:" : "Detected working directory:",
82
109
  directory
83
110
  );
84
111
  logger.debug("Discovering files...");
85
- const relativeFilepaths = await crawlDirectory(directory, [
112
+ const relativeFilepaths = await (0, import_dir.crawlDirectory)(directory, [
86
113
  ".gitignore",
87
114
  ".prettierignore"
88
115
  ]);
89
- logger.debug(`Discovered ${pluralise(relativeFilepaths.length, "file")}.`);
116
+ logger.debug(`Discovered ${(0, import_logging.pluralise)(relativeFilepaths.length, "file")}.`);
90
117
  const result = {
91
118
  count: relativeFilepaths.length,
92
119
  errored: [],
@@ -95,9 +122,9 @@ const runPrettier = async (mode, logger, cwd = process.cwd()) => {
95
122
  };
96
123
  logger.debug(mode === "format" ? "Formatting" : "Linting", "files...");
97
124
  for (const relativeFilepath of relativeFilepaths) {
98
- const filepath = path.relative(
125
+ const filepath = import_path.default.relative(
99
126
  process.cwd(),
100
- path.join(directory, relativeFilepath)
127
+ import_path.default.join(directory, relativeFilepath)
101
128
  );
102
129
  const parser = await inferParser(filepath);
103
130
  logger.debug(filepath);
@@ -107,8 +134,8 @@ const runPrettier = async (mode, logger, cwd = process.cwd()) => {
107
134
  continue;
108
135
  }
109
136
  const [config, data] = await Promise.all([
110
- resolveConfig(filepath),
111
- fs.promises.readFile(filepath, "utf-8")
137
+ (0, import_prettier.resolveConfig)(filepath),
138
+ import_fs_extra.default.promises.readFile(filepath, "utf-8")
112
139
  ]);
113
140
  const file = {
114
141
  data,
@@ -117,24 +144,24 @@ const runPrettier = async (mode, logger, cwd = process.cwd()) => {
117
144
  };
118
145
  const formatted = await formatOrLintFile(file, mode, result);
119
146
  if (typeof formatted === "string") {
120
- await fs.promises.writeFile(filepath, formatted);
147
+ await import_fs_extra.default.promises.writeFile(filepath, formatted);
121
148
  }
122
149
  }
123
150
  const end = process.hrtime.bigint();
124
151
  logger.plain(
125
- `Processed ${pluralise(
152
+ `Processed ${(0, import_logging.pluralise)(
126
153
  result.count - result.unparsed.length,
127
154
  "file"
128
155
  )} in ${logger.timing(start, end)}.`
129
156
  );
130
157
  if (result.touched.length) {
131
- logger.plain(`Formatted ${pluralise(result.touched.length, "file")}:`);
158
+ logger.plain(`Formatted ${(0, import_logging.pluralise)(result.touched.length, "file")}:`);
132
159
  for (const filepath of result.touched) {
133
160
  logger.warn(filepath);
134
161
  }
135
162
  }
136
163
  if (result.errored.length) {
137
- logger.plain(`Flagged ${pluralise(result.errored.length, "file")}:`);
164
+ logger.plain(`Flagged ${(0, import_logging.pluralise)(result.errored.length, "file")}:`);
138
165
  for (const { err, filepath } of result.errored) {
139
166
  logger.warn(
140
167
  filepath,
@@ -144,9 +171,10 @@ const runPrettier = async (mode, logger, cwd = process.cwd()) => {
144
171
  }
145
172
  return { ok: result.errored.length === 0, result };
146
173
  };
147
- export {
174
+ // Annotate the CommonJS export names for ESM import in node:
175
+ 0 && (module.exports = {
148
176
  formatOrLintFile,
149
177
  inferParser,
150
178
  runPrettier
151
- };
179
+ });
152
180
  //# sourceMappingURL=prettier.js.map