renovate 42.4.0 → 42.5.0

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 (708) hide show
  1. package/dist/config/decrypt.js +13 -14
  2. package/dist/config/decrypt.js.map +1 -1
  3. package/dist/config/massage.js +6 -7
  4. package/dist/config/massage.js.map +1 -1
  5. package/dist/config/migrate-validate.js +3 -3
  6. package/dist/config/migrate-validate.js.map +1 -1
  7. package/dist/config/migration.js +19 -20
  8. package/dist/config/migration.js.map +1 -1
  9. package/dist/config/migrations/base/abstract-migration.js +5 -6
  10. package/dist/config/migrations/base/abstract-migration.js.map +1 -1
  11. package/dist/config/migrations/custom/automerge-major-migration.js +2 -3
  12. package/dist/config/migrations/custom/automerge-major-migration.js.map +1 -1
  13. package/dist/config/migrations/custom/automerge-migration.js +4 -5
  14. package/dist/config/migrations/custom/automerge-migration.js.map +1 -1
  15. package/dist/config/migrations/custom/automerge-minor-migration.js +2 -3
  16. package/dist/config/migrations/custom/automerge-minor-migration.js.map +1 -1
  17. package/dist/config/migrations/custom/automerge-patch-migration.js +2 -3
  18. package/dist/config/migrations/custom/automerge-patch-migration.js.map +1 -1
  19. package/dist/config/migrations/custom/automerge-type-migration.js +2 -3
  20. package/dist/config/migrations/custom/automerge-type-migration.js.map +1 -1
  21. package/dist/config/migrations/custom/base-branch-migration.js +3 -4
  22. package/dist/config/migrations/custom/base-branch-migration.js.map +1 -1
  23. package/dist/config/migrations/custom/branch-name-migration.js +2 -3
  24. package/dist/config/migrations/custom/branch-name-migration.js.map +1 -1
  25. package/dist/config/migrations/custom/branch-prefix-migration.js +2 -3
  26. package/dist/config/migrations/custom/branch-prefix-migration.js.map +1 -1
  27. package/dist/config/migrations/custom/compatibility-migration.js +2 -3
  28. package/dist/config/migrations/custom/compatibility-migration.js.map +1 -1
  29. package/dist/config/migrations/custom/composer-ignore-platform-reqs-migration.js +2 -3
  30. package/dist/config/migrations/custom/composer-ignore-platform-reqs-migration.js.map +1 -1
  31. package/dist/config/migrations/custom/custom-managers-migration.js +2 -3
  32. package/dist/config/migrations/custom/custom-managers-migration.js.map +1 -1
  33. package/dist/config/migrations/custom/datasource-migration.js +2 -3
  34. package/dist/config/migrations/custom/datasource-migration.js.map +1 -1
  35. package/dist/config/migrations/custom/dep-types-migration.js +4 -5
  36. package/dist/config/migrations/custom/dep-types-migration.js.map +1 -1
  37. package/dist/config/migrations/custom/enabled-managers-migration.js +2 -3
  38. package/dist/config/migrations/custom/enabled-managers-migration.js.map +1 -1
  39. package/dist/config/migrations/custom/extends-migration.js +4 -5
  40. package/dist/config/migrations/custom/extends-migration.js.map +1 -1
  41. package/dist/config/migrations/custom/fetch-release-notes-migration.js +2 -3
  42. package/dist/config/migrations/custom/fetch-release-notes-migration.js.map +1 -1
  43. package/dist/config/migrations/custom/file-match-migration.js +3 -4
  44. package/dist/config/migrations/custom/file-match-migration.js.map +1 -1
  45. package/dist/config/migrations/custom/host-rules-migration.js +6 -7
  46. package/dist/config/migrations/custom/host-rules-migration.js.map +1 -1
  47. package/dist/config/migrations/custom/ignore-npmrc-file-migration.js +2 -3
  48. package/dist/config/migrations/custom/ignore-npmrc-file-migration.js.map +1 -1
  49. package/dist/config/migrations/custom/include-forks-migration.js +2 -3
  50. package/dist/config/migrations/custom/include-forks-migration.js.map +1 -1
  51. package/dist/config/migrations/custom/match-datasources-migration.js +2 -3
  52. package/dist/config/migrations/custom/match-datasources-migration.js.map +1 -1
  53. package/dist/config/migrations/custom/match-managers-migration.js +2 -3
  54. package/dist/config/migrations/custom/match-managers-migration.js.map +1 -1
  55. package/dist/config/migrations/custom/match-strings-migration.js +2 -3
  56. package/dist/config/migrations/custom/match-strings-migration.js.map +1 -1
  57. package/dist/config/migrations/custom/package-files-migration.js +6 -7
  58. package/dist/config/migrations/custom/package-files-migration.js.map +1 -1
  59. package/dist/config/migrations/custom/package-rules-migration.js +15 -16
  60. package/dist/config/migrations/custom/package-rules-migration.js.map +1 -1
  61. package/dist/config/migrations/custom/packages-migration.js +3 -4
  62. package/dist/config/migrations/custom/packages-migration.js.map +1 -1
  63. package/dist/config/migrations/custom/path-rules-migration.js +3 -4
  64. package/dist/config/migrations/custom/path-rules-migration.js.map +1 -1
  65. package/dist/config/migrations/custom/pin-versions-migration.js +2 -3
  66. package/dist/config/migrations/custom/pin-versions-migration.js.map +1 -1
  67. package/dist/config/migrations/custom/platform-commit-migration.js +2 -3
  68. package/dist/config/migrations/custom/platform-commit-migration.js.map +1 -1
  69. package/dist/config/migrations/custom/post-update-options-migration.js +2 -3
  70. package/dist/config/migrations/custom/post-update-options-migration.js.map +1 -1
  71. package/dist/config/migrations/custom/rebase-stale-prs-migration.js +2 -3
  72. package/dist/config/migrations/custom/rebase-stale-prs-migration.js.map +1 -1
  73. package/dist/config/migrations/custom/recreate-closed-migration.js +2 -3
  74. package/dist/config/migrations/custom/recreate-closed-migration.js.map +1 -1
  75. package/dist/config/migrations/custom/renovate-fork-migration.js +2 -3
  76. package/dist/config/migrations/custom/renovate-fork-migration.js.map +1 -1
  77. package/dist/config/migrations/custom/schedule-migration.js +4 -4
  78. package/dist/config/migrations/custom/schedule-migration.js.map +1 -1
  79. package/dist/config/migrations/custom/semantic-commits-migration.js +2 -3
  80. package/dist/config/migrations/custom/semantic-commits-migration.js.map +1 -1
  81. package/dist/config/migrations/custom/semantic-prefix-migration.js +2 -3
  82. package/dist/config/migrations/custom/semantic-prefix-migration.js.map +1 -1
  83. package/dist/config/migrations/custom/stability-days-migration.js +2 -3
  84. package/dist/config/migrations/custom/stability-days-migration.js.map +1 -1
  85. package/dist/config/migrations/custom/suppress-notifications-migration.js +2 -3
  86. package/dist/config/migrations/custom/suppress-notifications-migration.js.map +1 -1
  87. package/dist/config/migrations/custom/unpublish-safe-migration.js +2 -3
  88. package/dist/config/migrations/custom/unpublish-safe-migration.js.map +1 -1
  89. package/dist/config/migrations/migrations-service.js +2 -3
  90. package/dist/config/migrations/migrations-service.js.map +1 -1
  91. package/dist/config/options/index.js +7 -0
  92. package/dist/config/options/index.js.map +1 -1
  93. package/dist/config/presets/github/index.js +2 -3
  94. package/dist/config/presets/github/index.js.map +1 -1
  95. package/dist/config/presets/gitlab/index.js +2 -3
  96. package/dist/config/presets/gitlab/index.js.map +1 -1
  97. package/dist/config/presets/index.js +8 -8
  98. package/dist/config/presets/index.js.map +1 -1
  99. package/dist/config/presets/parse.js +2 -3
  100. package/dist/config/presets/parse.js.map +1 -1
  101. package/dist/config/secrets.js +3 -4
  102. package/dist/config/secrets.js.map +1 -1
  103. package/dist/config/types.d.ts +1 -0
  104. package/dist/config/types.js.map +1 -1
  105. package/dist/config/validation-helpers/match-base-branches.js +2 -3
  106. package/dist/config/validation-helpers/match-base-branches.js.map +1 -1
  107. package/dist/config/validation-helpers/regex-glob-matchers.js +2 -3
  108. package/dist/config/validation-helpers/regex-glob-matchers.js.map +1 -1
  109. package/dist/config/validation-helpers/utils.js +6 -6
  110. package/dist/config/validation-helpers/utils.js.map +1 -1
  111. package/dist/config/validation.js +29 -29
  112. package/dist/config/validation.js.map +1 -1
  113. package/dist/instrumentation/reporting.js +7 -8
  114. package/dist/instrumentation/reporting.js.map +1 -1
  115. package/dist/instrumentation/utils.js +2 -3
  116. package/dist/instrumentation/utils.js.map +1 -1
  117. package/dist/logger/err-serializer.js +2 -2
  118. package/dist/logger/err-serializer.js.map +1 -1
  119. package/dist/logger/index.js +3 -3
  120. package/dist/logger/index.js.map +1 -1
  121. package/dist/logger/renovate-logger.js +4 -5
  122. package/dist/logger/renovate-logger.js.map +1 -1
  123. package/dist/logger/utils.js +19 -19
  124. package/dist/logger/utils.js.map +1 -1
  125. package/dist/modules/datasource/aws-eks-addon/index.js +2 -2
  126. package/dist/modules/datasource/aws-eks-addon/index.js.map +1 -1
  127. package/dist/modules/datasource/bazel/index.js +2 -2
  128. package/dist/modules/datasource/bazel/index.js.map +1 -1
  129. package/dist/modules/datasource/bitrise/index.js +2 -2
  130. package/dist/modules/datasource/bitrise/index.js.map +1 -1
  131. package/dist/modules/datasource/common.js +4 -4
  132. package/dist/modules/datasource/common.js.map +1 -1
  133. package/dist/modules/datasource/conan/index.js +3 -3
  134. package/dist/modules/datasource/conan/index.js.map +1 -1
  135. package/dist/modules/datasource/custom/formats/html.js +2 -5
  136. package/dist/modules/datasource/custom/formats/html.js.map +1 -1
  137. package/dist/modules/datasource/custom/index.js +2 -3
  138. package/dist/modules/datasource/custom/index.js.map +1 -1
  139. package/dist/modules/datasource/custom/utils.js +4 -4
  140. package/dist/modules/datasource/custom/utils.js.map +1 -1
  141. package/dist/modules/datasource/dart-version/index.js +2 -3
  142. package/dist/modules/datasource/dart-version/index.js.map +1 -1
  143. package/dist/modules/datasource/deno/index.js +2 -2
  144. package/dist/modules/datasource/deno/index.js.map +1 -1
  145. package/dist/modules/datasource/docker/common.js +5 -5
  146. package/dist/modules/datasource/docker/common.js.map +1 -1
  147. package/dist/modules/datasource/docker/index.js +6 -6
  148. package/dist/modules/datasource/docker/index.js.map +1 -1
  149. package/dist/modules/datasource/endoflife-date/index.js +2 -2
  150. package/dist/modules/datasource/endoflife-date/index.js.map +1 -1
  151. package/dist/modules/datasource/galaxy/index.js +2 -2
  152. package/dist/modules/datasource/galaxy/index.js.map +1 -1
  153. package/dist/modules/datasource/galaxy-collection/index.js +2 -2
  154. package/dist/modules/datasource/galaxy-collection/index.js.map +1 -1
  155. package/dist/modules/datasource/git-refs/base.js +2 -2
  156. package/dist/modules/datasource/git-refs/base.js.map +1 -1
  157. package/dist/modules/datasource/github-release-attachments/index.js +2 -2
  158. package/dist/modules/datasource/github-release-attachments/index.js.map +1 -1
  159. package/dist/modules/datasource/github-releases/index.js +2 -3
  160. package/dist/modules/datasource/github-releases/index.js.map +1 -1
  161. package/dist/modules/datasource/github-tags/index.js +2 -3
  162. package/dist/modules/datasource/github-tags/index.js.map +1 -1
  163. package/dist/modules/datasource/go/goproxy-parser.js +3 -3
  164. package/dist/modules/datasource/go/goproxy-parser.js.map +1 -1
  165. package/dist/modules/datasource/go/index.js +2 -2
  166. package/dist/modules/datasource/go/index.js.map +1 -1
  167. package/dist/modules/datasource/go/releases-goproxy.js +3 -3
  168. package/dist/modules/datasource/go/releases-goproxy.js.map +1 -1
  169. package/dist/modules/datasource/hackage/index.js +2 -2
  170. package/dist/modules/datasource/hackage/index.js.map +1 -1
  171. package/dist/modules/datasource/hex/schema.js +2 -3
  172. package/dist/modules/datasource/hex/schema.js.map +1 -1
  173. package/dist/modules/datasource/hexpm-bob/index.js +2 -2
  174. package/dist/modules/datasource/hexpm-bob/index.js.map +1 -1
  175. package/dist/modules/datasource/index.js +14 -14
  176. package/dist/modules/datasource/index.js.map +1 -1
  177. package/dist/modules/datasource/jsr/index.js +2 -2
  178. package/dist/modules/datasource/jsr/index.js.map +1 -1
  179. package/dist/modules/datasource/jsr/util.js +3 -4
  180. package/dist/modules/datasource/jsr/util.js.map +1 -1
  181. package/dist/modules/datasource/metadata.js +5 -5
  182. package/dist/modules/datasource/metadata.js.map +1 -1
  183. package/dist/modules/datasource/npm/get.js +2 -2
  184. package/dist/modules/datasource/npm/get.js.map +1 -1
  185. package/dist/modules/datasource/npm/npmrc.js +7 -7
  186. package/dist/modules/datasource/npm/npmrc.js.map +1 -1
  187. package/dist/modules/datasource/nuget/v3.js +2 -2
  188. package/dist/modules/datasource/nuget/v3.js.map +1 -1
  189. package/dist/modules/datasource/packagist/index.js +2 -2
  190. package/dist/modules/datasource/packagist/index.js.map +1 -1
  191. package/dist/modules/datasource/packagist/schema.js +3 -4
  192. package/dist/modules/datasource/packagist/schema.js.map +1 -1
  193. package/dist/modules/datasource/pypi/index.js +2 -2
  194. package/dist/modules/datasource/pypi/index.js.map +1 -1
  195. package/dist/modules/datasource/repology/index.js +3 -3
  196. package/dist/modules/datasource/repology/index.js.map +1 -1
  197. package/dist/modules/datasource/rubygems/schema.js +5 -6
  198. package/dist/modules/datasource/rubygems/schema.js.map +1 -1
  199. package/dist/modules/datasource/util.js +2 -3
  200. package/dist/modules/datasource/util.js.map +1 -1
  201. package/dist/modules/manager/argocd/extract.js +3 -4
  202. package/dist/modules/manager/argocd/extract.js.map +1 -1
  203. package/dist/modules/manager/asdf/extract.js +2 -3
  204. package/dist/modules/manager/asdf/extract.js.map +1 -1
  205. package/dist/modules/manager/bazel/artifacts.js +2 -2
  206. package/dist/modules/manager/bazel/artifacts.js.map +1 -1
  207. package/dist/modules/manager/bazel/common.js +4 -5
  208. package/dist/modules/manager/bazel/common.js.map +1 -1
  209. package/dist/modules/manager/bazel/rules/http.js +3 -4
  210. package/dist/modules/manager/bazel/rules/http.js.map +1 -1
  211. package/dist/modules/manager/bazel/rules/maven.js +2 -3
  212. package/dist/modules/manager/bazel/rules/maven.js.map +1 -1
  213. package/dist/modules/manager/bazel-module/parser/starlark.js +2 -3
  214. package/dist/modules/manager/bazel-module/parser/starlark.js.map +1 -1
  215. package/dist/modules/manager/bazel-module/rules.js +3 -3
  216. package/dist/modules/manager/bazel-module/rules.js.map +1 -1
  217. package/dist/modules/manager/bitrise/utils.js +3 -4
  218. package/dist/modules/manager/bitrise/utils.js.map +1 -1
  219. package/dist/modules/manager/buildpacks/extract.js +2 -3
  220. package/dist/modules/manager/buildpacks/extract.js.map +1 -1
  221. package/dist/modules/manager/bun/artifacts.js +2 -2
  222. package/dist/modules/manager/bun/artifacts.js.map +1 -1
  223. package/dist/modules/manager/bun/extract.js +2 -3
  224. package/dist/modules/manager/bun/extract.js.map +1 -1
  225. package/dist/modules/manager/bundler/artifacts.js +3 -3
  226. package/dist/modules/manager/bundler/artifacts.js.map +1 -1
  227. package/dist/modules/manager/bundler/extract.js +5 -6
  228. package/dist/modules/manager/bundler/extract.js.map +1 -1
  229. package/dist/modules/manager/cargo/extract.js +3 -4
  230. package/dist/modules/manager/cargo/extract.js.map +1 -1
  231. package/dist/modules/manager/composer/artifacts.js +3 -3
  232. package/dist/modules/manager/composer/artifacts.js.map +1 -1
  233. package/dist/modules/manager/composer/utils.js +3 -4
  234. package/dist/modules/manager/composer/utils.js.map +1 -1
  235. package/dist/modules/manager/conan/extract.js +2 -3
  236. package/dist/modules/manager/conan/extract.js.map +1 -1
  237. package/dist/modules/manager/copier/utils.js +3 -4
  238. package/dist/modules/manager/copier/utils.js.map +1 -1
  239. package/dist/modules/manager/crow/extract.js +2 -3
  240. package/dist/modules/manager/crow/extract.js.map +1 -1
  241. package/dist/modules/manager/custom/jsonata/index.js +2 -3
  242. package/dist/modules/manager/custom/jsonata/index.js.map +1 -1
  243. package/dist/modules/manager/custom/jsonata/utils.js +3 -3
  244. package/dist/modules/manager/custom/jsonata/utils.js.map +1 -1
  245. package/dist/modules/manager/custom/regex/index.js +2 -3
  246. package/dist/modules/manager/custom/regex/index.js.map +1 -1
  247. package/dist/modules/manager/custom/regex/strategies.js +4 -5
  248. package/dist/modules/manager/custom/regex/strategies.js.map +1 -1
  249. package/dist/modules/manager/custom/regex/utils.js +2 -2
  250. package/dist/modules/manager/custom/regex/utils.js.map +1 -1
  251. package/dist/modules/manager/custom/utils.js +6 -7
  252. package/dist/modules/manager/custom/utils.js.map +1 -1
  253. package/dist/modules/manager/deps-edn/extract.js +13 -14
  254. package/dist/modules/manager/deps-edn/extract.js.map +1 -1
  255. package/dist/modules/manager/deps-edn/parser.js +2 -2
  256. package/dist/modules/manager/deps-edn/parser.js.map +1 -1
  257. package/dist/modules/manager/devbox/artifacts.js +2 -2
  258. package/dist/modules/manager/devbox/artifacts.js.map +1 -1
  259. package/dist/modules/manager/docker-compose/extract.js +3 -4
  260. package/dist/modules/manager/docker-compose/extract.js.map +1 -1
  261. package/dist/modules/manager/docker-compose/schema.js +2 -3
  262. package/dist/modules/manager/docker-compose/schema.js.map +1 -1
  263. package/dist/modules/manager/dockerfile/extract.js +5 -5
  264. package/dist/modules/manager/dockerfile/extract.js.map +1 -1
  265. package/dist/modules/manager/fingerprint.generated.js +5 -5
  266. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  267. package/dist/modules/manager/fleet/extract.js +2 -3
  268. package/dist/modules/manager/fleet/extract.js.map +1 -1
  269. package/dist/modules/manager/flux/extract.js +2 -3
  270. package/dist/modules/manager/flux/extract.js.map +1 -1
  271. package/dist/modules/manager/glasskube/extract.js +2 -3
  272. package/dist/modules/manager/glasskube/extract.js.map +1 -1
  273. package/dist/modules/manager/gleam/artifacts.js +3 -4
  274. package/dist/modules/manager/gleam/artifacts.js.map +1 -1
  275. package/dist/modules/manager/gomod/artifacts.js +2 -2
  276. package/dist/modules/manager/gomod/artifacts.js.map +1 -1
  277. package/dist/modules/manager/gradle/artifacts.js +2 -2
  278. package/dist/modules/manager/gradle/artifacts.js.map +1 -1
  279. package/dist/modules/manager/gradle/extract/catalog.js +5 -5
  280. package/dist/modules/manager/gradle/extract/catalog.js.map +1 -1
  281. package/dist/modules/manager/gradle-wrapper/artifacts.js +2 -2
  282. package/dist/modules/manager/gradle-wrapper/artifacts.js.map +1 -1
  283. package/dist/modules/manager/helm-requirements/extract.js +2 -3
  284. package/dist/modules/manager/helm-requirements/extract.js.map +1 -1
  285. package/dist/modules/manager/helmfile/artifacts.js +2 -3
  286. package/dist/modules/manager/helmfile/artifacts.js.map +1 -1
  287. package/dist/modules/manager/helmfile/extract.js +4 -5
  288. package/dist/modules/manager/helmfile/extract.js.map +1 -1
  289. package/dist/modules/manager/helmsman/extract.js +4 -5
  290. package/dist/modules/manager/helmsman/extract.js.map +1 -1
  291. package/dist/modules/manager/helmv3/artifacts.js +4 -4
  292. package/dist/modules/manager/helmv3/artifacts.js.map +1 -1
  293. package/dist/modules/manager/helmv3/extract.js +4 -5
  294. package/dist/modules/manager/helmv3/extract.js.map +1 -1
  295. package/dist/modules/manager/helmv3/oci.js +3 -4
  296. package/dist/modules/manager/helmv3/oci.js.map +1 -1
  297. package/dist/modules/manager/jenkins/extract.js +3 -3
  298. package/dist/modules/manager/jenkins/extract.js.map +1 -1
  299. package/dist/modules/manager/kotlin-script/extract.js +3 -4
  300. package/dist/modules/manager/kotlin-script/extract.js.map +1 -1
  301. package/dist/modules/manager/kubernetes/extract.js +4 -4
  302. package/dist/modules/manager/kubernetes/extract.js.map +1 -1
  303. package/dist/modules/manager/kustomize/artifacts.js +8 -8
  304. package/dist/modules/manager/kustomize/artifacts.js.map +1 -1
  305. package/dist/modules/manager/kustomize/extract.js +8 -8
  306. package/dist/modules/manager/kustomize/extract.js.map +1 -1
  307. package/dist/modules/manager/maven/extract.js +4 -4
  308. package/dist/modules/manager/maven/extract.js.map +1 -1
  309. package/dist/modules/manager/maven/update.js +2 -2
  310. package/dist/modules/manager/maven/update.js.map +1 -1
  311. package/dist/modules/manager/maven-wrapper/artifacts.js +2 -2
  312. package/dist/modules/manager/maven-wrapper/artifacts.js.map +1 -1
  313. package/dist/modules/manager/mise/backends.js +9 -10
  314. package/dist/modules/manager/mise/backends.js.map +1 -1
  315. package/dist/modules/manager/mise/extract.js +7 -8
  316. package/dist/modules/manager/mise/extract.js.map +1 -1
  317. package/dist/modules/manager/mix/artifacts.js +3 -3
  318. package/dist/modules/manager/mix/artifacts.js.map +1 -1
  319. package/dist/modules/manager/nix/artifacts.js +2 -2
  320. package/dist/modules/manager/nix/artifacts.js.map +1 -1
  321. package/dist/modules/manager/npm/detect.js +2 -2
  322. package/dist/modules/manager/npm/detect.js.map +1 -1
  323. package/dist/modules/manager/npm/extract/common/dependency.js +2 -2
  324. package/dist/modules/manager/npm/extract/common/dependency.js.map +1 -1
  325. package/dist/modules/manager/npm/extract/common/overrides.js +3 -4
  326. package/dist/modules/manager/npm/extract/common/overrides.js.map +1 -1
  327. package/dist/modules/manager/npm/extract/common/package-file.js +8 -9
  328. package/dist/modules/manager/npm/extract/common/package-file.js.map +1 -1
  329. package/dist/modules/manager/npm/extract/index.js +10 -10
  330. package/dist/modules/manager/npm/extract/index.js.map +1 -1
  331. package/dist/modules/manager/npm/extract/pnpm.js +7 -7
  332. package/dist/modules/manager/npm/extract/pnpm.js.map +1 -1
  333. package/dist/modules/manager/npm/extract/post/locked-versions.js +3 -3
  334. package/dist/modules/manager/npm/extract/post/locked-versions.js.map +1 -1
  335. package/dist/modules/manager/npm/extract/post/monorepo.js +3 -4
  336. package/dist/modules/manager/npm/extract/post/monorepo.js.map +1 -1
  337. package/dist/modules/manager/npm/extract/yarn.js +2 -3
  338. package/dist/modules/manager/npm/extract/yarn.js.map +1 -1
  339. package/dist/modules/manager/npm/extract/yarnrc.js +2 -3
  340. package/dist/modules/manager/npm/extract/yarnrc.js.map +1 -1
  341. package/dist/modules/manager/npm/post-update/index.js +6 -6
  342. package/dist/modules/manager/npm/post-update/index.js.map +1 -1
  343. package/dist/modules/manager/npm/post-update/npm.js +4 -4
  344. package/dist/modules/manager/npm/post-update/npm.js.map +1 -1
  345. package/dist/modules/manager/npm/post-update/pnpm.js +3 -3
  346. package/dist/modules/manager/npm/post-update/pnpm.js.map +1 -1
  347. package/dist/modules/manager/npm/post-update/rules.js +2 -2
  348. package/dist/modules/manager/npm/post-update/rules.js.map +1 -1
  349. package/dist/modules/manager/npm/post-update/utils.js +2 -2
  350. package/dist/modules/manager/npm/post-update/utils.js.map +1 -1
  351. package/dist/modules/manager/npm/post-update/yarn.js +3 -3
  352. package/dist/modules/manager/npm/post-update/yarn.js.map +1 -1
  353. package/dist/modules/manager/npm/update/dependency/index.js +2 -3
  354. package/dist/modules/manager/npm/update/dependency/index.js.map +1 -1
  355. package/dist/modules/manager/npm/update/dependency/pnpm.js +2 -3
  356. package/dist/modules/manager/npm/update/dependency/pnpm.js.map +1 -1
  357. package/dist/modules/manager/npm/update/dependency/yarn.js +3 -4
  358. package/dist/modules/manager/npm/update/dependency/yarn.js.map +1 -1
  359. package/dist/modules/manager/nuget/config-formatter.js +2 -2
  360. package/dist/modules/manager/nuget/config-formatter.js.map +1 -1
  361. package/dist/modules/manager/nuget/extract.js +4 -4
  362. package/dist/modules/manager/nuget/extract.js.map +1 -1
  363. package/dist/modules/manager/nuget/package-tree.js +2 -2
  364. package/dist/modules/manager/nuget/package-tree.js.map +1 -1
  365. package/dist/modules/manager/ocb/extract.js +2 -3
  366. package/dist/modules/manager/ocb/extract.js.map +1 -1
  367. package/dist/modules/manager/osgi/extract.js +4 -4
  368. package/dist/modules/manager/osgi/extract.js.map +1 -1
  369. package/dist/modules/manager/pep621/artifacts.js +3 -4
  370. package/dist/modules/manager/pep621/artifacts.js.map +1 -1
  371. package/dist/modules/manager/pep621/processors/uv.js +2 -3
  372. package/dist/modules/manager/pep621/processors/uv.js.map +1 -1
  373. package/dist/modules/manager/pep621/utils.js +8 -10
  374. package/dist/modules/manager/pep621/utils.js.map +1 -1
  375. package/dist/modules/manager/pep723/schema.js +2 -3
  376. package/dist/modules/manager/pep723/schema.js.map +1 -1
  377. package/dist/modules/manager/pip-compile/common.js +3 -3
  378. package/dist/modules/manager/pip-compile/common.js.map +1 -1
  379. package/dist/modules/manager/pip_requirements/artifacts.js +2 -3
  380. package/dist/modules/manager/pip_requirements/artifacts.js.map +1 -1
  381. package/dist/modules/manager/pip_requirements/extract.js +2 -3
  382. package/dist/modules/manager/pip_requirements/extract.js.map +1 -1
  383. package/dist/modules/manager/pipenv/artifacts.js +3 -4
  384. package/dist/modules/manager/pipenv/artifacts.js.map +1 -1
  385. package/dist/modules/manager/pipenv/extract.js +6 -7
  386. package/dist/modules/manager/pipenv/extract.js.map +1 -1
  387. package/dist/modules/manager/pixi/artifacts.js +2 -3
  388. package/dist/modules/manager/pixi/artifacts.js.map +1 -1
  389. package/dist/modules/manager/pixi/extract.js +2 -3
  390. package/dist/modules/manager/pixi/extract.js.map +1 -1
  391. package/dist/modules/manager/poetry/artifacts.js +4 -5
  392. package/dist/modules/manager/poetry/artifacts.js.map +1 -1
  393. package/dist/modules/manager/poetry/extract.js +2 -3
  394. package/dist/modules/manager/poetry/extract.js.map +1 -1
  395. package/dist/modules/manager/pre-commit/extract.js +4 -5
  396. package/dist/modules/manager/pre-commit/extract.js.map +1 -1
  397. package/dist/modules/manager/pub/artifacts.js +3 -4
  398. package/dist/modules/manager/pub/artifacts.js.map +1 -1
  399. package/dist/modules/manager/pub/extract.js +8 -11
  400. package/dist/modules/manager/pub/extract.js.map +1 -1
  401. package/dist/modules/manager/renovate-config-presets/extract.js +4 -5
  402. package/dist/modules/manager/renovate-config-presets/extract.js.map +1 -1
  403. package/dist/modules/manager/tekton/extract.js +9 -10
  404. package/dist/modules/manager/tekton/extract.js.map +1 -1
  405. package/dist/modules/manager/terraform/base.js +2 -3
  406. package/dist/modules/manager/terraform/base.js.map +1 -1
  407. package/dist/modules/manager/terraform/extract.js +2 -2
  408. package/dist/modules/manager/terraform/extract.js.map +1 -1
  409. package/dist/modules/manager/terraform/extractors/others/modules.js +3 -4
  410. package/dist/modules/manager/terraform/extractors/others/modules.js.map +1 -1
  411. package/dist/modules/manager/terraform/extractors/others/providers.js +3 -4
  412. package/dist/modules/manager/terraform/extractors/others/providers.js.map +1 -1
  413. package/dist/modules/manager/terraform/extractors/resources/generic-docker-image-ref.js +7 -8
  414. package/dist/modules/manager/terraform/extractors/resources/generic-docker-image-ref.js.map +1 -1
  415. package/dist/modules/manager/terraform/extractors/resources/helm-release.js +5 -6
  416. package/dist/modules/manager/terraform/extractors/resources/helm-release.js.map +1 -1
  417. package/dist/modules/manager/terraform/extractors/resources/terraform-workspace.js +3 -4
  418. package/dist/modules/manager/terraform/extractors/resources/terraform-workspace.js.map +1 -1
  419. package/dist/modules/manager/terraform/extractors/terraform-block/required-provider.js +4 -5
  420. package/dist/modules/manager/terraform/extractors/terraform-block/required-provider.js.map +1 -1
  421. package/dist/modules/manager/terraform/extractors/terraform-block/terraform-version.js +3 -3
  422. package/dist/modules/manager/terraform/extractors/terraform-block/terraform-version.js.map +1 -1
  423. package/dist/modules/manager/terraform/lockfile/index.js +2 -2
  424. package/dist/modules/manager/terraform/lockfile/index.js.map +1 -1
  425. package/dist/modules/manager/terraform/lockfile/util.js +2 -3
  426. package/dist/modules/manager/terraform/lockfile/util.js.map +1 -1
  427. package/dist/modules/manager/terraform/util.js +2 -3
  428. package/dist/modules/manager/terraform/util.js.map +1 -1
  429. package/dist/modules/manager/tflint-plugin/plugins.js +2 -3
  430. package/dist/modules/manager/tflint-plugin/plugins.js.map +1 -1
  431. package/dist/modules/manager/travis/extract.js +5 -6
  432. package/dist/modules/manager/travis/extract.js.map +1 -1
  433. package/dist/modules/manager/woodpecker/extract.js +2 -3
  434. package/dist/modules/manager/woodpecker/extract.js.map +1 -1
  435. package/dist/modules/platform/azure/index.js +2 -2
  436. package/dist/modules/platform/azure/index.js.map +1 -1
  437. package/dist/modules/platform/bitbucket/index.js +5 -5
  438. package/dist/modules/platform/bitbucket/index.js.map +1 -1
  439. package/dist/modules/platform/bitbucket-server/pr-cache.js +2 -2
  440. package/dist/modules/platform/bitbucket-server/pr-cache.js.map +1 -1
  441. package/dist/modules/platform/bitbucket-server/utils.js +2 -2
  442. package/dist/modules/platform/bitbucket-server/utils.js.map +1 -1
  443. package/dist/modules/platform/codecommit/codecommit-client.js +2 -2
  444. package/dist/modules/platform/codecommit/codecommit-client.js.map +1 -1
  445. package/dist/modules/platform/forgejo/index.js +5 -5
  446. package/dist/modules/platform/forgejo/index.js.map +1 -1
  447. package/dist/modules/platform/forgejo/utils.js +2 -2
  448. package/dist/modules/platform/forgejo/utils.js.map +1 -1
  449. package/dist/modules/platform/gitea/index.js +5 -5
  450. package/dist/modules/platform/gitea/index.js.map +1 -1
  451. package/dist/modules/platform/gitea/utils.js +2 -2
  452. package/dist/modules/platform/gitea/utils.js.map +1 -1
  453. package/dist/modules/platform/github/common.js +4 -5
  454. package/dist/modules/platform/github/common.js.map +1 -1
  455. package/dist/modules/platform/github/index.js +5 -5
  456. package/dist/modules/platform/github/index.js.map +1 -1
  457. package/dist/modules/platform/github/pr.js +2 -3
  458. package/dist/modules/platform/github/pr.js.map +1 -1
  459. package/dist/modules/platform/gitlab/http.js +2 -3
  460. package/dist/modules/platform/gitlab/http.js.map +1 -1
  461. package/dist/modules/platform/gitlab/index.js +3 -3
  462. package/dist/modules/platform/gitlab/index.js.map +1 -1
  463. package/dist/modules/platform/gitlab/utils.js +3 -3
  464. package/dist/modules/platform/gitlab/utils.js.map +1 -1
  465. package/dist/modules/platform/pr-body.js +2 -3
  466. package/dist/modules/platform/pr-body.js.map +1 -1
  467. package/dist/modules/versioning/composer/index.js +2 -3
  468. package/dist/modules/versioning/composer/index.js.map +1 -1
  469. package/dist/modules/versioning/generic.js +5 -6
  470. package/dist/modules/versioning/generic.js.map +1 -1
  471. package/dist/modules/versioning/gradle/compare.js +3 -4
  472. package/dist/modules/versioning/gradle/compare.js.map +1 -1
  473. package/dist/modules/versioning/nixpkgs/index.js +6 -7
  474. package/dist/modules/versioning/nixpkgs/index.js.map +1 -1
  475. package/dist/modules/versioning/npm/range.js +2 -2
  476. package/dist/modules/versioning/npm/range.js.map +1 -1
  477. package/dist/modules/versioning/rpm/index.js +4 -5
  478. package/dist/modules/versioning/rpm/index.js.map +1 -1
  479. package/dist/modules/versioning/schema.js +2 -2
  480. package/dist/modules/versioning/schema.js.map +1 -1
  481. package/dist/modules/versioning/semver-coerced/index.js +3 -3
  482. package/dist/modules/versioning/semver-coerced/index.js.map +1 -1
  483. package/dist/modules/versioning/semver-partial/index.js +4 -4
  484. package/dist/modules/versioning/semver-partial/index.js.map +1 -1
  485. package/dist/proxy.js +3 -4
  486. package/dist/proxy.js.map +1 -1
  487. package/dist/util/array.js +4 -5
  488. package/dist/util/array.js.map +1 -1
  489. package/dist/util/assign-keys.js +2 -3
  490. package/dist/util/assign-keys.js.map +1 -1
  491. package/dist/util/cache/package/decorator.js +6 -6
  492. package/dist/util/cache/package/decorator.js.map +1 -1
  493. package/dist/util/cache/package/ttl.js +4 -5
  494. package/dist/util/cache/package/ttl.js.map +1 -1
  495. package/dist/util/cache/repository/impl/base.js +3 -4
  496. package/dist/util/cache/repository/impl/base.js.map +1 -1
  497. package/dist/util/cache/repository/impl/s3.js +2 -3
  498. package/dist/util/cache/repository/impl/s3.js.map +1 -1
  499. package/dist/util/exec/common.js +2 -3
  500. package/dist/util/exec/common.js.map +1 -1
  501. package/dist/util/exec/containerbase.js +2 -2
  502. package/dist/util/exec/containerbase.js.map +1 -1
  503. package/dist/util/exec/docker/index.js +5 -5
  504. package/dist/util/exec/docker/index.js.map +1 -1
  505. package/dist/util/exec/index.js +2 -2
  506. package/dist/util/exec/index.js.map +1 -1
  507. package/dist/util/exec/utils.js +3 -4
  508. package/dist/util/exec/utils.js.map +1 -1
  509. package/dist/util/filter-map.js +2 -3
  510. package/dist/util/filter-map.js.map +1 -1
  511. package/dist/util/fs/index.js +3 -3
  512. package/dist/util/fs/index.js.map +1 -1
  513. package/dist/util/git/auth.js +2 -3
  514. package/dist/util/git/auth.js.map +1 -1
  515. package/dist/util/git/config.js +3 -4
  516. package/dist/util/git/config.js.map +1 -1
  517. package/dist/util/git/index.js +4 -4
  518. package/dist/util/git/index.js.map +1 -1
  519. package/dist/util/git/private-key.js +2 -2
  520. package/dist/util/git/private-key.js.map +1 -1
  521. package/dist/util/host-rules.js +6 -6
  522. package/dist/util/host-rules.js.map +1 -1
  523. package/dist/util/http/auth.js +3 -4
  524. package/dist/util/http/auth.js.map +1 -1
  525. package/dist/util/http/bitbucket-server.js +2 -3
  526. package/dist/util/http/bitbucket-server.js.map +1 -1
  527. package/dist/util/http/bitbucket.js +3 -4
  528. package/dist/util/http/bitbucket.js.map +1 -1
  529. package/dist/util/http/cache/package-http-cache-provider.js +2 -2
  530. package/dist/util/http/cache/package-http-cache-provider.js.map +1 -1
  531. package/dist/util/http/forgejo.js +3 -4
  532. package/dist/util/http/forgejo.js.map +1 -1
  533. package/dist/util/http/gitea.js +3 -4
  534. package/dist/util/http/gitea.js.map +1 -1
  535. package/dist/util/http/github.js +10 -10
  536. package/dist/util/http/github.js.map +1 -1
  537. package/dist/util/http/gitlab.js +4 -5
  538. package/dist/util/http/gitlab.js.map +1 -1
  539. package/dist/util/http/host-rules.js +10 -10
  540. package/dist/util/http/host-rules.js.map +1 -1
  541. package/dist/util/http/http.js +5 -5
  542. package/dist/util/http/http.js.map +1 -1
  543. package/dist/util/http/rate-limits.js +3 -3
  544. package/dist/util/http/rate-limits.js.map +1 -1
  545. package/dist/util/interpolator.js +8 -9
  546. package/dist/util/interpolator.js.map +1 -1
  547. package/dist/util/merge-confidence/index.js +5 -5
  548. package/dist/util/merge-confidence/index.js.map +1 -1
  549. package/dist/util/number.js +2 -3
  550. package/dist/util/number.js.map +1 -1
  551. package/dist/util/package-rules/base-branches.js +3 -4
  552. package/dist/util/package-rules/base-branches.js.map +1 -1
  553. package/dist/util/package-rules/categories.js +3 -4
  554. package/dist/util/package-rules/categories.js.map +1 -1
  555. package/dist/util/package-rules/current-age.js +3 -4
  556. package/dist/util/package-rules/current-age.js.map +1 -1
  557. package/dist/util/package-rules/current-value.js +2 -3
  558. package/dist/util/package-rules/current-value.js.map +1 -1
  559. package/dist/util/package-rules/current-version.js +5 -5
  560. package/dist/util/package-rules/current-version.js.map +1 -1
  561. package/dist/util/package-rules/datasources.js +3 -4
  562. package/dist/util/package-rules/datasources.js.map +1 -1
  563. package/dist/util/package-rules/dep-names.js +3 -4
  564. package/dist/util/package-rules/dep-names.js.map +1 -1
  565. package/dist/util/package-rules/dep-types.js +2 -3
  566. package/dist/util/package-rules/dep-types.js.map +1 -1
  567. package/dist/util/package-rules/files.js +4 -5
  568. package/dist/util/package-rules/files.js.map +1 -1
  569. package/dist/util/package-rules/index.js +6 -6
  570. package/dist/util/package-rules/index.js.map +1 -1
  571. package/dist/util/package-rules/managers.js +3 -4
  572. package/dist/util/package-rules/managers.js.map +1 -1
  573. package/dist/util/package-rules/merge-confidence.js +5 -6
  574. package/dist/util/package-rules/merge-confidence.js.map +1 -1
  575. package/dist/util/package-rules/new-value.js +2 -3
  576. package/dist/util/package-rules/new-value.js.map +1 -1
  577. package/dist/util/package-rules/package-names.js +2 -3
  578. package/dist/util/package-rules/package-names.js.map +1 -1
  579. package/dist/util/package-rules/repositories.js +3 -4
  580. package/dist/util/package-rules/repositories.js.map +1 -1
  581. package/dist/util/package-rules/sourceurls.js +2 -3
  582. package/dist/util/package-rules/sourceurls.js.map +1 -1
  583. package/dist/util/package-rules/update-types.js +2 -3
  584. package/dist/util/package-rules/update-types.js.map +1 -1
  585. package/dist/util/pretty-time.js +4 -4
  586. package/dist/util/pretty-time.js.map +1 -1
  587. package/dist/util/regex.js +2 -3
  588. package/dist/util/regex.js.map +1 -1
  589. package/dist/util/s3.js +2 -3
  590. package/dist/util/s3.js.map +1 -1
  591. package/dist/util/sanitize.js +2 -3
  592. package/dist/util/sanitize.js.map +1 -1
  593. package/dist/util/string-match.js +2 -3
  594. package/dist/util/string-match.js.map +1 -1
  595. package/dist/util/template/index.js +6 -6
  596. package/dist/util/template/index.js.map +1 -1
  597. package/dist/util/url.js +5 -5
  598. package/dist/util/url.js.map +1 -1
  599. package/dist/workers/global/autodiscover.js +3 -4
  600. package/dist/workers/global/autodiscover.js.map +1 -1
  601. package/dist/workers/global/config/parse/additional-config-file.js +4 -4
  602. package/dist/workers/global/config/parse/additional-config-file.js.map +1 -1
  603. package/dist/workers/global/config/parse/coersions.js +2 -2
  604. package/dist/workers/global/config/parse/coersions.js.map +1 -1
  605. package/dist/workers/global/config/parse/env.js +2 -2
  606. package/dist/workers/global/config/parse/env.js.map +1 -1
  607. package/dist/workers/global/config/parse/file.js +5 -5
  608. package/dist/workers/global/config/parse/file.js.map +1 -1
  609. package/dist/workers/global/config/parse/index.js +6 -7
  610. package/dist/workers/global/config/parse/index.js.map +1 -1
  611. package/dist/workers/global/config/parse/util.js +2 -2
  612. package/dist/workers/global/config/parse/util.js.map +1 -1
  613. package/dist/workers/global/index.js +5 -5
  614. package/dist/workers/global/index.js.map +1 -1
  615. package/dist/workers/global/limits.js +6 -7
  616. package/dist/workers/global/limits.js.map +1 -1
  617. package/dist/workers/repository/config-migration/branch/index.js +2 -3
  618. package/dist/workers/repository/config-migration/branch/index.js.map +1 -1
  619. package/dist/workers/repository/config-migration/branch/migrated-data.js +2 -2
  620. package/dist/workers/repository/config-migration/branch/migrated-data.js.map +1 -1
  621. package/dist/workers/repository/config-migration/pr/index.js +3 -3
  622. package/dist/workers/repository/config-migration/pr/index.js.map +1 -1
  623. package/dist/workers/repository/dependency-dashboard.js +10 -10
  624. package/dist/workers/repository/dependency-dashboard.js.map +1 -1
  625. package/dist/workers/repository/error.js +6 -1
  626. package/dist/workers/repository/error.js.map +1 -1
  627. package/dist/workers/repository/extract/index.js +2 -3
  628. package/dist/workers/repository/extract/index.js.map +1 -1
  629. package/dist/workers/repository/extract/manager-files.js +2 -3
  630. package/dist/workers/repository/extract/manager-files.js.map +1 -1
  631. package/dist/workers/repository/extract/supersedes.js +4 -5
  632. package/dist/workers/repository/extract/supersedes.js.map +1 -1
  633. package/dist/workers/repository/finalize/prune.js +2 -3
  634. package/dist/workers/repository/finalize/prune.js.map +1 -1
  635. package/dist/workers/repository/init/inherited.js +5 -5
  636. package/dist/workers/repository/init/inherited.js.map +1 -1
  637. package/dist/workers/repository/init/merge.js +13 -13
  638. package/dist/workers/repository/init/merge.js.map +1 -1
  639. package/dist/workers/repository/model/commit-message.js +2 -3
  640. package/dist/workers/repository/model/commit-message.js.map +1 -1
  641. package/dist/workers/repository/onboarding/branch/index.js +2 -3
  642. package/dist/workers/repository/onboarding/branch/index.js.map +1 -1
  643. package/dist/workers/repository/onboarding/branch/onboarding-branch-cache.js +5 -6
  644. package/dist/workers/repository/onboarding/branch/onboarding-branch-cache.js.map +1 -1
  645. package/dist/workers/repository/onboarding/pr/config-description.js +2 -5
  646. package/dist/workers/repository/onboarding/pr/config-description.js.map +1 -1
  647. package/dist/workers/repository/onboarding/pr/index.js +3 -3
  648. package/dist/workers/repository/onboarding/pr/index.js.map +1 -1
  649. package/dist/workers/repository/package-files.js +8 -9
  650. package/dist/workers/repository/package-files.js.map +1 -1
  651. package/dist/workers/repository/process/extract-update.js +2 -2
  652. package/dist/workers/repository/process/extract-update.js.map +1 -1
  653. package/dist/workers/repository/process/fetch.js +3 -3
  654. package/dist/workers/repository/process/fetch.js.map +1 -1
  655. package/dist/workers/repository/process/lookup/current.js +2 -3
  656. package/dist/workers/repository/process/lookup/current.js.map +1 -1
  657. package/dist/workers/repository/process/lookup/filter-checks.js +4 -5
  658. package/dist/workers/repository/process/lookup/filter-checks.js.map +1 -1
  659. package/dist/workers/repository/process/lookup/generate.js +2 -3
  660. package/dist/workers/repository/process/lookup/generate.js.map +1 -1
  661. package/dist/workers/repository/process/lookup/index.js +15 -16
  662. package/dist/workers/repository/process/lookup/index.js.map +1 -1
  663. package/dist/workers/repository/process/lookup/utils.js +7 -7
  664. package/dist/workers/repository/process/lookup/utils.js.map +1 -1
  665. package/dist/workers/repository/process/vulnerabilities.js +11 -11
  666. package/dist/workers/repository/process/vulnerabilities.js.map +1 -1
  667. package/dist/workers/repository/process/write.js +2 -3
  668. package/dist/workers/repository/process/write.js.map +1 -1
  669. package/dist/workers/repository/reconfigure/comment.js +2 -5
  670. package/dist/workers/repository/reconfigure/comment.js.map +1 -1
  671. package/dist/workers/repository/reconfigure/utils.js +2 -3
  672. package/dist/workers/repository/reconfigure/utils.js.map +1 -1
  673. package/dist/workers/repository/reconfigure/validate.js +2 -3
  674. package/dist/workers/repository/reconfigure/validate.js.map +1 -1
  675. package/dist/workers/repository/update/branch/auto-replace.js +4 -5
  676. package/dist/workers/repository/update/branch/auto-replace.js.map +1 -1
  677. package/dist/workers/repository/update/branch/commit.js +3 -4
  678. package/dist/workers/repository/update/branch/commit.js.map +1 -1
  679. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +12 -5
  680. package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
  681. package/dist/workers/repository/update/branch/get-updated.js +8 -9
  682. package/dist/workers/repository/update/branch/get-updated.js.map +1 -1
  683. package/dist/workers/repository/update/branch/index.js +3 -3
  684. package/dist/workers/repository/update/branch/index.js.map +1 -1
  685. package/dist/workers/repository/update/branch/schedule.js +2 -2
  686. package/dist/workers/repository/update/branch/schedule.js.map +1 -1
  687. package/dist/workers/repository/update/pr/body/notes.js +2 -2
  688. package/dist/workers/repository/update/pr/body/notes.js.map +1 -1
  689. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js +2 -2
  690. package/dist/workers/repository/update/pr/changelog/bitbucket/index.js.map +1 -1
  691. package/dist/workers/repository/update/pr/changelog/index.js +3 -3
  692. package/dist/workers/repository/update/pr/changelog/index.js.map +1 -1
  693. package/dist/workers/repository/update/pr/changelog/release-notes.js +4 -4
  694. package/dist/workers/repository/update/pr/changelog/release-notes.js.map +1 -1
  695. package/dist/workers/repository/update/pr/changelog/source.js +8 -8
  696. package/dist/workers/repository/update/pr/changelog/source.js.map +1 -1
  697. package/dist/workers/repository/update/pr/code-owners.js +2 -2
  698. package/dist/workers/repository/update/pr/code-owners.js.map +1 -1
  699. package/dist/workers/repository/update/pr/index.js +7 -8
  700. package/dist/workers/repository/update/pr/index.js.map +1 -1
  701. package/dist/workers/repository/update/pr/labels.js +4 -4
  702. package/dist/workers/repository/update/pr/labels.js.map +1 -1
  703. package/dist/workers/repository/update/pr/participants.js +4 -5
  704. package/dist/workers/repository/update/pr/participants.js.map +1 -1
  705. package/dist/workers/repository/updates/generate.js +4 -4
  706. package/dist/workers/repository/updates/generate.js.map +1 -1
  707. package/package.json +3 -3
  708. package/renovate-schema.json +7 -2
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/ocb/extract.ts"],"names":[],"mappings":";;AAYA,gDAgDC;AAED,sCAoBC;;AAlFD,kEAAkC;AAClC,4CAAyC;AACzC,+CAA4C;AAC5C,6CAAqD;AACrD,4CAAmD;AAMnD,qCAAkD;AAElD,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB,EACnB,OAAuB;IAEvB,IAAI,UAAU,GAAqB,IAAI,CAAC;IACxC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAA,sBAAe,EAAC,OAAO,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,kBAAS,CAAC,SAAS,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,IAAI,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAE/D,OAAO;QACL,kBAAkB,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO;QAC3C,IAAI;KACL,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,MAAc,EACd,OAAe;IAEf,MAAM,IAAI,GAAwB,EAAE,CAAC;IACrC,IAAI,YAAE,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,MAAM,EAAE,CAAC;QAC7B,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,IAAI,CAAC;YACR,UAAU,EAAE,iBAAY,CAAC,EAAE;YAC3B,OAAO;YACP,OAAO;YACP,YAAY;SACb,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { parseSingleYaml } from '../../../util/yaml';\nimport { GoDatasource } from '../../datasource/go';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types';\nimport { type Module, OCBConfig } from './schema';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n _config?: ExtractConfig,\n): PackageFileContent | null {\n let definition: OCBConfig | null = null;\n try {\n const yaml = parseSingleYaml(content);\n const parsed = OCBConfig.safeParse(yaml);\n if (!parsed.success) {\n logger.trace(\n { packageFile, error: parsed.error },\n 'Failed to parse OCB schema',\n );\n return null;\n }\n\n definition = parsed.data;\n } catch (error) {\n logger.debug(\n { packageFile, error },\n 'OCB manager failed to parse file as YAML',\n );\n return null;\n }\n\n const deps: PackageDependency[] = [];\n if (definition.dist.otelcol_version) {\n deps.push({\n datasource: GoDatasource.id,\n depType: 'collector',\n depName: 'go.opentelemetry.io/collector',\n currentValue: definition.dist.otelcol_version,\n extractVersion: '^v(?<version>\\\\S+)',\n });\n }\n\n deps.push(...processModule(definition.connectors, 'connectors'));\n deps.push(...processModule(definition.exporters, 'exports'));\n deps.push(...processModule(definition.extensions, 'extensions'));\n deps.push(...processModule(definition.processors, 'processors'));\n deps.push(...processModule(definition.providers, 'providers'));\n deps.push(...processModule(definition.receivers, 'receivers'));\n\n return {\n packageFileVersion: definition.dist.version,\n deps,\n };\n}\n\nexport function processModule(\n module: Module,\n depType: string,\n): PackageDependency[] {\n const deps: PackageDependency[] = [];\n if (is.nullOrUndefined(module)) {\n return deps;\n }\n\n for (const element of module) {\n const [depName, currentValue] = element.gomod.trim().split(regEx(/\\s+/));\n deps.push({\n datasource: GoDatasource.id,\n depType,\n depName,\n currentValue,\n });\n }\n\n return deps;\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/ocb/extract.ts"],"names":[],"mappings":";;AAYA,gDAgDC;AAED,sCAoBC;AAlFD,yCAAqD;AACrD,4CAAyC;AACzC,+CAA4C;AAC5C,6CAAqD;AACrD,4CAAmD;AAMnD,qCAAkD;AAElD,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB,EACnB,OAAuB;IAEvB,IAAI,UAAU,GAAqB,IAAI,CAAC;IACxC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAA,sBAAe,EAAC,OAAO,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,kBAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,eAAM,CAAC,KAAK,CACV,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EACpC,4BAA4B,CAC7B,CAAC;YACF,OAAO,IAAI,CAAC;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Ac,EACd,OAAe;IAEf,MAAM,IAAI,GAAwB,EAAE,CAAC;IACrC,IAAI,IAAA,sBAAiB,EAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,MAAM,EAAE,CAAC;QAC7B,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,IAAI,CAAC;YACR,UAAU,EAAE,iBAAY,CAAC,EAAE;YAC3B,OAAO;YACP,OAAO;YACP,YAAY;SACb,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { isNullOrUndefined } from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { parseSingleYaml } from '../../../util/yaml';\nimport { GoDatasource } from '../../datasource/go';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types';\nimport { type Module, OCBConfig } from './schema';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n _config?: ExtractConfig,\n): PackageFileContent | null {\n let definition: OCBConfig | null = null;\n try {\n const yaml = parseSingleYaml(content);\n const parsed = OCBConfig.safeParse(yaml);\n if (!parsed.success) {\n logger.trace(\n { packageFile, error: parsed.error },\n 'Failed to parse OCB schema',\n );\n return null;\n }\n\n definition = parsed.data;\n } catch (error) {\n logger.debug(\n { packageFile, error },\n 'OCB manager failed to parse file as YAML',\n );\n return null;\n }\n\n const deps: PackageDependency[] = [];\n if (definition.dist.otelcol_version) {\n deps.push({\n datasource: GoDatasource.id,\n depType: 'collector',\n depName: 'go.opentelemetry.io/collector',\n currentValue: definition.dist.otelcol_version,\n extractVersion: '^v(?<version>\\\\S+)',\n });\n }\n\n deps.push(...processModule(definition.connectors, 'connectors'));\n deps.push(...processModule(definition.exporters, 'exports'));\n deps.push(...processModule(definition.extensions, 'extensions'));\n deps.push(...processModule(definition.processors, 'processors'));\n deps.push(...processModule(definition.providers, 'providers'));\n deps.push(...processModule(definition.receivers, 'receivers'));\n\n return {\n packageFileVersion: definition.dist.version,\n deps,\n };\n}\n\nexport function processModule(\n module: Module,\n depType: string,\n): PackageDependency[] {\n const deps: PackageDependency[] = [];\n if (isNullOrUndefined(module)) {\n return deps;\n }\n\n for (const element of module) {\n const [depName, currentValue] = element.gomod.trim().split(regEx(/\\s+/));\n deps.push({\n datasource: GoDatasource.id,\n depType,\n depName,\n currentValue,\n });\n }\n\n return deps;\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractPackageFile = extractPackageFile;
4
4
  const tslib_1 = require("tslib");
5
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
5
+ const is_1 = require("@sindresorhus/is");
6
6
  const json5_1 = tslib_1.__importDefault(require("json5"));
7
7
  const semver_1 = require("semver");
8
8
  const logger_1 = require("../../../logger");
@@ -24,7 +24,7 @@ function extractPackageFile(content, packageFile, _config) {
24
24
  }
25
25
  if (
26
26
  // for empty an empty result
27
- is_1.default.nullOrUndefined(featureModel) ||
27
+ (0, is_1.isNullOrUndefined)(featureModel) ||
28
28
  // Compendium R8 159.9: resource versioning
29
29
  !isSupportedFeatureResourceVersion(featureModel, packageFile)) {
30
30
  return null;
@@ -33,7 +33,7 @@ function extractPackageFile(content, packageFile, _config) {
33
33
  const allBundles = featureModel.bundles ?? [];
34
34
  // The 'execution-environment' key is supported by the Sling/OSGi feature model implementation
35
35
  const execEnvFramework = featureModel['execution-environment:JSON|false']?.framework;
36
- if (!is_1.default.nullOrUndefined(execEnvFramework)) {
36
+ if (!(0, is_1.isNullOrUndefined)(execEnvFramework)) {
37
37
  allBundles.push(execEnvFramework);
38
38
  }
39
39
  // parse custom sections
@@ -100,7 +100,7 @@ function isSupportedFeatureResourceVersion(featureModel, fileName) {
100
100
  }
101
101
  function extractArtifactList(sectionName, sectionValue) {
102
102
  // The 'ARTIFACTS' key is supported by the Sling/OSGi feature model implementation
103
- if (sectionName.includes(':ARTIFACTS|') && is_1.default.array(sectionValue)) {
103
+ if (sectionName.includes(':ARTIFACTS|') && (0, is_1.isArray)(sectionValue)) {
104
104
  return sectionValue;
105
105
  }
106
106
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/osgi/extract.ts"],"names":[],"mappings":";;AAYA,gDAwFC;;AApGD,kEAAkC;AAClC,0DAA0B;AAC1B,mCAA2C;AAC3C,4CAAyC;AACzC,kDAAyD;AAQzD,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB,EACnB,OAAuB;IAEvB,cAAc;IACd,2GAA2G;IAC3G,4HAA4H;IAC5H,eAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAEtD,MAAM,IAAI,GAAwB,EAAE,CAAC;IACrC,IAAI,YAA0B,CAAC;IAC/B,IAAI,CAAC;QACH,iDAAiD;QACjD,YAAY,GAAG,eAAK,CAAC,KAAK,CAAe,OAAO,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,eAAM,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,2BAA2B,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;IACE,4BAA4B;IAC5B,YAAE,CAAC,eAAe,CAAC,YAAY,CAAC;QAChC,2CAA2C;QAC3C,CAAC,iCAAiC,CAAC,YAAY,EAAE,WAAW,CAAC,EAC7D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0CAA0C;IAC1C,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,IAAI,EAAE,CAAC;IAE9C,8FAA8F;IAC9F,MAAM,gBAAgB,GACpB,YAAY,CAAC,kCAAkC,CAAC,EAAE,SAAS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AkF;IAClF,IAAI,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,YAAE,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;QAClE,OAAO,YAAwB,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport json5 from 'json5';\nimport { coerce, satisfies } from 'semver';\nimport { logger } from '../../../logger';\nimport { MavenDatasource } from '../../datasource/maven';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types';\nimport type { Bundle, FeatureModel } from './types';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n _config?: ExtractConfig,\n): PackageFileContent | null {\n // References:\n // - OSGi compendium release 8 ( https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.feature.html )\n // - The Sling implementation of the feature model ( https://sling.apache.org/documentation/development/feature-model.html )\n logger.trace(`osgi.extractPackageFile($packageFile)`);\n\n const deps: PackageDependency[] = [];\n let featureModel: FeatureModel;\n try {\n // Compendium R8 159.3: JS comments are supported\n featureModel = json5.parse<FeatureModel>(content);\n } catch (err) {\n logger.warn({ packageFile, err }, 'Failed to parse osgi file');\n return null;\n }\n\n if (\n // for empty an empty result\n is.nullOrUndefined(featureModel) ||\n // Compendium R8 159.9: resource versioning\n !isSupportedFeatureResourceVersion(featureModel, packageFile)\n ) {\n return null;\n }\n\n // OSGi Compendium R8 159.4: bundles entry\n const allBundles = featureModel.bundles ?? [];\n\n // The 'execution-environment' key is supported by the Sling/OSGi feature model implementation\n const execEnvFramework =\n featureModel['execution-environment:JSON|false']?.framework;\n if (!is.nullOrUndefined(execEnvFramework)) {\n allBundles.push(execEnvFramework);\n }\n\n // parse custom sections\n //\n // Note: we do not support artifact list extensions as defined in\n // section 159.7.3 yet. As of 05-12-2022, there is no implementation that\n // supports this\n for (const [section, value] of Object.entries(featureModel)) {\n logger.trace({ fileName: packageFile, section }, 'Parsing section');\n const customSectionEntries = extractArtifactList(section, value);\n allBundles.push(...customSectionEntries);\n }\n\n // convert bundles to dependencies\n for (const entry of allBundles) {\n const rawGav = typeof entry === 'string' ? entry : entry.id;\n // skip invalid definitions, such as objects without an id set\n if (!rawGav) {\n continue;\n }\n\n // both '/' and ':' are valid separators, but the Maven datasource\n // expects the separator to be ':'\n const gav = rawGav.replace(/\\//g, ':');\n\n // identifiers support 3-5 parts, see OSGi R8 - 159.2.1 Identifiers\n // groupId ':' artifactId ( ':' type ( ':' classifier )? )? ':' version\n const parts = gav.split(':');\n if (parts.length < 3 || parts.length > 5) {\n deps.push({\n depName: gav,\n skipReason: 'invalid-value',\n });\n continue;\n }\n // parsing should use the last entry for the version\n const currentValue = parts[parts.length - 1];\n const result: PackageDependency = {\n datasource: MavenDatasource.id,\n depName: `${parts[0]}:${parts[1]}`,\n };\n if (currentValue.includes('${')) {\n result.skipReason = 'contains-variable';\n } else {\n result.currentValue = currentValue;\n }\n\n deps.push(result);\n }\n\n return deps.length ? { deps } : null;\n}\n\nfunction isSupportedFeatureResourceVersion(\n featureModel: FeatureModel,\n fileName: string,\n): boolean {\n const resourceVersion = featureModel['feature-resource-version'];\n if (resourceVersion) {\n const resourceSemVer = coerce(resourceVersion);\n if (!resourceSemVer) {\n logger.debug(\n `Skipping file ${fileName} due to invalid feature-resource-version '${resourceVersion}'`,\n );\n return false;\n }\n\n // we only support 1.x, although no over version has been defined\n if (!satisfies(resourceSemVer, '^1')) {\n logger.debug(\n `Skipping file ${fileName} due to unsupported feature-resource-version '${resourceVersion}'`,\n );\n return false;\n }\n }\n\n return true;\n}\n\nfunction extractArtifactList(\n sectionName: string,\n sectionValue: unknown,\n): Bundle[] {\n // The 'ARTIFACTS' key is supported by the Sling/OSGi feature model implementation\n if (sectionName.includes(':ARTIFACTS|') && is.array(sectionValue)) {\n return sectionValue as Bundle[];\n }\n\n return [];\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/osgi/extract.ts"],"names":[],"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B,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;QACrC,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AACvC,CAAC;AAED,SAAS,iCAAiC,CACxC,YAA0B,EAC1B,QAAgB;IAEhB,MAAM,eAAe,GAAG,YAAY,CAAC,0BAA0B,CAAC,CAAC;IACjE,IAAI,eAAe,EAAE,CAAC;QACpB,MAAM,cAAc,GAAG,IAAA,eAAM,EAAC,eAAe,CAAC,CAAC;QAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,eAAM,CAAC,KAAK,CACV,iBAAiB,QAAQ,6CAA6C,eAAe,GAAG,CACzF,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;QAED,iEAAiE;QACjE,IAAI,CAAC,IAAA,kBAAS,EAAC,cAAc,EAAE,IAAI,CAAC,EAAE,CAAC;YACrC,eAAM,CAAC,KAAK,CACV,iBAAiB,QAAQ,iDAAiD,eAAe,GAAG,CAC7F,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,mBAAmB,CAC1B,WAAmB,EACnB,YAAqB;IAErB,kFAAkF;IAClF,IAAI,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,IAAA,YAAO,EAAC,YAAY,CAAC,EAAE,CAAC;QACjE,OAAO,YAAwB,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { isArray, isNullOrUndefined } from '@sindresorhus/is';\nimport json5 from 'json5';\nimport { coerce, satisfies } from 'semver';\nimport { logger } from '../../../logger';\nimport { MavenDatasource } from '../../datasource/maven';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFileContent,\n} from '../types';\nimport type { Bundle, FeatureModel } from './types';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n _config?: ExtractConfig,\n): PackageFileContent | null {\n // References:\n // - OSGi compendium release 8 ( https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.feature.html )\n // - The Sling implementation of the feature model ( https://sling.apache.org/documentation/development/feature-model.html )\n logger.trace(`osgi.extractPackageFile($packageFile)`);\n\n const deps: PackageDependency[] = [];\n let featureModel: FeatureModel;\n try {\n // Compendium R8 159.3: JS comments are supported\n featureModel = json5.parse<FeatureModel>(content);\n } catch (err) {\n logger.warn({ packageFile, err }, 'Failed to parse osgi file');\n return null;\n }\n\n if (\n // for empty an empty result\n isNullOrUndefined(featureModel) ||\n // Compendium R8 159.9: resource versioning\n !isSupportedFeatureResourceVersion(featureModel, packageFile)\n ) {\n return null;\n }\n\n // OSGi Compendium R8 159.4: bundles entry\n const allBundles = featureModel.bundles ?? [];\n\n // The 'execution-environment' key is supported by the Sling/OSGi feature model implementation\n const execEnvFramework =\n featureModel['execution-environment:JSON|false']?.framework;\n if (!isNullOrUndefined(execEnvFramework)) {\n allBundles.push(execEnvFramework);\n }\n\n // parse custom sections\n //\n // Note: we do not support artifact list extensions as defined in\n // section 159.7.3 yet. As of 05-12-2022, there is no implementation that\n // supports this\n for (const [section, value] of Object.entries(featureModel)) {\n logger.trace({ fileName: packageFile, section }, 'Parsing section');\n const customSectionEntries = extractArtifactList(section, value);\n allBundles.push(...customSectionEntries);\n }\n\n // convert bundles to dependencies\n for (const entry of allBundles) {\n const rawGav = typeof entry === 'string' ? entry : entry.id;\n // skip invalid definitions, such as objects without an id set\n if (!rawGav) {\n continue;\n }\n\n // both '/' and ':' are valid separators, but the Maven datasource\n // expects the separator to be ':'\n const gav = rawGav.replace(/\\//g, ':');\n\n // identifiers support 3-5 parts, see OSGi R8 - 159.2.1 Identifiers\n // groupId ':' artifactId ( ':' type ( ':' classifier )? )? ':' version\n const parts = gav.split(':');\n if (parts.length < 3 || parts.length > 5) {\n deps.push({\n depName: gav,\n skipReason: 'invalid-value',\n });\n continue;\n }\n // parsing should use the last entry for the version\n const currentValue = parts[parts.length - 1];\n const result: PackageDependency = {\n datasource: MavenDatasource.id,\n depName: `${parts[0]}:${parts[1]}`,\n };\n if (currentValue.includes('${')) {\n result.skipReason = 'contains-variable';\n } else {\n result.currentValue = currentValue;\n }\n\n deps.push(result);\n }\n\n return deps.length ? { deps } : null;\n}\n\nfunction isSupportedFeatureResourceVersion(\n featureModel: FeatureModel,\n fileName: string,\n): boolean {\n const resourceVersion = featureModel['feature-resource-version'];\n if (resourceVersion) {\n const resourceSemVer = coerce(resourceVersion);\n if (!resourceSemVer) {\n logger.debug(\n `Skipping file ${fileName} due to invalid feature-resource-version '${resourceVersion}'`,\n );\n return false;\n }\n\n // we only support 1.x, although no over version has been defined\n if (!satisfies(resourceSemVer, '^1')) {\n logger.debug(\n `Skipping file ${fileName} due to unsupported feature-resource-version '${resourceVersion}'`,\n );\n return false;\n }\n }\n\n return true;\n}\n\nfunction extractArtifactList(\n sectionName: string,\n sectionValue: unknown,\n): Bundle[] {\n // The 'ARTIFACTS' key is supported by the Sling/OSGi feature model implementation\n if (sectionName.includes(':ARTIFACTS|') && isArray(sectionValue)) {\n return sectionValue as Bundle[];\n }\n\n return [];\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateArtifacts = updateArtifacts;
4
- const tslib_1 = require("tslib");
5
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
4
+ const is_1 = require("@sindresorhus/is");
6
5
  const fs_1 = require("../../../util/fs");
7
6
  const extract_1 = require("./extract");
8
7
  const processors_1 = require("./processors");
@@ -10,7 +9,7 @@ async function updateArtifacts(updateArtifact) {
10
9
  const { packageFileName, newPackageFileContent } = updateArtifact;
11
10
  await (0, fs_1.writeLocalFile)(packageFileName, newPackageFileContent);
12
11
  const project = (0, extract_1.parsePyProject)(newPackageFileContent, packageFileName);
13
- if (is_1.default.nullOrUndefined(project)) {
12
+ if ((0, is_1.isNullOrUndefined)(project)) {
14
13
  return [
15
14
  {
16
15
  artifactError: {
@@ -23,7 +22,7 @@ async function updateArtifacts(updateArtifact) {
23
22
  const result = [];
24
23
  for (const processor of processors_1.processors) {
25
24
  const artifactUpdates = await processor.updateArtifacts(updateArtifact, project);
26
- if (is_1.default.array(artifactUpdates)) {
25
+ if ((0, is_1.isArray)(artifactUpdates)) {
27
26
  result.push(...artifactUpdates);
28
27
  }
29
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep621/artifacts.ts"],"names":[],"mappings":";;AAMA,0CA+BC;;AArCD,kEAAkC;AAClC,yCAAkD;AAElD,uCAA2C;AAC3C,6CAA0C;AAEnC,KAAK,UAAU,eAAe,CACnC,cAA8B;IAE9B,MAAM,EAAE,eAAe,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAElE,MAAM,IAAA,mBAAc,EAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,IAAA,wBAAc,EAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;IACvE,IAAI,YAAE,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,MAAM,EAAE,0CAA0C;iBACnD;aACF;SACF,CAAC;IACJ,CAAC;IAED,6BAA6B;IAC7B,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,SAAS,IAAI,uBAAU,EAAE,CAAC;QACnC,MAAM,eAAe,GAAG,MAAM,SAAS,CAAC,eAAe,CACrD,cAAc,EACd,OAAO,CACR,CAAC;QACF,IAAI,YAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { writeLocalFile } from '../../../util/fs';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { parsePyProject } from './extract';\nimport { processors } from './processors';\n\nexport async function updateArtifacts(\n updateArtifact: UpdateArtifact,\n): Promise<UpdateArtifactsResult[] | null> {\n const { packageFileName, newPackageFileContent } = updateArtifact;\n\n await writeLocalFile(packageFileName, newPackageFileContent);\n\n const project = parsePyProject(newPackageFileContent, packageFileName);\n if (is.nullOrUndefined(project)) {\n return [\n {\n artifactError: {\n stderr: 'Failed to parse new package file content',\n },\n },\n ];\n }\n\n // process specific tool sets\n const result: UpdateArtifactsResult[] = [];\n for (const processor of processors) {\n const artifactUpdates = await processor.updateArtifacts(\n updateArtifact,\n project,\n );\n if (is.array(artifactUpdates)) {\n result.push(...artifactUpdates);\n }\n }\n\n return result.length > 0 ? result : null;\n}\n"]}
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep621/artifacts.ts"],"names":[],"mappings":";;AAMA,0CA+BC;AArCD,yCAA8D;AAC9D,yCAAkD;AAElD,uCAA2C;AAC3C,6CAA0C;AAEnC,KAAK,UAAU,eAAe,CACnC,cAA8B;IAE9B,MAAM,EAAE,eAAe,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAElE,MAAM,IAAA,mBAAc,EAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,IAAA,wBAAc,EAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;IACvE,IAAI,IAAA,sBAAiB,EAAC,OAAO,CAAC,EAAE,CAAC;QAC/B,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,MAAM,EAAE,0CAA0C;iBACnD;aACF;SACF,CAAC;IACJ,CAAC;IAED,6BAA6B;IAC7B,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,SAAS,IAAI,uBAAU,EAAE,CAAC;QACnC,MAAM,eAAe,GAAG,MAAM,SAAS,CAAC,eAAe,CACrD,cAAc,EACd,OAAO,CACR,CAAC;QACF,IAAI,IAAA,YAAO,EAAC,eAAe,CAAC,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC","sourcesContent":["import { isArray, isNullOrUndefined } from '@sindresorhus/is';\nimport { writeLocalFile } from '../../../util/fs';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { parsePyProject } from './extract';\nimport { processors } from './processors';\n\nexport async function updateArtifacts(\n updateArtifact: UpdateArtifact,\n): Promise<UpdateArtifactsResult[] | null> {\n const { packageFileName, newPackageFileContent } = updateArtifact;\n\n await writeLocalFile(packageFileName, newPackageFileContent);\n\n const project = parsePyProject(newPackageFileContent, packageFileName);\n if (isNullOrUndefined(project)) {\n return [\n {\n artifactError: {\n stderr: 'Failed to parse new package file content',\n },\n },\n ];\n }\n\n // process specific tool sets\n const result: UpdateArtifactsResult[] = [];\n for (const processor of processors) {\n const artifactUpdates = await processor.updateArtifacts(\n updateArtifact,\n project,\n );\n if (isArray(artifactUpdates)) {\n result.push(...artifactUpdates);\n }\n }\n\n return result.length > 0 ? result : null;\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UvProcessor = void 0;
4
- const tslib_1 = require("tslib");
5
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
4
+ const is_1 = require("@sindresorhus/is");
6
5
  const shlex_1 = require("shlex");
7
6
  const error_messages_1 = require("../../../../constants/error-messages");
8
7
  const logger_1 = require("../../../../logger");
@@ -251,7 +250,7 @@ async function getUvExtraIndexUrl(project, deps) {
251
250
  return !sources || !(packageName in sources);
252
251
  })
253
252
  .flatMap((dep) => dep.registryUrls)
254
- .filter(is_1.default.string)
253
+ .filter(is_1.isString)
255
254
  .filter((registryUrl) => {
256
255
  // Check if the registry URL is not the default one and not already configured
257
256
  const configuredIndexUrls = project.tool?.uv?.index?.map(({ url }) => url) ?? [];
@@ -1 +1 @@
1
- {"version":3,"file":"uv.js","sourceRoot":"","sources":["../../../../../lib/modules/manager/pep621/processors/uv.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,iCAA8B;AAC9B,yEAAuE;AACvE,+CAA4C;AAE5C,gDAA6C;AAE7C,4CAA8E;AAC9E,oDAAuE;AACvE,4DAAmD;AACnD,oDAAiD;AACjD,8CAAgD;AAChD,mDAA0D;AAC1D,mDAAiE;AAOjE,qCAA4C;AAC5C,sCAAuD;AACvD,oCAAoC;AAEpC,yCAAoD;AAEpD,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,MAAa,WAAY,SAAQ,iCAAsB;IAC5C,YAAY,GAAG,SAAS,CAAC;IAElC,OAAO,CAAC,OAAkB,EAAE,IAAyB;QACnD,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5B,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,kBAAkB,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,CACvC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,CAC3C,CAAC;QACF,MAAM,YAAY,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,CACjC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAC5C,CAAC;QACF,MAAM,iB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AW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;QAE3D,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,IAAI,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;QACxD,CAAC;QAED,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,IAAI,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../../constants/error-messages';\nimport { logger } from '../../../../logger';\nimport type { HostRule } from '../../../../types';\nimport { exec } from '../../../../util/exec';\nimport type { ExecOptions, ToolConstraint } from '../../../../util/exec/types';\nimport { findLocalSiblingOrParent, readLocalFile } from '../../../../util/fs';\nimport { getGitEnvironmentVariables } from '../../../../util/git/auth';\nimport { find } from '../../../../util/host-rules';\nimport { Result } from '../../../../util/result';\nimport { parseUrl } from '../../../../util/url';\nimport { PypiDatasource } from '../../../datasource/pypi';\nimport { getGoogleAuthHostRule } from '../../../datasource/util';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsResult,\n Upgrade,\n} from '../../types';\nimport { applyGitSource } from '../../util';\nimport { type PyProject, UvLockfile } from '../schema';\nimport { depTypes } from '../utils';\n\nimport { BasePyProjectProcessor } from './abstract';\n\nconst uvUpdateCMD = 'uv lock';\n\nexport class UvProcessor extends BasePyProjectProcessor {\n override lockfileName = 'uv.lock';\n\n process(project: PyProject, deps: PackageDependency[]): PackageDependency[] {\n const uv = project.tool?.uv;\n if (!uv) {\n return deps;\n }\n\n const hasExplicitDefault = uv.index?.some(\n (index) => index.default && index.explicit,\n );\n const defaultIndex = uv.index?.find(\n (index) => index.default && !index.explicit,\n );\n const implicitIndexUrls = uv.index\n ?.filter((index) => !index.explicit && index.name !== defaultIndex?.name)\n ?.map(({ url }) => url);\n\n const devDependencies = uv['dev-dependencies'];\n if (devDependencies) {\n deps.push(...devDependencies);\n }\n\n // https://docs.astral.sh/uv/concepts/dependencies/#dependency-sources\n // Skip sources that do not make sense to handle (e.g. path).\n if (uv.sources || defaultIndex || implicitIndexUrls) {\n for (const dep of deps) {\n /* v8 ignore next 3 -- needs test */\n if (!dep.packageName) {\n continue;\n }\n\n if (dep.depType === 'requires-python') {\n continue;\n }\n\n // Using `packageName` as it applies PEP 508 normalization, which is\n // also applied by uv when matching a source to a dependency.\n const depSource = uv.sources?.[dep.packageName];\n if (depSource) {\n // Dependency is pinned to a specific source.\n dep.depType = depTypes.uvSources;\n if ('index' in depSource) {\n const index = uv.index?.find(\n ({ name }) => name === depSource.index,\n );\n if (index) {\n dep.registryUrls = [index.url];\n }\n } else if ('git' in depSource) {\n applyGitSource(\n dep,\n depSource.git,\n depSource.rev,\n depSource.tag,\n depSource.branch,\n );\n } else if ('url' in depSource) {\n dep.skipReason = 'unsupported-url';\n } else if ('path' in depSource) {\n dep.skipReason = 'path-dependency';\n } else if ('workspace' in depSource) {\n dep.skipReason = 'inherited-dependency';\n /* v8 ignore next 3 -- needs test */\n } else {\n dep.skipReason = 'unknown-registry';\n }\n } else {\n // Dependency is not pinned to a specific source, so we need to\n // determine the source based on the index configuration.\n if (hasExplicitDefault) {\n // don't fall back to pypi if there is an explicit default index\n dep.registryUrls = [];\n } else if (defaultIndex) {\n // There is a default index configured, so use it.\n dep.registryUrls = [defaultIndex.url];\n }\n\n if (implicitIndexUrls?.length) {\n // If there are implicit indexes, check them first and fall back\n // to the default.\n dep.registryUrls = implicitIndexUrls.concat(\n dep.registryUrls ?? PypiDatasource.defaultURL,\n );\n }\n }\n }\n }\n\n return deps;\n }\n\n async extractLockedVersions(\n project: PyProject,\n deps: PackageDependency[],\n packageFile: string,\n ): Promise<PackageDependency[]> {\n const lockFileName = await findLocalSiblingOrParent(\n packageFile,\n this.lockfileName,\n );\n if (lockFileName === null) {\n logger.debug({ packageFile }, `No uv lock file found`);\n } else {\n const lockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (lockFileContent) {\n const { val: lockFileMapping, err } = Result.parse(\n lockFileContent,\n UvLockfile,\n ).unwrap();\n\n if (err) {\n logger.debug({ packageFile, err }, `Error parsing uv lock file`);\n } else {\n for (const dep of deps) {\n const packageName = dep.packageName;\n if (packageName && packageName in lockFileMapping) {\n dep.lockedVersion = lockFileMapping[packageName];\n }\n }\n }\n }\n }\n\n return Promise.resolve(deps);\n }\n\n async updateArtifacts(\n updateArtifact: UpdateArtifact,\n project: PyProject,\n ): Promise<UpdateArtifactsResult[] | null> {\n const { config, updatedDeps, packageFileName } = updateArtifact;\n\n const { isLockFileMaintenance } = config;\n\n // abort if no lockfile is defined\n const lockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'uv.lock',\n );\n if (lockFileName === null) {\n logger.debug({ packageFileName }, `No uv lock file found`);\n return null;\n }\n try {\n const existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug('No uv.lock found');\n return null;\n }\n\n const pythonConstraint: ToolConstraint = {\n toolName: 'python',\n constraint:\n config.constraints?.python ?? project.project?.['requires-python'],\n };\n const uvConstraint: ToolConstraint = {\n toolName: 'uv',\n constraint:\n config.constraints?.uv ?? project.tool?.uv?.['required-version'],\n };\n\n const extraEnv = {\n ...getGitEnvironmentVariables(['pep621']),\n ...(await getUvExtraIndexUrl(project, updateArtifact.updatedDeps)),\n ...(await getUvIndexCredentials(project)),\n };\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [pythonConstraint, uvConstraint],\n };\n\n // on lockFileMaintenance do not specify any packages and update the complete lock file\n // else only update specific packages\n let cmd: string;\n if (isLockFileMaintenance) {\n cmd = `${uvUpdateCMD} --upgrade`;\n } else {\n cmd = generateCMD(updatedDeps);\n }\n await exec(cmd, execOptions);\n\n // check for changes\n const fileChanges: UpdateArtifactsResult[] = [];\n const newLockContent = await readLocalFile(lockFileName, 'utf8');\n const isLockFileChanged = existingLockFileContent !== newLockContent;\n if (isLockFileChanged) {\n fileChanges.push({\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newLockContent,\n },\n });\n } else {\n logger.debug('uv.lock is unchanged');\n }\n\n return fileChanges.length ? fileChanges : null;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update uv lock file');\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n }\n}\n\nfunction generateCMD(updatedDeps: Upgrade[]): string {\n const deps: string[] = [];\n\n for (const dep of updatedDeps) {\n switch (dep.depType) {\n case depTypes.optionalDependencies: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.uvDevDependencies:\n case depTypes.uvSources: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.buildSystemRequires:\n // build requirements are not locked in the lock files, no need to update.\n break;\n default: {\n deps.push(dep.packageName!);\n }\n }\n }\n\n return `${uvUpdateCMD} ${deps.map((dep) => `--upgrade-package ${quote(dep)}`).join(' ')}`;\n}\n\nfunction getMatchingHostRule(url: string | undefined): HostRule {\n return find({ hostType: PypiDatasource.id, url });\n}\n\nasync function getUsernamePassword(\n url: URL,\n): Promise<{ username?: string; password?: string }> {\n const rule = getMatchingHostRule(url.toString());\n if (rule.username || rule.password) {\n return rule;\n }\n\n if (url.hostname.endsWith('.pkg.dev')) {\n const hostRule = await getGoogleAuthHostRule();\n if (hostRule) {\n return hostRule;\n } else {\n logger.once.debug({ url }, 'Could not get Google access token');\n }\n }\n\n return {};\n}\n\nasync function getUvExtraIndexUrl(\n project: PyProject,\n deps: Upgrade[],\n): Promise<NodeJS.ProcessEnv> {\n const pyPiRegistryUrls = deps\n .filter((dep) => dep.datasource === PypiDatasource.id)\n .filter((dep) => {\n // Remove dependencies that are pinned to a specific index\n const sources = project.tool?.uv?.sources;\n const packageName = dep.packageName!;\n return !sources || !(packageName in sources);\n })\n .flatMap((dep) => dep.registryUrls)\n .filter(is.string)\n .filter((registryUrl) => {\n // Check if the registry URL is not the default one and not already configured\n const configuredIndexUrls =\n project.tool?.uv?.index?.map(({ url }) => url) ?? [];\n return (\n registryUrl !== PypiDatasource.defaultURL &&\n !configuredIndexUrls.includes(registryUrl)\n );\n });\n\n const registryUrls = new Set(pyPiRegistryUrls);\n const extraIndexUrls: string[] = [];\n\n for (const registryUrl of registryUrls) {\n const parsedUrl = parseUrl(registryUrl);\n if (!parsedUrl) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n if (username || password) {\n if (username) {\n parsedUrl.username = username;\n }\n if (password) {\n parsedUrl.password = password;\n }\n }\n\n extraIndexUrls.push(parsedUrl.toString());\n }\n\n return {\n UV_EXTRA_INDEX_URL: extraIndexUrls.join(' '),\n };\n}\n\nasync function getUvIndexCredentials(\n project: PyProject,\n): Promise<NodeJS.ProcessEnv> {\n const uv_indexes = project.tool?.uv?.index;\n\n if (!uv_indexes) {\n return {};\n }\n\n const entries = [];\n\n for (const { name, url } of uv_indexes) {\n const parsedUrl = parseUrl(url);\n /* v8 ignore next 3 -- needs test */\n if (!parsedUrl) {\n continue;\n }\n\n // If no name is provided for the index, authentication information must be passed through alternative methods\n if (!name) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n\n const NAME = name.toUpperCase().replace(/[^A-Z0-9]/g, '_');\n\n if (username) {\n entries.push([`UV_INDEX_${NAME}_USERNAME`, username]);\n }\n\n if (password) {\n entries.push([`UV_INDEX_${NAME}_PASSWORD`, password]);\n }\n }\n\n return Object.fromEntries(entries);\n}\n"]}
1
+ {"version":3,"file":"uv.js","sourceRoot":"","sources":["../../../../../lib/modules/manager/pep621/processors/uv.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,iCAA8B;AAC9B,yEAAuE;AACvE,+C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error-messages';\nimport { logger } from '../../../../logger';\nimport type { HostRule } from '../../../../types';\nimport { exec } from '../../../../util/exec';\nimport type { ExecOptions, ToolConstraint } from '../../../../util/exec/types';\nimport { findLocalSiblingOrParent, readLocalFile } from '../../../../util/fs';\nimport { getGitEnvironmentVariables } from '../../../../util/git/auth';\nimport { find } from '../../../../util/host-rules';\nimport { Result } from '../../../../util/result';\nimport { parseUrl } from '../../../../util/url';\nimport { PypiDatasource } from '../../../datasource/pypi';\nimport { getGoogleAuthHostRule } from '../../../datasource/util';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsResult,\n Upgrade,\n} from '../../types';\nimport { applyGitSource } from '../../util';\nimport { type PyProject, UvLockfile } from '../schema';\nimport { depTypes } from '../utils';\n\nimport { BasePyProjectProcessor } from './abstract';\n\nconst uvUpdateCMD = 'uv lock';\n\nexport class UvProcessor extends BasePyProjectProcessor {\n override lockfileName = 'uv.lock';\n\n process(project: PyProject, deps: PackageDependency[]): PackageDependency[] {\n const uv = project.tool?.uv;\n if (!uv) {\n return deps;\n }\n\n const hasExplicitDefault = uv.index?.some(\n (index) => index.default && index.explicit,\n );\n const defaultIndex = uv.index?.find(\n (index) => index.default && !index.explicit,\n );\n const implicitIndexUrls = uv.index\n ?.filter((index) => !index.explicit && index.name !== defaultIndex?.name)\n ?.map(({ url }) => url);\n\n const devDependencies = uv['dev-dependencies'];\n if (devDependencies) {\n deps.push(...devDependencies);\n }\n\n // https://docs.astral.sh/uv/concepts/dependencies/#dependency-sources\n // Skip sources that do not make sense to handle (e.g. path).\n if (uv.sources || defaultIndex || implicitIndexUrls) {\n for (const dep of deps) {\n /* v8 ignore next 3 -- needs test */\n if (!dep.packageName) {\n continue;\n }\n\n if (dep.depType === 'requires-python') {\n continue;\n }\n\n // Using `packageName` as it applies PEP 508 normalization, which is\n // also applied by uv when matching a source to a dependency.\n const depSource = uv.sources?.[dep.packageName];\n if (depSource) {\n // Dependency is pinned to a specific source.\n dep.depType = depTypes.uvSources;\n if ('index' in depSource) {\n const index = uv.index?.find(\n ({ name }) => name === depSource.index,\n );\n if (index) {\n dep.registryUrls = [index.url];\n }\n } else if ('git' in depSource) {\n applyGitSource(\n dep,\n depSource.git,\n depSource.rev,\n depSource.tag,\n depSource.branch,\n );\n } else if ('url' in depSource) {\n dep.skipReason = 'unsupported-url';\n } else if ('path' in depSource) {\n dep.skipReason = 'path-dependency';\n } else if ('workspace' in depSource) {\n dep.skipReason = 'inherited-dependency';\n /* v8 ignore next 3 -- needs test */\n } else {\n dep.skipReason = 'unknown-registry';\n }\n } else {\n // Dependency is not pinned to a specific source, so we need to\n // determine the source based on the index configuration.\n if (hasExplicitDefault) {\n // don't fall back to pypi if there is an explicit default index\n dep.registryUrls = [];\n } else if (defaultIndex) {\n // There is a default index configured, so use it.\n dep.registryUrls = [defaultIndex.url];\n }\n\n if (implicitIndexUrls?.length) {\n // If there are implicit indexes, check them first and fall back\n // to the default.\n dep.registryUrls = implicitIndexUrls.concat(\n dep.registryUrls ?? PypiDatasource.defaultURL,\n );\n }\n }\n }\n }\n\n return deps;\n }\n\n async extractLockedVersions(\n project: PyProject,\n deps: PackageDependency[],\n packageFile: string,\n ): Promise<PackageDependency[]> {\n const lockFileName = await findLocalSiblingOrParent(\n packageFile,\n this.lockfileName,\n );\n if (lockFileName === null) {\n logger.debug({ packageFile }, `No uv lock file found`);\n } else {\n const lockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (lockFileContent) {\n const { val: lockFileMapping, err } = Result.parse(\n lockFileContent,\n UvLockfile,\n ).unwrap();\n\n if (err) {\n logger.debug({ packageFile, err }, `Error parsing uv lock file`);\n } else {\n for (const dep of deps) {\n const packageName = dep.packageName;\n if (packageName && packageName in lockFileMapping) {\n dep.lockedVersion = lockFileMapping[packageName];\n }\n }\n }\n }\n }\n\n return Promise.resolve(deps);\n }\n\n async updateArtifacts(\n updateArtifact: UpdateArtifact,\n project: PyProject,\n ): Promise<UpdateArtifactsResult[] | null> {\n const { config, updatedDeps, packageFileName } = updateArtifact;\n\n const { isLockFileMaintenance } = config;\n\n // abort if no lockfile is defined\n const lockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'uv.lock',\n );\n if (lockFileName === null) {\n logger.debug({ packageFileName }, `No uv lock file found`);\n return null;\n }\n try {\n const existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug('No uv.lock found');\n return null;\n }\n\n const pythonConstraint: ToolConstraint = {\n toolName: 'python',\n constraint:\n config.constraints?.python ?? project.project?.['requires-python'],\n };\n const uvConstraint: ToolConstraint = {\n toolName: 'uv',\n constraint:\n config.constraints?.uv ?? project.tool?.uv?.['required-version'],\n };\n\n const extraEnv = {\n ...getGitEnvironmentVariables(['pep621']),\n ...(await getUvExtraIndexUrl(project, updateArtifact.updatedDeps)),\n ...(await getUvIndexCredentials(project)),\n };\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [pythonConstraint, uvConstraint],\n };\n\n // on lockFileMaintenance do not specify any packages and update the complete lock file\n // else only update specific packages\n let cmd: string;\n if (isLockFileMaintenance) {\n cmd = `${uvUpdateCMD} --upgrade`;\n } else {\n cmd = generateCMD(updatedDeps);\n }\n await exec(cmd, execOptions);\n\n // check for changes\n const fileChanges: UpdateArtifactsResult[] = [];\n const newLockContent = await readLocalFile(lockFileName, 'utf8');\n const isLockFileChanged = existingLockFileContent !== newLockContent;\n if (isLockFileChanged) {\n fileChanges.push({\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newLockContent,\n },\n });\n } else {\n logger.debug('uv.lock is unchanged');\n }\n\n return fileChanges.length ? fileChanges : null;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update uv lock file');\n return [\n {\n artifactError: {\n lockFile: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n }\n}\n\nfunction generateCMD(updatedDeps: Upgrade[]): string {\n const deps: string[] = [];\n\n for (const dep of updatedDeps) {\n switch (dep.depType) {\n case depTypes.optionalDependencies: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.uvDevDependencies:\n case depTypes.uvSources: {\n deps.push(dep.depName!);\n break;\n }\n case depTypes.buildSystemRequires:\n // build requirements are not locked in the lock files, no need to update.\n break;\n default: {\n deps.push(dep.packageName!);\n }\n }\n }\n\n return `${uvUpdateCMD} ${deps.map((dep) => `--upgrade-package ${quote(dep)}`).join(' ')}`;\n}\n\nfunction getMatchingHostRule(url: string | undefined): HostRule {\n return find({ hostType: PypiDatasource.id, url });\n}\n\nasync function getUsernamePassword(\n url: URL,\n): Promise<{ username?: string; password?: string }> {\n const rule = getMatchingHostRule(url.toString());\n if (rule.username || rule.password) {\n return rule;\n }\n\n if (url.hostname.endsWith('.pkg.dev')) {\n const hostRule = await getGoogleAuthHostRule();\n if (hostRule) {\n return hostRule;\n } else {\n logger.once.debug({ url }, 'Could not get Google access token');\n }\n }\n\n return {};\n}\n\nasync function getUvExtraIndexUrl(\n project: PyProject,\n deps: Upgrade[],\n): Promise<NodeJS.ProcessEnv> {\n const pyPiRegistryUrls = deps\n .filter((dep) => dep.datasource === PypiDatasource.id)\n .filter((dep) => {\n // Remove dependencies that are pinned to a specific index\n const sources = project.tool?.uv?.sources;\n const packageName = dep.packageName!;\n return !sources || !(packageName in sources);\n })\n .flatMap((dep) => dep.registryUrls)\n .filter(isString)\n .filter((registryUrl) => {\n // Check if the registry URL is not the default one and not already configured\n const configuredIndexUrls =\n project.tool?.uv?.index?.map(({ url }) => url) ?? [];\n return (\n registryUrl !== PypiDatasource.defaultURL &&\n !configuredIndexUrls.includes(registryUrl)\n );\n });\n\n const registryUrls = new Set(pyPiRegistryUrls);\n const extraIndexUrls: string[] = [];\n\n for (const registryUrl of registryUrls) {\n const parsedUrl = parseUrl(registryUrl);\n if (!parsedUrl) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n if (username || password) {\n if (username) {\n parsedUrl.username = username;\n }\n if (password) {\n parsedUrl.password = password;\n }\n }\n\n extraIndexUrls.push(parsedUrl.toString());\n }\n\n return {\n UV_EXTRA_INDEX_URL: extraIndexUrls.join(' '),\n };\n}\n\nasync function getUvIndexCredentials(\n project: PyProject,\n): Promise<NodeJS.ProcessEnv> {\n const uv_indexes = project.tool?.uv?.index;\n\n if (!uv_indexes) {\n return {};\n }\n\n const entries = [];\n\n for (const { name, url } of uv_indexes) {\n const parsedUrl = parseUrl(url);\n /* v8 ignore next 3 -- needs test */\n if (!parsedUrl) {\n continue;\n }\n\n // If no name is provided for the index, authentication information must be passed through alternative methods\n if (!name) {\n continue;\n }\n\n const { username, password } = await getUsernamePassword(parsedUrl);\n\n const NAME = name.toUpperCase().replace(/[^A-Z0-9]/g, '_');\n\n if (username) {\n entries.push([`UV_INDEX_${NAME}_USERNAME`, username]);\n }\n\n if (password) {\n entries.push([`UV_INDEX_${NAME}_PASSWORD`, password]);\n }\n }\n\n return Object.fromEntries(entries);\n}\n"]}
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.depTypes = void 0;
4
4
  exports.parsePEP508 = parsePEP508;
5
5
  exports.pep508ToPackageDependency = pep508ToPackageDependency;
6
- const tslib_1 = require("tslib");
7
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
6
+ const is_1 = require("@sindresorhus/is");
8
7
  const logger_1 = require("../../../logger");
9
8
  const regex_1 = require("../../../util/regex");
10
9
  const pypi_1 = require("../../datasource/pypi");
@@ -20,19 +19,18 @@ exports.depTypes = {
20
19
  buildSystemRequires: 'build-system.requires',
21
20
  };
22
21
  function parsePEP508(value) {
23
- if (is_1.default.nullOrUndefined(value)) {
22
+ if ((0, is_1.isNullOrUndefined)(value)) {
24
23
  return null;
25
24
  }
26
25
  const regExpExec = pep508Regex.exec(value);
27
- if (is_1.default.nullOrUndefined(regExpExec) ||
28
- is_1.default.nullOrUndefined(regExpExec?.groups)) {
26
+ if ((0, is_1.isNullOrUndefined)(regExpExec) || (0, is_1.isNullOrUndefined)(regExpExec?.groups)) {
29
27
  logger_1.logger.trace(`Pep508 could not be extracted`);
30
28
  return null;
31
29
  }
32
30
  const result = {
33
31
  packageName: regExpExec.groups.packageName,
34
32
  };
35
- if (is_1.default.nonEmptyString(regExpExec.groups.currentValue)) {
33
+ if ((0, is_1.isNonEmptyString)(regExpExec.groups.currentValue)) {
36
34
  if (regExpExec.groups.currentValue.startsWith('(') &&
37
35
  regExpExec.groups.currentValue.endsWith(')')) {
38
36
  result.currentValue = regExpExec.groups.currentValue.slice(1, -1).trim();
@@ -41,10 +39,10 @@ function parsePEP508(value) {
41
39
  result.currentValue = regExpExec.groups.currentValue;
42
40
  }
43
41
  }
44
- if (is_1.default.nonEmptyString(regExpExec.groups.marker)) {
42
+ if ((0, is_1.isNonEmptyString)(regExpExec.groups.marker)) {
45
43
  result.marker = regExpExec.groups.marker;
46
44
  }
47
- if (is_1.default.nonEmptyString(regExpExec.groups.extras)) {
45
+ if ((0, is_1.isNonEmptyString)(regExpExec.groups.extras)) {
48
46
  // trim to remove allowed whitespace between brackets
49
47
  result.extras = regExpExec.groups.extras.split(',').map((e) => e.trim());
50
48
  }
@@ -52,7 +50,7 @@ function parsePEP508(value) {
52
50
  }
53
51
  function pep508ToPackageDependency(depType, value) {
54
52
  const parsed = parsePEP508(value);
55
- if (is_1.default.nullOrUndefined(parsed)) {
53
+ if ((0, is_1.isNullOrUndefined)(parsed)) {
56
54
  return null;
57
55
  }
58
56
  const dep = {
@@ -61,7 +59,7 @@ function pep508ToPackageDependency(depType, value) {
61
59
  datasource: pypi_1.PypiDatasource.id,
62
60
  depType,
63
61
  };
64
- if (is_1.default.nullOrUndefined(parsed.currentValue)) {
62
+ if ((0, is_1.isNullOrUndefined)(parsed.currentValue)) {
65
63
  dep.skipReason = 'unspecified-version';
66
64
  }
67
65
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep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,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { PypiDatasource } from '../../datasource/pypi';\nimport { normalizePythonDepName } from '../../datasource/pypi/common';\nimport type { PackageDependency } from '../types';\nimport type { Pep508ParseResult } from './types';\n\nconst pep508Regex = regEx(\n /^(?<packageName>[A-Z0-9._-]+)\\s*(\\[(?<extras>[A-Z0-9\\s,._-]+)\\])?\\s*(?<currentValue>[^;]+)?(;\\s*(?<marker>.*))?/i,\n);\n\nexport const depTypes = {\n dependencies: 'project.dependencies',\n optionalDependencies: 'project.optional-dependencies',\n dependencyGroups: 'dependency-groups',\n pdmDevDependencies: 'tool.pdm.dev-dependencies',\n uvDevDependencies: 'tool.uv.dev-dependencies',\n uvSources: 'tool.uv.sources',\n buildSystemRequires: 'build-system.requires',\n};\n\nexport function parsePEP508(\n value: string | null | undefined,\n): Pep508ParseResult | null {\n if (is.nullOrUndefined(value)) {\n return null;\n }\n\n const regExpExec = pep508Regex.exec(value);\n if (\n is.nullOrUndefined(regExpExec) ||\n is.nullOrUndefined(regExpExec?.groups)\n ) {\n logger.trace(`Pep508 could not be extracted`);\n return null;\n }\n\n const result: Pep508ParseResult = {\n packageName: regExpExec.groups.packageName,\n };\n if (is.nonEmptyString(regExpExec.groups.currentValue)) {\n if (\n regExpExec.groups.currentValue.startsWith('(') &&\n regExpExec.groups.currentValue.endsWith(')')\n ) {\n result.currentValue = regExpExec.groups.currentValue.slice(1, -1).trim();\n } else {\n result.currentValue = regExpExec.groups.currentValue;\n }\n }\n\n if (is.nonEmptyString(regExpExec.groups.marker)) {\n result.marker = regExpExec.groups.marker;\n }\n if (is.nonEmptyString(regExpExec.groups.extras)) {\n // trim to remove allowed whitespace between brackets\n result.extras = regExpExec.groups.extras.split(',').map((e) => e.trim());\n }\n\n return result;\n}\n\nexport function pep508ToPackageDependency(\n depType: string,\n value: string,\n): PackageDependency | null {\n const parsed = parsePEP508(value);\n if (is.nullOrUndefined(parsed)) {\n return null;\n }\n\n const dep: PackageDependency = {\n packageName: normalizePythonDepName(parsed.packageName),\n depName: parsed.packageName,\n datasource: PypiDatasource.id,\n depType,\n };\n\n if (is.nullOrUndefined(parsed.currentValue)) {\n dep.skipReason = 'unspecified-version';\n } else {\n dep.currentValue = parsed.currentValue;\n\n if (parsed.currentValue.startsWith('==')) {\n dep.currentVersion = parsed.currentValue.replace(regEx(/^==\\s*/), '');\n }\n }\n return dep;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep621/utils.ts"],"names":[],"mappings":";;;AAsBA,kCAoCC;AAED,8DA0BC;AAtFD,yCAAuE;AACvE,4CAAyC;AACzC,+CAA4C;AAC5C,gDAAuD;AACvD,yDAAsE;AAItE,MAAM,WAAW,GAAG,IAAA,aAAK,EACvB,kHAAkH,CACnH,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,YAAY,EAAE,sBAAsB;IACpC,oBAAoB,EAAE,+BAA+B;IACrD,gBAAgB,EAAE,mBAAmB;IACrC,kBAAkB,EAAE,2BAA2B;IAC/C,iBAAiB,EAAE,0BAA0B;IAC7C,SAAS,EAAE,iBAAiB;IAC5B,mBAAmB,EAAE,uBAAuB;CAC7C,CAAC;AAEF,SAAgB,WAAW,CACzB,KAAgC;IAEhC,IAAI,IAAA,sBAAiB,EAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,IAAA,s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yB,CACvC,OAAe,EACf,KAAa;IAEb,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,IAAA,sBAAiB,EAAC,MAAM,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,GAAG,GAAsB;QAC7B,WAAW,EAAE,IAAA,+BAAsB,EAAC,MAAM,CAAC,WAAW,CAAC;QACvD,OAAO,EAAE,MAAM,CAAC,WAAW;QAC3B,UAAU,EAAE,qBAAc,CAAC,EAAE;QAC7B,OAAO;KACR,CAAC;IAEF,IAAI,IAAA,sBAAiB,EAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,UAAU,GAAG,qBAAqB,CAAC;IACzC,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QAEvC,IAAI,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;QACxE,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { isNonEmptyString, isNullOrUndefined } from '@sindresorhus/is';\nimport { logger } from '../../../logger';\nimport { regEx } from '../../../util/regex';\nimport { PypiDatasource } from '../../datasource/pypi';\nimport { normalizePythonDepName } from '../../datasource/pypi/common';\nimport type { PackageDependency } from '../types';\nimport type { Pep508ParseResult } from './types';\n\nconst pep508Regex = regEx(\n /^(?<packageName>[A-Z0-9._-]+)\\s*(\\[(?<extras>[A-Z0-9\\s,._-]+)\\])?\\s*(?<currentValue>[^;]+)?(;\\s*(?<marker>.*))?/i,\n);\n\nexport const depTypes = {\n dependencies: 'project.dependencies',\n optionalDependencies: 'project.optional-dependencies',\n dependencyGroups: 'dependency-groups',\n pdmDevDependencies: 'tool.pdm.dev-dependencies',\n uvDevDependencies: 'tool.uv.dev-dependencies',\n uvSources: 'tool.uv.sources',\n buildSystemRequires: 'build-system.requires',\n};\n\nexport function parsePEP508(\n value: string | null | undefined,\n): Pep508ParseResult | null {\n if (isNullOrUndefined(value)) {\n return null;\n }\n\n const regExpExec = pep508Regex.exec(value);\n if (isNullOrUndefined(regExpExec) || isNullOrUndefined(regExpExec?.groups)) {\n logger.trace(`Pep508 could not be extracted`);\n return null;\n }\n\n const result: Pep508ParseResult = {\n packageName: regExpExec.groups.packageName,\n };\n if (isNonEmptyString(regExpExec.groups.currentValue)) {\n if (\n regExpExec.groups.currentValue.startsWith('(') &&\n regExpExec.groups.currentValue.endsWith(')')\n ) {\n result.currentValue = regExpExec.groups.currentValue.slice(1, -1).trim();\n } else {\n result.currentValue = regExpExec.groups.currentValue;\n }\n }\n\n if (isNonEmptyString(regExpExec.groups.marker)) {\n result.marker = regExpExec.groups.marker;\n }\n if (isNonEmptyString(regExpExec.groups.extras)) {\n // trim to remove allowed whitespace between brackets\n result.extras = regExpExec.groups.extras.split(',').map((e) => e.trim());\n }\n\n return result;\n}\n\nexport function pep508ToPackageDependency(\n depType: string,\n value: string,\n): PackageDependency | null {\n const parsed = parsePEP508(value);\n if (isNullOrUndefined(parsed)) {\n return null;\n }\n\n const dep: PackageDependency = {\n packageName: normalizePythonDepName(parsed.packageName),\n depName: parsed.packageName,\n datasource: PypiDatasource.id,\n depType,\n };\n\n if (isNullOrUndefined(parsed.currentValue)) {\n dep.skipReason = 'unspecified-version';\n } else {\n dep.currentValue = parsed.currentValue;\n\n if (parsed.currentValue.startsWith('==')) {\n dep.currentVersion = parsed.currentValue.replace(regEx(/^==\\s*/), '');\n }\n }\n return dep;\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Pep723 = void 0;
4
- const tslib_1 = require("tslib");
5
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
4
+ const is_1 = require("@sindresorhus/is");
6
5
  const zod_1 = require("zod");
7
6
  const schema_utils_1 = require("../../../util/schema-utils");
8
7
  const utils_1 = require("../pep621/utils");
@@ -19,7 +18,7 @@ exports.Pep723 = schema_utils_1.Toml.pipe(zod_1.z
19
18
  })
20
19
  .transform(({ 'requires-python': requiresPython, dependencies }) => {
21
20
  const res = { deps: dependencies ?? [] };
22
- if (is_1.default.nonEmptyString(requiresPython)) {
21
+ if ((0, is_1.isNonEmptyString)(requiresPython)) {
23
22
  res.extractedConstraints = { python: requiresPython };
24
23
  }
25
24
  return res;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep723/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,6BAAwB;AACxB,6DAAkD;AAClD,2CAAsE;AAGtE,MAAM,SAAS,GAAG,OAAC;KAChB,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,iCAAyB,EAAC,gBAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;AAEhE,QAAA,MAAM,GAAG,mBAAI,CAAC,IAAI,CAC7B,OAAC;KACE,MAAM,CAAC;IACN,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,OAAC;SACZ,KAAK,CAAC,SAAS,CAAC;SAChB,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SAChD,QAAQ,EAAE;CACd,CAAC;KACD,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE;IACjE,MAAM,GAAG,GAAuB,EAAE,IAAI,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC;IAE7D,IAAI,YAAE,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,oBAAoB,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CACL,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { z } from 'zod';\nimport { Toml } from '../../../util/schema-utils';\nimport { depTypes, pep508ToPackageDependency } from '../pep621/utils';\nimport type { PackageFileContent } from '../types';\n\nconst Pep723Dep = z\n .string()\n .transform((dep) => pep508ToPackageDependency(depTypes.dependencies, dep));\n\nexport const Pep723 = Toml.pipe(\n z\n .object({\n 'requires-python': z.string().optional(),\n dependencies: z\n .array(Pep723Dep)\n .transform((deps) => deps.filter((dep) => !!dep))\n .optional(),\n })\n .transform(({ 'requires-python': requiresPython, dependencies }) => {\n const res: PackageFileContent = { deps: dependencies ?? [] };\n\n if (is.nonEmptyString(requiresPython)) {\n res.extractedConstraints = { python: requiresPython };\n }\n\n return res;\n }),\n);\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep723/schema.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AACpD,6BAAwB;AACxB,6DAAkD;AAClD,2CAAsE;AAGtE,MAAM,SAAS,GAAG,OAAC;KAChB,MAAM,EAAE;KACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,iCAAyB,EAAC,gBAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;AAEhE,QAAA,MAAM,GAAG,mBAAI,CAAC,IAAI,CAC7B,OAAC;KACE,MAAM,CAAC;IACN,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,OAAC;SACZ,KAAK,CAAC,SAAS,CAAC;SAChB,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SAChD,QAAQ,EAAE;CACd,CAAC;KACD,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE;IACjE,MAAM,GAAG,GAAuB,EAAE,IAAI,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC;IAE7D,IAAI,IAAA,qBAAgB,EAAC,cAAc,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,oBAAoB,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CACL,CAAC","sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { z } from 'zod';\nimport { Toml } from '../../../util/schema-utils';\nimport { depTypes, pep508ToPackageDependency } from '../pep621/utils';\nimport type { PackageFileContent } from '../types';\n\nconst Pep723Dep = z\n .string()\n .transform((dep) => pep508ToPackageDependency(depTypes.dependencies, dep));\n\nexport const Pep723 = Toml.pipe(\n z\n .object({\n 'requires-python': z.string().optional(),\n dependencies: z\n .array(Pep723Dep)\n .transform((deps) => deps.filter((dep) => !!dep))\n .optional(),\n })\n .transform(({ 'requires-python': requiresPython, dependencies }) => {\n const res: PackageFileContent = { deps: dependencies ?? [] };\n\n if (isNonEmptyString(requiresPython)) {\n res.extractedConstraints = { python: requiresPython };\n }\n\n return res;\n }),\n);\n"]}
@@ -11,7 +11,7 @@ exports.extractPythonVersion = extractPythonVersion;
11
11
  exports.getRegistryCredVarsFromPackageFiles = getRegistryCredVarsFromPackageFiles;
12
12
  exports.matchManager = matchManager;
13
13
  const tslib_1 = require("tslib");
14
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
14
+ const is_1 = require("@sindresorhus/is");
15
15
  const shlex_1 = require("shlex");
16
16
  const upath_1 = tslib_1.__importDefault(require("upath"));
17
17
  const logger_1 = require("../../../logger");
@@ -36,7 +36,7 @@ function getPythonVersionConstraint(config, extractedPythonVersion) {
36
36
  function getPipToolsVersionConstraint(config) {
37
37
  const { constraints = {} } = config;
38
38
  const { pipTools } = constraints;
39
- if (is_1.default.string(pipTools)) {
39
+ if ((0, is_1.isString)(pipTools)) {
40
40
  logger_1.logger.debug('Using pipTools constraint from config');
41
41
  return pipTools;
42
42
  }
@@ -45,7 +45,7 @@ function getPipToolsVersionConstraint(config) {
45
45
  function getUvVersionConstraint(config) {
46
46
  const { constraints = {} } = config;
47
47
  const { uv } = constraints;
48
- if (is_1.default.string(uv)) {
48
+ if ((0, is_1.isString)(uv)) {
49
49
  logger_1.logger.debug('Using uv constraint from config');
50
50
  return uv;
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/common.ts"],"names":[],"mappings":";;;AAiBA,gEAkBC;AAED,oEAYC;AAED,wDAUC;AAED,4DAeC;AAED,wCA2BC;AA6DD,oDA+GC;AAOD,oDAqBC;AAoDD,kFA0BC;AAED,oCAeC;;AAlZD,kEAAkC;AAClC,iCAA8B;AAC9B,0DAA0B;AAC1B,4CAAyC;AACzC,+CAA2D;AAM3D,yCAAkD;AAClD,gDAAwD;AACxD,4EAAsD;AACtD,+CAA4C;AAI5C,SAAgB,0BAA0B,CACxC,MAA6B,EAC7B,sBAA0C;IAE1C,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAE/B,IAAI,MAAM,EAAE,CAAC;QACX,eAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,sBAAsB,EAAE,CAAC;QAC3B,eAAM,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACrE,OAAO,KAAK,sBAAsB,EAAE,CAAC;IACvC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,4B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,CAAC;IAClB,CAAC;IACD,2EAA2E;IAC3E,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1D,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { split } from 'shlex';\nimport upath from 'upath';\nimport { logger } from '../../../logger';\nimport { isNotNullOrUndefined } from '../../../util/array';\nimport type {\n ExecOptions,\n ExtraEnv,\n ToolConstraint,\n} from '../../../util/exec/types';\nimport { ensureCacheDir } from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport * as hostRules from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport type { PackageFileContent, UpdateArtifactsConfig } from '../types';\nimport type { CommandType, PipCompileArgs, SupportedManagers } from './types';\n\nexport function getPythonVersionConstraint(\n config: UpdateArtifactsConfig,\n extractedPythonVersion: string | undefined,\n): string | undefined | null {\n const { constraints = {} } = config;\n const { python } = constraints;\n\n if (python) {\n logger.debug('Using python constraint from config');\n return python;\n }\n\n if (extractedPythonVersion) {\n logger.debug('Using python constraint extracted from the lock file');\n return `==${extractedPythonVersion}`;\n }\n\n return undefined;\n}\n\nexport function getPipToolsVersionConstraint(\n config: UpdateArtifactsConfig,\n): string {\n const { constraints = {} } = config;\n const { pipTools } = constraints;\n\n if (is.string(pipTools)) {\n logger.debug('Using pipTools constraint from config');\n return pipTools;\n }\n\n return '';\n}\n\nexport function getUvVersionConstraint(config: UpdateArtifactsConfig): string {\n const { constraints = {} } = config;\n const { uv } = constraints;\n\n if (is.string(uv)) {\n logger.debug('Using uv constraint from config');\n return uv;\n }\n\n return '';\n}\n\nexport function getToolVersionConstraint(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n): ToolConstraint {\n if (commandType === 'uv') {\n return {\n toolName: 'uv',\n constraint: getUvVersionConstraint(config),\n };\n }\n\n return {\n toolName: 'pip-tools',\n constraint: getPipToolsVersionConstraint(config),\n };\n}\n\nexport async function getExecOptions(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n cwd: string,\n extraEnv: ExtraEnv<string>,\n extractedPythonVersion: string | undefined,\n): Promise<ExecOptions> {\n const constraint = getPythonVersionConstraint(config, extractedPythonVersion);\n const execOptions: ExecOptions = {\n cwd: ensureLocalPath(cwd),\n docker: {},\n toolConstraints: [\n {\n toolName: 'python',\n constraint,\n },\n getToolVersionConstraint(config, commandType),\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n PIP_NO_INPUT: 'true', // ensure pip doesn't block forever waiting for credentials on stdin\n PIP_KEYRING_PROVIDER: 'import',\n PYTHON_KEYRING_BACKEND: 'keyrings.envvars.keyring.EnvvarsKeyring',\n ...extraEnv,\n },\n };\n return execOptions;\n}\n\nexport const constraintLineRegex = regEx(\n /^(#.*?\\r?\\n)+# {4}(?<command>\\S*)(?<arguments> .*?)?\\r?\\n/,\n);\n\nexport const disallowedPipOptions = [\n '--no-header', // header is required by this manager\n];\nconst commonOptionsWithArguments = [\n '--output-file',\n '--extra',\n '--extra-index-url',\n];\nconst pipOptionsWithArguments = [\n '--resolver',\n '--constraint',\n ...commonOptionsWithArguments,\n];\nconst uvOptionsWithArguments = [\n '--constraints',\n '--python-version',\n '--no-emit-package',\n '--prerelease',\n '--format',\n '--resolution',\n '--fork-strategy',\n '--exclude-newer',\n '--exclude-newer-package',\n ...commonOptionsWithArguments,\n];\nexport const optionsWithArguments = [\n ...pipOptionsWithArguments,\n ...uvOptionsWithArguments,\n];\nconst allowedCommonOptions = [\n '-v',\n '--generate-hashes',\n '--emit-index-url',\n '--index-url',\n '--all-extras',\n];\nexport const allowedOptions: Record<CommandType, string[]> = {\n 'pip-compile': [\n '--allow-unsafe',\n '--generate-hashes',\n '--no-emit-index-url',\n '--strip-extras',\n ...allowedCommonOptions,\n ...pipOptionsWithArguments,\n ],\n uv: [\n '--no-strip-extras',\n '--universal',\n ...allowedCommonOptions,\n ...uvOptionsWithArguments,\n ],\n custom: [],\n};\n\n// TODO(not7cd): test on all correct headers, even with CUSTOM_COMPILE_COMMAND\nexport function extractHeaderCommand(\n content: string,\n fileName: string,\n): PipCompileArgs {\n const compileCommand = constraintLineRegex.exec(content);\n if (compileCommand?.groups === undefined) {\n throw new Error(\n `Failed to extract command from header in ${fileName} ${content}`,\n );\n }\n logger.trace(\n `pip-compile: found header in ${fileName}: \\n${compileCommand[0]}`,\n );\n const command = compileCommand.groups.command;\n const argv = [command];\n let commandType: CommandType;\n if (command === 'pip-compile') {\n commandType = 'pip-compile';\n } else if (command === 'uv') {\n commandType = 'uv';\n } else {\n commandType = 'custom';\n }\n if (compileCommand.groups.arguments) {\n argv.push(...split(compileCommand.groups.arguments));\n }\n logger.debug(\n { fileName, argv, commandType },\n `pip-compile: extracted command from header`,\n );\n\n const result: PipCompileArgs = {\n argv,\n command,\n commandType,\n outputFile: '',\n sourceFiles: [],\n };\n for (const arg of argv.slice(1)) {\n if (commandType === 'uv' && ['pip', 'compile'].includes(arg)) {\n continue;\n }\n // TODO(not7cd): check for \"--option -- argument\" case\n if (!arg.startsWith('-')) {\n result.sourceFiles.push(arg);\n continue;\n }\n throwForDisallowedOption(arg);\n throwForNoEqualSignInOptionWithArgument(arg);\n throwForUnknownOption(commandType, arg);\n\n if (arg.includes('=')) {\n const [option, value] = arg.split('=');\n if (option === '--extra') {\n result.extra = result.extra ?? [];\n result.extra.push(value);\n } else if (option === '--extra-index-url') {\n result.extraIndexUrl = result.extraIndexUrl ?? [];\n result.extraIndexUrl.push(value);\n // TODO: add to secrets? next PR\n } else if (['--constraint', '--constraints'].includes(option)) {\n result.constraintsFiles = result.constraintsFiles ?? [];\n result.constraintsFiles.push(value);\n } else if (option === '--output-file') {\n if (result.outputFile) {\n throw new Error('Cannot use multiple --output-file options');\n }\n result.outputFile = upath.normalize(value);\n } else if (option === '--python-version') {\n result.pythonVersion = value;\n } else if (option === '--index-url') {\n if (result.indexUrl) {\n throw new Error('Cannot use multiple --index-url options');\n }\n result.indexUrl = value;\n // TODO: add to secrets? next PR\n } else {\n logger.debug({ option }, `pip-compile: option not handled`);\n }\n continue;\n }\n if (arg === '--no-emit-index-url') {\n result.noEmitIndexUrl = true;\n continue;\n }\n if (arg === '--emit-index-url') {\n result.emitIndexUrl = true;\n continue;\n }\n if (arg === '--all-extras') {\n result.allExtras = true;\n continue;\n }\n\n logger.debug({ option: arg }, `pip-compile: option not handled`);\n }\n logger.trace(\n {\n ...result,\n },\n 'Parsed pip-compile command from header',\n );\n if (result.noEmitIndexUrl && result.emitIndexUrl) {\n throw new Error('Cannot use both --no-emit-index-url and --emit-index-url');\n }\n if (result.sourceFiles.length === 0) {\n throw new Error(\n 'No source files detected in command, pass at least one package file explicitly',\n );\n }\n return result;\n}\n\nconst pythonVersionRegex = regEx(\n /^(#.*?\\r?\\n)*# This file is autogenerated by pip-compile with Python (?<pythonVersion>\\d+(\\.\\d+)*)\\s/,\n 'i',\n);\n\nexport function extractPythonVersion(\n content: string,\n fileName: string,\n): string | undefined {\n const match = pythonVersionRegex.exec(content);\n if (match?.groups === undefined) {\n logger.warn(\n { fileName, content },\n 'pip-compile: failed to extract Python version from header in file',\n );\n return undefined;\n }\n logger.trace(\n `pip-compile: found Python version header in ${fileName}: \\n${match[0]}`,\n );\n const { pythonVersion } = match.groups;\n logger.debug(\n { fileName, pythonVersion },\n `pip-compile: extracted Python version from header`,\n );\n return pythonVersion;\n}\n\nfunction throwForDisallowedOption(arg: string): void {\n if (disallowedPipOptions.includes(arg)) {\n throw new Error(`Option ${arg} not allowed for this manager`);\n }\n}\nfunction throwForNoEqualSignInOptionWithArgument(arg: string): void {\n if (optionsWithArguments.includes(arg)) {\n throw new Error(\n `Option ${arg} must have equal sign '=' separating it's argument`,\n );\n }\n}\nfunction throwForUnknownOption(commandType: CommandType, arg: string): void {\n if (arg.includes('=')) {\n const [option] = arg.split('=');\n if (allowedOptions[commandType].includes(option)) {\n return;\n }\n }\n if (allowedOptions[commandType].includes(arg)) {\n return;\n }\n throw new Error(`Option ${arg} not supported (yet)`);\n}\n\nfunction getRegistryCredEnvVars(\n url: URL,\n index: number,\n): Record<string, string> {\n const hostRule = hostRules.find({ url: url.href });\n logger.debug(hostRule, `Found host rule for url ${url.href}`);\n const ret: Record<string, string> = {};\n if (!!hostRule.username || !!hostRule.password) {\n ret[`KEYRING_SERVICE_NAME_${index}`] = url.hostname;\n ret[`KEYRING_SERVICE_USERNAME_${index}`] = hostRule.username ?? '';\n ret[`KEYRING_SERVICE_PASSWORD_${index}`] = hostRule.password ?? '';\n }\n return ret;\n}\n\nfunction cleanUrl(url: string): URL | null {\n try {\n // Strip everything but protocol, host, and port\n const urlObj = new URL(url);\n return new URL(urlObj.origin);\n } catch {\n return null;\n }\n}\n\nexport function getRegistryCredVarsFromPackageFiles(\n packageFiles: PackageFileContent[],\n): ExtraEnv<string> {\n const urls: string[] = [];\n for (const packageFile of packageFiles) {\n urls.push(\n ...(packageFile.registryUrls ?? []),\n ...(packageFile.additionalRegistryUrls ?? []),\n );\n }\n logger.debug(urls, 'Extracted registry URLs from package files');\n\n const uniqueHosts = new Set<URL>(\n urls.map(cleanUrl).filter(isNotNullOrUndefined),\n );\n\n let allCreds: ExtraEnv<string> = {};\n for (const [index, host] of [...uniqueHosts].entries()) {\n const hostCreds = getRegistryCredEnvVars(host, index);\n allCreds = {\n ...allCreds,\n ...hostCreds,\n };\n }\n\n return allCreds;\n}\n\nexport function matchManager(filename: string): SupportedManagers | 'unknown' {\n if (filename.endsWith('setup.py')) {\n return 'pip_setup';\n }\n if (filename.endsWith('setup.cfg')) {\n return 'setup-cfg';\n }\n if (filename.endsWith('pyproject.toml')) {\n return 'pep621';\n }\n // naive, could be improved, maybe use pip_requirements.managerFilePatterns\n if (filename.endsWith('.in') || filename.endsWith('.txt')) {\n return 'pip_requirements';\n }\n return 'unknown';\n}\n"]}
1
+ {"version":3,"file":"common.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AAC,CAAC;IAEjE,MAAM,WAAW,GAAG,IAAI,GAAG,CACzB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,4BAAoB,CAAC,CAChD,CAAC;IAEF,IAAI,QAAQ,GAAqB,EAAE,CAAC;IACpC,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACvD,MAAM,SAAS,GAAG,sBAAsB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtD,QAAQ,GAAG;YACT,GAAG,QAAQ;YACX,GAAG,SAAS;SACb,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAgB,YAAY,CAAC,QAAgB;IAC3C,IAAI,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACxC,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,2EAA2E;IAC3E,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1D,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { split } from 'shlex';\nimport upath from 'upath';\nimport { logger } from '../../../logger';\nimport { isNotNullOrUndefined } from '../../../util/array';\nimport type {\n ExecOptions,\n ExtraEnv,\n ToolConstraint,\n} from '../../../util/exec/types';\nimport { ensureCacheDir } from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport * as hostRules from '../../../util/host-rules';\nimport { regEx } from '../../../util/regex';\nimport type { PackageFileContent, UpdateArtifactsConfig } from '../types';\nimport type { CommandType, PipCompileArgs, SupportedManagers } from './types';\n\nexport function getPythonVersionConstraint(\n config: UpdateArtifactsConfig,\n extractedPythonVersion: string | undefined,\n): string | undefined | null {\n const { constraints = {} } = config;\n const { python } = constraints;\n\n if (python) {\n logger.debug('Using python constraint from config');\n return python;\n }\n\n if (extractedPythonVersion) {\n logger.debug('Using python constraint extracted from the lock file');\n return `==${extractedPythonVersion}`;\n }\n\n return undefined;\n}\n\nexport function getPipToolsVersionConstraint(\n config: UpdateArtifactsConfig,\n): string {\n const { constraints = {} } = config;\n const { pipTools } = constraints;\n\n if (isString(pipTools)) {\n logger.debug('Using pipTools constraint from config');\n return pipTools;\n }\n\n return '';\n}\n\nexport function getUvVersionConstraint(config: UpdateArtifactsConfig): string {\n const { constraints = {} } = config;\n const { uv } = constraints;\n\n if (isString(uv)) {\n logger.debug('Using uv constraint from config');\n return uv;\n }\n\n return '';\n}\n\nexport function getToolVersionConstraint(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n): ToolConstraint {\n if (commandType === 'uv') {\n return {\n toolName: 'uv',\n constraint: getUvVersionConstraint(config),\n };\n }\n\n return {\n toolName: 'pip-tools',\n constraint: getPipToolsVersionConstraint(config),\n };\n}\n\nexport async function getExecOptions(\n config: UpdateArtifactsConfig,\n commandType: CommandType,\n cwd: string,\n extraEnv: ExtraEnv<string>,\n extractedPythonVersion: string | undefined,\n): Promise<ExecOptions> {\n const constraint = getPythonVersionConstraint(config, extractedPythonVersion);\n const execOptions: ExecOptions = {\n cwd: ensureLocalPath(cwd),\n docker: {},\n toolConstraints: [\n {\n toolName: 'python',\n constraint,\n },\n getToolVersionConstraint(config, commandType),\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n PIP_NO_INPUT: 'true', // ensure pip doesn't block forever waiting for credentials on stdin\n PIP_KEYRING_PROVIDER: 'import',\n PYTHON_KEYRING_BACKEND: 'keyrings.envvars.keyring.EnvvarsKeyring',\n ...extraEnv,\n },\n };\n return execOptions;\n}\n\nexport const constraintLineRegex = regEx(\n /^(#.*?\\r?\\n)+# {4}(?<command>\\S*)(?<arguments> .*?)?\\r?\\n/,\n);\n\nexport const disallowedPipOptions = [\n '--no-header', // header is required by this manager\n];\nconst commonOptionsWithArguments = [\n '--output-file',\n '--extra',\n '--extra-index-url',\n];\nconst pipOptionsWithArguments = [\n '--resolver',\n '--constraint',\n ...commonOptionsWithArguments,\n];\nconst uvOptionsWithArguments = [\n '--constraints',\n '--python-version',\n '--no-emit-package',\n '--prerelease',\n '--format',\n '--resolution',\n '--fork-strategy',\n '--exclude-newer',\n '--exclude-newer-package',\n ...commonOptionsWithArguments,\n];\nexport const optionsWithArguments = [\n ...pipOptionsWithArguments,\n ...uvOptionsWithArguments,\n];\nconst allowedCommonOptions = [\n '-v',\n '--generate-hashes',\n '--emit-index-url',\n '--index-url',\n '--all-extras',\n];\nexport const allowedOptions: Record<CommandType, string[]> = {\n 'pip-compile': [\n '--allow-unsafe',\n '--generate-hashes',\n '--no-emit-index-url',\n '--strip-extras',\n ...allowedCommonOptions,\n ...pipOptionsWithArguments,\n ],\n uv: [\n '--no-strip-extras',\n '--universal',\n ...allowedCommonOptions,\n ...uvOptionsWithArguments,\n ],\n custom: [],\n};\n\n// TODO(not7cd): test on all correct headers, even with CUSTOM_COMPILE_COMMAND\nexport function extractHeaderCommand(\n content: string,\n fileName: string,\n): PipCompileArgs {\n const compileCommand = constraintLineRegex.exec(content);\n if (compileCommand?.groups === undefined) {\n throw new Error(\n `Failed to extract command from header in ${fileName} ${content}`,\n );\n }\n logger.trace(\n `pip-compile: found header in ${fileName}: \\n${compileCommand[0]}`,\n );\n const command = compileCommand.groups.command;\n const argv = [command];\n let commandType: CommandType;\n if (command === 'pip-compile') {\n commandType = 'pip-compile';\n } else if (command === 'uv') {\n commandType = 'uv';\n } else {\n commandType = 'custom';\n }\n if (compileCommand.groups.arguments) {\n argv.push(...split(compileCommand.groups.arguments));\n }\n logger.debug(\n { fileName, argv, commandType },\n `pip-compile: extracted command from header`,\n );\n\n const result: PipCompileArgs = {\n argv,\n command,\n commandType,\n outputFile: '',\n sourceFiles: [],\n };\n for (const arg of argv.slice(1)) {\n if (commandType === 'uv' && ['pip', 'compile'].includes(arg)) {\n continue;\n }\n // TODO(not7cd): check for \"--option -- argument\" case\n if (!arg.startsWith('-')) {\n result.sourceFiles.push(arg);\n continue;\n }\n throwForDisallowedOption(arg);\n throwForNoEqualSignInOptionWithArgument(arg);\n throwForUnknownOption(commandType, arg);\n\n if (arg.includes('=')) {\n const [option, value] = arg.split('=');\n if (option === '--extra') {\n result.extra = result.extra ?? [];\n result.extra.push(value);\n } else if (option === '--extra-index-url') {\n result.extraIndexUrl = result.extraIndexUrl ?? [];\n result.extraIndexUrl.push(value);\n // TODO: add to secrets? next PR\n } else if (['--constraint', '--constraints'].includes(option)) {\n result.constraintsFiles = result.constraintsFiles ?? [];\n result.constraintsFiles.push(value);\n } else if (option === '--output-file') {\n if (result.outputFile) {\n throw new Error('Cannot use multiple --output-file options');\n }\n result.outputFile = upath.normalize(value);\n } else if (option === '--python-version') {\n result.pythonVersion = value;\n } else if (option === '--index-url') {\n if (result.indexUrl) {\n throw new Error('Cannot use multiple --index-url options');\n }\n result.indexUrl = value;\n // TODO: add to secrets? next PR\n } else {\n logger.debug({ option }, `pip-compile: option not handled`);\n }\n continue;\n }\n if (arg === '--no-emit-index-url') {\n result.noEmitIndexUrl = true;\n continue;\n }\n if (arg === '--emit-index-url') {\n result.emitIndexUrl = true;\n continue;\n }\n if (arg === '--all-extras') {\n result.allExtras = true;\n continue;\n }\n\n logger.debug({ option: arg }, `pip-compile: option not handled`);\n }\n logger.trace(\n {\n ...result,\n },\n 'Parsed pip-compile command from header',\n );\n if (result.noEmitIndexUrl && result.emitIndexUrl) {\n throw new Error('Cannot use both --no-emit-index-url and --emit-index-url');\n }\n if (result.sourceFiles.length === 0) {\n throw new Error(\n 'No source files detected in command, pass at least one package file explicitly',\n );\n }\n return result;\n}\n\nconst pythonVersionRegex = regEx(\n /^(#.*?\\r?\\n)*# This file is autogenerated by pip-compile with Python (?<pythonVersion>\\d+(\\.\\d+)*)\\s/,\n 'i',\n);\n\nexport function extractPythonVersion(\n content: string,\n fileName: string,\n): string | undefined {\n const match = pythonVersionRegex.exec(content);\n if (match?.groups === undefined) {\n logger.warn(\n { fileName, content },\n 'pip-compile: failed to extract Python version from header in file',\n );\n return undefined;\n }\n logger.trace(\n `pip-compile: found Python version header in ${fileName}: \\n${match[0]}`,\n );\n const { pythonVersion } = match.groups;\n logger.debug(\n { fileName, pythonVersion },\n `pip-compile: extracted Python version from header`,\n );\n return pythonVersion;\n}\n\nfunction throwForDisallowedOption(arg: string): void {\n if (disallowedPipOptions.includes(arg)) {\n throw new Error(`Option ${arg} not allowed for this manager`);\n }\n}\nfunction throwForNoEqualSignInOptionWithArgument(arg: string): void {\n if (optionsWithArguments.includes(arg)) {\n throw new Error(\n `Option ${arg} must have equal sign '=' separating it's argument`,\n );\n }\n}\nfunction throwForUnknownOption(commandType: CommandType, arg: string): void {\n if (arg.includes('=')) {\n const [option] = arg.split('=');\n if (allowedOptions[commandType].includes(option)) {\n return;\n }\n }\n if (allowedOptions[commandType].includes(arg)) {\n return;\n }\n throw new Error(`Option ${arg} not supported (yet)`);\n}\n\nfunction getRegistryCredEnvVars(\n url: URL,\n index: number,\n): Record<string, string> {\n const hostRule = hostRules.find({ url: url.href });\n logger.debug(hostRule, `Found host rule for url ${url.href}`);\n const ret: Record<string, string> = {};\n if (!!hostRule.username || !!hostRule.password) {\n ret[`KEYRING_SERVICE_NAME_${index}`] = url.hostname;\n ret[`KEYRING_SERVICE_USERNAME_${index}`] = hostRule.username ?? '';\n ret[`KEYRING_SERVICE_PASSWORD_${index}`] = hostRule.password ?? '';\n }\n return ret;\n}\n\nfunction cleanUrl(url: string): URL | null {\n try {\n // Strip everything but protocol, host, and port\n const urlObj = new URL(url);\n return new URL(urlObj.origin);\n } catch {\n return null;\n }\n}\n\nexport function getRegistryCredVarsFromPackageFiles(\n packageFiles: PackageFileContent[],\n): ExtraEnv<string> {\n const urls: string[] = [];\n for (const packageFile of packageFiles) {\n urls.push(\n ...(packageFile.registryUrls ?? []),\n ...(packageFile.additionalRegistryUrls ?? []),\n );\n }\n logger.debug(urls, 'Extracted registry URLs from package files');\n\n const uniqueHosts = new Set<URL>(\n urls.map(cleanUrl).filter(isNotNullOrUndefined),\n );\n\n let allCreds: ExtraEnv<string> = {};\n for (const [index, host] of [...uniqueHosts].entries()) {\n const hostCreds = getRegistryCredEnvVars(host, index);\n allCreds = {\n ...allCreds,\n ...hostCreds,\n };\n }\n\n return allCreds;\n}\n\nexport function matchManager(filename: string): SupportedManagers | 'unknown' {\n if (filename.endsWith('setup.py')) {\n return 'pip_setup';\n }\n if (filename.endsWith('setup.cfg')) {\n return 'setup-cfg';\n }\n if (filename.endsWith('pyproject.toml')) {\n return 'pep621';\n }\n // naive, could be improved, maybe use pip_requirements.managerFilePatterns\n if (filename.endsWith('.in') || filename.endsWith('.txt')) {\n return 'pip_requirements';\n }\n return 'unknown';\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateArtifacts = updateArtifacts;
4
- const tslib_1 = require("tslib");
5
- const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
4
+ const is_1 = require("@sindresorhus/is");
6
5
  const shlex_1 = require("shlex");
7
6
  const error_messages_1 = require("../../../constants/error-messages");
8
7
  const logger_1 = require("../../../logger");
@@ -32,7 +31,7 @@ function dependencyAndHashPattern(depName) {
32
31
  }
33
32
  async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileContent, config, }) {
34
33
  logger_1.logger.debug(`pip_requirements.updateArtifacts(${packageFileName})`);
35
- if (!is_1.default.nonEmptyArray(updatedDeps)) {
34
+ if (!(0, is_1.isNonEmptyArray)(updatedDeps)) {
36
35
  logger_1.logger.debug('No updated pip_requirements deps - returning null');
37
36
  return null;
38
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_requirements/artifacts.ts"],"names":[],"mappings":";;AAoCA,0CA0EC;;AA9GD,kEAAkC;AAClC,iCAA8B;AAC9B,sEAAoE;AACpE,4CAAyC;AACzC,6CAA0C;AAE1C,yCAAiE;AACjE,+CAA0D;AAE1D,uCAA0C;AAE1C;;;;;;;;;;GAUG;AACH,SAAS,wBAAwB,CAAC,OAAe;IAC/C,MAAM,cAAc,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,CAAC;IAE7C,8FAA8F;IAC9F,oEAAoE;IACpE,EAAE;IACF,uEAAuE;IACvE,8DAA8D;IAC9D,OAAO,IAAA,aAAK,EACV,yBAAyB,cAAc,GAAG,uBAAa,0BAA0B,EACjF,GAAG,CACJ,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,EACpC,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,MAAM,GACS;IACf,eAAM,CAAC,KAAK,CAAC,oCAAoC,eAAe,GAAG,CAAC,CAAC;IACrE,IAAI,CAAC,YAAE,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,eAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,GAAa,EAAE,CAAC;QACzB,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3E,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;gBACjB,SAAS;YACX,CAAC;YACD,MAAM,eAAe,GAAG,wBAAwB,CAA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;oBAChB,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,UAAU;iBACrB;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,qBAAqB;QACrB,IAAI,GAAG,CAAC,OAAO,KAAK,gCAAe,EAAE,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,oBAAoB,eAAe,OAAO,CAAC,CAAC;QAClE,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,QAAQ,EAAE,eAAe;oBACzB,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;iBACvD;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions } from '../../../util/exec/types';\nimport { ensureCacheDir, readLocalFile } from '../../../util/fs';\nimport { escapeRegExp, regEx } from '../../../util/regex';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { extrasPattern } from './extract';\n\n/**\n * Create a RegExp that matches the first dependency pattern for\n * the named dependency that is followed by package hashes.\n *\n * The regular expression defines a single named group `depConstraint`\n * that holds the dependency constraint without the hash specifiers.\n * The substring matched by this named group will start with the dependency\n * name and end with a non-whitespace character.\n *\n * @param depName the name of the dependency\n */\nfunction dependencyAndHashPattern(depName: string): RegExp {\n const escapedDepName = escapeRegExp(depName);\n\n // extrasPattern covers any whitespace between the dep name and the optional extras specifier,\n // but it does not cover any whitespace in front of the equal signs.\n //\n // Use a non-greedy wildcard for the range pattern; otherwise, we would\n // include all but the last hash specifier into depConstraint.\n return regEx(\n `^\\\\s*(?<depConstraint>${escapedDepName}${extrasPattern}\\\\s*==.*?\\\\S)\\\\s+--hash=`,\n 'm',\n );\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`pip_requirements.updateArtifacts(${packageFileName})`);\n if (!is.nonEmptyArray(updatedDeps)) {\n logger.debug('No updated pip_requirements deps - returning null');\n return null;\n }\n try {\n const cmd: string[] = [];\n const rewrittenContent = newPackageFileContent.replace(regEx(/\\\\\\n/g), '');\n for (const dep of updatedDeps) {\n if (!dep.depName) {\n continue;\n }\n const depAndHashMatch = dependencyAndHashPattern(dep.depName).exec(\n rewrittenContent,\n );\n if (depAndHashMatch) {\n // If there's a match, then the regular expression guarantees\n // that the named subgroup deepConstraint did match as well.\n const depConstraint = depAndHashMatch.groups!.depConstraint;\n cmd.push(`hashin ${quote(depConstraint)} -r ${quote(packageFileName)}`);\n }\n }\n if (!cmd.length) {\n logger.debug('No hashin commands to run - returning');\n return null;\n }\n const execOptions: ExecOptions = {\n cwdFile: '.',\n docker: {},\n toolConstraints: [\n { toolName: 'python', constraint: config.constraints?.python },\n { toolName: 'hashin', constraint: config.constraints?.hashin },\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n },\n };\n await exec(cmd, execOptions);\n const newContent = await readLocalFile(packageFileName, 'utf8');\n if (newContent === newPackageFileContent) {\n logger.debug(`${packageFileName} is unchanged`);\n return null;\n }\n logger.debug(`Returning updated ${packageFileName}`);\n return [\n {\n file: {\n type: 'addition',\n path: packageFileName,\n contents: newContent,\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, `Failed to update ${packageFileName} file`);\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: `${String(err.stdout)}\\n${String(err.stderr)}`,\n },\n },\n ];\n }\n}\n"]}
1
+ {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../lib/modules/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,KAAK,gCAAe,EAAE,CAAC;YACpC,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,oBAAoB,eAAe,OAAO,CAAC,CAAC;QAClE,OAAO;YACL;gBACE,aAAa,EAAE;oBACb,QAAQ,EAAE,eAAe;oBACzB,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;iBACvD;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { isNonEmptyArray } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages';\nimport { logger } from '../../../logger';\nimport { exec } from '../../../util/exec';\nimport type { ExecOptions } from '../../../util/exec/types';\nimport { ensureCacheDir, readLocalFile } from '../../../util/fs';\nimport { escapeRegExp, regEx } from '../../../util/regex';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types';\nimport { extrasPattern } from './extract';\n\n/**\n * Create a RegExp that matches the first dependency pattern for\n * the named dependency that is followed by package hashes.\n *\n * The regular expression defines a single named group `depConstraint`\n * that holds the dependency constraint without the hash specifiers.\n * The substring matched by this named group will start with the dependency\n * name and end with a non-whitespace character.\n *\n * @param depName the name of the dependency\n */\nfunction dependencyAndHashPattern(depName: string): RegExp {\n const escapedDepName = escapeRegExp(depName);\n\n // extrasPattern covers any whitespace between the dep name and the optional extras specifier,\n // but it does not cover any whitespace in front of the equal signs.\n //\n // Use a non-greedy wildcard for the range pattern; otherwise, we would\n // include all but the last hash specifier into depConstraint.\n return regEx(\n `^\\\\s*(?<depConstraint>${escapedDepName}${extrasPattern}\\\\s*==.*?\\\\S)\\\\s+--hash=`,\n 'm',\n );\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`pip_requirements.updateArtifacts(${packageFileName})`);\n if (!isNonEmptyArray(updatedDeps)) {\n logger.debug('No updated pip_requirements deps - returning null');\n return null;\n }\n try {\n const cmd: string[] = [];\n const rewrittenContent = newPackageFileContent.replace(regEx(/\\\\\\n/g), '');\n for (const dep of updatedDeps) {\n if (!dep.depName) {\n continue;\n }\n const depAndHashMatch = dependencyAndHashPattern(dep.depName).exec(\n rewrittenContent,\n );\n if (depAndHashMatch) {\n // If there's a match, then the regular expression guarantees\n // that the named subgroup deepConstraint did match as well.\n const depConstraint = depAndHashMatch.groups!.depConstraint;\n cmd.push(`hashin ${quote(depConstraint)} -r ${quote(packageFileName)}`);\n }\n }\n if (!cmd.length) {\n logger.debug('No hashin commands to run - returning');\n return null;\n }\n const execOptions: ExecOptions = {\n cwdFile: '.',\n docker: {},\n toolConstraints: [\n { toolName: 'python', constraint: config.constraints?.python },\n { toolName: 'hashin', constraint: config.constraints?.hashin },\n ],\n extraEnv: {\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n },\n };\n await exec(cmd, execOptions);\n const newContent = await readLocalFile(packageFileName, 'utf8');\n if (newContent === newPackageFileContent) {\n logger.debug(`${packageFileName} is unchanged`);\n return null;\n }\n logger.debug(`Returning updated ${packageFileName}`);\n return [\n {\n file: {\n type: 'addition',\n path: packageFileName,\n contents: newContent,\n },\n },\n ];\n } catch (err) {\n // istanbul ignore if\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, `Failed to update ${packageFileName} file`);\n return [\n {\n artifactError: {\n lockFile: packageFileName,\n stderr: `${String(err.stdout)}\\n${String(err.stderr)}`,\n },\n },\n ];\n }\n}\n"]}