renovate 40.1.3 → 40.2.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 (355) 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/data-files.generated.js +1 -1
  19. package/dist/data-files.generated.js.map +1 -1
  20. package/dist/modules/manager/ansible/index.d.ts +1 -1
  21. package/dist/modules/manager/ansible/index.js +1 -1
  22. package/dist/modules/manager/ansible/index.js.map +1 -1
  23. package/dist/modules/manager/ansible-galaxy/index.d.ts +1 -1
  24. package/dist/modules/manager/ansible-galaxy/index.js +1 -1
  25. package/dist/modules/manager/ansible-galaxy/index.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 +4 -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/ruby-version/index.d.ts +1 -1
  296. package/dist/modules/manager/ruby-version/index.js +1 -1
  297. package/dist/modules/manager/ruby-version/index.js.map +1 -1
  298. package/dist/modules/manager/runtime-version/index.d.ts +1 -1
  299. package/dist/modules/manager/runtime-version/index.js +1 -1
  300. package/dist/modules/manager/runtime-version/index.js.map +1 -1
  301. package/dist/modules/manager/sbt/index.d.ts +1 -1
  302. package/dist/modules/manager/sbt/index.js +5 -5
  303. package/dist/modules/manager/sbt/index.js.map +1 -1
  304. package/dist/modules/manager/scalafmt/index.d.ts +1 -1
  305. package/dist/modules/manager/scalafmt/index.js +1 -1
  306. package/dist/modules/manager/scalafmt/index.js.map +1 -1
  307. package/dist/modules/manager/setup-cfg/index.d.ts +1 -1
  308. package/dist/modules/manager/setup-cfg/index.js +1 -1
  309. package/dist/modules/manager/setup-cfg/index.js.map +1 -1
  310. package/dist/modules/manager/sveltos/index.d.ts +1 -1
  311. package/dist/modules/manager/sveltos/index.js +1 -1
  312. package/dist/modules/manager/sveltos/index.js.map +1 -1
  313. package/dist/modules/manager/swift/index.d.ts +1 -1
  314. package/dist/modules/manager/swift/index.js +1 -1
  315. package/dist/modules/manager/swift/index.js.map +1 -1
  316. package/dist/modules/manager/tekton/index.d.ts +1 -1
  317. package/dist/modules/manager/tekton/index.js +1 -1
  318. package/dist/modules/manager/tekton/index.js.map +1 -1
  319. package/dist/modules/manager/terraform/index.d.ts +1 -1
  320. package/dist/modules/manager/terraform/index.js +1 -1
  321. package/dist/modules/manager/terraform/index.js.map +1 -1
  322. package/dist/modules/manager/terraform-version/index.d.ts +1 -1
  323. package/dist/modules/manager/terraform-version/index.js +1 -1
  324. package/dist/modules/manager/terraform-version/index.js.map +1 -1
  325. package/dist/modules/manager/terragrunt/index.d.ts +1 -1
  326. package/dist/modules/manager/terragrunt/index.js +1 -1
  327. package/dist/modules/manager/terragrunt/index.js.map +1 -1
  328. package/dist/modules/manager/terragrunt-version/index.d.ts +1 -1
  329. package/dist/modules/manager/terragrunt-version/index.js +1 -1
  330. package/dist/modules/manager/terragrunt-version/index.js.map +1 -1
  331. package/dist/modules/manager/tflint-plugin/index.d.ts +1 -1
  332. package/dist/modules/manager/tflint-plugin/index.js +1 -1
  333. package/dist/modules/manager/tflint-plugin/index.js.map +1 -1
  334. package/dist/modules/manager/travis/index.d.ts +1 -1
  335. package/dist/modules/manager/travis/index.js +1 -1
  336. package/dist/modules/manager/travis/index.js.map +1 -1
  337. package/dist/modules/manager/velaci/index.d.ts +1 -1
  338. package/dist/modules/manager/velaci/index.js +1 -1
  339. package/dist/modules/manager/velaci/index.js.map +1 -1
  340. package/dist/modules/manager/vendir/index.d.ts +1 -1
  341. package/dist/modules/manager/vendir/index.js +1 -1
  342. package/dist/modules/manager/vendir/index.js.map +1 -1
  343. package/dist/modules/manager/woodpecker/index.d.ts +1 -1
  344. package/dist/modules/manager/woodpecker/index.js +1 -1
  345. package/dist/modules/manager/woodpecker/index.js.map +1 -1
  346. package/dist/workers/repository/extract/extract-fingerprint-config.js +1 -1
  347. package/dist/workers/repository/extract/extract-fingerprint-config.js.map +1 -1
  348. package/dist/workers/repository/extract/file-match.js +5 -6
  349. package/dist/workers/repository/extract/file-match.js.map +1 -1
  350. package/dist/workers/repository/update/pr/code-owners.js +7 -7
  351. package/dist/workers/repository/update/pr/code-owners.js.map +1 -1
  352. package/dist/workers/types.d.ts +1 -1
  353. package/dist/workers/types.js.map +1 -1
  354. package/package.json +2 -2
  355. package/renovate-schema.json +237 -239
@@ -10,7 +10,7 @@ exports.displayName = 'nodenv';
10
10
  exports.url = 'https://github.com/nodenv/nodenv#readme';
11
11
  exports.categories = ['js', 'node'];
12
12
  exports.defaultConfig = {
13
- fileMatch: ['(^|/)\\.node-version$'],
13
+ managerFilePatterns: ['/(^|/)\\.node-version$/'],
14
14
  versioning: nodeVersioning.id,
15
15
  };
16
16
  exports.supportedDatasources = [node_version_1.NodeVersionDatasource.id];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/nodenv/index.ts"],"names":[],"mappings":";;;;AACA,gEAAsE;AACtE,8EAAwD;AAExD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,QAAQ,CAAC;AACvB,QAAA,GAAG,GAAG,yCAAyC,CAAC;AAChD,QAAA,UAAU,GAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,uBAAuB,CAAC;IACpC,UAAU,EAAE,cAAc,CAAC,EAAE;CAC9B,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 = 'nodenv';\nexport const url = 'https://github.com/nodenv/nodenv#readme';\nexport const categories: Category[] = ['js', 'node'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)\\\\.node-version$'],\n versioning: nodeVersioning.id,\n};\n\nexport const supportedDatasources = [NodeVersionDatasource.id];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/nodenv/index.ts"],"names":[],"mappings":";;;;AACA,gEAAsE;AACtE,8EAAwD;AAExD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,QAAQ,CAAC;AACvB,QAAA,GAAG,GAAG,yCAAyC,CAAC;AAChD,QAAA,UAAU,GAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE,CAAC,yBAAyB,CAAC;IAChD,UAAU,EAAE,cAAc,CAAC,EAAE;CAC9B,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 = 'nodenv';\nexport const url = 'https://github.com/nodenv/nodenv#readme';\nexport const categories: Category[] = ['js', 'node'];\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)\\\\.node-version$/'],\n versioning: nodeVersioning.id,\n};\n\nexport const supportedDatasources = [NodeVersionDatasource.id];\n"]}
@@ -169,7 +169,7 @@ async function extractAllPackageFiles(config, packageFiles) {
169
169
  const content = await (0, fs_1.readLocalFile)(packageFile, 'utf8');
170
170
  // istanbul ignore else
171
171
  if (content) {
172
- // pnpm workspace files are their own package file, defined via fileMatch.
172
+ // pnpm workspace files are their own package file, defined via managerFilePatterns.
173
173
  // We duck-type the content here, to allow users to rename the file itself.
174
174
  const parsedPnpmWorkspaceYaml = (0, pnpm_1.tryParsePnpmWorkspaceYaml)(content);
175
175
  if (parsedPnpmWorkspaceYaml.success) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/modules/manager/npm/extract/index.ts"],"names":[],"mappings":";;AAkCA,gDA2LC;AAED,wDA4CC;;AA3QD,kEAAkC;AAClC,sDAAyD;AACzD,+CAA4C;AAC5C,4CAI6B;AAC7B,kDAA6D;AAC7D,iDAAwD;AAQxD,oDAA8D;AAC9D,wDAA2D;AAC3D,iCAA6E;AAC7E,iCAAqC;AAErC,iCAAuC;AAEvC,qCAIkB;AAElB,SAAS,oBAAoB,CAAC,SAAuB;IACnD,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,YAAE,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/D,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACtC,OAAe,EACf,WAAmB,EACnB,MAAqB;IAErB,eAAM,CAAC,KAAK,CAAC,0BAA0B,WAAW,GAAG,CAAC,CAAC;IACvD,eAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC1B,IAAI,WAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,cAAc,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,GAAG,GAAG,IAAA,iCAAkB,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACzD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,kBAAwC,CAAC;IAC7C,IAAI,YAAE,CAAC,KAAK,CAAC,WAAW,CAAC,UAA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AI;wBACP,WAAW;qBACZ,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,kBAAkB,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,MAAM,IAAA,kBAAW,EAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../../config/global';\nimport { logger } from '../../../../logger';\nimport {\n findLocalSiblingOrParent,\n getSiblingFileName,\n readLocalFile,\n} from '../../../../util/fs';\nimport { newlineRegex, regEx } from '../../../../util/regex';\nimport { NpmDatasource } from '../../../datasource/npm';\n\nimport type {\n ExtractConfig,\n PackageFile,\n PackageFileContent,\n} from '../../types';\nimport type { NpmLockFiles, NpmManagerData } from '../types';\nimport { getExtractedConstraints } from './common/dependency';\nimport { extractPackageJson } from './common/package-file';\nimport { extractPnpmWorkspaceFile, tryParsePnpmWorkspaceYaml } from './pnpm';\nimport { postExtract } from './post';\nimport type { NpmPackage } from './types';\nimport { isZeroInstall } from './yarn';\nimport type { YarnConfig } from './yarnrc';\nimport {\n loadConfigFromLegacyYarnrc,\n loadConfigFromYarnrcYml,\n resolveRegistryUrl,\n} from './yarnrc';\n\nfunction hasMultipleLockFiles(lockFiles: NpmLockFiles): boolean {\n return Object.values(lockFiles).filter(is.string).length > 1;\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): Promise<PackageFileContent<NpmManagerData> | null> {\n logger.trace(`npm.extractPackageFile(${packageFile})`);\n logger.trace({ content });\n let packageJson: NpmPackage;\n try {\n packageJson = JSON.parse(content);\n } catch {\n logger.debug({ packageFile }, `Invalid JSON`);\n return null;\n }\n\n const res = extractPackageJson(packageJson, packageFile);\n if (!res) {\n return null;\n }\n\n let workspacesPackages: string[] | undefined;\n if (is.array(packageJson.workspaces)) {\n workspacesPackages = packageJson.workspaces;\n } else {\n workspacesPackages = packageJson.workspaces?.packages;\n }\n\n const lockFiles: NpmLockFiles = {\n yarnLock: 'yarn.lock',\n packageLock: 'package-lock.json',\n shrinkwrapJson: 'npm-shrinkwrap.json',\n pnpmShrinkwrap: 'pnpm-lock.yaml',\n };\n\n for (const [key, val] of Object.entries(lockFiles) as [\n 'yarnLock' | 'packageLock' | 'shrinkwrapJson' | 'pnpmShrinkwrap',\n string,\n ][]) {\n const filePath = getSiblingFileName(packageFile, val);\n if (await readLocalFile(filePath, 'utf8')) {\n lockFiles[key] = filePath;\n } else {\n lockFiles[key] = undefined;\n }\n }\n lockFiles.npmLock = lockFiles.packageLock ?? lockFiles.shrinkwrapJson;\n delete lockFiles.packageLock;\n delete lockFiles.shrinkwrapJson;\n\n if (hasMultipleLockFiles(lockFiles)) {\n logger.warn(\n 'Updating multiple npm lock files is deprecated and support will be removed in future versions.',\n );\n }\n\n let npmrc: string | undefined;\n const npmrcFileName = getSiblingFileName(packageFile, '.npmrc');\n let repoNpmrc = await readLocalFile(npmrcFileName, 'utf8');\n if (is.string(repoNpmrc)) {\n if (is.string(config.npmrc) && !config.npmrcMerge) {\n logger.debug(\n { npmrcFileName },\n 'Repo .npmrc file is ignored due to config.npmrc with config.npmrcMerge=false',\n );\n npmrc = config.npmrc;\n } else {\n npmrc = config.npmrc ?? '';\n if (npmrc.length) {\n if (!npmrc.endsWith('\\n')) {\n npmrc += '\\n';\n }\n }\n if (repoNpmrc?.includes('package-lock')) {\n logger.debug('Stripping package-lock setting from .npmrc');\n repoNpmrc = repoNpmrc.replace(\n regEx(/(^|\\n)package-lock.*?(\\n|$)/g),\n '\\n',\n );\n }\n if (repoNpmrc.includes('=${') && !GlobalConfig.get('exposeAllEnv')) {\n logger.debug(\n { npmrcFileName },\n 'Stripping .npmrc file of lines with variables',\n );\n repoNpmrc = repoNpmrc\n .split(newlineRegex)\n .filter((line) => !line.includes('=${'))\n .join('\\n');\n }\n npmrc += repoNpmrc;\n }\n } else if (is.string(config.npmrc)) {\n npmrc = config.npmrc;\n }\n\n const yarnrcYmlFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc.yml',\n );\n const yarnZeroInstall = yarnrcYmlFileName\n ? await isZeroInstall(yarnrcYmlFileName)\n : false;\n\n let yarnConfig: YarnConfig | null = null;\n const repoYarnrcYml = yarnrcYmlFileName\n ? await readLocalFile(yarnrcYmlFileName, 'utf8')\n : null;\n if (is.string(repoYarnrcYml) && repoYarnrcYml.trim().length > 0) {\n yarnConfig = loadConfigFromYarnrcYml(repoYarnrcYml);\n }\n\n const legacyYarnrcFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc',\n );\n const repoLegacyYarnrc = legacyYarnrcFileName\n ? await readLocalFile(legacyYarnrcFileName, 'utf8')\n : null;\n if (is.string(repoLegacyYarnrc) && repoLegacyYarnrc.trim().length > 0) {\n yarnConfig = loadConfigFromLegacyYarnrc(repoLegacyYarnrc);\n }\n\n if (res.deps.length === 0) {\n logger.debug('Package file has no deps');\n if (\n !(\n !!res.managerData?.packageJsonName ||\n !!res.packageFileVersion ||\n !!npmrc ||\n workspacesPackages\n )\n ) {\n logger.debug('Skipping file');\n return null;\n }\n }\n let skipInstalls = config.skipInstalls;\n if (skipInstalls === null) {\n const hasFancyRefs = !!res.deps.some(\n (dep) =>\n !!dep.currentValue?.startsWith('file:') ||\n !!dep.currentValue?.startsWith('npm:'),\n );\n if ((hasFancyRefs && !!lockFiles.npmLock) || yarnZeroInstall) {\n // https://github.com/npm/cli/issues/1432\n // Explanation:\n // - npm install --package-lock-only is buggy for transitive deps in file: and npm: references\n // - So we set skipInstalls to false if file: or npm: refs are found *and* the user hasn't explicitly set the value already\n // - Also, do not skip install if Yarn zero-install is used\n logger.debug('Automatically setting skipInstalls to false');\n skipInstalls = false;\n } else {\n skipInstalls = true;\n }\n }\n\n const extractedConstraints = getExtractedConstraints(res.deps);\n\n if (yarnConfig) {\n for (const dep of res.deps) {\n if (dep.depName) {\n const registryUrlFromYarnConfig = resolveRegistryUrl(\n dep.packageName ?? dep.depName,\n yarnConfig,\n );\n if (registryUrlFromYarnConfig && dep.datasource === NpmDatasource.id) {\n dep.registryUrls = [registryUrlFromYarnConfig];\n }\n }\n }\n }\n\n return {\n ...res,\n npmrc,\n managerData: {\n ...res.managerData,\n ...lockFiles,\n yarnZeroInstall,\n hasPackageManager: is.nonEmptyStringAndNotWhitespace(\n packageJson.packageManager,\n ),\n workspacesPackages,\n },\n skipInstalls,\n extractedConstraints,\n };\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile<NpmManagerData>[]> {\n const npmFiles: PackageFile<NpmManagerData>[] = [];\n for (const packageFile of packageFiles) {\n const content = await readLocalFile(packageFile, 'utf8');\n // istanbul ignore else\n if (content) {\n // pnpm workspace files are their own package file, defined via fileMatch.\n // We duck-type the content here, to allow users to rename the file itself.\n const parsedPnpmWorkspaceYaml = tryParsePnpmWorkspaceYaml(content);\n if (parsedPnpmWorkspaceYaml.success) {\n logger.trace(\n { packageFile },\n `Extracting file as a pnpm workspace YAML file`,\n );\n const deps = await extractPnpmWorkspaceFile(\n parsedPnpmWorkspaceYaml.data,\n packageFile,\n );\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n } else {\n logger.trace({ packageFile }, `Extracting as a package.json file`);\n const deps = await extractPackageFile(content, packageFile, config);\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n }\n } else {\n logger.debug({ packageFile }, `No content found`);\n }\n }\n\n await postExtract(npmFiles);\n return npmFiles;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lib/modules/manager/npm/extract/index.ts"],"names":[],"mappings":";;AAkCA,gDA2LC;AAED,wDA4CC;;AA3QD,kEAAkC;AAClC,sDAAyD;AACzD,+CAA4C;AAC5C,4CAI6B;AAC7B,kDAA6D;AAC7D,iDAAwD;AAQxD,oDAA8D;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Q,GAAkC,EAAE,CAAC;IACnD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAa,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACzD,uBAAuB;QACvB,IAAI,OAAO,EAAE,CAAC;YACZ,oFAAoF;YACpF,2EAA2E;YAC3E,MAAM,uBAAuB,GAAG,IAAA,gCAAyB,EAAC,OAAO,CAAC,CAAC;YACnE,IAAI,uBAAuB,CAAC,OAAO,EAAE,CAAC;gBACpC,eAAM,CAAC,KAAK,CACV,EAAE,WAAW,EAAE,EACf,+CAA+C,CAChD,CAAC;gBACF,MAAM,IAAI,GAAG,MAAM,IAAA,+BAAwB,EACzC,uBAAuB,CAAC,IAAI,EAC5B,WAAW,CACZ,CAAC;gBACF,IAAI,IAAI,EAAE,CAAC;oBACT,QAAQ,CAAC,IAAI,CAAC;wBACZ,GAAG,IAAI;wBACP,WAAW;qBACZ,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,mCAAmC,CAAC,CAAC;gBACnE,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;gBACpE,IAAI,IAAI,EAAE,CAAC;oBACT,QAAQ,CAAC,IAAI,CAAC;wBACZ,GAAG,IAAI;wBACP,WAAW;qBACZ,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,eAAM,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,EAAE,kBAAkB,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IAED,MAAM,IAAA,kBAAW,EAAC,QAAQ,CAAC,CAAC;IAC5B,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../../config/global';\nimport { logger } from '../../../../logger';\nimport {\n findLocalSiblingOrParent,\n getSiblingFileName,\n readLocalFile,\n} from '../../../../util/fs';\nimport { newlineRegex, regEx } from '../../../../util/regex';\nimport { NpmDatasource } from '../../../datasource/npm';\n\nimport type {\n ExtractConfig,\n PackageFile,\n PackageFileContent,\n} from '../../types';\nimport type { NpmLockFiles, NpmManagerData } from '../types';\nimport { getExtractedConstraints } from './common/dependency';\nimport { extractPackageJson } from './common/package-file';\nimport { extractPnpmWorkspaceFile, tryParsePnpmWorkspaceYaml } from './pnpm';\nimport { postExtract } from './post';\nimport type { NpmPackage } from './types';\nimport { isZeroInstall } from './yarn';\nimport type { YarnConfig } from './yarnrc';\nimport {\n loadConfigFromLegacyYarnrc,\n loadConfigFromYarnrcYml,\n resolveRegistryUrl,\n} from './yarnrc';\n\nfunction hasMultipleLockFiles(lockFiles: NpmLockFiles): boolean {\n return Object.values(lockFiles).filter(is.string).length > 1;\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): Promise<PackageFileContent<NpmManagerData> | null> {\n logger.trace(`npm.extractPackageFile(${packageFile})`);\n logger.trace({ content });\n let packageJson: NpmPackage;\n try {\n packageJson = JSON.parse(content);\n } catch {\n logger.debug({ packageFile }, `Invalid JSON`);\n return null;\n }\n\n const res = extractPackageJson(packageJson, packageFile);\n if (!res) {\n return null;\n }\n\n let workspacesPackages: string[] | undefined;\n if (is.array(packageJson.workspaces)) {\n workspacesPackages = packageJson.workspaces;\n } else {\n workspacesPackages = packageJson.workspaces?.packages;\n }\n\n const lockFiles: NpmLockFiles = {\n yarnLock: 'yarn.lock',\n packageLock: 'package-lock.json',\n shrinkwrapJson: 'npm-shrinkwrap.json',\n pnpmShrinkwrap: 'pnpm-lock.yaml',\n };\n\n for (const [key, val] of Object.entries(lockFiles) as [\n 'yarnLock' | 'packageLock' | 'shrinkwrapJson' | 'pnpmShrinkwrap',\n string,\n ][]) {\n const filePath = getSiblingFileName(packageFile, val);\n if (await readLocalFile(filePath, 'utf8')) {\n lockFiles[key] = filePath;\n } else {\n lockFiles[key] = undefined;\n }\n }\n lockFiles.npmLock = lockFiles.packageLock ?? lockFiles.shrinkwrapJson;\n delete lockFiles.packageLock;\n delete lockFiles.shrinkwrapJson;\n\n if (hasMultipleLockFiles(lockFiles)) {\n logger.warn(\n 'Updating multiple npm lock files is deprecated and support will be removed in future versions.',\n );\n }\n\n let npmrc: string | undefined;\n const npmrcFileName = getSiblingFileName(packageFile, '.npmrc');\n let repoNpmrc = await readLocalFile(npmrcFileName, 'utf8');\n if (is.string(repoNpmrc)) {\n if (is.string(config.npmrc) && !config.npmrcMerge) {\n logger.debug(\n { npmrcFileName },\n 'Repo .npmrc file is ignored due to config.npmrc with config.npmrcMerge=false',\n );\n npmrc = config.npmrc;\n } else {\n npmrc = config.npmrc ?? '';\n if (npmrc.length) {\n if (!npmrc.endsWith('\\n')) {\n npmrc += '\\n';\n }\n }\n if (repoNpmrc?.includes('package-lock')) {\n logger.debug('Stripping package-lock setting from .npmrc');\n repoNpmrc = repoNpmrc.replace(\n regEx(/(^|\\n)package-lock.*?(\\n|$)/g),\n '\\n',\n );\n }\n if (repoNpmrc.includes('=${') && !GlobalConfig.get('exposeAllEnv')) {\n logger.debug(\n { npmrcFileName },\n 'Stripping .npmrc file of lines with variables',\n );\n repoNpmrc = repoNpmrc\n .split(newlineRegex)\n .filter((line) => !line.includes('=${'))\n .join('\\n');\n }\n npmrc += repoNpmrc;\n }\n } else if (is.string(config.npmrc)) {\n npmrc = config.npmrc;\n }\n\n const yarnrcYmlFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc.yml',\n );\n const yarnZeroInstall = yarnrcYmlFileName\n ? await isZeroInstall(yarnrcYmlFileName)\n : false;\n\n let yarnConfig: YarnConfig | null = null;\n const repoYarnrcYml = yarnrcYmlFileName\n ? await readLocalFile(yarnrcYmlFileName, 'utf8')\n : null;\n if (is.string(repoYarnrcYml) && repoYarnrcYml.trim().length > 0) {\n yarnConfig = loadConfigFromYarnrcYml(repoYarnrcYml);\n }\n\n const legacyYarnrcFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc',\n );\n const repoLegacyYarnrc = legacyYarnrcFileName\n ? await readLocalFile(legacyYarnrcFileName, 'utf8')\n : null;\n if (is.string(repoLegacyYarnrc) && repoLegacyYarnrc.trim().length > 0) {\n yarnConfig = loadConfigFromLegacyYarnrc(repoLegacyYarnrc);\n }\n\n if (res.deps.length === 0) {\n logger.debug('Package file has no deps');\n if (\n !(\n !!res.managerData?.packageJsonName ||\n !!res.packageFileVersion ||\n !!npmrc ||\n workspacesPackages\n )\n ) {\n logger.debug('Skipping file');\n return null;\n }\n }\n let skipInstalls = config.skipInstalls;\n if (skipInstalls === null) {\n const hasFancyRefs = !!res.deps.some(\n (dep) =>\n !!dep.currentValue?.startsWith('file:') ||\n !!dep.currentValue?.startsWith('npm:'),\n );\n if ((hasFancyRefs && !!lockFiles.npmLock) || yarnZeroInstall) {\n // https://github.com/npm/cli/issues/1432\n // Explanation:\n // - npm install --package-lock-only is buggy for transitive deps in file: and npm: references\n // - So we set skipInstalls to false if file: or npm: refs are found *and* the user hasn't explicitly set the value already\n // - Also, do not skip install if Yarn zero-install is used\n logger.debug('Automatically setting skipInstalls to false');\n skipInstalls = false;\n } else {\n skipInstalls = true;\n }\n }\n\n const extractedConstraints = getExtractedConstraints(res.deps);\n\n if (yarnConfig) {\n for (const dep of res.deps) {\n if (dep.depName) {\n const registryUrlFromYarnConfig = resolveRegistryUrl(\n dep.packageName ?? dep.depName,\n yarnConfig,\n );\n if (registryUrlFromYarnConfig && dep.datasource === NpmDatasource.id) {\n dep.registryUrls = [registryUrlFromYarnConfig];\n }\n }\n }\n }\n\n return {\n ...res,\n npmrc,\n managerData: {\n ...res.managerData,\n ...lockFiles,\n yarnZeroInstall,\n hasPackageManager: is.nonEmptyStringAndNotWhitespace(\n packageJson.packageManager,\n ),\n workspacesPackages,\n },\n skipInstalls,\n extractedConstraints,\n };\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile<NpmManagerData>[]> {\n const npmFiles: PackageFile<NpmManagerData>[] = [];\n for (const packageFile of packageFiles) {\n const content = await readLocalFile(packageFile, 'utf8');\n // istanbul ignore else\n if (content) {\n // pnpm workspace files are their own package file, defined via managerFilePatterns.\n // We duck-type the content here, to allow users to rename the file itself.\n const parsedPnpmWorkspaceYaml = tryParsePnpmWorkspaceYaml(content);\n if (parsedPnpmWorkspaceYaml.success) {\n logger.trace(\n { packageFile },\n `Extracting file as a pnpm workspace YAML file`,\n );\n const deps = await extractPnpmWorkspaceFile(\n parsedPnpmWorkspaceYaml.data,\n packageFile,\n );\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n } else {\n logger.trace({ packageFile }, `Extracting as a package.json file`);\n const deps = await extractPackageFile(content, packageFile, config);\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n }\n } else {\n logger.debug({ packageFile }, `No content found`);\n }\n }\n\n await postExtract(npmFiles);\n return npmFiles;\n}\n"]}
@@ -9,7 +9,7 @@ export declare const displayName = "npm";
9
9
  export declare const url = "https://docs.npmjs.com";
10
10
  export declare const categories: Category[];
11
11
  export declare const defaultConfig: {
12
- fileMatch: string[];
12
+ managerFilePatterns: string[];
13
13
  digest: {
14
14
  prBodyDefinitions: {
15
15
  Change: string;
@@ -21,7 +21,10 @@ exports.displayName = 'npm';
21
21
  exports.url = 'https://docs.npmjs.com';
22
22
  exports.categories = ['js'];
23
23
  exports.defaultConfig = {
24
- fileMatch: ['(^|/)package\\.json$', '(^|/)pnpm-workspace\\.yaml$'],
24
+ managerFilePatterns: [
25
+ '/(^|/)package\\.json$/',
26
+ '/(^|/)pnpm-workspace\\.yaml$/',
27
+ ],
25
28
  digest: {
26
29
  prBodyDefinitions: {
27
30
  Change: '{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/npm/index.ts"],"names":[],"mappings":";;;AACA,8DAAoE;AACpE,gEAAsE;AACtE,8CAAqD;AAErD,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAC3B,qCAAmD;AAA1C,iHAAA,sBAAsB,OAAA;AAC/B,mCAIkB;AAHhB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,gHAAA,sBAAsB,OAAA;AAExB,iCAA2C;AAAlC,yGAAA,gBAAgB,OAAA;AACzB,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,WAAW,GAAG,KAAK,CAAC;AACpB,QAAA,GAAG,GAAG,wBAAwB,CAAC;AAC/B,QAAA,UAAU,GAAe,CAAC,IAAI,CAAC,CAAC;AAEhC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,CAAC,sBAAsB,EAAE,6BAA6B,CAAC;IAClE,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,MAAM,EACJ,+KAA+K;SAClL;KACF;IACD,iBAAiB,EAAE;QACjB,MAAM,EACJ,8SAA8S;KACjT;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,kCAAoB,CAAC,EAAE;IACvB,mBAAa,CAAC,EAAE;IAChB,oCAAqB,CAAC,EAAE;CACzB,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { NodeVersionDatasource } from '../../datasource/node-version';\nimport { NpmDatasource } from '../../datasource/npm';\n\nexport { detectGlobalConfig } from './detect';\nexport { extractAllPackageFiles } from './extract';\nexport {\n bumpPackageVersion,\n updateDependency,\n updateLockedDependency,\n} from './update';\nexport { getRangeStrategy } from './range';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const displayName = 'npm';\nexport const url = 'https://docs.npmjs.com';\nexport const categories: Category[] = ['js'];\n\nexport const defaultConfig = {\n fileMatch: ['(^|/)package\\\\.json$', '(^|/)pnpm-workspace\\\\.yaml$'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [\n GithubTagsDatasource.id,\n NpmDatasource.id,\n NodeVersionDatasource.id,\n];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/npm/index.ts"],"names":[],"mappings":";;;AACA,8DAAoE;AACpE,gEAAsE;AACtE,8CAAqD;AAErD,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAC3B,qCAAmD;AAA1C,iHAAA,sBAAsB,OAAA;AAC/B,mCAIkB;AAHhB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,gHAAA,sBAAsB,OAAA;AAExB,iCAA2C;AAAlC,yGAAA,gBAAgB,OAAA;AACzB,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AAEX,QAAA,2BAA2B,GAAG,IAAI,CAAC;AAEnC,QAAA,WAAW,GAAG,KAAK,CAAC;AACpB,QAAA,GAAG,GAAG,wBAAwB,CAAC;AAC/B,QAAA,UAAU,GAAe,CAAC,IAAI,CAAC,CAAC;AAEhC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE;QACnB,wBAAwB;QACxB,+BAA+B;KAChC;IACD,MAAM,EAAE;QACN,iBAAiB,EAAE;YACjB,MAAM,EACJ,+KAA+K;SAClL;KACF;IACD,iBAAiB,EAAE;QACjB,MAAM,EACJ,8SAA8S;KACjT;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,kCAAoB,CAAC,EAAE;IACvB,mBAAa,CAAC,EAAE;IAChB,oCAAqB,CAAC,EAAE;CACzB,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { GithubTagsDatasource } from '../../datasource/github-tags';\nimport { NodeVersionDatasource } from '../../datasource/node-version';\nimport { NpmDatasource } from '../../datasource/npm';\n\nexport { detectGlobalConfig } from './detect';\nexport { extractAllPackageFiles } from './extract';\nexport {\n bumpPackageVersion,\n updateDependency,\n updateLockedDependency,\n} from './update';\nexport { getRangeStrategy } from './range';\nexport { updateArtifacts } from './artifacts';\n\nexport const supportsLockFileMaintenance = true;\n\nexport const displayName = 'npm';\nexport const url = 'https://docs.npmjs.com';\nexport const categories: Category[] = ['js'];\n\nexport const defaultConfig = {\n managerFilePatterns: [\n '/(^|/)package\\\\.json$/',\n '/(^|/)pnpm-workspace\\\\.yaml$/',\n ],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [\n GithubTagsDatasource.id,\n NpmDatasource.id,\n NodeVersionDatasource.id,\n];\n"]}
@@ -6,6 +6,6 @@ export declare const displayName = "NuGet";
6
6
  export declare const url = "https://learn.microsoft.com/nuget";
7
7
  export declare const categories: Category[];
8
8
  export declare const defaultConfig: {
9
- fileMatch: string[];
9
+ managerFilePatterns: string[];
10
10
  };
11
11
  export declare const supportedDatasources: string[];
@@ -14,11 +14,11 @@ exports.displayName = 'NuGet';
14
14
  exports.url = 'https://learn.microsoft.com/nuget';
15
15
  exports.categories = ['dotnet'];
16
16
  exports.defaultConfig = {
17
- fileMatch: [
18
- '\\.(?:cs|fs|vb)proj$',
19
- '\\.(?:props|targets)$',
20
- '(^|/)dotnet-tools\\.json$',
21
- '(^|/)global\\.json$',
17
+ managerFilePatterns: [
18
+ '/\\.(?:cs|fs|vb)proj$/',
19
+ '/\\.(?:props|targets)$/',
20
+ '/(^|/)dotnet-tools\\.json$/',
21
+ '/(^|/)global\\.json$/',
22
22
  ],
23
23
  };
24
24
  exports.supportedDatasources = [
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/nuget/index.ts"],"names":[],"mappings":";;;AACA,oDAA2D;AAC3D,oEAA0E;AAC1E,kDAAyD;AAEzD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,GAAG,GAAG,mCAAmC,CAAC;AAC1C,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE;QACT,sBAAsB;QACtB,uBAAuB;QACvB,2BAA2B;QAC3B,qBAAqB;KACtB;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,yBAAgB,CAAC,EAAE;IACnB,wCAAuB,CAAC,EAAE;IAC1B,uBAAe,CAAC,EAAE;CACnB,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { DockerDatasource } from '../../datasource/docker';\nimport { DotnetVersionDatasource } from '../../datasource/dotnet-version';\nimport { NugetDatasource } from '../../datasource/nuget';\n\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\nexport { bumpPackageVersion } from './update';\n\nexport const displayName = 'NuGet';\nexport const url = 'https://learn.microsoft.com/nuget';\nexport const categories: Category[] = ['dotnet'];\n\nexport const defaultConfig = {\n fileMatch: [\n '\\\\.(?:cs|fs|vb)proj$',\n '\\\\.(?:props|targets)$',\n '(^|/)dotnet-tools\\\\.json$',\n '(^|/)global\\\\.json$',\n ],\n};\n\nexport const supportedDatasources = [\n DockerDatasource.id,\n DotnetVersionDatasource.id,\n NugetDatasource.id,\n];\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../lib/modules/manager/nuget/index.ts"],"names":[],"mappings":";;;AACA,oDAA2D;AAC3D,oEAA0E;AAC1E,kDAAyD;AAEzD,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAC3B,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,mCAA8C;AAArC,4GAAA,kBAAkB,OAAA;AAEd,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,GAAG,GAAG,mCAAmC,CAAC;AAC1C,QAAA,UAAU,GAAe,CAAC,QAAQ,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG;IAC3B,mBAAmB,EAAE;QACnB,wBAAwB;QACxB,yBAAyB;QACzB,6BAA6B;QAC7B,uBAAuB;KACxB;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,yBAAgB,CAAC,EAAE;IACnB,wCAAuB,CAAC,EAAE;IAC1B,uBAAe,CAAC,EAAE;CACnB,CAAC","sourcesContent":["import type { Category } from '../../../constants';\nimport { DockerDatasource } from '../../datasource/docker';\nimport { DotnetVersionDatasource } from '../../datasource/dotnet-version';\nimport { NugetDatasource } from '../../datasource/nuget';\n\nexport { extractPackageFile } from './extract';\nexport { updateArtifacts } from './artifacts';\nexport { bumpPackageVersion } from './update';\n\nexport const displayName = 'NuGet';\nexport const url = 'https://learn.microsoft.com/nuget';\nexport const categories: Category[] = ['dotnet'];\n\nexport const defaultConfig = {\n managerFilePatterns: [\n '/\\\\.(?:cs|fs|vb)proj$/',\n '/\\\\.(?:props|targets)$/',\n '/(^|/)dotnet-tools\\\\.json$/',\n '/(^|/)global\\\\.json$/',\n ],\n};\n\nexport const supportedDatasources = [\n DockerDatasource.id,\n DotnetVersionDatasource.id,\n NugetDatasource.id,\n];\n"]}
@@ -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,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,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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;AACx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G,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)) {