renovate 40.1.4 → 40.3.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 (364) hide show
  1. package/dist/config/migration.js +9 -6
  2. package/dist/config/migration.js.map +1 -1
  3. package/dist/config/migrations/custom/file-match-migration.d.ts +6 -0
  4. package/dist/config/migrations/custom/file-match-migration.js +20 -0
  5. package/dist/config/migrations/custom/file-match-migration.js.map +1 -0
  6. package/dist/config/migrations/migrations-service.js +2 -0
  7. package/dist/config/migrations/migrations-service.js.map +1 -1
  8. package/dist/config/options/index.js +3 -3
  9. package/dist/config/options/index.js.map +1 -1
  10. package/dist/config/presets/internal/custom-managers.js +20 -20
  11. package/dist/config/presets/internal/custom-managers.js.map +1 -1
  12. package/dist/config/types.d.ts +1 -1
  13. package/dist/config/types.js.map +1 -1
  14. package/dist/config/validation-helpers/regex-glob-matchers.js +3 -1
  15. package/dist/config/validation-helpers/regex-glob-matchers.js.map +1 -1
  16. package/dist/config/validation.js +6 -19
  17. package/dist/config/validation.js.map +1 -1
  18. package/dist/modules/manager/ansible/index.d.ts +1 -1
  19. package/dist/modules/manager/ansible/index.js +1 -1
  20. package/dist/modules/manager/ansible/index.js.map +1 -1
  21. package/dist/modules/manager/ansible-galaxy/index.d.ts +1 -1
  22. package/dist/modules/manager/ansible-galaxy/index.js +1 -1
  23. package/dist/modules/manager/ansible-galaxy/index.js.map +1 -1
  24. package/dist/modules/manager/api.js +2 -0
  25. package/dist/modules/manager/api.js.map +1 -1
  26. package/dist/modules/manager/argocd/index.d.ts +1 -1
  27. package/dist/modules/manager/argocd/index.js +1 -1
  28. package/dist/modules/manager/argocd/index.js.map +1 -1
  29. package/dist/modules/manager/asdf/index.d.ts +1 -1
  30. package/dist/modules/manager/asdf/index.js +1 -1
  31. package/dist/modules/manager/asdf/index.js.map +1 -1
  32. package/dist/modules/manager/azure-pipelines/index.d.ts +1 -1
  33. package/dist/modules/manager/azure-pipelines/index.js +4 -1
  34. package/dist/modules/manager/azure-pipelines/index.js.map +1 -1
  35. package/dist/modules/manager/batect/index.d.ts +1 -1
  36. package/dist/modules/manager/batect/index.js +1 -1
  37. package/dist/modules/manager/batect/index.js.map +1 -1
  38. package/dist/modules/manager/batect-wrapper/index.d.ts +1 -1
  39. package/dist/modules/manager/batect-wrapper/index.js +1 -1
  40. package/dist/modules/manager/batect-wrapper/index.js.map +1 -1
  41. package/dist/modules/manager/bazel/index.d.ts +1 -1
  42. package/dist/modules/manager/bazel/index.js +4 -4
  43. package/dist/modules/manager/bazel/index.js.map +1 -1
  44. package/dist/modules/manager/bazel-module/index.d.ts +1 -1
  45. package/dist/modules/manager/bazel-module/index.js +1 -1
  46. package/dist/modules/manager/bazel-module/index.js.map +1 -1
  47. package/dist/modules/manager/bazelisk/index.d.ts +1 -1
  48. package/dist/modules/manager/bazelisk/index.js +1 -1
  49. package/dist/modules/manager/bazelisk/index.js.map +1 -1
  50. package/dist/modules/manager/bicep/index.d.ts +1 -1
  51. package/dist/modules/manager/bicep/index.js +1 -1
  52. package/dist/modules/manager/bicep/index.js.map +1 -1
  53. package/dist/modules/manager/bitbucket-pipelines/index.d.ts +1 -1
  54. package/dist/modules/manager/bitbucket-pipelines/index.js +1 -1
  55. package/dist/modules/manager/bitbucket-pipelines/index.js.map +1 -1
  56. package/dist/modules/manager/bitrise/index.d.ts +1 -1
  57. package/dist/modules/manager/bitrise/index.js +1 -1
  58. package/dist/modules/manager/bitrise/index.js.map +1 -1
  59. package/dist/modules/manager/buildkite/index.d.ts +1 -1
  60. package/dist/modules/manager/buildkite/index.js +1 -1
  61. package/dist/modules/manager/buildkite/index.js.map +1 -1
  62. package/dist/modules/manager/buildpacks/index.d.ts +1 -1
  63. package/dist/modules/manager/buildpacks/index.js +1 -1
  64. package/dist/modules/manager/buildpacks/index.js.map +1 -1
  65. package/dist/modules/manager/bun/index.d.ts +1 -1
  66. package/dist/modules/manager/bun/index.js +1 -1
  67. package/dist/modules/manager/bun/index.js.map +1 -1
  68. package/dist/modules/manager/bun-version/index.d.ts +1 -1
  69. package/dist/modules/manager/bun-version/index.js +1 -1
  70. package/dist/modules/manager/bun-version/index.js.map +1 -1
  71. package/dist/modules/manager/bundler/index.d.ts +1 -1
  72. package/dist/modules/manager/bundler/index.js +1 -1
  73. package/dist/modules/manager/bundler/index.js.map +1 -1
  74. package/dist/modules/manager/cake/index.d.ts +1 -1
  75. package/dist/modules/manager/cake/index.js +1 -1
  76. package/dist/modules/manager/cake/index.js.map +1 -1
  77. package/dist/modules/manager/cargo/index.d.ts +1 -1
  78. package/dist/modules/manager/cargo/index.js +1 -1
  79. package/dist/modules/manager/cargo/index.js.map +1 -1
  80. package/dist/modules/manager/cdnurl/index.d.ts +1 -1
  81. package/dist/modules/manager/cdnurl/index.js +1 -1
  82. package/dist/modules/manager/cdnurl/index.js.map +1 -1
  83. package/dist/modules/manager/circleci/index.d.ts +1 -1
  84. package/dist/modules/manager/circleci/index.js +1 -1
  85. package/dist/modules/manager/circleci/index.js.map +1 -1
  86. package/dist/modules/manager/cloudbuild/index.d.ts +1 -1
  87. package/dist/modules/manager/cloudbuild/index.js +1 -1
  88. package/dist/modules/manager/cloudbuild/index.js.map +1 -1
  89. package/dist/modules/manager/cocoapods/index.d.ts +1 -1
  90. package/dist/modules/manager/cocoapods/index.js +1 -1
  91. package/dist/modules/manager/cocoapods/index.js.map +1 -1
  92. package/dist/modules/manager/composer/index.d.ts +1 -1
  93. package/dist/modules/manager/composer/index.js +1 -1
  94. package/dist/modules/manager/composer/index.js.map +1 -1
  95. package/dist/modules/manager/conan/index.d.ts +1 -1
  96. package/dist/modules/manager/conan/index.js +1 -1
  97. package/dist/modules/manager/conan/index.js.map +1 -1
  98. package/dist/modules/manager/copier/index.d.ts +1 -1
  99. package/dist/modules/manager/copier/index.js +1 -1
  100. package/dist/modules/manager/copier/index.js.map +1 -1
  101. package/dist/modules/manager/cpanfile/index.d.ts +1 -1
  102. package/dist/modules/manager/cpanfile/index.js +1 -1
  103. package/dist/modules/manager/cpanfile/index.js.map +1 -1
  104. package/dist/modules/manager/crossplane/index.d.ts +1 -1
  105. package/dist/modules/manager/crossplane/index.js +1 -1
  106. package/dist/modules/manager/crossplane/index.js.map +1 -1
  107. package/dist/modules/manager/custom/types.d.ts +1 -1
  108. package/dist/modules/manager/custom/types.js.map +1 -1
  109. package/dist/modules/manager/deps-edn/index.d.ts +1 -1
  110. package/dist/modules/manager/deps-edn/index.js +1 -1
  111. package/dist/modules/manager/deps-edn/index.js.map +1 -1
  112. package/dist/modules/manager/devbox/index.d.ts +1 -1
  113. package/dist/modules/manager/devbox/index.js +1 -1
  114. package/dist/modules/manager/devbox/index.js.map +1 -1
  115. package/dist/modules/manager/devcontainer/index.d.ts +1 -1
  116. package/dist/modules/manager/devcontainer/index.js +4 -1
  117. package/dist/modules/manager/devcontainer/index.js.map +1 -1
  118. package/dist/modules/manager/docker-compose/index.d.ts +1 -1
  119. package/dist/modules/manager/docker-compose/index.js +1 -1
  120. package/dist/modules/manager/docker-compose/index.js.map +1 -1
  121. package/dist/modules/manager/dockerfile/index.d.ts +1 -1
  122. package/dist/modules/manager/dockerfile/index.js +3 -3
  123. package/dist/modules/manager/dockerfile/index.js.map +1 -1
  124. package/dist/modules/manager/droneci/index.d.ts +1 -1
  125. package/dist/modules/manager/droneci/index.js +1 -1
  126. package/dist/modules/manager/droneci/index.js.map +1 -1
  127. package/dist/modules/manager/fingerprint.generated.js +5 -4
  128. package/dist/modules/manager/fingerprint.generated.js.map +1 -1
  129. package/dist/modules/manager/fleet/index.d.ts +1 -1
  130. package/dist/modules/manager/fleet/index.js +1 -1
  131. package/dist/modules/manager/fleet/index.js.map +1 -1
  132. package/dist/modules/manager/flux/index.d.ts +1 -1
  133. package/dist/modules/manager/flux/index.js +1 -1
  134. package/dist/modules/manager/flux/index.js.map +1 -1
  135. package/dist/modules/manager/fvm/index.d.ts +1 -1
  136. package/dist/modules/manager/fvm/index.js +1 -1
  137. package/dist/modules/manager/fvm/index.js.map +1 -1
  138. package/dist/modules/manager/git-submodules/index.d.ts +1 -1
  139. package/dist/modules/manager/git-submodules/index.js +1 -1
  140. package/dist/modules/manager/git-submodules/index.js.map +1 -1
  141. package/dist/modules/manager/github-actions/index.d.ts +1 -1
  142. package/dist/modules/manager/github-actions/index.js +3 -3
  143. package/dist/modules/manager/github-actions/index.js.map +1 -1
  144. package/dist/modules/manager/gitlabci/index.d.ts +1 -1
  145. package/dist/modules/manager/gitlabci/index.js +1 -1
  146. package/dist/modules/manager/gitlabci/index.js.map +1 -1
  147. package/dist/modules/manager/gitlabci-include/index.d.ts +1 -1
  148. package/dist/modules/manager/gitlabci-include/index.js +1 -1
  149. package/dist/modules/manager/gitlabci-include/index.js.map +1 -1
  150. package/dist/modules/manager/glasskube/index.d.ts +1 -1
  151. package/dist/modules/manager/glasskube/index.js +1 -1
  152. package/dist/modules/manager/glasskube/index.js.map +1 -1
  153. package/dist/modules/manager/gleam/index.d.ts +1 -1
  154. package/dist/modules/manager/gleam/index.js +1 -1
  155. package/dist/modules/manager/gleam/index.js.map +1 -1
  156. package/dist/modules/manager/gomod/index.d.ts +1 -1
  157. package/dist/modules/manager/gomod/index.js +1 -1
  158. package/dist/modules/manager/gomod/index.js.map +1 -1
  159. package/dist/modules/manager/gradle/index.d.ts +1 -1
  160. package/dist/modules/manager/gradle/index.js +8 -8
  161. package/dist/modules/manager/gradle/index.js.map +1 -1
  162. package/dist/modules/manager/gradle-wrapper/index.d.ts +1 -1
  163. package/dist/modules/manager/gradle-wrapper/index.js +1 -1
  164. package/dist/modules/manager/gradle-wrapper/index.js.map +1 -1
  165. package/dist/modules/manager/haskell-cabal/index.d.ts +1 -1
  166. package/dist/modules/manager/haskell-cabal/index.js +1 -1
  167. package/dist/modules/manager/haskell-cabal/index.js.map +1 -1
  168. package/dist/modules/manager/helm-requirements/index.d.ts +1 -1
  169. package/dist/modules/manager/helm-requirements/index.js +1 -1
  170. package/dist/modules/manager/helm-requirements/index.js.map +1 -1
  171. package/dist/modules/manager/helm-values/index.d.ts +1 -1
  172. package/dist/modules/manager/helm-values/index.js +1 -1
  173. package/dist/modules/manager/helm-values/index.js.map +1 -1
  174. package/dist/modules/manager/helmfile/index.d.ts +1 -1
  175. package/dist/modules/manager/helmfile/index.js +1 -1
  176. package/dist/modules/manager/helmfile/index.js.map +1 -1
  177. package/dist/modules/manager/helmsman/index.d.ts +1 -1
  178. package/dist/modules/manager/helmsman/index.js +1 -1
  179. package/dist/modules/manager/helmsman/index.js.map +1 -1
  180. package/dist/modules/manager/helmv3/index.d.ts +1 -1
  181. package/dist/modules/manager/helmv3/index.js +1 -1
  182. package/dist/modules/manager/helmv3/index.js.map +1 -1
  183. package/dist/modules/manager/hermit/default-config.d.ts +1 -1
  184. package/dist/modules/manager/hermit/default-config.js +1 -1
  185. package/dist/modules/manager/hermit/default-config.js.map +1 -1
  186. package/dist/modules/manager/hermit/index.d.ts +1 -1
  187. package/dist/modules/manager/hermit/index.js +1 -1
  188. package/dist/modules/manager/hermit/index.js.map +1 -1
  189. package/dist/modules/manager/homebrew/index.d.ts +1 -1
  190. package/dist/modules/manager/homebrew/index.js +1 -1
  191. package/dist/modules/manager/homebrew/index.js.map +1 -1
  192. package/dist/modules/manager/html/index.d.ts +1 -1
  193. package/dist/modules/manager/html/index.js +1 -1
  194. package/dist/modules/manager/html/index.js.map +1 -1
  195. package/dist/modules/manager/jenkins/index.d.ts +1 -1
  196. package/dist/modules/manager/jenkins/index.js +1 -1
  197. package/dist/modules/manager/jenkins/index.js.map +1 -1
  198. package/dist/modules/manager/jsonnet-bundler/index.d.ts +1 -1
  199. package/dist/modules/manager/jsonnet-bundler/index.js +1 -1
  200. package/dist/modules/manager/jsonnet-bundler/index.js.map +1 -1
  201. package/dist/modules/manager/kotlin-script/index.d.ts +1 -1
  202. package/dist/modules/manager/kotlin-script/index.js +1 -1
  203. package/dist/modules/manager/kotlin-script/index.js.map +1 -1
  204. package/dist/modules/manager/kubernetes/index.d.ts +1 -1
  205. package/dist/modules/manager/kubernetes/index.js +1 -1
  206. package/dist/modules/manager/kubernetes/index.js.map +1 -1
  207. package/dist/modules/manager/kustomize/index.d.ts +1 -1
  208. package/dist/modules/manager/kustomize/index.js +1 -1
  209. package/dist/modules/manager/kustomize/index.js.map +1 -1
  210. package/dist/modules/manager/leiningen/index.d.ts +1 -1
  211. package/dist/modules/manager/leiningen/index.js +1 -1
  212. package/dist/modules/manager/leiningen/index.js.map +1 -1
  213. package/dist/modules/manager/maven/index.d.ts +1 -1
  214. package/dist/modules/manager/maven/index.js +4 -4
  215. package/dist/modules/manager/maven/index.js.map +1 -1
  216. package/dist/modules/manager/maven-wrapper/index.d.ts +1 -1
  217. package/dist/modules/manager/maven-wrapper/index.js +1 -1
  218. package/dist/modules/manager/maven-wrapper/index.js.map +1 -1
  219. package/dist/modules/manager/meteor/index.d.ts +1 -1
  220. package/dist/modules/manager/meteor/index.js +1 -1
  221. package/dist/modules/manager/meteor/index.js.map +1 -1
  222. package/dist/modules/manager/mint/index.d.ts +1 -1
  223. package/dist/modules/manager/mint/index.js +1 -1
  224. package/dist/modules/manager/mint/index.js.map +1 -1
  225. package/dist/modules/manager/mise/index.d.ts +1 -1
  226. package/dist/modules/manager/mise/index.js +4 -1
  227. package/dist/modules/manager/mise/index.js.map +1 -1
  228. package/dist/modules/manager/mix/index.d.ts +1 -1
  229. package/dist/modules/manager/mix/index.js +1 -1
  230. package/dist/modules/manager/mix/index.js.map +1 -1
  231. package/dist/modules/manager/nix/index.d.ts +1 -1
  232. package/dist/modules/manager/nix/index.js +1 -1
  233. package/dist/modules/manager/nix/index.js.map +1 -1
  234. package/dist/modules/manager/nodenv/index.d.ts +1 -1
  235. package/dist/modules/manager/nodenv/index.js +1 -1
  236. package/dist/modules/manager/nodenv/index.js.map +1 -1
  237. package/dist/modules/manager/npm/extract/index.js +1 -1
  238. package/dist/modules/manager/npm/extract/index.js.map +1 -1
  239. package/dist/modules/manager/npm/index.d.ts +1 -1
  240. package/dist/modules/manager/npm/index.js +4 -1
  241. package/dist/modules/manager/npm/index.js.map +1 -1
  242. package/dist/modules/manager/nuget/index.d.ts +1 -1
  243. package/dist/modules/manager/nuget/index.js +5 -5
  244. package/dist/modules/manager/nuget/index.js.map +1 -1
  245. package/dist/modules/manager/nvm/index.d.ts +1 -1
  246. package/dist/modules/manager/nvm/index.js +1 -1
  247. package/dist/modules/manager/nvm/index.js.map +1 -1
  248. package/dist/modules/manager/ocb/index.d.ts +1 -1
  249. package/dist/modules/manager/ocb/index.js +1 -1
  250. package/dist/modules/manager/ocb/index.js.map +1 -1
  251. package/dist/modules/manager/osgi/index.d.ts +1 -1
  252. package/dist/modules/manager/osgi/index.js +1 -1
  253. package/dist/modules/manager/osgi/index.js.map +1 -1
  254. package/dist/modules/manager/pep621/index.d.ts +1 -1
  255. package/dist/modules/manager/pep621/index.js +1 -1
  256. package/dist/modules/manager/pep621/index.js.map +1 -1
  257. package/dist/modules/manager/pep723/index.d.ts +1 -1
  258. package/dist/modules/manager/pep723/index.js +1 -1
  259. package/dist/modules/manager/pep723/index.js.map +1 -1
  260. package/dist/modules/manager/pip-compile/common.js +1 -1
  261. package/dist/modules/manager/pip-compile/common.js.map +1 -1
  262. package/dist/modules/manager/pip-compile/extract.d.ts +1 -1
  263. package/dist/modules/manager/pip-compile/extract.js +22 -22
  264. package/dist/modules/manager/pip-compile/extract.js.map +1 -1
  265. package/dist/modules/manager/pip-compile/index.d.ts +1 -1
  266. package/dist/modules/manager/pip-compile/index.js +1 -1
  267. package/dist/modules/manager/pip-compile/index.js.map +1 -1
  268. package/dist/modules/manager/pip_requirements/index.d.ts +1 -1
  269. package/dist/modules/manager/pip_requirements/index.js +1 -1
  270. package/dist/modules/manager/pip_requirements/index.js.map +1 -1
  271. package/dist/modules/manager/pip_setup/index.d.ts +1 -1
  272. package/dist/modules/manager/pip_setup/index.js +1 -1
  273. package/dist/modules/manager/pip_setup/index.js.map +1 -1
  274. package/dist/modules/manager/pipenv/index.d.ts +1 -1
  275. package/dist/modules/manager/pipenv/index.js +1 -1
  276. package/dist/modules/manager/pipenv/index.js.map +1 -1
  277. package/dist/modules/manager/pixi/index.d.ts +1 -1
  278. package/dist/modules/manager/pixi/index.js +3 -3
  279. package/dist/modules/manager/pixi/index.js.map +1 -1
  280. package/dist/modules/manager/poetry/index.d.ts +1 -1
  281. package/dist/modules/manager/poetry/index.js +1 -1
  282. package/dist/modules/manager/poetry/index.js.map +1 -1
  283. package/dist/modules/manager/pre-commit/index.d.ts +1 -1
  284. package/dist/modules/manager/pre-commit/index.js +1 -1
  285. package/dist/modules/manager/pre-commit/index.js.map +1 -1
  286. package/dist/modules/manager/pub/index.d.ts +1 -1
  287. package/dist/modules/manager/pub/index.js +1 -1
  288. package/dist/modules/manager/pub/index.js.map +1 -1
  289. package/dist/modules/manager/puppet/index.d.ts +1 -1
  290. package/dist/modules/manager/puppet/index.js +1 -1
  291. package/dist/modules/manager/puppet/index.js.map +1 -1
  292. package/dist/modules/manager/pyenv/index.d.ts +1 -1
  293. package/dist/modules/manager/pyenv/index.js +1 -1
  294. package/dist/modules/manager/pyenv/index.js.map +1 -1
  295. package/dist/modules/manager/renovate-config-presets/extract.d.ts +2 -0
  296. package/dist/modules/manager/renovate-config-presets/extract.js +52 -0
  297. package/dist/modules/manager/renovate-config-presets/extract.js.map +1 -0
  298. package/dist/modules/manager/renovate-config-presets/index.d.ts +6 -0
  299. package/dist/modules/manager/renovate-config-presets/index.js +21 -0
  300. package/dist/modules/manager/renovate-config-presets/index.js.map +1 -0
  301. package/dist/modules/manager/renovate-config-presets/schema.d.ts +8 -0
  302. package/dist/modules/manager/renovate-config-presets/schema.js +9 -0
  303. package/dist/modules/manager/renovate-config-presets/schema.js.map +1 -0
  304. package/dist/modules/manager/ruby-version/index.d.ts +1 -1
  305. package/dist/modules/manager/ruby-version/index.js +1 -1
  306. package/dist/modules/manager/ruby-version/index.js.map +1 -1
  307. package/dist/modules/manager/runtime-version/index.d.ts +1 -1
  308. package/dist/modules/manager/runtime-version/index.js +1 -1
  309. package/dist/modules/manager/runtime-version/index.js.map +1 -1
  310. package/dist/modules/manager/sbt/index.d.ts +1 -1
  311. package/dist/modules/manager/sbt/index.js +5 -5
  312. package/dist/modules/manager/sbt/index.js.map +1 -1
  313. package/dist/modules/manager/scalafmt/index.d.ts +1 -1
  314. package/dist/modules/manager/scalafmt/index.js +1 -1
  315. package/dist/modules/manager/scalafmt/index.js.map +1 -1
  316. package/dist/modules/manager/setup-cfg/index.d.ts +1 -1
  317. package/dist/modules/manager/setup-cfg/index.js +1 -1
  318. package/dist/modules/manager/setup-cfg/index.js.map +1 -1
  319. package/dist/modules/manager/sveltos/index.d.ts +1 -1
  320. package/dist/modules/manager/sveltos/index.js +1 -1
  321. package/dist/modules/manager/sveltos/index.js.map +1 -1
  322. package/dist/modules/manager/swift/index.d.ts +1 -1
  323. package/dist/modules/manager/swift/index.js +1 -1
  324. package/dist/modules/manager/swift/index.js.map +1 -1
  325. package/dist/modules/manager/tekton/index.d.ts +1 -1
  326. package/dist/modules/manager/tekton/index.js +1 -1
  327. package/dist/modules/manager/tekton/index.js.map +1 -1
  328. package/dist/modules/manager/terraform/index.d.ts +1 -1
  329. package/dist/modules/manager/terraform/index.js +1 -1
  330. package/dist/modules/manager/terraform/index.js.map +1 -1
  331. package/dist/modules/manager/terraform-version/index.d.ts +1 -1
  332. package/dist/modules/manager/terraform-version/index.js +1 -1
  333. package/dist/modules/manager/terraform-version/index.js.map +1 -1
  334. package/dist/modules/manager/terragrunt/index.d.ts +1 -1
  335. package/dist/modules/manager/terragrunt/index.js +1 -1
  336. package/dist/modules/manager/terragrunt/index.js.map +1 -1
  337. package/dist/modules/manager/terragrunt-version/index.d.ts +1 -1
  338. package/dist/modules/manager/terragrunt-version/index.js +1 -1
  339. package/dist/modules/manager/terragrunt-version/index.js.map +1 -1
  340. package/dist/modules/manager/tflint-plugin/index.d.ts +1 -1
  341. package/dist/modules/manager/tflint-plugin/index.js +1 -1
  342. package/dist/modules/manager/tflint-plugin/index.js.map +1 -1
  343. package/dist/modules/manager/travis/index.d.ts +1 -1
  344. package/dist/modules/manager/travis/index.js +1 -1
  345. package/dist/modules/manager/travis/index.js.map +1 -1
  346. package/dist/modules/manager/velaci/index.d.ts +1 -1
  347. package/dist/modules/manager/velaci/index.js +1 -1
  348. package/dist/modules/manager/velaci/index.js.map +1 -1
  349. package/dist/modules/manager/vendir/index.d.ts +1 -1
  350. package/dist/modules/manager/vendir/index.js +1 -1
  351. package/dist/modules/manager/vendir/index.js.map +1 -1
  352. package/dist/modules/manager/woodpecker/index.d.ts +1 -1
  353. package/dist/modules/manager/woodpecker/index.js +1 -1
  354. package/dist/modules/manager/woodpecker/index.js.map +1 -1
  355. package/dist/workers/repository/extract/extract-fingerprint-config.js +1 -1
  356. package/dist/workers/repository/extract/extract-fingerprint-config.js.map +1 -1
  357. package/dist/workers/repository/extract/file-match.js +5 -6
  358. package/dist/workers/repository/extract/file-match.js.map +1 -1
  359. package/dist/workers/repository/update/pr/code-owners.js +7 -7
  360. package/dist/workers/repository/update/pr/code-owners.js.map +1 -1
  361. package/dist/workers/types.d.ts +1 -1
  362. package/dist/workers/types.js.map +1 -1
  363. package/package.json +1 -1
  364. package/renovate-schema.json +255 -239
@@ -4,7 +4,7 @@ export declare const displayName = "nvm";
4
4
  export declare const url = "https://github.com/nvm-sh/nvm#readme";
5
5
  export declare const categories: Category[];
6
6
  export declare const defaultConfig: {
7
- fileMatch: string[];
7
+ managerFilePatterns: string[];
8
8
  versioning: string;
9
9
  pinDigests: boolean;
10
10
  };
@@ -10,7 +10,7 @@ exports.displayName = 'nvm';
10
10
  exports.url = 'https://github.com/nvm-sh/nvm#readme';
11
11
  exports.categories = ['js', 'node'];
12
12
  exports.defaultConfig = {
13
- fileMatch: ['(^|/)\\.nvmrc$'],
13
+ managerFilePatterns: ['/(^|/)\\.nvmrc$/'],
14
14
  versioning: nodeVersioning.id,
15
15
  pinDigests: false,
16
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/nvm/index.ts"],"names":[],"mappings":";;;;AACA,gEAAsE;AACtE,8EAAwD;AAExD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,KAAK,CAAC;AACpB,QAAA,GAAG,GAAG,sCAAsC,CAAC;AAC7C,QAAA,UAAU,GAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,gBAAgB,CAAC;IAC7B,UAAU,EAAE,cAAc,CAAC,EAAE;IAC7B,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,oCAAqB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { NodeVersionDatasource } from '../../datasource/node-version';\nimport * as nodeVersioning from '../../versioning/node';\n\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'nvm';\nexport const url = 'https://github.com/nvm-sh/nvm#readme';\nexport const categories: Category[] = ['js', 'node'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)\\\\.nvmrc$'],\n versioning: nodeVersioning.id,\n pinDigests: false,\n};\n\nexport const supportedDatasources = [NodeVersionDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/nvm/index.ts"],"names":[],"mappings":";;;;AACA,gEAAsE;AACtE,8EAAwD;AAExD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,KAAK,CAAC;AACpB,QAAA,GAAG,GAAG,sCAAsC,CAAC;AAC7C,QAAA,UAAU,GAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,kBAAkB,CAAC;IACzC,UAAU,EAAE,cAAc,CAAC,EAAE;IAC7B,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,oCAAqB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { NodeVersionDatasource } from '../../datasource/node-version';\nimport * as nodeVersioning from '../../versioning/node';\n\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'nvm';\nexport const url = 'https://github.com/nvm-sh/nvm#readme';\nexport const categories: Category[] = ['js', 'node'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)\\\\.nvmrc$/'],\n versioning: nodeVersioning.id,\n pinDigests: false,\n};\n\nexport const supportedDatasources = [NodeVersionDatasource.id];\n"]}
@@ -5,6 +5,6 @@ export declare const displayName = "OpenTelemetry Collector Builder (ocb)";
5
5
  export declare const url = "https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder";
6
6
  export declare const categories: Category[];
7
7
  export declare const defaultConfig: {
8
- fileMatch: never[];
8
+ managerFilePatterns: never[];
9
9
  };
10
10
  export declare const supportedDatasources: string[];
@@ -10,7 +10,7 @@ exports.displayName = 'OpenTelemetry Collector Builder (ocb)';
10
10
  exports.url = 'https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder';
11
11
  exports.categories = ['golang'];
12
12
  exports.defaultConfig = {
13
- fileMatch: [],
13
+ managerFilePatterns: [],
14
14
  };
15
15
  exports.supportedDatasources = [go_1.GoDatasource.id];
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/ocb/index.ts"],"names":[],"mappings":";;;AACA,4CAAmD;AAEnD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,uCAAuC,CAAC;AACtD,QAAA,GAAG,GACd,iFAAiF,CAAC;AACvE,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,EAAE;CACd,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,iBAAY,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GoDatasource } from '../../datasource/go';\n\nexport { extractPackageFile } from './extract';\nexport { bumpPackageVersion } from './update';\n\nexport const displayName = 'OpenTelemetry Collector Builder (ocb)';\nexport const url =\n 'https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder';\nexport const categories: Category[] = ['golang'];\n\nexport const defaultConfig = {\n fileMatch: [],\n};\n\nexport const supportedDatasources = [GoDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/ocb/index.ts"],"names":[],"mappings":";;;AACA,4CAAmD;AAEnD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,uCAAuC,CAAC;AACtD,QAAA,GAAG,GACd,iFAAiF,CAAC;AACvE,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,iBAAY,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GoDatasource } from '../../datasource/go';\n\nexport { extractPackageFile } from './extract';\nexport { bumpPackageVersion } from './update';\n\nexport const displayName = 'OpenTelemetry Collector Builder (ocb)';\nexport const url =\n 'https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder';\nexport const categories: Category[] = ['golang'];\n\nexport const defaultConfig = {\n managerFilePatterns: [],\n};\n\nexport const supportedDatasources = [GoDatasource.id];\n"]}
@@ -1,6 +1,6 @@
1
1
  export { extractPackageFile } from './extract';
2
2
  export declare const displayName = "OSGi";
3
3
  export declare const defaultConfig: {
4
- fileMatch: string[];
4
+ managerFilePatterns: string[];
5
5
  };
6
6
  export declare const supportedDatasources: string[];
@@ -6,7 +6,7 @@ var extract_1 = require("./extract");
6
6
  Object.defineProperty(exports, "extractPackageFile", { enumerable: true, get: function () { return extract_1.extractPackageFile; } });
7
7
  exports.displayName = 'OSGi';
8
8
  exports.defaultConfig = {
9
- fileMatch: ['(^|/)src/main/features/.+\\.json$'],
9
+ managerFilePatterns: ['/(^|/)src/main/features/.+\\.json$/'],
10
10
  };
11
11
  exports.supportedDatasources = [maven_1.MavenDatasource.id];
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/osgi/index.ts"],"names":[],"mappings":";;;AAAA,kDAAyD;AAEzD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,MAAM,CAAC;AAErB,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,mCAAmC,CAAC;CACjD,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,uBAAe,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { MavenDatasource } from '../../datasource/maven';\n\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'OSGi';\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)src/main/features/.+\\\\.json$'],\n};\n\nexport const supportedDatasources = [MavenDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/osgi/index.ts"],"names":[],"mappings":";;;AAAA,kDAAyD;AAEzD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,MAAM,CAAC;AAErB,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,qCAAqC,CAAC;CAC7D,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,uBAAe,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { MavenDatasource } from '../../datasource/maven';\n\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'OSGi';\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)src/main/features/.+\\\\.json$/'],\n};\n\nexport const supportedDatasources = [MavenDatasource.id];\n"]}
@@ -7,6 +7,6 @@ export declare const displayName = "PEP 621";
7
7
  export declare const url = "https://peps.python.org/pep-0621";
8
8
  export declare const categories: Category[];
9
9
  export declare const defaultConfig: {
10
- fileMatch: string[];
10
+ managerFilePatterns: string[];
11
11
  };
12
12
  export declare const supportedDatasources: string[];
@@ -13,7 +13,7 @@ exports.displayName = 'PEP 621';
13
13
  exports.url = 'https://peps.python.org/pep-0621';
14
14
  exports.categories = ['python'];
15
15
  exports.defaultConfig = {
16
- fileMatch: ['(^|/)pyproject\\.toml$'],
16
+ managerFilePatterns: ['/(^|/)pyproject\\.toml$/'],
17
17
  };
18
18
  exports.supportedDatasources = [pypi_1.PypiDatasource.id];
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep621/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AACvD,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAC3B,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,WAAW,GAAG,SAAS,CAAC;AACxB,QAAA,GAAG,GAAG,kCAAkC,CAAC;AACzC,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,wBAAwB,CAAC;CACtC,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\nexport { bumpPackageVersion } from './update';\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const displayName = 'PEP 621';\nexport const url = 'https://peps.python.org/pep-0621';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)pyproject\\\\.toml$'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep621/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AACvD,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAC3B,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,WAAW,GAAG,SAAS,CAAC;AACxB,QAAA,GAAG,GAAG,kCAAkC,CAAC;AACzC,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,0BAA0B,CAAC;CAClD,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\nexport { bumpPackageVersion } from './update';\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const displayName = 'PEP 621';\nexport const url = 'https://peps.python.org/pep-0621';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)pyproject\\\\.toml$/'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
@@ -4,6 +4,6 @@ export declare const displayName = "PEP 723";
4
4
  export declare const url = "https://peps.python.org/pep-0723";
5
5
  export declare const categories: Category[];
6
6
  export declare const defaultConfig: {
7
- fileMatch: never[];
7
+ managerFilePatterns: never[];
8
8
  };
9
9
  export declare const supportedDatasources: string[];
@@ -9,7 +9,7 @@ exports.url = 'https://peps.python.org/pep-0723';
9
9
  exports.categories = ['python'];
10
10
  exports.defaultConfig = {
11
11
  // Since any Python file can embed PEP 723 metadata, make the feature opt-in, to avoid parsing all Python files.
12
- fileMatch: [],
12
+ managerFilePatterns: [],
13
13
  };
14
14
  exports.supportedDatasources = [pypi_1.PypiDatasource.id];
15
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep723/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AACvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,SAAS,CAAC;AACxB,QAAA,GAAG,GAAG,kCAAkC,CAAC;AACzC,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,gHAAgH;IAChH,SAAS,EAAE,EAAE;CACd,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'PEP 723';\nexport const url = 'https://peps.python.org/pep-0723';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n // Since any Python file can embed PEP 723 metadata, make the feature opt-in, to avoid parsing all Python files.\n fileMatch: [],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pep723/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AACvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,SAAS,CAAC;AACxB,QAAA,GAAG,GAAG,kCAAkC,CAAC;AACzC,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,gHAAgH;IAChH,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'PEP 723';\nexport const url = 'https://peps.python.org/pep-0723';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n // Since any Python file can embed PEP 723 metadata, make the feature opt-in, to avoid parsing all Python files.\n managerFilePatterns: [],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
@@ -317,7 +317,7 @@ function matchManager(filename) {
317
317
  if (filename.endsWith('pyproject.toml')) {
318
318
  return 'pep621';
319
319
  }
320
- // naive, could be improved, maybe use pip_requirements.fileMatch
320
+ // naive, could be improved, maybe use pip_requirements.managerFilePatterns
321
321
  if (filename.endsWith('.in') || filename.endsWith('.txt')) {
322
322
  return 'pip_requirements';
323
323
  }
@@ -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;AAsDD,oDA+GC;AAOD,oDAqBC;AAoDD,kFA0BC;AAED,oCAeC;;AA3YD,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,CA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C,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,iEAAiE;IACjE,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 ...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];\nexport const allowedOptions: Record<CommandType, string[]> = {\n 'pip-compile': [\n '--all-extras',\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.fileMatch\n if (filename.endsWith('.in') || filename.endsWith('.txt')) {\n return 'pip_requirements';\n }\n return 'unknown';\n}\n"]}
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;AAsDD,oDA+GC;AAOD,oDAqBC;AAoDD,kFA0BC;AAED,oCAeC;;AA3YD,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,4BAA4B,CAC1C,MAA6B;IAE7B,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACpC,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;IAEjC,IAAI,YAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,eAAM,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACtD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,sBAAsB,CAAC,MAA6B;IAClE,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,MAAM,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AAI,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 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 ...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];\nexport const allowedOptions: Record<CommandType, string[]> = {\n 'pip-compile': [\n '--all-extras',\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,3 +1,3 @@
1
1
  import type { ExtractConfig, PackageFile, PackageFileContent } from '../types';
2
2
  export declare function extractPackageFile(content: string, packageFile: string, _config: ExtractConfig): PackageFileContent | null;
3
- export declare function extractAllPackageFiles(config: ExtractConfig, fileMatches: string[]): Promise<PackageFile[] | null>;
3
+ export declare function extractAllPackageFiles(config: ExtractConfig, matchedFiles: string[]): Promise<PackageFile[] | null>;
@@ -28,39 +28,39 @@ function extractPackageFile(content, packageFile, _config) {
28
28
  return null;
29
29
  }
30
30
  }
31
- async function extractAllPackageFiles(config, fileMatches) {
31
+ async function extractAllPackageFiles(config, matchedFiles) {
32
32
  logger_1.logger.trace('pip-compile.extractAllPackageFiles()');
33
33
  const lockFileArgs = new Map();
34
34
  const depsBetweenFiles = [];
35
35
  const packageFiles = new Map();
36
36
  const lockFileSources = new Map();
37
- for (const fileMatch of fileMatches) {
38
- const fileContent = await (0, fs_1.readLocalFile)(fileMatch, 'utf8');
37
+ for (const matchedFile of matchedFiles) {
38
+ const fileContent = await (0, fs_1.readLocalFile)(matchedFile, 'utf8');
39
39
  if (!fileContent) {
40
- logger_1.logger.debug(`pip-compile: no content found for fileMatch ${fileMatch}`);
40
+ logger_1.logger.debug(`pip-compile: no content found for file ${matchedFile}`);
41
41
  continue;
42
42
  }
43
43
  let compileArgs;
44
44
  let compileDir;
45
45
  try {
46
- compileArgs = (0, common_1.extractHeaderCommand)(fileContent, fileMatch);
47
- compileDir = (0, utils_1.inferCommandExecDir)(fileMatch, compileArgs.outputFile);
46
+ compileArgs = (0, common_1.extractHeaderCommand)(fileContent, matchedFile);
47
+ compileDir = (0, utils_1.inferCommandExecDir)(matchedFile, compileArgs.outputFile);
48
48
  }
49
49
  catch (error) {
50
- logger_1.logger.warn({ fileMatch, errorMessage: error.message }, 'pip-compile error');
50
+ logger_1.logger.warn({ matchedFile, errorMessage: error.message }, 'pip-compile error');
51
51
  continue;
52
52
  }
53
- lockFileArgs.set(fileMatch, compileArgs);
53
+ lockFileArgs.set(matchedFile, compileArgs);
54
54
  for (const constraint of (0, array_1.coerceArray)(compileArgs.constraintsFiles)) {
55
55
  depsBetweenFiles.push({
56
56
  sourceFile: constraint,
57
- outputFile: fileMatch,
57
+ outputFile: matchedFile,
58
58
  type: 'constraint',
59
59
  });
60
60
  }
61
61
  const lockedDeps = (0, extract_1.extractPackageFile)(fileContent)?.deps;
62
62
  if (!lockedDeps) {
63
- logger_1.logger.debug({ fileMatch }, 'pip-compile: Failed to extract dependencies from lock file');
63
+ logger_1.logger.debug({ matchedFile }, 'pip-compile: Failed to extract dependencies from lock file');
64
64
  continue;
65
65
  }
66
66
  for (const relativeSourceFile of compileArgs.sourceFiles) {
@@ -69,27 +69,27 @@ async function extractAllPackageFiles(config, fileMatches) {
69
69
  (0, util_1.ensureLocalPath)(packageFile);
70
70
  }
71
71
  catch {
72
- logger_1.logger.warn({ fileMatch, packageFile }, 'pip-compile: Source file path outside of repository');
72
+ logger_1.logger.warn({ matchedFile, packageFile }, 'pip-compile: Source file path outside of repository');
73
73
  continue;
74
74
  }
75
75
  depsBetweenFiles.push({
76
76
  sourceFile: packageFile,
77
- outputFile: fileMatch,
77
+ outputFile: matchedFile,
78
78
  type: 'requirement',
79
79
  });
80
- if (fileMatches.includes(packageFile)) {
80
+ if (matchedFiles.includes(packageFile)) {
81
81
  // TODO(not7cd): do something about it
82
- logger_1.logger.warn({ sourceFile: packageFile, lockFile: fileMatch }, 'pip-compile: lock file acts as source file for another lock file');
82
+ logger_1.logger.warn({ sourceFile: packageFile, lockFile: matchedFile }, 'pip-compile: lock file acts as source file for another lock file');
83
83
  continue;
84
84
  }
85
85
  if (packageFiles.has(packageFile)) {
86
86
  logger_1.logger.debug(`pip-compile: ${packageFile} used in multiple output files`);
87
87
  const existingPackageFile = packageFiles.get(packageFile);
88
- existingPackageFile.lockFiles.push(fileMatch);
88
+ existingPackageFile.lockFiles.push(matchedFile);
89
89
  extendWithIndirectDeps(existingPackageFile, lockedDeps);
90
- const source = lockFileSources.get(fileMatch) ?? [];
90
+ const source = lockFileSources.get(matchedFile) ?? [];
91
91
  source.push(existingPackageFile);
92
- lockFileSources.set(fileMatch, source);
92
+ lockFileSources.set(matchedFile, source);
93
93
  continue;
94
94
  }
95
95
  const content = await (0, fs_1.readLocalFile)(packageFile, 'utf8');
@@ -127,19 +127,19 @@ async function extractAllPackageFiles(config, fileMatches) {
127
127
  dep.lockedVersion = lockedVersion;
128
128
  }
129
129
  else {
130
- logger_1.logger.warn({ depName: dep.depName, lockFile: fileMatch }, 'pip-compile: dependency not found in lock file');
130
+ logger_1.logger.warn({ depName: dep.depName, lockFile: matchedFile }, 'pip-compile: dependency not found in lock file');
131
131
  }
132
132
  }
133
133
  extendWithIndirectDeps(packageFileContent, lockedDeps);
134
134
  const newPackageFile = {
135
135
  ...packageFileContent,
136
- lockFiles: [fileMatch],
136
+ lockFiles: [matchedFile],
137
137
  packageFile,
138
138
  };
139
139
  packageFiles.set(packageFile, newPackageFile);
140
- const source = lockFileSources.get(fileMatch) ?? [];
140
+ const source = lockFileSources.get(matchedFile) ?? [];
141
141
  source.push(newPackageFile);
142
- lockFileSources.set(fileMatch, source);
142
+ lockFileSources.set(matchedFile, source);
143
143
  }
144
144
  else {
145
145
  logger_1.logger.warn({ packageFile }, 'pip-compile: failed to find dependencies in source file');
@@ -154,7 +154,7 @@ async function extractAllPackageFiles(config, fileMatches) {
154
154
  for (const packageFile of [...result].reverse()) {
155
155
  for (const reqFile of packageFile.managerData?.requirementsFiles ?? []) {
156
156
  let sourceFiles = undefined;
157
- if (fileMatches.includes(reqFile)) {
157
+ if (matchedFiles.includes(reqFile)) {
158
158
  sourceFiles = lockFileSources.get(reqFile);
159
159
  }
160
160
  else if (packageFiles.has(reqFile)) {
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/extract.ts"],"names":[],"mappings":";;AAqBA,gDAyBC;AAED,wDAiMC;;AAjPD,0DAA0B;AAC1B,4CAAyC;AACzC,+CAAkD;AAClD,yCAAiD;AACjD,gDAAwD;AACxD,yDAA4F;AAC5F,4CAAwE;AAOxE,qCAA8D;AAE9D,mCAIiB;AAEjB,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB,EACnB,OAAsB;IAEtB,eAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,qBAAY,EAAC,WAAW,CAAC,CAAC;IAC1C,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,IAAA,8BAAkB,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QAC3D,KAAK,kBAAkB;YACrB,OAAO,IAAA,4BAAuB,EAAC,OAAO,CAAC,CAAC;QAC1C,KAAK,SAAS;YACZ,eAAM,CAAC,IAAI,CACT,EAAE,WAAW,EAAE,EACf,0DAA0D,CAC3D,CAAC;YACF,OAAO,IAAI,CAAC;Q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coerceArray } from '../../../util/array';\nimport { readLocalFile } from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport { extractPackageFile as extractRequirementsFile } from '../pip_requirements/extract';\nimport { extractPackageFile as extractSetupPyFile } from '../pip_setup';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFile,\n PackageFileContent,\n} from '../types';\nimport { extractHeaderCommand, matchManager } from './common';\nimport type { DependencyBetweenFiles, PipCompileArgs } from './types';\nimport {\n generateMermaidGraph,\n inferCommandExecDir,\n sortPackageFiles,\n} from './utils';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n _config: ExtractConfig,\n): PackageFileContent | null {\n logger.trace('pip-compile.extractPackageFile()');\n const manager = matchManager(packageFile);\n switch (manager) {\n case 'pip_setup':\n return extractSetupPyFile(content, packageFile, _config);\n case 'pip_requirements':\n return extractRequirementsFile(content);\n case 'unknown':\n logger.warn(\n { packageFile },\n `pip-compile: could not determine manager for source file`,\n );\n return null;\n default:\n logger.warn(\n { packageFile, manager },\n `pip-compile: support for manager is not yet implemented`,\n );\n return null;\n }\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n fileMatches: string[],\n): Promise<PackageFile[] | null> {\n logger.trace('pip-compile.extractAllPackageFiles()');\n const lockFileArgs = new Map<string, PipCompileArgs>();\n const depsBetweenFiles: DependencyBetweenFiles[] = [];\n const packageFiles = new Map<string, PackageFile>();\n const lockFileSources = new Map<string, PackageFile[]>();\n for (const fileMatch of fileMatches) {\n const fileContent = await readLocalFile(fileMatch, 'utf8');\n if (!fileContent) {\n logger.debug(`pip-compile: no content found for fileMatch ${fileMatch}`);\n continue;\n }\n let compileArgs: PipCompileArgs;\n let compileDir: string;\n try {\n compileArgs = extractHeaderCommand(fileContent, fileMatch);\n compileDir = inferCommandExecDir(fileMatch, compileArgs.outputFile);\n } catch (error) {\n logger.warn(\n { fileMatch, errorMessage: error.message },\n 'pip-compile error',\n );\n continue;\n }\n lockFileArgs.set(fileMatch, compileArgs);\n for (const constraint of coerceArray(compileArgs.constraintsFiles)) {\n depsBetweenFiles.push({\n sourceFile: constraint,\n outputFile: fileMatch,\n type: 'constraint',\n });\n }\n const lockedDeps = extractRequirementsFile(fileContent)?.deps;\n if (!lockedDeps) {\n logger.debug(\n { fileMatch },\n 'pip-compile: Failed to extract dependencies from lock file',\n );\n continue;\n }\n\n for (const relativeSourceFile of compileArgs.sourceFiles) {\n const packageFile = upath.normalizeTrim(\n upath.join(compileDir, relativeSourceFile),\n );\n try {\n ensureLocalPath(packageFile);\n } catch {\n logger.warn(\n { fileMatch, packageFile },\n 'pip-compile: Source file path outside of repository',\n );\n continue;\n }\n depsBetweenFiles.push({\n sourceFile: packageFile,\n outputFile: fileMatch,\n type: 'requirement',\n });\n if (fileMatches.includes(packageFile)) {\n // TODO(not7cd): do something about it\n logger.warn(\n { sourceFile: packageFile, lockFile: fileMatch },\n 'pip-compile: lock file acts as source file for another lock file',\n );\n continue;\n }\n if (packageFiles.has(packageFile)) {\n logger.debug(\n `pip-compile: ${packageFile} used in multiple output files`,\n );\n const existingPackageFile = packageFiles.get(packageFile)!;\n existingPackageFile.lockFiles!.push(fileMatch);\n extendWithIndirectDeps(existingPackageFile, lockedDeps);\n const source = lockFileSources.get(fileMatch) ?? [];\n source.push(existingPackageFile);\n lockFileSources.set(fileMatch, source);\n continue;\n }\n const content = await readLocalFile(packageFile, 'utf8');\n if (!content) {\n logger.debug(`pip-compile: No content for source file ${packageFile}`);\n continue;\n }\n\n const packageFileContent = extractPackageFile(\n content,\n packageFile,\n config,\n );\n if (packageFileContent) {\n if (packageFileContent.managerData?.requirementsFiles) {\n packageFileContent.managerData.requirementsFiles =\n packageFileContent.managerData.requirementsFiles.map(\n (file: string) => upath.normalize(upath.join(compileDir, file)),\n );\n for (const file of packageFileContent.managerData.requirementsFiles) {\n depsBetweenFiles.push({\n sourceFile: file,\n outputFile: packageFile,\n type: 'requirement',\n });\n }\n }\n if (packageFileContent.managerData?.constraintsFiles) {\n packageFileContent.managerData.constraintsFiles =\n packageFileContent.managerData.constraintsFiles.map(\n (file: string) => upath.normalize(upath.join(compileDir, file)),\n );\n for (const file of packageFileContent.managerData.constraintsFiles) {\n depsBetweenFiles.push({\n sourceFile: file,\n outputFile: packageFile,\n type: 'requirement',\n });\n }\n }\n for (const dep of packageFileContent.deps) {\n const lockedVersion = lockedDeps?.find(\n (lockedDep) => lockedDep.packageName === dep.packageName,\n )?.currentVersion;\n if (lockedVersion) {\n dep.lockedVersion = lockedVersion;\n } else {\n logger.warn(\n { depName: dep.depName, lockFile: fileMatch },\n 'pip-compile: dependency not found in lock file',\n );\n }\n }\n extendWithIndirectDeps(packageFileContent, lockedDeps);\n const newPackageFile: PackageFile = {\n ...packageFileContent,\n lockFiles: [fileMatch],\n packageFile,\n };\n packageFiles.set(packageFile, newPackageFile);\n const source = lockFileSources.get(fileMatch) ?? [];\n source.push(newPackageFile);\n lockFileSources.set(fileMatch, source);\n } else {\n logger.warn(\n { packageFile },\n 'pip-compile: failed to find dependencies in source file',\n );\n }\n }\n }\n if (packageFiles.size === 0) {\n return null;\n }\n const result: PackageFile[] = sortPackageFiles(\n depsBetweenFiles,\n packageFiles,\n );\n\n // This needs to go in reverse order to handle transitive dependencies\n for (const packageFile of [...result].reverse()) {\n for (const reqFile of packageFile.managerData?.requirementsFiles ?? []) {\n let sourceFiles: PackageFile[] | undefined = undefined;\n if (fileMatches.includes(reqFile)) {\n sourceFiles = lockFileSources.get(reqFile);\n } else if (packageFiles.has(reqFile)) {\n sourceFiles = [packageFiles.get(reqFile)!];\n }\n if (!sourceFiles) {\n logger.warn(\n { packageFile: packageFile.packageFile, requirementsFile: reqFile },\n 'pip-compile: Package file references a file which does not appear to be a requirements file managed by pip-compile',\n );\n continue;\n }\n // These get reversed before merging so that we keep the last instance of any common\n // lock files, since a file that -r includes multiple lock files needs to be updated after\n // all of the lock files it includes\n const files = new Set([...packageFile.lockFiles!].reverse());\n for (const sourceFile of sourceFiles) {\n const merged = new Set(files);\n for (const lockFile of [...sourceFile.lockFiles!].reverse()) {\n merged.add(lockFile);\n }\n sourceFile.lockFiles = Array.from(merged).reverse();\n }\n }\n }\n logger.debug(\n 'pip-compile: dependency graph:\\n' +\n generateMermaidGraph(depsBetweenFiles, lockFileArgs),\n );\n return result;\n}\n\nfunction extendWithIndirectDeps(\n packageFileContent: PackageFileContent,\n lockedDeps: PackageDependency[],\n): void {\n for (const lockedDep of lockedDeps) {\n if (\n !packageFileContent.deps.find(\n (dep) => lockedDep.packageName === dep.packageName,\n )\n ) {\n packageFileContent.deps.push(indirectDep(lockedDep));\n }\n }\n}\n\n/**\n * As indirect dependecies don't exist in the package file, we need to\n * create them from the lock file.\n *\n * By removing currentValue and currentVersion, we ensure that they\n * are handled like unconstrained dependencies with locked version.\n * Such packages are updated when their update strategy\n * is set to 'update-lockfile',\n * see: lib/workers/repository/process/lookup/index.ts.\n *\n * By disabling them by default, we won't create noise by updating them.\n * Unless they have vulnerability alert, then they are forced to be updated.\n * @param dep dependency extracted from lock file (requirements.txt)\n * @returns unconstrained dependency with locked version\n */\nfunction indirectDep(dep: PackageDependency): PackageDependency {\n const result = {\n ...dep,\n lockedVersion: dep.currentVersion,\n depType: 'indirect',\n enabled: false,\n };\n delete result.currentValue;\n delete result.currentVersion;\n return result;\n}\n"]}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/extract.ts"],"names":[],"mappings":";;AAqBA,gDAyBC;AAED,wDAiMC;;AAjPD,0DAA0B;AAC1B,4CAAyC;AACzC,+CAAkD;AAClD,yCAAiD;AACjD,gDAAwD;AACxD,yDAA4F;AAC5F,4CAAwE;AAOxE,qCAA8D;AAE9D,mCAIiB;AAEjB,SAAgB,kBAAkB,CAChC,OAAe,EACf,WAAmB,EACnB,OAAsB;IAEtB,eAAM,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,qBAAY,EAAC,WAAW,CAAC,CAA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H,SAAS,WAAW,CAAC,GAAsB;IACzC,MAAM,MAAM,GAAG;QACb,GAAG,GAAG;QACN,aAAa,EAAE,GAAG,CAAC,cAAc;QACjC,OAAO,EAAE,UAAU;QACnB,OAAO,EAAE,KAAK;KACf,CAAC;IACF,OAAO,MAAM,CAAC,YAAY,CAAC;IAC3B,OAAO,MAAM,CAAC,cAAc,CAAC;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import upath from 'upath';\nimport { logger } from '../../../logger';\nimport { coerceArray } from '../../../util/array';\nimport { readLocalFile } from '../../../util/fs';\nimport { ensureLocalPath } from '../../../util/fs/util';\nimport { extractPackageFile as extractRequirementsFile } from '../pip_requirements/extract';\nimport { extractPackageFile as extractSetupPyFile } from '../pip_setup';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFile,\n PackageFileContent,\n} from '../types';\nimport { extractHeaderCommand, matchManager } from './common';\nimport type { DependencyBetweenFiles, PipCompileArgs } from './types';\nimport {\n generateMermaidGraph,\n inferCommandExecDir,\n sortPackageFiles,\n} from './utils';\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n _config: ExtractConfig,\n): PackageFileContent | null {\n logger.trace('pip-compile.extractPackageFile()');\n const manager = matchManager(packageFile);\n switch (manager) {\n case 'pip_setup':\n return extractSetupPyFile(content, packageFile, _config);\n case 'pip_requirements':\n return extractRequirementsFile(content);\n case 'unknown':\n logger.warn(\n { packageFile },\n `pip-compile: could not determine manager for source file`,\n );\n return null;\n default:\n logger.warn(\n { packageFile, manager },\n `pip-compile: support for manager is not yet implemented`,\n );\n return null;\n }\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n matchedFiles: string[],\n): Promise<PackageFile[] | null> {\n logger.trace('pip-compile.extractAllPackageFiles()');\n const lockFileArgs = new Map<string, PipCompileArgs>();\n const depsBetweenFiles: DependencyBetweenFiles[] = [];\n const packageFiles = new Map<string, PackageFile>();\n const lockFileSources = new Map<string, PackageFile[]>();\n for (const matchedFile of matchedFiles) {\n const fileContent = await readLocalFile(matchedFile, 'utf8');\n if (!fileContent) {\n logger.debug(`pip-compile: no content found for file ${matchedFile}`);\n continue;\n }\n let compileArgs: PipCompileArgs;\n let compileDir: string;\n try {\n compileArgs = extractHeaderCommand(fileContent, matchedFile);\n compileDir = inferCommandExecDir(matchedFile, compileArgs.outputFile);\n } catch (error) {\n logger.warn(\n { matchedFile, errorMessage: error.message },\n 'pip-compile error',\n );\n continue;\n }\n lockFileArgs.set(matchedFile, compileArgs);\n for (const constraint of coerceArray(compileArgs.constraintsFiles)) {\n depsBetweenFiles.push({\n sourceFile: constraint,\n outputFile: matchedFile,\n type: 'constraint',\n });\n }\n const lockedDeps = extractRequirementsFile(fileContent)?.deps;\n if (!lockedDeps) {\n logger.debug(\n { matchedFile },\n 'pip-compile: Failed to extract dependencies from lock file',\n );\n continue;\n }\n\n for (const relativeSourceFile of compileArgs.sourceFiles) {\n const packageFile = upath.normalizeTrim(\n upath.join(compileDir, relativeSourceFile),\n );\n try {\n ensureLocalPath(packageFile);\n } catch {\n logger.warn(\n { matchedFile, packageFile },\n 'pip-compile: Source file path outside of repository',\n );\n continue;\n }\n depsBetweenFiles.push({\n sourceFile: packageFile,\n outputFile: matchedFile,\n type: 'requirement',\n });\n if (matchedFiles.includes(packageFile)) {\n // TODO(not7cd): do something about it\n logger.warn(\n { sourceFile: packageFile, lockFile: matchedFile },\n 'pip-compile: lock file acts as source file for another lock file',\n );\n continue;\n }\n if (packageFiles.has(packageFile)) {\n logger.debug(\n `pip-compile: ${packageFile} used in multiple output files`,\n );\n const existingPackageFile = packageFiles.get(packageFile)!;\n existingPackageFile.lockFiles!.push(matchedFile);\n extendWithIndirectDeps(existingPackageFile, lockedDeps);\n const source = lockFileSources.get(matchedFile) ?? [];\n source.push(existingPackageFile);\n lockFileSources.set(matchedFile, source);\n continue;\n }\n const content = await readLocalFile(packageFile, 'utf8');\n if (!content) {\n logger.debug(`pip-compile: No content for source file ${packageFile}`);\n continue;\n }\n\n const packageFileContent = extractPackageFile(\n content,\n packageFile,\n config,\n );\n if (packageFileContent) {\n if (packageFileContent.managerData?.requirementsFiles) {\n packageFileContent.managerData.requirementsFiles =\n packageFileContent.managerData.requirementsFiles.map(\n (file: string) => upath.normalize(upath.join(compileDir, file)),\n );\n for (const file of packageFileContent.managerData.requirementsFiles) {\n depsBetweenFiles.push({\n sourceFile: file,\n outputFile: packageFile,\n type: 'requirement',\n });\n }\n }\n if (packageFileContent.managerData?.constraintsFiles) {\n packageFileContent.managerData.constraintsFiles =\n packageFileContent.managerData.constraintsFiles.map(\n (file: string) => upath.normalize(upath.join(compileDir, file)),\n );\n for (const file of packageFileContent.managerData.constraintsFiles) {\n depsBetweenFiles.push({\n sourceFile: file,\n outputFile: packageFile,\n type: 'requirement',\n });\n }\n }\n for (const dep of packageFileContent.deps) {\n const lockedVersion = lockedDeps?.find(\n (lockedDep) => lockedDep.packageName === dep.packageName,\n )?.currentVersion;\n if (lockedVersion) {\n dep.lockedVersion = lockedVersion;\n } else {\n logger.warn(\n { depName: dep.depName, lockFile: matchedFile },\n 'pip-compile: dependency not found in lock file',\n );\n }\n }\n extendWithIndirectDeps(packageFileContent, lockedDeps);\n const newPackageFile: PackageFile = {\n ...packageFileContent,\n lockFiles: [matchedFile],\n packageFile,\n };\n packageFiles.set(packageFile, newPackageFile);\n const source = lockFileSources.get(matchedFile) ?? [];\n source.push(newPackageFile);\n lockFileSources.set(matchedFile, source);\n } else {\n logger.warn(\n { packageFile },\n 'pip-compile: failed to find dependencies in source file',\n );\n }\n }\n }\n if (packageFiles.size === 0) {\n return null;\n }\n const result: PackageFile[] = sortPackageFiles(\n depsBetweenFiles,\n packageFiles,\n );\n\n // This needs to go in reverse order to handle transitive dependencies\n for (const packageFile of [...result].reverse()) {\n for (const reqFile of packageFile.managerData?.requirementsFiles ?? []) {\n let sourceFiles: PackageFile[] | undefined = undefined;\n if (matchedFiles.includes(reqFile)) {\n sourceFiles = lockFileSources.get(reqFile);\n } else if (packageFiles.has(reqFile)) {\n sourceFiles = [packageFiles.get(reqFile)!];\n }\n if (!sourceFiles) {\n logger.warn(\n { packageFile: packageFile.packageFile, requirementsFile: reqFile },\n 'pip-compile: Package file references a file which does not appear to be a requirements file managed by pip-compile',\n );\n continue;\n }\n // These get reversed before merging so that we keep the last instance of any common\n // lock files, since a file that -r includes multiple lock files needs to be updated after\n // all of the lock files it includes\n const files = new Set([...packageFile.lockFiles!].reverse());\n for (const sourceFile of sourceFiles) {\n const merged = new Set(files);\n for (const lockFile of [...sourceFile.lockFiles!].reverse()) {\n merged.add(lockFile);\n }\n sourceFile.lockFiles = Array.from(merged).reverse();\n }\n }\n }\n logger.debug(\n 'pip-compile: dependency graph:\\n' +\n generateMermaidGraph(depsBetweenFiles, lockFileArgs),\n );\n return result;\n}\n\nfunction extendWithIndirectDeps(\n packageFileContent: PackageFileContent,\n lockedDeps: PackageDependency[],\n): void {\n for (const lockedDep of lockedDeps) {\n if (\n !packageFileContent.deps.find(\n (dep) => lockedDep.packageName === dep.packageName,\n )\n ) {\n packageFileContent.deps.push(indirectDep(lockedDep));\n }\n }\n}\n\n/**\n * As indirect dependecies don't exist in the package file, we need to\n * create them from the lock file.\n *\n * By removing currentValue and currentVersion, we ensure that they\n * are handled like unconstrained dependencies with locked version.\n * Such packages are updated when their update strategy\n * is set to 'update-lockfile',\n * see: lib/workers/repository/process/lookup/index.ts.\n *\n * By disabling them by default, we won't create noise by updating them.\n * Unless they have vulnerability alert, then they are forced to be updated.\n * @param dep dependency extracted from lock file (requirements.txt)\n * @returns unconstrained dependency with locked version\n */\nfunction indirectDep(dep: PackageDependency): PackageDependency {\n const result = {\n ...dep,\n lockedVersion: dep.currentVersion,\n depType: 'indirect',\n enabled: false,\n };\n delete result.currentValue;\n delete result.currentVersion;\n return result;\n}\n"]}
@@ -6,7 +6,7 @@ export declare const displayName = "pip-compile";
6
6
  export declare const url = "https://pip-tools.readthedocs.io/en/latest/cli/pip-compile";
7
7
  export declare const categories: Category[];
8
8
  export declare const defaultConfig: {
9
- fileMatch: never[];
9
+ managerFilePatterns: never[];
10
10
  lockFileMaintenance: {
11
11
  enabled: boolean;
12
12
  branchTopic: string;
@@ -13,7 +13,7 @@ exports.displayName = 'pip-compile';
13
13
  exports.url = 'https://pip-tools.readthedocs.io/en/latest/cli/pip-compile';
14
14
  exports.categories = ['python'];
15
15
  exports.defaultConfig = {
16
- fileMatch: [],
16
+ managerFilePatterns: [],
17
17
  lockFileMaintenance: {
18
18
  enabled: true,
19
19
  branchTopic: 'pip-compile-refresh',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/index.ts"],"names":[],"mappings":";;;AACA,wDAA8D;AAC9D,gDAAuD;AAEvD,qCAAuE;AAA9D,iHAAA,sBAAsB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AACnD,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,GAAG,GAAG,4DAA4D,CAAC;AACnE,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,EAAE;IACb,mBAAmB,EAAE;QACnB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,qBAAqB;QAClC,mBAAmB,EAAE,6BAA6B;KACnD;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,EAAE,4BAAiB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractAllPackageFiles, extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const displayName = 'pip-compile';\nexport const url = 'https://pip-tools.readthedocs.io/en/latest/cli/pip-compile';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n fileMatch: [],\n lockFileMaintenance: {\n enabled: true,\n branchTopic: 'pip-compile-refresh',\n commitMessageAction: 'Refresh pip-compile outputs',\n },\n};\n\nexport const supportedDatasources = [PypiDatasource.id, GitTagsDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip-compile/index.ts"],"names":[],"mappings":";;;AACA,wDAA8D;AAC9D,gDAAuD;AAEvD,qCAAuE;AAA9D,iHAAA,sBAAsB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AACnD,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,GAAG,GAAG,4DAA4D,CAAC;AACnE,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,EAAE;IACvB,mBAAmB,EAAE;QACnB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,qBAAqB;QAClC,mBAAmB,EAAE,6BAA6B;KACnD;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,EAAE,4BAAiB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractAllPackageFiles, extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const displayName = 'pip-compile';\nexport const url = 'https://pip-tools.readthedocs.io/en/latest/cli/pip-compile';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n managerFilePatterns: [],\n lockFileMaintenance: {\n enabled: true,\n branchTopic: 'pip-compile-refresh',\n commitMessageAction: 'Refresh pip-compile outputs',\n },\n};\n\nexport const supportedDatasources = [PypiDatasource.id, GitTagsDatasource.id];\n"]}
@@ -5,6 +5,6 @@ export declare const displayName = "pip Requirements";
5
5
  export declare const url = "https://pip.pypa.io/en/stable/reference/requirements-file-format";
6
6
  export declare const categories: Category[];
7
7
  export declare const defaultConfig: {
8
- fileMatch: string[];
8
+ managerFilePatterns: string[];
9
9
  };
10
10
  export declare const supportedDatasources: string[];
@@ -11,7 +11,7 @@ exports.displayName = 'pip Requirements';
11
11
  exports.url = 'https://pip.pypa.io/en/stable/reference/requirements-file-format';
12
12
  exports.categories = ['python'];
13
13
  exports.defaultConfig = {
14
- fileMatch: ['(^|/)[\\w-]*requirements([-.]\\w+)?\\.(txt|pip)$'],
14
+ managerFilePatterns: ['/(^|/)[\\w-]*requirements([-.]\\w+)?\\.(txt|pip)$/'],
15
15
  };
16
16
  exports.supportedDatasources = [pypi_1.PypiDatasource.id, git_tags_1.GitTagsDatasource.id];
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_requirements/index.ts"],"names":[],"mappings":";;;AACA,wDAA8D;AAC9D,gDAAuD;AAEvD,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,kBAAkB,CAAC;AACjC,QAAA,GAAG,GACd,kEAAkE,CAAC;AACxD,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,kDAAkD,CAAC;CAChE,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,EAAE,4BAAiB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { updateArtifacts } from './artifacts';\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'pip Requirements';\nexport const url =\n 'https://pip.pypa.io/en/stable/reference/requirements-file-format';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)[\\\\w-]*requirements([-.]\\\\w+)?\\\\.(txt|pip)$'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id, GitTagsDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_requirements/index.ts"],"names":[],"mappings":";;;AACA,wDAA8D;AAC9D,gDAAuD;AAEvD,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,kBAAkB,CAAC;AACjC,QAAA,GAAG,GACd,kEAAkE,CAAC;AACxD,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;CAC5E,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,EAAE,4BAAiB,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GitTagsDatasource } from '../../datasource/git-tags';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { updateArtifacts } from './artifacts';\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'pip Requirements';\nexport const url =\n 'https://pip.pypa.io/en/stable/reference/requirements-file-format';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)[\\\\w-]*requirements([-.]\\\\w+)?\\\\.(txt|pip)$/'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id, GitTagsDatasource.id];\n"]}
@@ -4,6 +4,6 @@ export declare const displayName = "pip setup.py";
4
4
  export declare const url = "https://pip.pypa.io/en/latest/reference/build-system/setup-py";
5
5
  export declare const categories: Category[];
6
6
  export declare const defaultConfig: {
7
- fileMatch: string[];
7
+ managerFilePatterns: string[];
8
8
  };
9
9
  export declare const supportedDatasources: string[];
@@ -8,7 +8,7 @@ exports.displayName = 'pip setup.py';
8
8
  exports.url = 'https://pip.pypa.io/en/latest/reference/build-system/setup-py';
9
9
  exports.categories = ['python'];
10
10
  exports.defaultConfig = {
11
- fileMatch: ['(^|/)setup\\.py$'],
11
+ managerFilePatterns: ['/(^|/)setup\\.py$/'],
12
12
  };
13
13
  exports.supportedDatasources = [pypi_1.PypiDatasource.id];
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_setup/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AAEvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,cAAc,CAAC;AAC7B,QAAA,GAAG,GACd,+DAA+D,CAAC;AACrD,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,kBAAkB,CAAC;CAChC,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'pip setup.py';\nexport const url =\n 'https://pip.pypa.io/en/latest/reference/build-system/setup-py';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)setup\\\\.py$'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pip_setup/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AAEvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,cAAc,CAAC;AAC7B,QAAA,GAAG,GACd,+DAA+D,CAAC;AACrD,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,oBAAoB,CAAC;CAC5C,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractPackageFile } from './extract';\n\nexport const displayName = 'pip setup.py';\nexport const url =\n 'https://pip.pypa.io/en/latest/reference/build-system/setup-py';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)setup\\\\.py$/'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
@@ -5,6 +5,6 @@ export declare const supportsLockFileMaintenance = true;
5
5
  export declare const url = "https://pipenv.pypa.io/en/latest";
6
6
  export declare const categories: Category[];
7
7
  export declare const defaultConfig: {
8
- fileMatch: string[];
8
+ managerFilePatterns: string[];
9
9
  };
10
10
  export declare const supportedDatasources: string[];
@@ -10,7 +10,7 @@ exports.supportsLockFileMaintenance = true;
10
10
  exports.url = 'https://pipenv.pypa.io/en/latest';
11
11
  exports.categories = ['python'];
12
12
  exports.defaultConfig = {
13
- fileMatch: ['(^|/)Pipfile$'],
13
+ managerFilePatterns: ['/(^|/)Pipfile$/'],
14
14
  };
15
15
  exports.supportedDatasources = [pypi_1.PypiDatasource.id];
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pipenv/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AAEvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,GAAG,GAAG,kCAAkC,CAAC;AACzC,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,eAAe,CAAC;CAC7B,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const url = 'https://pipenv.pypa.io/en/latest';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)Pipfile$'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/pipenv/index.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AAEvD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,GAAG,GAAG,kCAAkC,CAAC;AACzC,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,iBAAiB,CAAC;CACzC,CAAC;AAEW,QAAA,oBAAoB,GAAG,CAAC,qBAAc,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { PypiDatasource } from '../../datasource/pypi';\n\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const url = 'https://pipenv.pypa.io/en/latest';\nexport const categories: Category[] = ['python'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)Pipfile$/'],\n};\n\nexport const supportedDatasources = [PypiDatasource.id];\n"]}
@@ -5,6 +5,6 @@ export declare const supportsLockFileMaintenance = true;
5
5
  export declare const url = "https://github.com/prefix-dev/pixi/";
6
6
  export declare const categories: Category[];
7
7
  export declare const defaultConfig: {
8
- fileMatch: string[];
8
+ managerFilePatterns: string[];
9
9
  };
10
10
  export declare const supportedDatasources: string[];