renovate 40.0.0-next.4 → 40.0.0-next.41

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 (810) hide show
  1. package/dist/config/decrypt/legacy.js +0 -1
  2. package/dist/config/decrypt/legacy.js.map +1 -1
  3. package/dist/config/decrypt.d.ts +3 -1
  4. package/dist/config/decrypt.js +56 -13
  5. package/dist/config/decrypt.js.map +1 -1
  6. package/dist/config/migrate-validate.js +3 -2
  7. package/dist/config/migrate-validate.js.map +1 -1
  8. package/dist/config/migration.js +2 -1
  9. package/dist/config/migration.js.map +1 -1
  10. package/dist/config/migrations/custom/rebase-stale-prs-migration.js +1 -1
  11. package/dist/config/migrations/custom/rebase-stale-prs-migration.js.map +1 -1
  12. package/dist/config/options/index.js +17 -3
  13. package/dist/config/options/index.js.map +1 -1
  14. package/dist/config/parse.js +2 -2
  15. package/dist/config/parse.js.map +1 -1
  16. package/dist/config/presets/common.js +1 -0
  17. package/dist/config/presets/common.js.map +1 -1
  18. package/dist/config/presets/gitea/index.js +0 -1
  19. package/dist/config/presets/gitea/index.js.map +1 -1
  20. package/dist/config/presets/github/index.js +0 -1
  21. package/dist/config/presets/github/index.js.map +1 -1
  22. package/dist/config/presets/gitlab/index.js +1 -1
  23. package/dist/config/presets/gitlab/index.js.map +1 -1
  24. package/dist/config/presets/http/index.js +1 -2
  25. package/dist/config/presets/http/index.js.map +1 -1
  26. package/dist/config/presets/index.js +0 -7
  27. package/dist/config/presets/index.js.map +1 -1
  28. package/dist/config/presets/internal/custom-managers.js +18 -4
  29. package/dist/config/presets/internal/custom-managers.js.map +1 -1
  30. package/dist/config/presets/internal/group.js +30 -1
  31. package/dist/config/presets/internal/group.js.map +1 -1
  32. package/dist/config/presets/internal/index.js +1 -3
  33. package/dist/config/presets/internal/index.js.map +1 -1
  34. package/dist/config/presets/internal/workarounds.js +1 -0
  35. package/dist/config/presets/internal/workarounds.js.map +1 -1
  36. package/dist/config/presets/parse.js +2 -1
  37. package/dist/config/presets/parse.js.map +1 -1
  38. package/dist/config/schema.d.ts +2 -2
  39. package/dist/config/types.d.ts +4 -1
  40. package/dist/config/types.js.map +1 -1
  41. package/dist/config/validation.js +3 -5
  42. package/dist/config/validation.js.map +1 -1
  43. package/dist/config-validator.js +0 -1
  44. package/dist/config-validator.js.map +1 -1
  45. package/dist/constants/category.js +0 -1
  46. package/dist/constants/category.js.map +1 -1
  47. package/dist/constants/platforms.js +5 -1
  48. package/dist/constants/platforms.js.map +1 -1
  49. package/dist/data/monorepo.json +8 -2
  50. package/dist/data/source-urls.json +1 -0
  51. package/dist/data-files.generated.js +2 -2
  52. package/dist/data-files.generated.js.map +1 -1
  53. package/dist/instrumentation/index.js +39 -15
  54. package/dist/instrumentation/index.js.map +1 -1
  55. package/dist/instrumentation/utils.js +1 -1
  56. package/dist/instrumentation/utils.js.map +1 -1
  57. package/dist/logger/cmd-serializer.js +0 -1
  58. package/dist/logger/cmd-serializer.js.map +1 -1
  59. package/dist/logger/config-serializer.js +0 -1
  60. package/dist/logger/config-serializer.js.map +1 -1
  61. package/dist/logger/index.js +1 -4
  62. package/dist/logger/index.js.map +1 -1
  63. package/dist/logger/once.js +4 -2
  64. package/dist/logger/once.js.map +1 -1
  65. package/dist/logger/pretty-stdout.js +0 -1
  66. package/dist/logger/pretty-stdout.js.map +1 -1
  67. package/dist/logger/renovate-logger.js +1 -1
  68. package/dist/logger/renovate-logger.js.map +1 -1
  69. package/dist/logger/utils.js +6 -11
  70. package/dist/logger/utils.js.map +1 -1
  71. package/dist/modules/datasource/api.js +4 -0
  72. package/dist/modules/datasource/api.js.map +1 -1
  73. package/dist/modules/datasource/artifactory/index.js +1 -2
  74. package/dist/modules/datasource/artifactory/index.js.map +1 -1
  75. package/dist/modules/datasource/aws-eks-addon/index.d.ts +11 -0
  76. package/dist/modules/datasource/aws-eks-addon/index.js +75 -0
  77. package/dist/modules/datasource/aws-eks-addon/index.js.map +1 -0
  78. package/dist/modules/datasource/aws-eks-addon/schema.d.ts +40 -0
  79. package/dist/modules/datasource/aws-eks-addon/schema.js +31 -0
  80. package/dist/modules/datasource/aws-eks-addon/schema.js.map +1 -0
  81. package/dist/modules/datasource/aws-machine-image/index.js +6 -5
  82. package/dist/modules/datasource/aws-machine-image/index.js.map +1 -1
  83. package/dist/modules/datasource/azure-pipelines-tasks/index.js +15 -1
  84. package/dist/modules/datasource/azure-pipelines-tasks/index.js.map +1 -1
  85. package/dist/modules/datasource/azure-pipelines-tasks/schema.d.ts +24 -0
  86. package/dist/modules/datasource/azure-pipelines-tasks/schema.js +3 -0
  87. package/dist/modules/datasource/azure-pipelines-tasks/schema.js.map +1 -1
  88. package/dist/modules/datasource/bazel/index.js +18 -2
  89. package/dist/modules/datasource/bazel/index.js.map +1 -1
  90. package/dist/modules/datasource/bazel/schema.d.ts +1 -0
  91. package/dist/modules/datasource/bazel/schema.js.map +1 -1
  92. package/dist/modules/datasource/bitbucket-server-tags/index.d.ts +19 -0
  93. package/dist/modules/datasource/bitbucket-server-tags/index.js +133 -0
  94. package/dist/modules/datasource/bitbucket-server-tags/index.js.map +1 -0
  95. package/dist/modules/datasource/bitbucket-server-tags/schema.d.ts +28 -0
  96. package/dist/modules/datasource/bitbucket-server-tags/schema.js +13 -0
  97. package/dist/modules/datasource/bitbucket-server-tags/schema.js.map +1 -0
  98. package/dist/modules/datasource/bitrise/index.js +1 -1
  99. package/dist/modules/datasource/bitrise/index.js.map +1 -1
  100. package/dist/modules/datasource/cdnjs/schema.d.ts +2 -2
  101. package/dist/modules/datasource/conda/index.js +18 -1
  102. package/dist/modules/datasource/conda/index.js.map +1 -1
  103. package/dist/modules/datasource/conda/prefix-dev.d.ts +3 -0
  104. package/dist/modules/datasource/conda/prefix-dev.js +81 -0
  105. package/dist/modules/datasource/conda/prefix-dev.js.map +1 -0
  106. package/dist/modules/datasource/conda/schema/prefix-dev.d.ts +189 -0
  107. package/dist/modules/datasource/conda/schema/prefix-dev.js +31 -0
  108. package/dist/modules/datasource/conda/schema/prefix-dev.js.map +1 -0
  109. package/dist/modules/datasource/conda/types.d.ts +1 -20
  110. package/dist/modules/datasource/conda/types.js.map +1 -1
  111. package/dist/modules/datasource/cpan/index.js +2 -4
  112. package/dist/modules/datasource/cpan/index.js.map +1 -1
  113. package/dist/modules/datasource/crate/index.js +3 -3
  114. package/dist/modules/datasource/crate/index.js.map +1 -1
  115. package/dist/modules/datasource/custom/formats/html.js +1 -1
  116. package/dist/modules/datasource/custom/formats/html.js.map +1 -1
  117. package/dist/modules/datasource/custom/formats/yaml.js +1 -1
  118. package/dist/modules/datasource/custom/formats/yaml.js.map +1 -1
  119. package/dist/modules/datasource/custom/index.js +4 -2
  120. package/dist/modules/datasource/custom/index.js.map +1 -1
  121. package/dist/modules/datasource/custom/schema.d.ts +22 -22
  122. package/dist/modules/datasource/custom/utils.js +1 -0
  123. package/dist/modules/datasource/custom/utils.js.map +1 -1
  124. package/dist/modules/datasource/dart/index.js +1 -1
  125. package/dist/modules/datasource/dart/index.js.map +1 -1
  126. package/dist/modules/datasource/dart-version/index.js +1 -1
  127. package/dist/modules/datasource/dart-version/index.js.map +1 -1
  128. package/dist/modules/datasource/datasource.js +0 -1
  129. package/dist/modules/datasource/datasource.js.map +1 -1
  130. package/dist/modules/datasource/deb/index.d.ts +4 -5
  131. package/dist/modules/datasource/deb/index.js +10 -11
  132. package/dist/modules/datasource/deb/index.js.map +1 -1
  133. package/dist/modules/datasource/deb/url.d.ts +3 -3
  134. package/dist/modules/datasource/deb/url.js +17 -13
  135. package/dist/modules/datasource/deb/url.js.map +1 -1
  136. package/dist/modules/datasource/deno/index.js +1 -1
  137. package/dist/modules/datasource/deno/index.js.map +1 -1
  138. package/dist/modules/datasource/deno/schema.d.ts +1 -1
  139. package/dist/modules/datasource/devbox/index.js +0 -1
  140. package/dist/modules/datasource/devbox/index.js.map +1 -1
  141. package/dist/modules/datasource/docker/common.js +5 -2
  142. package/dist/modules/datasource/docker/common.js.map +1 -1
  143. package/dist/modules/datasource/docker/index.js +10 -8
  144. package/dist/modules/datasource/docker/index.js.map +1 -1
  145. package/dist/modules/datasource/docker/schema.d.ts +77 -101
  146. package/dist/modules/datasource/docker/schema.js +2 -1
  147. package/dist/modules/datasource/docker/schema.js.map +1 -1
  148. package/dist/modules/datasource/flutter-version/index.js +1 -1
  149. package/dist/modules/datasource/flutter-version/index.js.map +1 -1
  150. package/dist/modules/datasource/galaxy/schema.d.ts +1 -1
  151. package/dist/modules/datasource/galaxy-collection/schema.d.ts +8 -8
  152. package/dist/modules/datasource/git-refs/index.js +1 -1
  153. package/dist/modules/datasource/git-refs/index.js.map +1 -1
  154. package/dist/modules/datasource/gitea-releases/schema.d.ts +2 -2
  155. package/dist/modules/datasource/gitea-tags/schema.d.ts +4 -4
  156. package/dist/modules/datasource/github-release-attachments/index.js +2 -2
  157. package/dist/modules/datasource/github-release-attachments/index.js.map +1 -1
  158. package/dist/modules/datasource/github-runners/index.js +2 -2
  159. package/dist/modules/datasource/github-runners/index.js.map +1 -1
  160. package/dist/modules/datasource/gitlab-packages/index.js +1 -1
  161. package/dist/modules/datasource/gitlab-packages/index.js.map +1 -1
  162. package/dist/modules/datasource/gitlab-releases/index.js +1 -3
  163. package/dist/modules/datasource/gitlab-releases/index.js.map +1 -1
  164. package/dist/modules/datasource/go/base.js +1 -1
  165. package/dist/modules/datasource/go/base.js.map +1 -1
  166. package/dist/modules/datasource/go/index.js +1 -1
  167. package/dist/modules/datasource/go/index.js.map +1 -1
  168. package/dist/modules/datasource/go/releases-direct.js +7 -4
  169. package/dist/modules/datasource/go/releases-direct.js.map +1 -1
  170. package/dist/modules/datasource/go/releases-goproxy.js +1 -1
  171. package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
  172. package/dist/modules/datasource/golang-version/index.js +2 -2
  173. package/dist/modules/datasource/golang-version/index.js.map +1 -1
  174. package/dist/modules/datasource/gradle-version/index.js +1 -1
  175. package/dist/modules/datasource/gradle-version/index.js.map +1 -1
  176. package/dist/modules/datasource/helm/index.js +1 -1
  177. package/dist/modules/datasource/helm/index.js.map +1 -1
  178. package/dist/modules/datasource/hex/index.js +1 -1
  179. package/dist/modules/datasource/hex/index.js.map +1 -1
  180. package/dist/modules/datasource/hex/schema.d.ts +11 -11
  181. package/dist/modules/datasource/hexpm-bob/index.js +1 -1
  182. package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
  183. package/dist/modules/datasource/index.js +4 -4
  184. package/dist/modules/datasource/index.js.map +1 -1
  185. package/dist/modules/datasource/java-version/index.js +0 -1
  186. package/dist/modules/datasource/java-version/index.js.map +1 -1
  187. package/dist/modules/datasource/jenkins-plugins/index.js +1 -1
  188. package/dist/modules/datasource/jenkins-plugins/index.js.map +1 -1
  189. package/dist/modules/datasource/maven/index.js +35 -27
  190. package/dist/modules/datasource/maven/index.js.map +1 -1
  191. package/dist/modules/datasource/maven/types.d.ts +3 -6
  192. package/dist/modules/datasource/maven/types.js.map +1 -1
  193. package/dist/modules/datasource/maven/util.d.ts +4 -5
  194. package/dist/modules/datasource/maven/util.js +94 -157
  195. package/dist/modules/datasource/maven/util.js.map +1 -1
  196. package/dist/modules/datasource/metadata.js +9 -1
  197. package/dist/modules/datasource/metadata.js.map +1 -1
  198. package/dist/modules/datasource/node-version/index.js +1 -1
  199. package/dist/modules/datasource/node-version/index.js.map +1 -1
  200. package/dist/modules/datasource/npm/get.d.ts +0 -1
  201. package/dist/modules/datasource/npm/get.js +14 -68
  202. package/dist/modules/datasource/npm/get.js.map +1 -1
  203. package/dist/modules/datasource/npm/index.js +1 -1
  204. package/dist/modules/datasource/npm/index.js.map +1 -1
  205. package/dist/modules/datasource/npm/npmrc.js +1 -1
  206. package/dist/modules/datasource/npm/npmrc.js.map +1 -1
  207. package/dist/modules/datasource/npm/types.d.ts +0 -8
  208. package/dist/modules/datasource/npm/types.js.map +1 -1
  209. package/dist/modules/datasource/nuget/index.js +1 -1
  210. package/dist/modules/datasource/nuget/index.js.map +1 -1
  211. package/dist/modules/datasource/nuget/v2.js +1 -1
  212. package/dist/modules/datasource/nuget/v2.js.map +1 -1
  213. package/dist/modules/datasource/nuget/v3.js +6 -6
  214. package/dist/modules/datasource/nuget/v3.js.map +1 -1
  215. package/dist/modules/datasource/orb/index.js +1 -1
  216. package/dist/modules/datasource/orb/index.js.map +1 -1
  217. package/dist/modules/datasource/packagist/index.js +2 -2
  218. package/dist/modules/datasource/packagist/index.js.map +1 -1
  219. package/dist/modules/datasource/packagist/schema.d.ts +32 -32
  220. package/dist/modules/datasource/pod/index.js +2 -2
  221. package/dist/modules/datasource/pod/index.js.map +1 -1
  222. package/dist/modules/datasource/postprocess-release.js +1 -1
  223. package/dist/modules/datasource/postprocess-release.js.map +1 -1
  224. package/dist/modules/datasource/pypi/index.js +1 -1
  225. package/dist/modules/datasource/pypi/index.js.map +1 -1
  226. package/dist/modules/datasource/python-version/index.js +1 -1
  227. package/dist/modules/datasource/python-version/index.js.map +1 -1
  228. package/dist/modules/datasource/repology/index.js +1 -1
  229. package/dist/modules/datasource/repology/index.js.map +1 -1
  230. package/dist/modules/datasource/ruby-version/index.js +1 -1
  231. package/dist/modules/datasource/ruby-version/index.js.map +1 -1
  232. package/dist/modules/datasource/rubygems/index.js +2 -2
  233. package/dist/modules/datasource/rubygems/index.js.map +1 -1
  234. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js +2 -2
  235. package/dist/modules/datasource/rubygems/versions-endpoint-cache.js.map +1 -1
  236. package/dist/modules/datasource/sbt-package/index.js +1 -1
  237. package/dist/modules/datasource/sbt-package/index.js.map +1 -1
  238. package/dist/modules/datasource/sbt-plugin/index.js +1 -1
  239. package/dist/modules/datasource/sbt-plugin/index.js.map +1 -1
  240. package/dist/modules/datasource/schema.d.ts +4 -4
  241. package/dist/modules/datasource/terraform-module/index.js +1 -1
  242. package/dist/modules/datasource/terraform-module/index.js.map +1 -1
  243. package/dist/modules/datasource/terraform-provider/index.js +2 -3
  244. package/dist/modules/datasource/terraform-provider/index.js.map +1 -1
  245. package/dist/modules/datasource/types.d.ts +2 -0
  246. package/dist/modules/datasource/types.js.map +1 -1
  247. package/dist/modules/datasource/unity3d/index.d.ts +4 -1
  248. package/dist/modules/datasource/unity3d/index.js +36 -42
  249. package/dist/modules/datasource/unity3d/index.js.map +1 -1
  250. package/dist/modules/datasource/unity3d/schema.d.ts +47 -0
  251. package/dist/modules/datasource/unity3d/schema.js +17 -0
  252. package/dist/modules/datasource/unity3d/schema.js.map +1 -0
  253. package/dist/modules/manager/api.js +2 -0
  254. package/dist/modules/manager/api.js.map +1 -1
  255. package/dist/modules/manager/argocd/extract.js +1 -1
  256. package/dist/modules/manager/argocd/extract.js.map +1 -1
  257. package/dist/modules/manager/argocd/schema.d.ts +22 -22
  258. package/dist/modules/manager/asdf/upgradeable-tooling.js +94 -0
  259. package/dist/modules/manager/asdf/upgradeable-tooling.js.map +1 -1
  260. package/dist/modules/manager/azure-pipelines/schema.d.ts +32 -32
  261. package/dist/modules/manager/batect/schema.d.ts +4 -4
  262. package/dist/modules/manager/batect-wrapper/artifacts.js +1 -1
  263. package/dist/modules/manager/batect-wrapper/artifacts.js.map +1 -1
  264. package/dist/modules/manager/bazel/rules/docker.d.ts +6 -6
  265. package/dist/modules/manager/bazel/rules/git.d.ts +10 -10
  266. package/dist/modules/manager/bazel/rules/git.js +9 -2
  267. package/dist/modules/manager/bazel/rules/git.js.map +1 -1
  268. package/dist/modules/manager/bazel/rules/go.d.ts +5 -5
  269. package/dist/modules/manager/bazel/rules/maven.d.ts +7 -7
  270. package/dist/modules/manager/bazel/rules/oci.d.ts +6 -6
  271. package/dist/modules/manager/bazel-module/parser/fragments.d.ts +40 -40
  272. package/dist/modules/manager/bazel-module/parser/maven.d.ts +44 -90
  273. package/dist/modules/manager/bazel-module/parser/oci.d.ts +19 -42
  274. package/dist/modules/manager/bazel-module/rules.d.ts +50 -160
  275. package/dist/modules/manager/bun/artifacts.js +0 -1
  276. package/dist/modules/manager/bun/artifacts.js.map +1 -1
  277. package/dist/modules/manager/bun/extract.d.ts +1 -0
  278. package/dist/modules/manager/bun/extract.js +53 -27
  279. package/dist/modules/manager/bun/extract.js.map +1 -1
  280. package/dist/modules/manager/bun/index.js +1 -1
  281. package/dist/modules/manager/bun/index.js.map +1 -1
  282. package/dist/modules/manager/bun/utils.d.ts +2 -0
  283. package/dist/modules/manager/bun/utils.js +22 -0
  284. package/dist/modules/manager/bun/utils.js.map +1 -0
  285. package/dist/modules/manager/bundler/artifacts.js +0 -1
  286. package/dist/modules/manager/bundler/artifacts.js.map +1 -1
  287. package/dist/modules/manager/bundler/extract.js +2 -1
  288. package/dist/modules/manager/bundler/extract.js.map +1 -1
  289. package/dist/modules/manager/cake/index.js +4 -2
  290. package/dist/modules/manager/cake/index.js.map +1 -1
  291. package/dist/modules/manager/cargo/artifacts.js +5 -7
  292. package/dist/modules/manager/cargo/artifacts.js.map +1 -1
  293. package/dist/modules/manager/cargo/schema.d.ts +117 -117
  294. package/dist/modules/manager/circleci/extract.js +21 -30
  295. package/dist/modules/manager/circleci/extract.js.map +1 -1
  296. package/dist/modules/manager/circleci/schema.d.ts +33 -144
  297. package/dist/modules/manager/circleci/schema.js +21 -17
  298. package/dist/modules/manager/circleci/schema.js.map +1 -1
  299. package/dist/modules/manager/cocoapods/artifacts.js +1 -2
  300. package/dist/modules/manager/cocoapods/artifacts.js.map +1 -1
  301. package/dist/modules/manager/composer/artifacts.js +1 -2
  302. package/dist/modules/manager/composer/artifacts.js.map +1 -1
  303. package/dist/modules/manager/composer/schema.d.ts +32 -34
  304. package/dist/modules/manager/composer/schema.js +1 -1
  305. package/dist/modules/manager/composer/schema.js.map +1 -1
  306. package/dist/modules/manager/composer/utils.d.ts +1 -0
  307. package/dist/modules/manager/composer/utils.js +18 -6
  308. package/dist/modules/manager/composer/utils.js.map +1 -1
  309. package/dist/modules/manager/conan/artifacts.d.ts +2 -0
  310. package/dist/modules/manager/conan/artifacts.js +76 -0
  311. package/dist/modules/manager/conan/artifacts.js.map +1 -0
  312. package/dist/modules/manager/conan/index.d.ts +2 -0
  313. package/dist/modules/manager/conan/index.js +4 -1
  314. package/dist/modules/manager/conan/index.js.map +1 -1
  315. package/dist/modules/manager/copier/artifacts.js +0 -1
  316. package/dist/modules/manager/copier/artifacts.js.map +1 -1
  317. package/dist/modules/manager/crossplane/schema.d.ts +2 -2
  318. package/dist/modules/manager/custom/jsonata/index.js +4 -0
  319. package/dist/modules/manager/custom/jsonata/index.js.map +1 -1
  320. package/dist/modules/manager/custom/jsonata/schema.d.ts +21 -21
  321. package/dist/modules/manager/custom/regex/index.js +2 -0
  322. package/dist/modules/manager/custom/regex/index.js.map +1 -1
  323. package/dist/modules/manager/deps-edn/extract.js +2 -1
  324. package/dist/modules/manager/deps-edn/extract.js.map +1 -1
  325. package/dist/modules/manager/devbox/artifacts.d.ts +1 -1
  326. package/dist/modules/manager/devbox/artifacts.js +35 -11
  327. package/dist/modules/manager/devbox/artifacts.js.map +1 -1
  328. package/dist/modules/manager/devbox/schema.js +1 -1
  329. package/dist/modules/manager/devbox/schema.js.map +1 -1
  330. package/dist/modules/manager/devcontainer/extract.js +43 -1
  331. package/dist/modules/manager/devcontainer/extract.js.map +1 -1
  332. package/dist/modules/manager/devcontainer/index.js +11 -1
  333. package/dist/modules/manager/devcontainer/index.js.map +1 -1
  334. package/dist/modules/manager/devcontainer/schema.d.ts +7 -3
  335. package/dist/modules/manager/devcontainer/schema.js +3 -1
  336. package/dist/modules/manager/devcontainer/schema.js.map +1 -1
  337. package/dist/modules/manager/docker-compose/schema.d.ts +6 -6
  338. package/dist/modules/manager/dockerfile/extract.js +2 -6
  339. package/dist/modules/manager/dockerfile/extract.js.map +1 -1
  340. package/dist/modules/manager/fingerprint.generated.js +86 -85
  341. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  342. package/dist/modules/manager/flux/artifacts.js +0 -1
  343. package/dist/modules/manager/flux/artifacts.js.map +1 -1
  344. package/dist/modules/manager/flux/extract.js +27 -24
  345. package/dist/modules/manager/flux/extract.js.map +1 -1
  346. package/dist/modules/manager/flux/schema.d.ts +130 -154
  347. package/dist/modules/manager/github-actions/extract.js +60 -39
  348. package/dist/modules/manager/github-actions/extract.js.map +1 -1
  349. package/dist/modules/manager/github-actions/schema.d.ts +66 -0
  350. package/dist/modules/manager/github-actions/schema.js +38 -0
  351. package/dist/modules/manager/github-actions/schema.js.map +1 -0
  352. package/dist/modules/manager/gitlabci/extract.d.ts +1 -5
  353. package/dist/modules/manager/gitlabci/extract.js +27 -126
  354. package/dist/modules/manager/gitlabci/extract.js.map +1 -1
  355. package/dist/modules/manager/gitlabci/schema.d.ts +55 -0
  356. package/dist/modules/manager/gitlabci/schema.js +63 -0
  357. package/dist/modules/manager/gitlabci/schema.js.map +1 -0
  358. package/dist/modules/manager/gitlabci-include/extract.js +6 -54
  359. package/dist/modules/manager/gitlabci-include/extract.js.map +1 -1
  360. package/dist/modules/manager/gitlabci-include/schema.d.ts +13 -0
  361. package/dist/modules/manager/gitlabci-include/schema.js +46 -0
  362. package/dist/modules/manager/gitlabci-include/schema.js.map +1 -0
  363. package/dist/modules/manager/glasskube/schema.d.ts +8 -8
  364. package/dist/modules/manager/gomod/artifacts-extra.js +12 -4
  365. package/dist/modules/manager/gomod/artifacts-extra.js.map +1 -1
  366. package/dist/modules/manager/gomod/artifacts.js +24 -10
  367. package/dist/modules/manager/gomod/artifacts.js.map +1 -1
  368. package/dist/modules/manager/gomod/extract.js +23 -0
  369. package/dist/modules/manager/gomod/extract.js.map +1 -1
  370. package/dist/modules/manager/gomod/line-parser.js +16 -0
  371. package/dist/modules/manager/gomod/line-parser.js.map +1 -1
  372. package/dist/modules/manager/gomod/update.js +5 -3
  373. package/dist/modules/manager/gomod/update.js.map +1 -1
  374. package/dist/modules/manager/gradle/artifacts.js +0 -1
  375. package/dist/modules/manager/gradle/artifacts.js.map +1 -1
  376. package/dist/modules/manager/gradle/extract/catalog.js +1 -1
  377. package/dist/modules/manager/gradle/extract/catalog.js.map +1 -1
  378. package/dist/modules/manager/gradle/extract.js +8 -13
  379. package/dist/modules/manager/gradle/extract.js.map +1 -1
  380. package/dist/modules/manager/gradle/parser/assignments.js +2 -2
  381. package/dist/modules/manager/gradle/parser/assignments.js.map +1 -1
  382. package/dist/modules/manager/gradle/parser/handlers.d.ts +1 -2
  383. package/dist/modules/manager/gradle/parser/handlers.js +17 -24
  384. package/dist/modules/manager/gradle/parser/handlers.js.map +1 -1
  385. package/dist/modules/manager/gradle/parser/registry-urls.js +46 -12
  386. package/dist/modules/manager/gradle/parser/registry-urls.js.map +1 -1
  387. package/dist/modules/manager/gradle/types.d.ts +1 -0
  388. package/dist/modules/manager/gradle/types.js.map +1 -1
  389. package/dist/modules/manager/gradle-wrapper/artifacts.js +1 -2
  390. package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
  391. package/dist/modules/manager/helmfile/artifacts.js +0 -1
  392. package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
  393. package/dist/modules/manager/helmfile/extract.js +4 -0
  394. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  395. package/dist/modules/manager/helmfile/schema.d.ts +9 -9
  396. package/dist/modules/manager/helmv3/artifacts.js +0 -1
  397. package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
  398. package/dist/modules/manager/helmv3/utils.js +3 -1
  399. package/dist/modules/manager/helmv3/utils.js.map +1 -1
  400. package/dist/modules/manager/hermit/artifacts.js +0 -1
  401. package/dist/modules/manager/hermit/artifacts.js.map +1 -1
  402. package/dist/modules/manager/homebrew/extract.js +0 -1
  403. package/dist/modules/manager/homebrew/extract.js.map +1 -1
  404. package/dist/modules/manager/jsonnet-bundler/artifacts.js +0 -1
  405. package/dist/modules/manager/jsonnet-bundler/artifacts.js.map +1 -1
  406. package/dist/modules/manager/kustomize/artifacts.d.ts +2 -0
  407. package/dist/modules/manager/kustomize/artifacts.js +154 -0
  408. package/dist/modules/manager/kustomize/artifacts.js.map +1 -0
  409. package/dist/modules/manager/kustomize/common.d.ts +3 -0
  410. package/dist/modules/manager/kustomize/common.js +22 -0
  411. package/dist/modules/manager/kustomize/common.js.map +1 -0
  412. package/dist/modules/manager/kustomize/index.d.ts +1 -0
  413. package/dist/modules/manager/kustomize/index.js +3 -1
  414. package/dist/modules/manager/kustomize/index.js.map +1 -1
  415. package/dist/modules/manager/kustomize/types.d.ts +4 -0
  416. package/dist/modules/manager/kustomize/types.js.map +1 -1
  417. package/dist/modules/manager/maven/extract.js +4 -4
  418. package/dist/modules/manager/maven/extract.js.map +1 -1
  419. package/dist/modules/manager/maven-wrapper/artifacts.js +0 -1
  420. package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
  421. package/dist/modules/manager/mise/extract.js +1 -1
  422. package/dist/modules/manager/mise/extract.js.map +1 -1
  423. package/dist/modules/manager/mix/artifacts.js +64 -14
  424. package/dist/modules/manager/mix/artifacts.js.map +1 -1
  425. package/dist/modules/manager/mix/index.d.ts +1 -0
  426. package/dist/modules/manager/mix/index.js +2 -1
  427. package/dist/modules/manager/mix/index.js.map +1 -1
  428. package/dist/modules/manager/nix/artifacts.js +0 -1
  429. package/dist/modules/manager/nix/artifacts.js.map +1 -1
  430. package/dist/modules/manager/nix/extract.js +1 -1
  431. package/dist/modules/manager/nix/extract.js.map +1 -1
  432. package/dist/modules/manager/nix/schema.d.ts +20 -20
  433. package/dist/modules/manager/nix/schema.js +1 -0
  434. package/dist/modules/manager/nix/schema.js.map +1 -1
  435. package/dist/modules/manager/npm/artifacts.js +0 -1
  436. package/dist/modules/manager/npm/artifacts.js.map +1 -1
  437. package/dist/modules/manager/npm/extract/common/package-file.js +1 -0
  438. package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
  439. package/dist/modules/manager/npm/extract/yarn.js +2 -2
  440. package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
  441. package/dist/modules/manager/npm/post-update/npm.js +0 -1
  442. package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
  443. package/dist/modules/manager/npm/post-update/pnpm.js +13 -2
  444. package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
  445. package/dist/modules/manager/npm/post-update/rules.js +11 -1
  446. package/dist/modules/manager/npm/post-update/rules.js.map +1 -1
  447. package/dist/modules/manager/npm/post-update/yarn.js +0 -1
  448. package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
  449. package/dist/modules/manager/npm/schema.d.ts +13 -13
  450. package/dist/modules/manager/npm/update/dependency/index.js +1 -1
  451. package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
  452. package/dist/modules/manager/nuget/artifacts.js +1 -2
  453. package/dist/modules/manager/nuget/artifacts.js.map +1 -1
  454. package/dist/modules/manager/nuget/extract.js +21 -18
  455. package/dist/modules/manager/nuget/extract.js.map +1 -1
  456. package/dist/modules/manager/nuget/package-tree.js +4 -0
  457. package/dist/modules/manager/nuget/package-tree.js.map +1 -1
  458. package/dist/modules/manager/nuget/schema.d.ts +8 -8
  459. package/dist/modules/manager/nuget/util.js +4 -1
  460. package/dist/modules/manager/nuget/util.js.map +1 -1
  461. package/dist/modules/manager/ocb/schema.d.ts +6 -6
  462. package/dist/modules/manager/pep621/processors/pdm.js +0 -1
  463. package/dist/modules/manager/pep621/processors/pdm.js.map +1 -1
  464. package/dist/modules/manager/pep621/processors/uv.js +0 -1
  465. package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
  466. package/dist/modules/manager/pep621/schema.d.ts +346 -54
  467. package/dist/modules/manager/pep621/schema.js +2 -0
  468. package/dist/modules/manager/pep621/schema.js.map +1 -1
  469. package/dist/modules/manager/pep621/utils.js +1 -1
  470. package/dist/modules/manager/pep621/utils.js.map +1 -1
  471. package/dist/modules/manager/pip-compile/common.js +0 -1
  472. package/dist/modules/manager/pip-compile/common.js.map +1 -1
  473. package/dist/modules/manager/pip_requirements/artifacts.js +0 -1
  474. package/dist/modules/manager/pip_requirements/artifacts.js.map +1 -1
  475. package/dist/modules/manager/pip_requirements/common.js +2 -6
  476. package/dist/modules/manager/pip_requirements/common.js.map +1 -1
  477. package/dist/modules/manager/pipenv/artifacts.js +0 -1
  478. package/dist/modules/manager/pipenv/artifacts.js.map +1 -1
  479. package/dist/modules/manager/pixi/artifacts.d.ts +3 -0
  480. package/dist/modules/manager/pixi/artifacts.js +78 -0
  481. package/dist/modules/manager/pixi/artifacts.js.map +1 -0
  482. package/dist/modules/manager/pixi/extract.d.ts +4 -0
  483. package/dist/modules/manager/pixi/extract.js +131 -0
  484. package/dist/modules/manager/pixi/extract.js.map +1 -0
  485. package/dist/modules/manager/pixi/index.d.ts +10 -0
  486. package/dist/modules/manager/pixi/index.js +20 -0
  487. package/dist/modules/manager/pixi/index.js.map +1 -0
  488. package/dist/modules/manager/pixi/schema.d.ts +405 -0
  489. package/dist/modules/manager/pixi/schema.js +147 -0
  490. package/dist/modules/manager/pixi/schema.js.map +1 -0
  491. package/dist/modules/manager/poetry/artifacts.js +3 -4
  492. package/dist/modules/manager/poetry/artifacts.js.map +1 -1
  493. package/dist/modules/manager/poetry/extract.js +2 -1
  494. package/dist/modules/manager/poetry/extract.js.map +1 -1
  495. package/dist/modules/manager/poetry/schema.d.ts +48 -48
  496. package/dist/modules/manager/pub/artifacts.js +0 -1
  497. package/dist/modules/manager/pub/artifacts.js.map +1 -1
  498. package/dist/modules/manager/pub/schema.d.ts +8 -8
  499. package/dist/modules/manager/scalafmt/extract.js +1 -1
  500. package/dist/modules/manager/scalafmt/extract.js.map +1 -1
  501. package/dist/modules/manager/sveltos/schema.d.ts +30 -42
  502. package/dist/modules/manager/terraform/lockfile/hash.d.ts +1 -1
  503. package/dist/modules/manager/terraform/util.js +1 -3
  504. package/dist/modules/manager/terraform/util.js.map +1 -1
  505. package/dist/modules/manager/types.d.ts +6 -2
  506. package/dist/modules/manager/types.js.map +1 -1
  507. package/dist/modules/manager/vendir/schema.d.ts +7 -7
  508. package/dist/modules/platform/api.d.ts +1 -1
  509. package/dist/modules/platform/azure/azure-helper.js +2 -2
  510. package/dist/modules/platform/azure/azure-helper.js.map +1 -1
  511. package/dist/modules/platform/azure/index.js +14 -14
  512. package/dist/modules/platform/azure/index.js.map +1 -1
  513. package/dist/modules/platform/bitbucket/comments.js +4 -4
  514. package/dist/modules/platform/bitbucket/comments.js.map +1 -1
  515. package/dist/modules/platform/bitbucket/index.d.ts +1 -0
  516. package/dist/modules/platform/bitbucket/index.js +54 -44
  517. package/dist/modules/platform/bitbucket/index.js.map +1 -1
  518. package/dist/modules/platform/bitbucket/schema.d.ts +14 -14
  519. package/dist/modules/platform/bitbucket/utils.js +3 -3
  520. package/dist/modules/platform/bitbucket/utils.js.map +1 -1
  521. package/dist/modules/platform/bitbucket-server/index.d.ts +3 -3
  522. package/dist/modules/platform/bitbucket-server/index.js +81 -81
  523. package/dist/modules/platform/bitbucket-server/index.js.map +1 -1
  524. package/dist/modules/platform/bitbucket-server/pr-cache.d.ts +23 -0
  525. package/dist/modules/platform/bitbucket-server/pr-cache.js +125 -0
  526. package/dist/modules/platform/bitbucket-server/pr-cache.js.map +1 -0
  527. package/dist/modules/platform/bitbucket-server/schema.d.ts +76 -0
  528. package/dist/modules/platform/bitbucket-server/schema.js +15 -1
  529. package/dist/modules/platform/bitbucket-server/schema.js.map +1 -1
  530. package/dist/modules/platform/bitbucket-server/types.d.ts +8 -2
  531. package/dist/modules/platform/bitbucket-server/types.js.map +1 -1
  532. package/dist/modules/platform/bitbucket-server/utils.d.ts +0 -2
  533. package/dist/modules/platform/bitbucket-server/utils.js +6 -52
  534. package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
  535. package/dist/modules/platform/codecommit/codecommit-client.js +6 -6
  536. package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
  537. package/dist/modules/platform/codecommit/index.js +24 -24
  538. package/dist/modules/platform/codecommit/index.js.map +1 -1
  539. package/dist/modules/platform/gerrit/client.d.ts +0 -3
  540. package/dist/modules/platform/gerrit/client.js +20 -29
  541. package/dist/modules/platform/gerrit/client.js.map +1 -1
  542. package/dist/modules/platform/gerrit/index.js +0 -6
  543. package/dist/modules/platform/gerrit/index.js.map +1 -1
  544. package/dist/modules/platform/gerrit/scm.js +5 -6
  545. package/dist/modules/platform/gerrit/scm.js.map +1 -1
  546. package/dist/modules/platform/gerrit/types.d.ts +1 -4
  547. package/dist/modules/platform/gerrit/types.js.map +1 -1
  548. package/dist/modules/platform/gerrit/utils.d.ts +3 -2
  549. package/dist/modules/platform/gerrit/utils.js +4 -8
  550. package/dist/modules/platform/gerrit/utils.js.map +1 -1
  551. package/dist/modules/platform/gitea/gitea-helper.d.ts +1 -0
  552. package/dist/modules/platform/gitea/gitea-helper.js +16 -0
  553. package/dist/modules/platform/gitea/gitea-helper.js.map +1 -1
  554. package/dist/modules/platform/gitea/index.d.ts +1 -0
  555. package/dist/modules/platform/gitea/index.js +33 -16
  556. package/dist/modules/platform/gitea/index.js.map +1 -1
  557. package/dist/modules/platform/gitea/schema.d.ts +8 -8
  558. package/dist/modules/platform/gitea/types.d.ts +1 -1
  559. package/dist/modules/platform/gitea/types.js.map +1 -1
  560. package/dist/modules/platform/github/common.d.ts +2 -0
  561. package/dist/modules/platform/github/common.js +16 -0
  562. package/dist/modules/platform/github/common.js.map +1 -1
  563. package/dist/modules/platform/github/index.d.ts +1 -1
  564. package/dist/modules/platform/github/index.js +87 -82
  565. package/dist/modules/platform/github/index.js.map +1 -1
  566. package/dist/modules/platform/github/issue.d.ts +18 -18
  567. package/dist/modules/platform/github/massage-markdown-links.js +2 -2
  568. package/dist/modules/platform/github/massage-markdown-links.js.map +1 -1
  569. package/dist/modules/platform/github/pr.js +3 -3
  570. package/dist/modules/platform/github/pr.js.map +1 -1
  571. package/dist/modules/platform/github/schema.d.ts +128 -128
  572. package/dist/modules/platform/github/schema.js +3 -1
  573. package/dist/modules/platform/github/schema.js.map +1 -1
  574. package/dist/modules/platform/gitlab/index.d.ts +1 -0
  575. package/dist/modules/platform/gitlab/index.js +72 -49
  576. package/dist/modules/platform/gitlab/index.js.map +1 -1
  577. package/dist/modules/platform/index.js +0 -1
  578. package/dist/modules/platform/index.js.map +1 -1
  579. package/dist/modules/platform/scm.d.ts +1 -1
  580. package/dist/modules/versioning/api.js +2 -0
  581. package/dist/modules/versioning/api.js.map +1 -1
  582. package/dist/modules/versioning/composer/index.js +10 -0
  583. package/dist/modules/versioning/composer/index.js.map +1 -1
  584. package/dist/modules/versioning/conda/index.d.ts +41 -0
  585. package/dist/modules/versioning/conda/index.js +178 -0
  586. package/dist/modules/versioning/conda/index.js.map +1 -0
  587. package/dist/modules/versioning/distro.js +1 -3
  588. package/dist/modules/versioning/distro.js.map +1 -1
  589. package/dist/modules/versioning/hashicorp/convertor.d.ts +2 -1
  590. package/dist/modules/versioning/hashicorp/convertor.js +13 -8
  591. package/dist/modules/versioning/hashicorp/convertor.js.map +1 -1
  592. package/dist/modules/versioning/hex/index.js +3 -3
  593. package/dist/modules/versioning/hex/index.js.map +1 -1
  594. package/dist/modules/versioning/npm/index.js +2 -1
  595. package/dist/modules/versioning/npm/index.js.map +1 -1
  596. package/dist/modules/versioning/schema.js +1 -1
  597. package/dist/modules/versioning/schema.js.map +1 -1
  598. package/dist/modules/versioning/types.d.ts +4 -0
  599. package/dist/modules/versioning/types.js.map +1 -1
  600. package/dist/proxy.js +2 -1
  601. package/dist/proxy.js.map +1 -1
  602. package/dist/renovate.js +2 -2
  603. package/dist/renovate.js.map +1 -1
  604. package/dist/util/cache/package/decorator.js +2 -2
  605. package/dist/util/cache/package/decorator.js.map +1 -1
  606. package/dist/util/cache/package/redis.js +0 -1
  607. package/dist/util/cache/package/redis.js.map +1 -1
  608. package/dist/util/cache/package/types.d.ts +1 -1
  609. package/dist/util/cache/package/types.js.map +1 -1
  610. package/dist/util/cache/repository/impl/base.d.ts +1 -1
  611. package/dist/util/cache/repository/impl/base.js +4 -0
  612. package/dist/util/cache/repository/impl/base.js.map +1 -1
  613. package/dist/util/cache/repository/schema.d.ts +4 -4
  614. package/dist/util/cache/repository/types.d.ts +3 -0
  615. package/dist/util/cache/repository/types.js.map +1 -1
  616. package/dist/util/common.d.ts +4 -2
  617. package/dist/util/common.js +17 -3
  618. package/dist/util/common.js.map +1 -1
  619. package/dist/util/env.d.ts +4 -0
  620. package/dist/util/env.js +22 -0
  621. package/dist/util/env.js.map +1 -0
  622. package/dist/util/exec/containerbase.js +19 -14
  623. package/dist/util/exec/containerbase.js.map +1 -1
  624. package/dist/util/exec/index.js +5 -2
  625. package/dist/util/exec/index.js.map +1 -1
  626. package/dist/util/exec/types.d.ts +0 -2
  627. package/dist/util/exec/types.js.map +1 -1
  628. package/dist/util/exec/utils.d.ts +1 -1
  629. package/dist/util/exec/utils.js +6 -5
  630. package/dist/util/exec/utils.js.map +1 -1
  631. package/dist/util/git/auth.js +8 -5
  632. package/dist/util/git/auth.js.map +1 -1
  633. package/dist/util/git/author.js +1 -1
  634. package/dist/util/git/author.js.map +1 -1
  635. package/dist/util/git/config.js +0 -1
  636. package/dist/util/git/config.js.map +1 -1
  637. package/dist/util/git/error.js +4 -2
  638. package/dist/util/git/error.js.map +1 -1
  639. package/dist/util/git/index.js +75 -52
  640. package/dist/util/git/index.js.map +1 -1
  641. package/dist/util/git/private-key.js +2 -4
  642. package/dist/util/git/private-key.js.map +1 -1
  643. package/dist/util/git/types.d.ts +2 -0
  644. package/dist/util/git/types.js.map +1 -1
  645. package/dist/util/git/url.js +1 -1
  646. package/dist/util/git/url.js.map +1 -1
  647. package/dist/util/github/graphql/datasource-fetcher.js +3 -5
  648. package/dist/util/github/graphql/datasource-fetcher.js.map +1 -1
  649. package/dist/util/github/graphql/query-adapters/releases-query-adapter.d.ts +2 -2
  650. package/dist/util/github/graphql/query-adapters/tags-query-adapter.d.ts +2 -2
  651. package/dist/util/http/auth.js +0 -1
  652. package/dist/util/http/auth.js.map +1 -1
  653. package/dist/util/http/bitbucket-server.d.ts +7 -5
  654. package/dist/util/http/bitbucket-server.js +26 -23
  655. package/dist/util/http/bitbucket-server.js.map +1 -1
  656. package/dist/util/http/bitbucket.d.ts +6 -5
  657. package/dist/util/http/bitbucket.js +34 -31
  658. package/dist/util/http/bitbucket.js.map +1 -1
  659. package/dist/util/http/cache/abstract-http-cache-provider.js +2 -2
  660. package/dist/util/http/cache/abstract-http-cache-provider.js.map +1 -1
  661. package/dist/util/http/cache/memory-http-cache-provider.d.ts +10 -0
  662. package/dist/util/http/cache/memory-http-cache-provider.js +29 -0
  663. package/dist/util/http/cache/memory-http-cache-provider.js.map +1 -0
  664. package/dist/util/http/cache/package-http-cache-provider.d.ts +23 -0
  665. package/dist/util/http/cache/package-http-cache-provider.js +80 -0
  666. package/dist/util/http/cache/package-http-cache-provider.js.map +1 -0
  667. package/dist/util/http/cache/schema.d.ts +2 -2
  668. package/dist/util/http/errors.d.ts +2 -0
  669. package/dist/util/http/errors.js +8 -0
  670. package/dist/util/http/errors.js.map +1 -0
  671. package/dist/util/http/gerrit.d.ts +6 -4
  672. package/dist/util/http/gerrit.js +11 -12
  673. package/dist/util/http/gerrit.js.map +1 -1
  674. package/dist/util/http/gitea.d.ts +5 -4
  675. package/dist/util/http/gitea.js +14 -13
  676. package/dist/util/http/gitea.js.map +1 -1
  677. package/dist/util/http/github.d.ts +14 -8
  678. package/dist/util/http/github.js +65 -60
  679. package/dist/util/http/github.js.map +1 -1
  680. package/dist/util/http/gitlab.d.ts +7 -5
  681. package/dist/util/http/gitlab.js +58 -46
  682. package/dist/util/http/gitlab.js.map +1 -1
  683. package/dist/util/http/got.d.ts +9 -0
  684. package/dist/util/http/got.js +54 -0
  685. package/dist/util/http/got.js.map +1 -0
  686. package/dist/util/http/host-rules.d.ts +2 -1
  687. package/dist/util/http/host-rules.js +17 -4
  688. package/dist/util/http/host-rules.js.map +1 -1
  689. package/dist/util/http/http.d.ts +93 -0
  690. package/dist/util/http/http.js +346 -0
  691. package/dist/util/http/http.js.map +1 -0
  692. package/dist/util/http/index.d.ts +6 -74
  693. package/dist/util/http/index.js +5 -359
  694. package/dist/util/http/index.js.map +1 -1
  695. package/dist/util/http/legacy.js +4 -1
  696. package/dist/util/http/legacy.js.map +1 -1
  697. package/dist/util/http/types.d.ts +9 -16
  698. package/dist/util/http/types.js.map +1 -1
  699. package/dist/util/schema-utils.d.ts +1 -0
  700. package/dist/util/schema-utils.js +43 -8
  701. package/dist/util/schema-utils.js.map +1 -1
  702. package/dist/util/stats.d.ts +10 -0
  703. package/dist/util/stats.js +45 -1
  704. package/dist/util/stats.js.map +1 -1
  705. package/dist/util/string.d.ts +16 -0
  706. package/dist/util/string.js +79 -0
  707. package/dist/util/string.js.map +1 -1
  708. package/dist/util/toml.d.ts +1 -0
  709. package/dist/util/toml.js +6 -0
  710. package/dist/util/toml.js.map +1 -1
  711. package/dist/util/url.js +3 -8
  712. package/dist/util/url.js.map +1 -1
  713. package/dist/util/yaml.js +3 -8
  714. package/dist/util/yaml.js.map +1 -1
  715. package/dist/workers/global/config/parse/env.js +3 -2
  716. package/dist/workers/global/config/parse/env.js.map +1 -1
  717. package/dist/workers/global/config/parse/file.js +19 -9
  718. package/dist/workers/global/config/parse/file.js.map +1 -1
  719. package/dist/workers/global/config/parse/host-rules-from-env.js +6 -2
  720. package/dist/workers/global/config/parse/host-rules-from-env.js.map +1 -1
  721. package/dist/workers/global/config/parse/index.js +15 -0
  722. package/dist/workers/global/config/parse/index.js.map +1 -1
  723. package/dist/workers/global/index.js +4 -2
  724. package/dist/workers/global/index.js.map +1 -1
  725. package/dist/workers/repository/cache.js +1 -2
  726. package/dist/workers/repository/cache.js.map +1 -1
  727. package/dist/workers/repository/config-migration/branch/migrated-data.js +2 -0
  728. package/dist/workers/repository/config-migration/branch/migrated-data.js.map +1 -1
  729. package/dist/workers/repository/index.js +1 -0
  730. package/dist/workers/repository/index.js.map +1 -1
  731. package/dist/workers/repository/init/merge.js +6 -3
  732. package/dist/workers/repository/init/merge.js.map +1 -1
  733. package/dist/workers/repository/onboarding/pr/config-description.js +3 -1
  734. package/dist/workers/repository/onboarding/pr/config-description.js.map +1 -1
  735. package/dist/workers/repository/process/extract-update.js +0 -1
  736. package/dist/workers/repository/process/extract-update.js.map +1 -1
  737. package/dist/workers/repository/process/fingerprint-fields.js +0 -1
  738. package/dist/workers/repository/process/fingerprint-fields.js.map +1 -1
  739. package/dist/workers/repository/process/libyear.js +2 -2
  740. package/dist/workers/repository/process/libyear.js.map +1 -1
  741. package/dist/workers/repository/process/lookup/index.js +15 -4
  742. package/dist/workers/repository/process/lookup/index.js.map +1 -1
  743. package/dist/workers/repository/process/lookup/timestamps.d.ts +18 -0
  744. package/dist/workers/repository/process/lookup/timestamps.js +69 -0
  745. package/dist/workers/repository/process/lookup/timestamps.js.map +1 -0
  746. package/dist/workers/repository/process/lookup/types.d.ts +1 -0
  747. package/dist/workers/repository/process/lookup/types.js.map +1 -1
  748. package/dist/workers/repository/process/lookup/utils.js +20 -9
  749. package/dist/workers/repository/process/lookup/utils.js.map +1 -1
  750. package/dist/workers/repository/process/sort.js +1 -1
  751. package/dist/workers/repository/process/sort.js.map +1 -1
  752. package/dist/workers/repository/process/vulnerabilities.js +1 -1
  753. package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
  754. package/dist/workers/repository/process/write.js +1 -8
  755. package/dist/workers/repository/process/write.js.map +1 -1
  756. package/dist/workers/repository/reconfigure/utils.d.ts +2 -0
  757. package/dist/workers/repository/reconfigure/utils.js +16 -0
  758. package/dist/workers/repository/reconfigure/utils.js.map +1 -1
  759. package/dist/workers/repository/reconfigure/validate.js +6 -17
  760. package/dist/workers/repository/reconfigure/validate.js.map +1 -1
  761. package/dist/workers/repository/update/branch/auto-replace.js +25 -5
  762. package/dist/workers/repository/update/branch/auto-replace.js.map +1 -1
  763. package/dist/workers/repository/update/branch/commit.js +2 -0
  764. package/dist/workers/repository/update/branch/commit.js.map +1 -1
  765. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +10 -1
  766. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
  767. package/dist/workers/repository/update/pr/body/config-description.js +26 -1
  768. package/dist/workers/repository/update/pr/body/config-description.js.map +1 -1
  769. package/dist/workers/repository/update/pr/body/index.js +21 -14
  770. package/dist/workers/repository/update/pr/body/index.js.map +1 -1
  771. package/dist/workers/repository/update/pr/changelog/api.js +8 -6
  772. package/dist/workers/repository/update/pr/changelog/api.js.map +1 -1
  773. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +1 -1
  774. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
  775. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.d.ts +3 -0
  776. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js +39 -0
  777. package/dist/workers/repository/update/pr/changelog/bitbucket-server/index.js.map +1 -0
  778. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.d.ts +8 -0
  779. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js +31 -0
  780. package/dist/workers/repository/update/pr/changelog/bitbucket-server/source.js.map +1 -0
  781. package/dist/workers/repository/update/pr/changelog/github/index.js +6 -3
  782. package/dist/workers/repository/update/pr/changelog/github/index.js.map +1 -1
  783. package/dist/workers/repository/update/pr/changelog/gitlab/index.js +1 -1
  784. package/dist/workers/repository/update/pr/changelog/gitlab/index.js.map +1 -1
  785. package/dist/workers/repository/update/pr/changelog/release-notes.js +12 -8
  786. package/dist/workers/repository/update/pr/changelog/release-notes.js.map +1 -1
  787. package/dist/workers/repository/update/pr/changelog/source.d.ts +1 -1
  788. package/dist/workers/repository/update/pr/changelog/source.js +1 -0
  789. package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
  790. package/dist/workers/repository/update/pr/changelog/types.d.ts +1 -1
  791. package/dist/workers/repository/update/pr/changelog/types.js.map +1 -1
  792. package/dist/workers/repository/update/pr/index.js +2 -4
  793. package/dist/workers/repository/update/pr/index.js.map +1 -1
  794. package/dist/workers/repository/updates/flatten.js +8 -4
  795. package/dist/workers/repository/updates/flatten.js.map +1 -1
  796. package/dist/workers/repository/updates/generate.js +3 -2
  797. package/dist/workers/repository/updates/generate.js.map +1 -1
  798. package/dist/workers/types.d.ts +1 -4
  799. package/dist/workers/types.js.map +1 -1
  800. package/package.json +85 -85
  801. package/renovate-schema.json +24 -3
  802. package/dist/modules/manager/github-actions/types.d.ts +0 -30
  803. package/dist/modules/manager/github-actions/types.js +0 -3
  804. package/dist/modules/manager/github-actions/types.js.map +0 -1
  805. package/dist/modules/manager/gitlabci/common.d.ts +0 -6
  806. package/dist/modules/manager/gitlabci/common.js +0 -30
  807. package/dist/modules/manager/gitlabci/common.js.map +0 -1
  808. package/dist/modules/manager/gitlabci/types.d.ts +0 -35
  809. package/dist/modules/manager/gitlabci/types.js +0 -3
  810. package/dist/modules/manager/gitlabci/types.js.map +0 -1
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ export declare const MultiDocumentLocalIncludes: z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodAny, "many">, string[][], any[]>, string[], any[]>;
3
+ export declare const Job: z.ZodObject<{
4
+ image: z.ZodCatch<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, {
5
+ type: "image";
6
+ value: string;
7
+ }, string>, z.ZodEffects<z.ZodObject<{
8
+ name: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name: string;
11
+ }, {
12
+ name: string;
13
+ }>, {
14
+ type: "image-name";
15
+ value: string;
16
+ }, {
17
+ name: string;
18
+ }>]>>>;
19
+ services: z.ZodCatch<z.ZodEffects<z.ZodArray<z.ZodAny, "many">, string[], any[]>>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ services: string[];
22
+ image?: {
23
+ type: "image";
24
+ value: string;
25
+ } | {
26
+ type: "image-name";
27
+ value: string;
28
+ } | undefined;
29
+ }, {
30
+ image?: unknown;
31
+ services?: unknown;
32
+ }>;
33
+ export declare const Jobs: z.ZodEffects<z.ZodCatch<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, {
34
+ services: string[];
35
+ image?: {
36
+ type: "image";
37
+ value: string;
38
+ } | {
39
+ type: "image-name";
40
+ value: string;
41
+ } | undefined;
42
+ }>, Record<string, any>>>, {
43
+ services: string[];
44
+ image?: {
45
+ type: "image";
46
+ value: string;
47
+ } | {
48
+ type: "image-name";
49
+ value: string;
50
+ } | undefined;
51
+ }[], unknown>;
52
+ export declare const GitlabDocument: z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, {
53
+ include: unknown;
54
+ children: unknown[];
55
+ }, Record<string, unknown>>, string[], Record<string, unknown>>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GitlabDocument = exports.Jobs = exports.Job = exports.MultiDocumentLocalIncludes = void 0;
4
+ const zod_1 = require("zod");
5
+ const array_1 = require("../../../util/array");
6
+ const schema_utils_1 = require("../../../util/schema-utils");
7
+ const url_1 = require("../../../util/url");
8
+ const LocalInclude = zod_1.z
9
+ .union([
10
+ zod_1.z.string(),
11
+ zod_1.z.object({ local: zod_1.z.string() }).transform(({ local }) => local),
12
+ ])
13
+ .transform(url_1.trimLeadingSlash);
14
+ const DocumentLocalIncludes = zod_1.z
15
+ .object({
16
+ include: zod_1.z.union([
17
+ (0, schema_utils_1.LooseArray)(LocalInclude),
18
+ LocalInclude.transform(array_1.toArray),
19
+ ]),
20
+ })
21
+ .transform(({ include }) => include);
22
+ exports.MultiDocumentLocalIncludes = (0, schema_utils_1.LooseArray)(DocumentLocalIncludes).transform((includes) => includes.flat());
23
+ exports.Job = zod_1.z.object({
24
+ image: zod_1.z
25
+ .union([
26
+ zod_1.z.string().transform((image) => ({
27
+ type: 'image',
28
+ value: image,
29
+ })),
30
+ zod_1.z.object({ name: zod_1.z.string() }).transform(({ name }) => ({
31
+ type: 'image-name',
32
+ value: name,
33
+ })),
34
+ ])
35
+ .optional()
36
+ .catch(undefined),
37
+ services: (0, schema_utils_1.LooseArray)(zod_1.z.union([
38
+ zod_1.z.string(),
39
+ zod_1.z.object({ name: zod_1.z.string() }).transform(({ name }) => name),
40
+ ])).catch([]),
41
+ });
42
+ exports.Jobs = (0, schema_utils_1.LooseRecord)(zod_1.z.string(), exports.Job)
43
+ .catch({})
44
+ .transform((x) => Object.values(x));
45
+ const GitlabInclude = zod_1.z
46
+ .object({ component: zod_1.z.string() })
47
+ .transform(({ component }) => component);
48
+ const GitlabIncludes = zod_1.z
49
+ .union([(0, schema_utils_1.LooseArray)(GitlabInclude), GitlabInclude.transform(array_1.toArray)])
50
+ .catch([]);
51
+ exports.GitlabDocument = zod_1.z
52
+ .record(zod_1.z.unknown())
53
+ .transform((obj) => {
54
+ const { include, ...rest } = obj;
55
+ const children = Object.values(rest);
56
+ return { include, children };
57
+ })
58
+ .transform(({ include, children }) => [
59
+ ...GitlabDocumentArray.parse(children),
60
+ ...GitlabIncludes.parse(include),
61
+ ]);
62
+ const GitlabDocumentArray = (0, schema_utils_1.LooseArray)(exports.GitlabDocument).transform((x) => x.flat());
63
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gitlabci/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAA8C;AAC9C,6DAAqE;AACrE,2CAAqD;AAErD,MAAM,YAAY,GAAG,OAAC;KACnB,KAAK,CAAC;IACL,OAAC,CAAC,MAAM,EAAE;IACV,OAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC;CAChE,CAAC;KACD,SAAS,CAAC,sBAAgB,CAAC,CAAC;AAE/B,MAAM,qBAAqB,GAAG,OAAC;KAC5B,MAAM,CAAC;IACN,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC;QACf,IAAA,yBAAU,EAAC,YAAY,CAAC;QACxB,YAAY,CAAC,SAAS,CAAC,eAAO,CAAC;KAChC,CAAC;CACH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,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,aAAa,GAAG,OAAC;KACpB,MAAM,CAAC,EAAE,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,CAAC;KACjC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;AAE3C,MAAM,cAAc,GAAG,OAAC;KACrB,KAAK,CAAC,CAAC,IAAA,yBAAU,EAAC,aAAa,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,eAAO,CAAC,CAAC,CAAC;KACpE,KAAK,CAAC,EAAE,CAAC,CAAC;AAEA,QAAA,cAAc,GAAG,OAAC;KAC5B,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;KACnB,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC,CAAC;KACD,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAY,EAAE,CAAC;IAC9C,GAAG,mBAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC;IACtC,GAAG,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC;CACjC,CAAC,CAAC;AAEL,MAAM,mBAAmB,GAAG,IAAA,yBAAU,EAAC,sBAAc,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CACrE,CAAC,CAAC,IAAI,EAAE,CACT,CAAC","sourcesContent":["import { z } from 'zod';\nimport { toArray } from '../../../util/array';\nimport { LooseArray, LooseRecord } from '../../../util/schema-utils';\nimport { trimLeadingSlash } from '../../../util/url';\n\nconst LocalInclude = z\n .union([\n z.string(),\n z.object({ local: z.string() }).transform(({ local }) => local),\n ])\n .transform(trimLeadingSlash);\n\nconst DocumentLocalIncludes = z\n .object({\n include: z.union([\n LooseArray(LocalInclude),\n LocalInclude.transform(toArray),\n ]),\n })\n .transform(({ include }) => include);\n\nexport const MultiDocumentLocalIncludes = LooseArray(\n DocumentLocalIncludes,\n).transform((includes) => includes.flat());\n\nexport const Job = z.object({\n image: z\n .union([\n z.string().transform((image) => ({\n type: 'image' as const,\n value: image,\n })),\n z.object({ name: z.string() }).transform(({ name }) => ({\n type: 'image-name' as const,\n value: name,\n })),\n ])\n .optional()\n .catch(undefined),\n services: LooseArray(\n z.union([\n z.string(),\n z.object({ name: z.string() }).transform(({ name }) => name),\n ]),\n ).catch([]),\n});\n\nexport const Jobs = LooseRecord(z.string(), Job)\n .catch({})\n .transform((x) => Object.values(x));\n\nconst GitlabInclude = z\n .object({ component: z.string() })\n .transform(({ component }) => component);\n\nconst GitlabIncludes = z\n .union([LooseArray(GitlabInclude), GitlabInclude.transform(toArray)])\n .catch([]);\n\nexport const GitlabDocument = z\n .record(z.unknown())\n .transform((obj) => {\n const { include, ...rest } = obj;\n const children = Object.values(rest);\n return { include, children };\n })\n .transform(({ include, children }): string[] => [\n ...GitlabDocumentArray.parse(children),\n ...GitlabIncludes.parse(include),\n ]);\n\nconst GitlabDocumentArray = LooseArray(GitlabDocument).transform((x) =>\n x.flat(),\n);\n"]}
@@ -1,50 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractPackageFile = extractPackageFile;
4
- const tslib_1 = require("tslib");
5
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
6
4
  const global_1 = require("../../../config/global");
7
5
  const logger_1 = require("../../../logger");
8
6
  const regex_1 = require("../../../util/regex");
9
7
  const yaml_1 = require("../../../util/yaml");
10
- const gitlab_tags_1 = require("../../datasource/gitlab-tags");
11
- const common_1 = require("../gitlabci/common");
12
- function extractDepFromIncludeFile(includeObj) {
13
- const dep = {
14
- datasource: gitlab_tags_1.GitlabTagsDatasource.id,
15
- depName: includeObj.project,
16
- depType: 'repository',
17
- };
18
- if (!includeObj.ref) {
19
- dep.skipReason = 'unspecified-version';
20
- return dep;
21
- }
22
- dep.currentValue = includeObj.ref;
23
- return dep;
24
- }
25
- function getIncludeProjectsFromInclude(includeValue) {
26
- const includes = is_1.default.array(includeValue) ? includeValue : [includeValue];
27
- // Filter out includes that dont have a file & project.
28
- return includes.filter(common_1.isGitlabIncludeProject);
29
- }
30
- function getAllIncludeProjects(data) {
31
- // If Array, search each element.
32
- if (is_1.default.array(data)) {
33
- return data
34
- .filter(common_1.isNonEmptyObject)
35
- .map(getAllIncludeProjects)
36
- .flat();
37
- }
38
- const childrenData = Object.values((0, common_1.filterIncludeFromGitlabPipeline)(data))
39
- .filter(common_1.isNonEmptyObject)
40
- .map(getAllIncludeProjects)
41
- .flat();
42
- // Process include key.
43
- if (data.include) {
44
- childrenData.push(...getIncludeProjectsFromInclude(data.include));
45
- }
46
- return childrenData;
47
- }
8
+ const schema_1 = require("./schema");
48
9
  function extractPackageFile(content, packageFile) {
49
10
  const deps = [];
50
11
  const platform = global_1.GlobalConfig.get('platform');
@@ -53,21 +14,12 @@ function extractPackageFile(content, packageFile) {
53
14
  ? [endpoint.replace((0, regex_1.regEx)(/\/api\/v4\/?/), '')]
54
15
  : null;
55
16
  try {
56
- // TODO: use schema (#9610)
57
- const docs = (0, yaml_1.parseYaml)(content, {
58
- uniqueKeys: false,
59
- });
60
- for (const doc of docs) {
61
- if (is_1.default.object(doc)) {
62
- const includes = getAllIncludeProjects(doc);
63
- for (const includeObj of includes) {
64
- const dep = extractDepFromIncludeFile(includeObj);
65
- if (registryUrls) {
66
- dep.registryUrls = registryUrls;
67
- }
68
- deps.push(dep);
69
- }
17
+ const docs = (0, yaml_1.parseYaml)(content, { uniqueKeys: false });
18
+ for (const dep of schema_1.GitlabDocumentArray.parse(docs)) {
19
+ if (registryUrls) {
20
+ dep.registryUrls = registryUrls;
70
21
  }
22
+ deps.push(dep);
71
23
  }
72
24
  }
73
25
  catch (err) /* istanbul ignore next */ {
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gitlabci-include/extract.ts"],"names":[],"mappings":";;AAgEA,gDA0CC;;AA1GD,kEAAkC;AAClC,mDAAsD;AACtD,4CAAyC;AACzC,+CAA4C;AAC5C,6CAA+C;AAC/C,8DAAoE;AACpE,+CAI4B;AAQ5B,SAAS,yBAAyB,CAChC,UAAgC;IAEhC,MAAM,GAAG,GAAsB;QAC7B,UAAU,EAAE,kCAAoB,CAAC,EAAE;QACnC,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,OAAO,EAAE,YAAY;KACtB,CAAC;IACF,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QACpB,GAAG,CAAC,UAAU,GAAG,qBAAqB,CAAC;QACvC,OAAO,GAAG,CAAC;IACb,CAAC;IACD,GAAG,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC;IAClC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,6BAA6B,CACpC,YAA6C;IAE7C,MAAM,QAAQ,GAAG,YAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAExE,uDAAuD;IACvD,OAAO,QAAQ,CAAC,MAAM,CAAC,+BAAsB,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAoB;IACjD,iCAAiC;IACjC,IAAI,YAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACnB,OAAQ,IAAyB;aAC9B,MAAM,CAAC,yBAAgB,CAAC;aACxB,GAAG,CAAC,qBAAqB,CAAC;aAC1B,IAAI,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAA,wCAA+B,EAAC,IAAI,CAAC,CAAC;SACtE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C;gBACjB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,0BAA0B,CAAC,CAAC;QACxC,IAAI,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC5C,eAAM,CAAC,KAAK,CACV,EAAE,GAAG,EAAE,WAAW,EAAE,EACpB,8CAA8C,CAC/C,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,qCAAqC,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { parseYaml } from '../../../util/yaml';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags';\nimport {\n filterIncludeFromGitlabPipeline,\n isGitlabIncludeProject,\n isNonEmptyObject,\n} from '../gitlabci/common';\nimport type {\n GitlabInclude,\n GitlabIncludeProject,\n GitlabPipeline,\n} from '../gitlabci/types';\nimport type { PackageDependency, PackageFileContent } from '../types';\n\nfunction extractDepFromIncludeFile(\n includeObj: GitlabIncludeProject,\n): PackageDependency {\n const dep: PackageDependency = {\n datasource: GitlabTagsDatasource.id,\n depName: includeObj.project,\n depType: 'repository',\n };\n if (!includeObj.ref) {\n dep.skipReason = 'unspecified-version';\n return dep;\n }\n dep.currentValue = includeObj.ref;\n return dep;\n}\n\nfunction getIncludeProjectsFromInclude(\n includeValue: GitlabInclude[] | GitlabInclude,\n): GitlabIncludeProject[] {\n const includes = is.array(includeValue) ? includeValue : [includeValue];\n\n // Filter out includes that dont have a file & project.\n return includes.filter(isGitlabIncludeProject);\n}\n\nfunction getAllIncludeProjects(data: GitlabPipeline): GitlabIncludeProject[] {\n // If Array, search each element.\n if (is.array(data)) {\n return (data as GitlabPipeline[])\n .filter(isNonEmptyObject)\n .map(getAllIncludeProjects)\n .flat();\n }\n\n const childrenData = Object.values(filterIncludeFromGitlabPipeline(data))\n .filter(isNonEmptyObject)\n .map(getAllIncludeProjects)\n .flat();\n\n // Process include key.\n if (data.include) {\n childrenData.push(...getIncludeProjectsFromInclude(data.include));\n }\n return childrenData;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile?: string,\n): PackageFileContent | null {\n const deps: PackageDependency[] = [];\n const platform = GlobalConfig.get('platform');\n const endpoint = GlobalConfig.get('endpoint');\n const registryUrls =\n platform === 'gitlab' && endpoint\n ? [endpoint.replace(regEx(/\\/api\\/v4\\/?/), '')]\n : null;\n try {\n // TODO: use schema (#9610)\n const docs = parseYaml<GitlabPipeline>(content, {\n uniqueKeys: false,\n });\n for (const doc of docs) {\n if (is.object(doc)) {\n const includes = getAllIncludeProjects(doc);\n for (const includeObj of includes) {\n const dep = extractDepFromIncludeFile(includeObj);\n if (registryUrls) {\n dep.registryUrls = registryUrls;\n }\n deps.push(dep);\n }\n }\n }\n } catch (err) /* istanbul ignore next */ {\n if (err.stack?.startsWith('YAMLException:')) {\n logger.debug(\n { err, packageFile },\n 'YAML exception extracting GitLab CI includes',\n );\n } else {\n logger.debug({ err, packageFile }, 'Error extracting GitLab CI includes');\n }\n }\n if (!deps.length) {\n return null;\n }\n return { deps };\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gitlabci-include/extract.ts"],"names":[],"mappings":";;AAOA,gDAoCC;AA3CD,mDAAsD;AACtD,4CAAyC;AACzC,+CAA4C;AAC5C,6CAA+C;AAE/C,qCAA+C;AAE/C,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAoB;IAEpB,MAAM,IAAI,GAAwB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,qBAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,qBAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,YAAY,GAChB,QAAQ,KAAK,QAAQ,IAAI,QAAQ;QAC/B,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/C,CAAC,CAAC,IAAI,CAAC;IAEX,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAA,gBAAS,EAAC,OAAO,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;QACvD,KAAK,MAAM,GAAG,IAAI,4BAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAClD,IAAI,YAAY,EAAE,CAAC;gBACjB,GAAG,CAAC,YAAY,GAAG,YAAY,CAAC;YAClC,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,0BAA0B,CAAC,CAAC;QACxC,IAAI,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC5C,eAAM,CAAC,KAAK,CACV,EAAE,GAAG,EAAE,WAAW,EAAE,EACpB,8CAA8C,CAC/C,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,qCAAqC,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC","sourcesContent":["import { GlobalConfig } from '../../../config/global';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { parseYaml } from '../../../util/yaml';\nimport type { PackageDependency, PackageFileContent } from '../types';\nimport { GitlabDocumentArray } from './schema';\n\nexport function extractPackageFile(\n content: string,\n packageFile?: string,\n): PackageFileContent | null {\n const deps: PackageDependency[] = [];\n const platform = GlobalConfig.get('platform');\n const endpoint = GlobalConfig.get('endpoint');\n const registryUrls =\n platform === 'gitlab' && endpoint\n ? [endpoint.replace(regEx(/\\/api\\/v4\\/?/), '')]\n : null;\n\n try {\n const docs = parseYaml(content, { uniqueKeys: false });\n for (const dep of GitlabDocumentArray.parse(docs)) {\n if (registryUrls) {\n dep.registryUrls = registryUrls;\n }\n deps.push(dep);\n }\n } catch (err) /* istanbul ignore next */ {\n if (err.stack?.startsWith('YAMLException:')) {\n logger.debug(\n { err, packageFile },\n 'YAML exception extracting GitLab CI includes',\n );\n } else {\n logger.debug({ err, packageFile }, 'Error extracting GitLab CI includes');\n }\n }\n\n if (!deps.length) {\n return null;\n }\n\n return { deps };\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import type { PackageDependency } from '../types';
3
+ export declare const GitlabDocument: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, {
4
+ include: unknown;
5
+ children: unknown[];
6
+ }, Record<string, unknown>>, {
7
+ include: unknown;
8
+ children: unknown[];
9
+ }[], Record<string, unknown>>, z.ZodEffects<z.ZodArray<z.ZodAny, "many">, {
10
+ include: unknown;
11
+ children: unknown[];
12
+ }[], any[]>]>, PackageDependency<Record<string, any>>[], any[] | Record<string, unknown>>;
13
+ export declare const GitlabDocumentArray: z.ZodCatch<z.ZodEffects<z.ZodEffects<z.ZodArray<z.ZodAny, "many">, PackageDependency<Record<string, any>>[][], any[]>, PackageDependency<Record<string, any>>[], any[]>>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GitlabDocumentArray = exports.GitlabDocument = void 0;
4
+ const zod_1 = require("zod");
5
+ const array_1 = require("../../../util/array");
6
+ const schema_utils_1 = require("../../../util/schema-utils");
7
+ const gitlab_tags_1 = require("../../datasource/gitlab-tags");
8
+ const GitlabInclude = zod_1.z
9
+ .object({
10
+ project: zod_1.z.string(),
11
+ ref: zod_1.z.string().optional().catch(undefined),
12
+ })
13
+ .transform(({ project, ref }) => {
14
+ const dep = {
15
+ datasource: gitlab_tags_1.GitlabTagsDatasource.id,
16
+ depName: project,
17
+ depType: 'repository',
18
+ };
19
+ if (!ref) {
20
+ dep.skipReason = 'unspecified-version';
21
+ return dep;
22
+ }
23
+ dep.currentValue = ref;
24
+ return dep;
25
+ });
26
+ const GitlabIncludes = zod_1.z
27
+ .union([GitlabInclude.transform(array_1.toArray), (0, schema_utils_1.LooseArray)(GitlabInclude)])
28
+ .catch([]);
29
+ const GitlabRecord = zod_1.z.record(zod_1.z.unknown()).transform((obj) => {
30
+ const { include, ...rest } = obj;
31
+ const children = Object.values(rest);
32
+ return { include, children };
33
+ });
34
+ exports.GitlabDocument = zod_1.z
35
+ .union([GitlabRecord.transform(array_1.toArray), (0, schema_utils_1.LooseArray)(GitlabRecord)])
36
+ .transform((docs) => docs
37
+ .map(({ include, children }) => {
38
+ const deps = GitlabIncludes.parse(include);
39
+ const childrenDeps = exports.GitlabDocumentArray.parse(children);
40
+ return [...childrenDeps, ...deps];
41
+ })
42
+ .flat());
43
+ exports.GitlabDocumentArray = (0, schema_utils_1.LooseArray)(exports.GitlabDocument)
44
+ .transform((x) => x.flat())
45
+ .catch([]);
46
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gitlabci-include/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,+CAA8C;AAC9C,6DAAwD;AACxD,8DAAoE;AAGpE,MAAM,aAAa,GAAG,OAAC;KACpB,MAAM,CAAC;IACN,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,GAAG,EAAE,O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E,EAAE,EAAE;IAC7B,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,2BAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC,CAAC;KACD,IAAI,EAAE,CACV,CAAC;AAES,QAAA,mBAAmB,GAAG,IAAA,yBAAU,EAAC,sBAAc,CAAC;KAC1D,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;KAC1B,KAAK,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { toArray } from '../../../util/array';\nimport { LooseArray } from '../../../util/schema-utils';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags';\nimport type { PackageDependency } from '../types';\n\nconst GitlabInclude = z\n .object({\n project: z.string(),\n ref: z.string().optional().catch(undefined),\n })\n .transform(({ project, ref }) => {\n const dep: PackageDependency = {\n datasource: GitlabTagsDatasource.id,\n depName: project,\n depType: 'repository',\n };\n\n if (!ref) {\n dep.skipReason = 'unspecified-version';\n return dep;\n }\n\n dep.currentValue = ref;\n return dep;\n });\n\nconst GitlabIncludes = z\n .union([GitlabInclude.transform(toArray), LooseArray(GitlabInclude)])\n .catch([]);\n\nconst GitlabRecord = z.record(z.unknown()).transform((obj) => {\n const { include, ...rest } = obj;\n const children = Object.values(rest);\n return { include, children };\n});\n\nexport const GitlabDocument = z\n .union([GitlabRecord.transform(toArray), LooseArray(GitlabRecord)])\n .transform((docs): PackageDependency[] =>\n docs\n .map(({ include, children }) => {\n const deps = GitlabIncludes.parse(include);\n const childrenDeps = GitlabDocumentArray.parse(children);\n return [...childrenDeps, ...deps];\n })\n .flat(),\n );\n\nexport const GitlabDocumentArray = LooseArray(GitlabDocument)\n .transform((x) => x.flat())\n .catch([]);\n"]}
@@ -30,8 +30,8 @@ export declare const Package: z.ZodObject<{
30
30
  };
31
31
  }>;
32
32
  }, "strip", z.ZodTypeAny, {
33
- kind: "Package" | "ClusterPackage";
34
33
  apiVersion: string;
34
+ kind: "Package" | "ClusterPackage";
35
35
  spec: {
36
36
  packageInfo: {
37
37
  name: string;
@@ -40,8 +40,8 @@ export declare const Package: z.ZodObject<{
40
40
  };
41
41
  };
42
42
  }, {
43
- kind: "Package" | "ClusterPackage";
44
43
  apiVersion: string;
44
+ kind: "Package" | "ClusterPackage";
45
45
  spec: {
46
46
  packageInfo: {
47
47
  name: string;
@@ -71,22 +71,22 @@ export declare const PackageRepository: z.ZodObject<{
71
71
  url: string;
72
72
  }>;
73
73
  }, "strip", z.ZodTypeAny, {
74
+ apiVersion: string;
74
75
  metadata: {
75
76
  name: string;
76
77
  annotations?: Record<string, string> | undefined;
77
78
  };
78
79
  kind: "PackageRepository";
79
- apiVersion: string;
80
80
  spec: {
81
81
  url: string;
82
82
  };
83
83
  }, {
84
+ apiVersion: string;
84
85
  metadata: {
85
86
  name: string;
86
87
  annotations?: Record<string, string> | undefined;
87
88
  };
88
89
  kind: "PackageRepository";
89
- apiVersion: string;
90
90
  spec: {
91
91
  url: string;
92
92
  };
@@ -122,8 +122,8 @@ export declare const GlasskubeResource: z.ZodUnion<[z.ZodObject<{
122
122
  };
123
123
  }>;
124
124
  }, "strip", z.ZodTypeAny, {
125
- kind: "Package" | "ClusterPackage";
126
125
  apiVersion: string;
126
+ kind: "Package" | "ClusterPackage";
127
127
  spec: {
128
128
  packageInfo: {
129
129
  name: string;
@@ -132,8 +132,8 @@ export declare const GlasskubeResource: z.ZodUnion<[z.ZodObject<{
132
132
  };
133
133
  };
134
134
  }, {
135
- kind: "Package" | "ClusterPackage";
136
135
  apiVersion: string;
136
+ kind: "Package" | "ClusterPackage";
137
137
  spec: {
138
138
  packageInfo: {
139
139
  name: string;
@@ -162,22 +162,22 @@ export declare const GlasskubeResource: z.ZodUnion<[z.ZodObject<{
162
162
  url: string;
163
163
  }>;
164
164
  }, "strip", z.ZodTypeAny, {
165
+ apiVersion: string;
165
166
  metadata: {
166
167
  name: string;
167
168
  annotations?: Record<string, string> | undefined;
168
169
  };
169
170
  kind: "PackageRepository";
170
- apiVersion: string;
171
171
  spec: {
172
172
  url: string;
173
173
  };
174
174
  }, {
175
+ apiVersion: string;
175
176
  metadata: {
176
177
  name: string;
177
178
  annotations?: Record<string, string> | undefined;
178
179
  };
179
180
  kind: "PackageRepository";
180
- apiVersion: string;
181
181
  spec: {
182
182
  url: string;
183
183
  };
@@ -22,15 +22,22 @@ function getExtraDeps(goModBefore, goModAfter, excludeDeps) {
22
22
  if (!res) {
23
23
  continue;
24
24
  }
25
- const { depName, currentValue } = res;
25
+ const { depName, depType, currentValue } = res;
26
26
  if (!depName || !currentValue) {
27
27
  continue;
28
28
  }
29
+ let expandedDepName = depName;
30
+ // NOTE: Right now the only special depType we care about is 'toolchain' because the table
31
+ // rendering prior to this change was ambiguous with regards to go version vs toolchain
32
+ // version updates.
33
+ if (depType === 'toolchain') {
34
+ expandedDepName = `${depName} (${depType})`;
35
+ }
29
36
  if (added) {
30
- addDeps[depName] = currentValue;
37
+ addDeps[expandedDepName] = currentValue;
31
38
  }
32
39
  else {
33
- rmDeps[depName] = currentValue;
40
+ rmDeps[expandedDepName] = currentValue;
34
41
  }
35
42
  }
36
43
  for (const [depName, currentValue] of Object.entries(rmDeps)) {
@@ -73,7 +80,8 @@ function getExtraDepsNotice(goModBefore, goModAfter, excludeDeps) {
73
80
  '\n',
74
81
  ];
75
82
  const goUpdated = extraDeps.some(({ depName }) => depName === 'go');
76
- const otherDepsCount = extraDeps.length - (goUpdated ? 1 : 0);
83
+ const toolchainUpdated = extraDeps.some(({ depName }) => depName === 'go (toolchain)');
84
+ const otherDepsCount = extraDeps.length - (goUpdated ? 1 : 0) - (toolchainUpdated ? 1 : 0);
77
85
  if (otherDepsCount === 1) {
78
86
  noticeLines.push(`- ${otherDepsCount} additional dependency was updated`);
79
87
  }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AE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;IACpE,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9D,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;QACzB,WAAW,CAAC,IAAI,CAAC,KAAK,cAAc,oCAAoC,CAAC,CAAC;IAC5E,CAAC;SAAM,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;QAC9B,WAAW,CAAC,IAAI,CACd,KAAK,cAAc,uCAAuC,CAC3D,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,WAAW,CAAC,IAAI,CACd,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { diffLines } from 'diff';\nimport markdownTable from 'markdown-table';\nimport { parseLine } from './line-parser';\nimport type { ExtraDep } from './types';\n\nexport function getExtraDeps(\n goModBefore: string,\n goModAfter: string,\n excludeDeps: string[],\n): ExtraDep[] {\n const result: ExtraDep[] = [];\n\n const diff = diffLines(goModBefore, goModAfter, {\n newlineIsToken: true,\n });\n\n const addDeps: Record<string, string> = {};\n const rmDeps: Record<string, string> = {};\n for (const { added, removed, value } of diff) {\n if (!added && !removed) {\n continue;\n }\n\n const res = parseLine(value);\n if (!res) {\n continue;\n }\n\n const { depName, currentValue } = res;\n if (!depName || !currentValue) {\n continue;\n }\n\n if (added) {\n addDeps[depName] = currentValue;\n } else {\n rmDeps[depName] = currentValue;\n }\n }\n\n for (const [depName, currentValue] of Object.entries(rmDeps)) {\n if (excludeDeps.includes(depName)) {\n continue;\n }\n\n const newValue = addDeps[depName];\n if (newValue) {\n result.push({\n depName,\n currentValue,\n newValue,\n });\n }\n }\n\n return result;\n}\n\nexport function extraDepsTable(extraDeps: ExtraDep[]): string {\n const tableLines: string[][] = [];\n\n tableLines.push(['**Package**', '**Change**']);\n\n for (const { depName, currentValue, newValue } of extraDeps) {\n const depNameQuoted = `\\`${depName}\\``;\n const versionChangeQuoted = `\\`${currentValue}\\` -> \\`${newValue}\\``;\n tableLines.push([depNameQuoted, versionChangeQuoted]);\n }\n\n return markdownTable(tableLines, {\n align: ['l', 'l'],\n });\n}\n\nexport function getExtraDepsNotice(\n goModBefore: string | null,\n goModAfter: string | null,\n excludeDeps: string[],\n): string | null {\n if (!goModBefore || !goModAfter) {\n return null;\n }\n\n const extraDeps = getExtraDeps(goModBefore, goModAfter, excludeDeps);\n if (extraDeps.length === 0) {\n return null;\n }\n\n const noticeLines: string[] = [\n 'In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s):',\n '\\n',\n ];\n\n const goUpdated = extraDeps.some(({ depName }) => depName === 'go');\n const otherDepsCount = extraDeps.length - (goUpdated ? 1 : 0);\n\n if (otherDepsCount === 1) {\n noticeLines.push(`- ${otherDepsCount} additional dependency was updated`);\n } else if (otherDepsCount > 1) {\n noticeLines.push(\n `- ${otherDepsCount} additional dependencies were updated`,\n );\n }\n\n if (goUpdated) {\n noticeLines.push(\n '- The `go` directive was updated for compatibility reasons',\n );\n }\n\n noticeLines.push('\\n');\n noticeLines.push('Details:');\n noticeLines.push('\\n');\n noticeLines.push(extraDepsTable(extraDeps));\n\n return noticeLines.join('\\n');\n}\n"]}
1
+ {"version":3,"file":"artifacts-extra.js","sourceRoot":"","sources":["../../../../lib/modules/manager/gomod/artifacts-extra.ts"],"names":[],"mappings":";;AAKA,oCA2DC;AAED,wCAcC;AA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;KACL,CAAC;IAEF,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;IACpE,MAAM,gBAAgB,GAAG,SAAS,CAAC,IAAI,CACrC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,KAAK,gBAAgB,CAC9C,CAAC;IACF,MAAM,cAAc,GAClB,SAAS,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtE,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;QACzB,WAAW,CAAC,IAAI,CAAC,KAAK,cAAc,oCAAoC,CAAC,CAAC;IAC5E,CAAC;SAAM,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;QAC9B,WAAW,CAAC,IAAI,CACd,KAAK,cAAc,uCAAuC,CAC3D,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,WAAW,CAAC,IAAI,CACd,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IAED,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5C,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { diffLines } from 'diff';\nimport markdownTable from 'markdown-table';\nimport { parseLine } from './line-parser';\nimport type { ExtraDep } from './types';\n\nexport function getExtraDeps(\n goModBefore: string,\n goModAfter: string,\n excludeDeps: string[],\n): ExtraDep[] {\n const result: ExtraDep[] = [];\n\n const diff = diffLines(goModBefore, goModAfter, {\n newlineIsToken: true,\n });\n\n const addDeps: Record<string, string> = {};\n const rmDeps: Record<string, string> = {};\n for (const { added, removed, value } of diff) {\n if (!added && !removed) {\n continue;\n }\n\n const res = parseLine(value);\n if (!res) {\n continue;\n }\n\n const { depName, depType, currentValue } = res;\n if (!depName || !currentValue) {\n continue;\n }\n\n let expandedDepName = depName;\n // NOTE: Right now the only special depType we care about is 'toolchain' because the table\n // rendering prior to this change was ambiguous with regards to go version vs toolchain\n // version updates.\n if (depType === 'toolchain') {\n expandedDepName = `${depName} (${depType})`;\n }\n\n if (added) {\n addDeps[expandedDepName] = currentValue;\n } else {\n rmDeps[expandedDepName] = currentValue;\n }\n }\n\n for (const [depName, currentValue] of Object.entries(rmDeps)) {\n if (excludeDeps.includes(depName)) {\n continue;\n }\n\n const newValue = addDeps[depName];\n if (newValue) {\n result.push({\n depName,\n currentValue,\n newValue,\n });\n }\n }\n\n return result;\n}\n\nexport function extraDepsTable(extraDeps: ExtraDep[]): string {\n const tableLines: string[][] = [];\n\n tableLines.push(['**Package**', '**Change**']);\n\n for (const { depName, currentValue, newValue } of extraDeps) {\n const depNameQuoted = `\\`${depName}\\``;\n const versionChangeQuoted = `\\`${currentValue}\\` -> \\`${newValue}\\``;\n tableLines.push([depNameQuoted, versionChangeQuoted]);\n }\n\n return markdownTable(tableLines, {\n align: ['l', 'l'],\n });\n}\n\nexport function getExtraDepsNotice(\n goModBefore: string | null,\n goModAfter: string | null,\n excludeDeps: string[],\n): string | null {\n if (!goModBefore || !goModAfter) {\n return null;\n }\n\n const extraDeps = getExtraDeps(goModBefore, goModAfter, excludeDeps);\n if (extraDeps.length === 0) {\n return null;\n }\n\n const noticeLines: string[] = [\n 'In order to perform the update(s) described in the table above, Renovate ran the `go get` command, which resulted in the following additional change(s):',\n '\\n',\n ];\n\n const goUpdated = extraDeps.some(({ depName }) => depName === 'go');\n const toolchainUpdated = extraDeps.some(\n ({ depName }) => depName === 'go (toolchain)',\n );\n const otherDepsCount =\n extraDeps.length - (goUpdated ? 1 : 0) - (toolchainUpdated ? 1 : 0);\n\n if (otherDepsCount === 1) {\n noticeLines.push(`- ${otherDepsCount} additional dependency was updated`);\n } else if (otherDepsCount > 1) {\n noticeLines.push(\n `- ${otherDepsCount} additional dependencies were updated`,\n );\n }\n\n if (goUpdated) {\n noticeLines.push(\n '- The `go` directive was updated for compatibility reasons',\n );\n }\n\n noticeLines.push('\\n');\n noticeLines.push('Details:');\n noticeLines.push('\\n');\n noticeLines.push(extraDepsTable(extraDeps));\n\n return noticeLines.join('\\n');\n}\n"]}
@@ -117,13 +117,12 @@ async function updateArtifacts({ packageFileName: goModFileName, updatedDeps, ne
117
117
  logger_1.logger.debug('Removed some relative replace statements and comments from go.mod');
118
118
  }
119
119
  }
120
- const goConstraints = config.constraints?.go ?? (await getGoConstraints(goModFileName));
120
+ const goConstraints = config.constraints?.go ?? getGoConstraints(newGoModContent);
121
121
  try {
122
122
  await (0, fs_1.writeLocalFile)(goModFileName, massagedGoMod);
123
123
  const cmd = 'go';
124
124
  const execOptions = {
125
125
  cwdFile: goModFileName,
126
- userConfiguredEnv: config.env,
127
126
  extraEnv: {
128
127
  GOPATH: await (0, fs_1.ensureCacheDir)('go'),
129
128
  GOPROXY: process.env.GOPROXY,
@@ -132,9 +131,8 @@ async function updateArtifacts({ packageFileName: goModFileName, updatedDeps, ne
132
131
  GONOSUMDB: process.env.GONOSUMDB,
133
132
  GOSUMDB: process.env.GOSUMDB,
134
133
  GOINSECURE: process.env.GOINSECURE,
135
- GOFLAGS: useModcacherw(goConstraints)
136
- ? '-modcacherw'
137
- : /* istanbul ignore next: hard to test */ null,
134
+ /* v8 ignore next -- TODO: add test */
135
+ GOFLAGS: useModcacherw(goConstraints) ? '-modcacherw' : null,
138
136
  CGO_ENABLED: global_1.GlobalConfig.get('binarySource') === 'docker' ? '0' : null,
139
137
  ...(0, auth_1.getGitEnvironmentVariables)(['go']),
140
138
  },
@@ -333,16 +331,32 @@ async function updateArtifacts({ packageFileName: goModFileName, updatedDeps, ne
333
331
  ];
334
332
  }
335
333
  }
336
- async function getGoConstraints(goModFileName) {
337
- const content = (await (0, fs_1.readLocalFile)(goModFileName, 'utf8')) ?? null;
338
- if (!content) {
339
- return undefined;
334
+ function getGoConstraints(content) {
335
+ // prefer toolchain directive when go.mod has one
336
+ const toolchainMatch = (0, regex_1.regEx)(/^toolchain\s*go(?<gover>\d+\.\d+\.\d+)$/m).exec(content);
337
+ const toolchainVer = toolchainMatch?.groups?.gover;
338
+ if (toolchainVer) {
339
+ logger_1.logger.debug(`Using go version ${toolchainVer} found in toolchain directive`);
340
+ return toolchainVer;
341
+ }
342
+ // If go.mod doesn't have toolchain directive and has a full go version spec,
343
+ // for example `go 1.23.6`, pick this version, this doesn't match major.minor version spec.
344
+ //
345
+ // This is because when go.mod have same version defined in go directive and toolchain directive,
346
+ // go will remove toolchain directive from go.mod.
347
+ //
348
+ // For example, go will rewrite `go 1.23.5\ntoolchain go1.23.5` to `go 1.23.5` by default,
349
+ // in this case, the go directive is the toolchain directive.
350
+ const goFullVersion = (0, regex_1.regEx)(/^go\s*(?<gover>\d+\.\d+\.\d+)$/m).exec(content)
351
+ ?.groups?.gover;
352
+ if (goFullVersion) {
353
+ return goFullVersion;
340
354
  }
341
355
  const re = (0, regex_1.regEx)(/^go\s*(?<gover>\d+\.\d+)$/m);
342
356
  const match = re.exec(content);
343
357
  if (!match?.groups?.gover) {
344
358
  return undefined;
345
359
  }
346
- return '^' + match.groups.gover;
360
+ return `^${match.groups.gover}`;
347
361
  }
348
362
  //# sourceMappingURL=artifacts.js.map