renovate 44.161.1 → 44.161.2
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.
- package/dist/modules/manager/fingerprint.generated.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/poetry/artifacts.js +5 -11
- package/dist/modules/manager/poetry/artifacts.js.map +1 -1
- package/dist/modules/manager/poetry/extract.js +15 -2
- package/dist/modules/manager/poetry/extract.js.map +1 -1
- package/dist/modules/manager/poetry/schema.js +32 -20
- package/dist/modules/manager/poetry/schema.js.map +1 -1
- package/dist/modules/manager/poetry/utils.js +19 -0
- package/dist/modules/manager/poetry/utils.js.map +1 -0
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
|
@@ -87,7 +87,7 @@ hashMap.set("pip_requirements", "bf3a407f72abf711230247bef94ba5dc84c08a35107b0f0
|
|
|
87
87
|
hashMap.set("pip_setup", "df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79");
|
|
88
88
|
hashMap.set("pipenv", "baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398");
|
|
89
89
|
hashMap.set("pixi", "e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2");
|
|
90
|
-
hashMap.set("poetry", "
|
|
90
|
+
hashMap.set("poetry", "2c74e8e94c484c8bfc93ba1272078d531a52e4faaa978fc90ddb654064bb85bc");
|
|
91
91
|
hashMap.set("pre-commit", "760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac");
|
|
92
92
|
hashMap.set("proto", "412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843");
|
|
93
93
|
hashMap.set("pub", "8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','8e11293c8f61b4cbae77a3b1634a47213031c59df2c9833d89db65bf4e6edc64');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','66c207983960b1a1f49b972f77efe3bfd3097e19b0ee4034ccf9ac6c0d13e05b');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','04a13dec4e08ba21004961c718072fde976226d65809fa3c838bf66ba93e5d5a');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4d4f1d9a6519ba552b316b396db13ff0654a2663d8ed976188899a2d57d306a2');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','6789cc6499c77cdf44d4fb306198274bb72241e6d0ef7ceda7e916d7022d864c');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','32bddfcf1201495289921a2bf5f9b256b985b8b63a3985190676fb9f9f0f9b23');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','3976117beb9adeade088187965929d42f21f5da12c4614fd22aa92cad1083b19');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','197219e93857ad7e6701755ede245824329da08913ebdb23d1e5e854a169aafe');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','41e6a8b7b8bae08f07b3e4b69c8c095db5da984bb23c004cd1ebf755a6317794');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','b5faeb8f31d238e0d05a4aeebf9a837273687908ab8078b34e738bb0e369c80c');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f4e2c6ddf2fa93241665c5176faafb358eecfcb701e7478790c4d58853ed827a');\nhashMap.set('github-actions','0a91da0530d909b3cc6ad1265be0349e5c946e13cff7504cbfbfbaf1c967635c');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','89899292f917777b79f8ce1714e54c4e61cf151fb75f87f1ddb1d1ccd6a4e6f7');\nhashMap.set('gradle','14ffeecba62452d47d3796e68753da745de2614b6e5ecc346da4f0067ed4bc6e');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','22f61344565f87ca3512c0ba8fac32627fde8ee919b7badae07b2116e285f049');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','ab63e5bc2bb381939a6b75911947e3fc79d31827423ded07f61ea1c98d95a542');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','927798e082caf46a0da703389ba07e9e61fa73ef571ab551301b8fc6b06957d1');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','4a4321595a55de36669f3bcc6fb54236ad81c8f80ec9cbd3888f49a45fbe70e7');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','59c691024c34cb4be4d9b4f811019ae9b22410df0da54977cdcecea261fbbbf5');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','9cbd96a29fe96e3df7418e422256380202f07970cf7f00b08388c181224a2b85');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','9686302b38f9d6ff899cc69590ec2b9677fd5451f52d227649c0e0812b15c6f9');\nhashMap.set('nuget','fb02247c67a198ffe414a44d23c7894bd114dcc53803334f82e39479e7b27f6f');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','5a01837b4bc0b575073d1d3d44d9cb030ad66ea2bfb0be830f83f53c30bdb277');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','6788a8569ba9c50c763ffa2bed952a4314ae8e696c29f93d3eb7c4a12d99ce20');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','48e2bff8d3a96e8011ee12776fe9c6e8aac4718ff47e891c294a8f12660cb1bb');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEA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"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','8e11293c8f61b4cbae77a3b1634a47213031c59df2c9833d89db65bf4e6edc64');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','66c207983960b1a1f49b972f77efe3bfd3097e19b0ee4034ccf9ac6c0d13e05b');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','04a13dec4e08ba21004961c718072fde976226d65809fa3c838bf66ba93e5d5a');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4d4f1d9a6519ba552b316b396db13ff0654a2663d8ed976188899a2d57d306a2');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','6789cc6499c77cdf44d4fb306198274bb72241e6d0ef7ceda7e916d7022d864c');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','32bddfcf1201495289921a2bf5f9b256b985b8b63a3985190676fb9f9f0f9b23');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','3976117beb9adeade088187965929d42f21f5da12c4614fd22aa92cad1083b19');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','197219e93857ad7e6701755ede245824329da08913ebdb23d1e5e854a169aafe');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','41e6a8b7b8bae08f07b3e4b69c8c095db5da984bb23c004cd1ebf755a6317794');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','b5faeb8f31d238e0d05a4aeebf9a837273687908ab8078b34e738bb0e369c80c');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f4e2c6ddf2fa93241665c5176faafb358eecfcb701e7478790c4d58853ed827a');\nhashMap.set('github-actions','0a91da0530d909b3cc6ad1265be0349e5c946e13cff7504cbfbfbaf1c967635c');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','89899292f917777b79f8ce1714e54c4e61cf151fb75f87f1ddb1d1ccd6a4e6f7');\nhashMap.set('gradle','14ffeecba62452d47d3796e68753da745de2614b6e5ecc346da4f0067ed4bc6e');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','22f61344565f87ca3512c0ba8fac32627fde8ee919b7badae07b2116e285f049');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','ab63e5bc2bb381939a6b75911947e3fc79d31827423ded07f61ea1c98d95a542');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','927798e082caf46a0da703389ba07e9e61fa73ef571ab551301b8fc6b06957d1');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','4a4321595a55de36669f3bcc6fb54236ad81c8f80ec9cbd3888f49a45fbe70e7');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','59c691024c34cb4be4d9b4f811019ae9b22410df0da54977cdcecea261fbbbf5');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','9cbd96a29fe96e3df7418e422256380202f07970cf7f00b08388c181224a2b85');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','9686302b38f9d6ff899cc69590ec2b9677fd5451f52d227649c0e0812b15c6f9');\nhashMap.set('nuget','fb02247c67a198ffe414a44d23c7894bd114dcc53803334f82e39479e7b27f6f');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','5a01837b4bc0b575073d1d3d44d9cb030ad66ea2bfb0be830f83f53c30bdb277');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','2c74e8e94c484c8bfc93ba1272078d531a52e4faaa978fc90ddb654064bb85bc');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','6788a8569ba9c50c763ffa2bed952a4314ae8e696c29f93d3eb7c4a12d99ce20');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','48e2bff8d3a96e8011ee12776fe9c6e8aac4718ff47e891c294a8f12660cb1bb');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,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QAAQ,IAAI,SAAQ,kEAAkE"}
|
|
@@ -10,6 +10,7 @@ import { findPypiIndexCredentials } from "../../datasource/pypi/host-rules.js";
|
|
|
10
10
|
import { artifactErrorResult, resolveToolConstraint, updateLockFile } from "../util.js";
|
|
11
11
|
import { withGitEnvironment } from "../../../util/git/exec.js";
|
|
12
12
|
import { Lockfile, PoetryPyProject } from "./schema.js";
|
|
13
|
+
import { getLockfilePoetryVersion } from "./utils.js";
|
|
13
14
|
import { isNonEmptyArray, isNumber, isString } from "@sindresorhus/is";
|
|
14
15
|
import { Duration } from "luxon";
|
|
15
16
|
import { quote } from "shlex";
|
|
@@ -29,17 +30,10 @@ function getPythonConstraint(pyProjectContent, existingLockFileContent) {
|
|
|
29
30
|
return null;
|
|
30
31
|
}
|
|
31
32
|
function getPoetryRequirement(pyProjectContent, existingLockFileContent) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
logger.debug(`Using poetry version ${poetryVersion} from poetry.lock header`);
|
|
37
|
-
return poetryVersion;
|
|
38
|
-
}
|
|
39
|
-
const { val: lockfilePoetryConstraint } = Result.parse(existingLockFileContent, Lockfile.transform(({ poetryConstraint }) => poetryConstraint)).unwrap();
|
|
40
|
-
if (lockfilePoetryConstraint) {
|
|
41
|
-
logger.debug(`Using poetry version ${lockfilePoetryConstraint} from poetry.lock metadata`);
|
|
42
|
-
return lockfilePoetryConstraint;
|
|
33
|
+
const lockfilePoetryVersion = getLockfilePoetryVersion(existingLockFileContent);
|
|
34
|
+
if (lockfilePoetryVersion) {
|
|
35
|
+
logger.debug(`Using poetry version ${lockfilePoetryVersion} from poetry.lock`);
|
|
36
|
+
return lockfilePoetryVersion;
|
|
43
37
|
}
|
|
44
38
|
const { val: pyprojectPoetryConstraint } = Result.parse(massage(pyProjectContent), PoetryPyProject.transform(({ poetryRequirement }) => poetryRequirement)).unwrap();
|
|
45
39
|
if (pyprojectPoetryConstraint) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","names":["massageToml","parseToml"],"sources":["../../../../lib/modules/manager/poetry/artifacts.ts"],"sourcesContent":["import { isNonEmptyArray, isNumber, isString } from '@sindresorhus/is';\nimport { Duration } from 'luxon';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport {\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n} from '../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../util/git/exec.ts';\nimport { toMs } from '../../../util/pretty-time.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { Result } from '../../../util/result.ts';\nimport {\n massage as massageToml,\n parse as parseToml,\n} from '../../../util/toml.ts';\nimport { findPypiIndexCredentials } from '../../datasource/pypi/host-rules.ts';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\nimport {\n artifactErrorResult,\n resolveToolConstraint,\n updateLockFile,\n} from '../util.ts';\nimport { Lockfile, PoetryPyProject } from './schema.ts';\nimport type { PoetryFile, PoetrySource } from './types.ts';\n\nconst gitExec = withGitEnvironment(['poetry']);\n\nexport function getPythonConstraint(\n pyProjectContent: string,\n existingLockFileContent: string,\n): string | null {\n // Read Python version from `pyproject.toml` first as it could have been updated\n const pyprojectPythonConstraint = Result.parse(\n massageToml(pyProjectContent),\n PoetryPyProject.transform(\n ({ packageFileContent }) =>\n packageFileContent.deps.find((dep) => dep.depName === 'python')\n ?.currentValue,\n ),\n ).unwrapOrNull();\n if (pyprojectPythonConstraint) {\n logger.debug('Using python version from pyproject.toml');\n return pyprojectPythonConstraint;\n }\n\n const lockfilePythonConstraint = Result.parse(\n existingLockFileContent,\n Lockfile.transform(({ pythonVersions }) => pythonVersions),\n ).unwrapOrNull();\n if (lockfilePythonConstraint) {\n logger.debug('Using python version from poetry.lock');\n return lockfilePythonConstraint;\n }\n\n return null;\n}\n\nexport function getPoetryRequirement(\n pyProjectContent: string,\n existingLockFileContent: string,\n): undefined | string | null {\n // Read Poetry version from first line of poetry.lock\n const firstLine = existingLockFileContent.split('\\n')[0];\n const poetryVersionMatch = regEx(/by Poetry (?<version>[\\d\\\\.]+)/).exec(\n firstLine,\n );\n if (poetryVersionMatch?.groups?.version) {\n const poetryVersion = poetryVersionMatch.groups.version;\n logger.debug(\n `Using poetry version ${poetryVersion} from poetry.lock header`,\n );\n return poetryVersion;\n }\n\n const { val: lockfilePoetryConstraint } = Result.parse(\n existingLockFileContent,\n Lockfile.transform(({ poetryConstraint }) => poetryConstraint),\n ).unwrap();\n if (lockfilePoetryConstraint) {\n logger.debug(\n `Using poetry version ${lockfilePoetryConstraint} from poetry.lock metadata`,\n );\n return lockfilePoetryConstraint;\n }\n\n const { val: pyprojectPoetryConstraint } = Result.parse(\n massageToml(pyProjectContent),\n PoetryPyProject.transform(({ poetryRequirement }) => poetryRequirement),\n ).unwrap();\n if (pyprojectPoetryConstraint) {\n logger.debug(\n `Using poetry version ${pyprojectPoetryConstraint} from pyproject.toml`,\n );\n return pyprojectPoetryConstraint;\n }\n\n return null;\n}\n\nfunction getPoetrySources(content: string, fileName: string): PoetrySource[] {\n let pyprojectFile: PoetryFile;\n try {\n pyprojectFile = parseToml(massageToml(content)) as PoetryFile;\n } catch (err) {\n logger.debug({ err }, 'Error parsing pyproject.toml file');\n return [];\n }\n if (!pyprojectFile.tool?.poetry) {\n logger.debug(`${fileName} contains no poetry section`);\n return [];\n }\n\n const sources = coerceArray(pyprojectFile.tool?.poetry?.source);\n const sourceArray: PoetrySource[] = [];\n for (const source of sources) {\n if (source.name && source.url) {\n sourceArray.push({ name: source.name, url: source.url });\n }\n }\n return sourceArray;\n}\n\nasync function getSourceCredentialVars(\n pyprojectContent: string,\n packageFileName: string,\n): Promise<NodeJS.ProcessEnv> {\n const poetrySources = getPoetrySources(pyprojectContent, packageFileName);\n const envVars: NodeJS.ProcessEnv = {};\n\n for (const source of poetrySources) {\n const matchingHostRule = await findPypiIndexCredentials(source.url);\n const formattedSourceName = source.name\n .replace(regEx(/(?:\\.|-)+/g), '_')\n .toUpperCase();\n if (matchingHostRule.username) {\n envVars[`POETRY_HTTP_BASIC_${formattedSourceName}_USERNAME`] =\n matchingHostRule.username;\n }\n if (matchingHostRule.password) {\n envVars[`POETRY_HTTP_BASIC_${formattedSourceName}_PASSWORD`] =\n matchingHostRule.password;\n }\n }\n return envVars;\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`poetry.updateArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (!isNonEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated poetry deps - returning null');\n return null;\n }\n // Try poetry.lock first\n let lockFileName = getSiblingFileName(packageFileName, 'poetry.lock');\n let existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n // Try pyproject.lock next\n lockFileName = getSiblingFileName(packageFileName, 'pyproject.lock');\n existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug(`No lock file found`);\n return null;\n }\n }\n // a const, so the closure below keeps the narrowing to string\n const lockFileContent = existingLockFileContent;\n logger.debug(`Updating ${lockFileName}`);\n const cmd: string[] = [];\n if (isLockFileMaintenance) {\n cmd.push('poetry update --lock --no-interaction');\n } else {\n cmd.push(\n `poetry update --lock --no-interaction ${updatedDeps\n .map((dep) => dep.depName)\n .filter(isString)\n .map((dep) => quote(dep))\n .join(' ')}`,\n );\n }\n\n try {\n return await updateLockFile({\n lockFileName,\n existingLockFileContent,\n packageFile: { path: packageFileName, contents: newPackageFileContent },\n deleteLockFile: isLockFileMaintenance,\n run: async () => {\n const pythonConstraint = await resolveToolConstraint(\n config,\n 'python',\n () => getPythonConstraint(newPackageFileContent, lockFileContent),\n );\n const poetryConstraint = await resolveToolConstraint(\n config,\n 'poetry',\n () => getPoetryRequirement(newPackageFileContent, lockFileContent),\n );\n const extraEnv: NodeJS.ProcessEnv = {\n ...(await getSourceCredentialVars(\n newPackageFileContent,\n packageFileName,\n )),\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n };\n\n if (config.minimumReleaseAge) {\n const ageMs = toMs(config.minimumReleaseAge);\n if (isNumber(ageMs)) {\n const days = Math.ceil(Duration.fromMillis(ageMs).as('days'));\n extraEnv.POETRY_SOLVER_MIN_RELEASE_AGE = days.toString();\n } else {\n logger.debug(\n { minimumReleaseAge: config.minimumReleaseAge },\n 'Invalid minimumReleaseAge, skipping POETRY_SOLVER_MIN_RELEASE_AGE',\n );\n }\n }\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [\n { toolName: 'python', constraint: pythonConstraint },\n { toolName: 'poetry', constraint: poetryConstraint },\n ],\n };\n await gitExec(cmd, execOptions);\n },\n });\n } catch (err) {\n /* v8 ignore if -- defensive rethrow, not reproduced in the poetry specs */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, `Failed to update ${lockFileName} file`);\n return artifactErrorResult(lockFileName, err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,MAAM,UAAU,mBAAmB,CAAC,QAAQ,CAAC;AAE7C,SAAgB,oBACd,kBACA,yBACe;CAEf,MAAM,4BAA4B,OAAO,MACvCA,QAAY,gBAAgB,GAC5B,gBAAgB,WACb,EAAE,yBACD,mBAAmB,KAAK,MAAM,QAAQ,IAAI,YAAY,QAAQ,CAAC,EAC3D,YACR,CACF,CAAC,CAAC,aAAa;CACf,IAAI,2BAA2B;EAC7B,OAAO,MAAM,0CAA0C;EACvD,OAAO;CACT;CAEA,MAAM,2BAA2B,OAAO,MACtC,yBACA,SAAS,WAAW,EAAE,qBAAqB,cAAc,CAC3D,CAAC,CAAC,aAAa;CACf,IAAI,0B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AAa;IAAE,MAAM;IAAiB,UAAU;GAAsB;GACtE,gBAAgB;GAChB,KAAK,YAAY;IACf,MAAM,mBAAmB,MAAM,sBAC7B,QACA,gBACM,oBAAoB,uBAAuB,eAAe,CAClE;IACA,MAAM,mBAAmB,MAAM,sBAC7B,QACA,gBACM,qBAAqB,uBAAuB,eAAe,CACnE;IACA,MAAM,WAA8B;KAClC,GAAI,MAAM,wBACR,uBACA,eACF;KACA,eAAe,MAAM,eAAe,KAAK;IAC3C;IAEA,IAAI,OAAO,mBAAmB;KAC5B,MAAM,QAAQ,KAAK,OAAO,iBAAiB;KAC3C,IAAI,SAAS,KAAK,GAEhB,SAAS,gCADI,KAAK,KAAK,SAAS,WAAW,KAAK,CAAC,CAAC,GAAG,MAAM,CACf,CAAC,CAAC,SAAS;UAEvD,OAAO,MACL,EAAE,mBAAmB,OAAO,kBAAkB,GAC9C,mEACF;IAEJ;IAWA,MAAM,QAAQ,KAAK;KARjB,SAAS;KACT;KACA,QAAQ,CAAC;KACT,iBAAiB,CACf;MAAE,UAAU;MAAU,YAAY;KAAiB,GACnD;MAAE,UAAU;MAAU,YAAY;KAAiB,CACrD;IAE2B,CAAC;GAChC;EACF,CAAC;CACH,SAAS,KAAK;;EAEZ,IAAI,IAAI,YAAA,mBACN,MAAM;EAER,OAAO,MAAM,EAAE,IAAI,GAAG,oBAAoB,aAAa,MAAM;EAC7D,OAAO,oBAAoB,cAAc,GAAG;CAC9C;AACF"}
|
|
1
|
+
{"version":3,"file":"artifacts.js","names":["massageToml","parseToml"],"sources":["../../../../lib/modules/manager/poetry/artifacts.ts"],"sourcesContent":["import { isNonEmptyArray, isNumber, isString } from '@sindresorhus/is';\nimport { Duration } from 'luxon';\nimport { quote } from 'shlex';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport {\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n} from '../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../util/git/exec.ts';\nimport { toMs } from '../../../util/pretty-time.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { Result } from '../../../util/result.ts';\nimport {\n massage as massageToml,\n parse as parseToml,\n} from '../../../util/toml.ts';\nimport { findPypiIndexCredentials } from '../../datasource/pypi/host-rules.ts';\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\nimport {\n artifactErrorResult,\n resolveToolConstraint,\n updateLockFile,\n} from '../util.ts';\nimport { Lockfile, PoetryPyProject } from './schema.ts';\nimport type { PoetryFile, PoetrySource } from './types.ts';\nimport { getLockfilePoetryVersion } from './utils.ts';\n\nconst gitExec = withGitEnvironment(['poetry']);\n\nexport function getPythonConstraint(\n pyProjectContent: string,\n existingLockFileContent: string,\n): string | null {\n // Read Python version from `pyproject.toml` first as it could have been updated\n const pyprojectPythonConstraint = Result.parse(\n massageToml(pyProjectContent),\n PoetryPyProject.transform(\n ({ packageFileContent }) =>\n packageFileContent.deps.find((dep) => dep.depName === 'python')\n ?.currentValue,\n ),\n ).unwrapOrNull();\n if (pyprojectPythonConstraint) {\n logger.debug('Using python version from pyproject.toml');\n return pyprojectPythonConstraint;\n }\n\n const lockfilePythonConstraint = Result.parse(\n existingLockFileContent,\n Lockfile.transform(({ pythonVersions }) => pythonVersions),\n ).unwrapOrNull();\n if (lockfilePythonConstraint) {\n logger.debug('Using python version from poetry.lock');\n return lockfilePythonConstraint;\n }\n\n return null;\n}\n\nexport function getPoetryRequirement(\n pyProjectContent: string,\n existingLockFileContent: string,\n): undefined | string | null {\n const lockfilePoetryVersion = getLockfilePoetryVersion(\n existingLockFileContent,\n );\n if (lockfilePoetryVersion) {\n logger.debug(\n `Using poetry version ${lockfilePoetryVersion} from poetry.lock`,\n );\n return lockfilePoetryVersion;\n }\n\n const { val: pyprojectPoetryConstraint } = Result.parse(\n massageToml(pyProjectContent),\n PoetryPyProject.transform(({ poetryRequirement }) => poetryRequirement),\n ).unwrap();\n if (pyprojectPoetryConstraint) {\n logger.debug(\n `Using poetry version ${pyprojectPoetryConstraint} from pyproject.toml`,\n );\n return pyprojectPoetryConstraint;\n }\n\n return null;\n}\n\nfunction getPoetrySources(content: string, fileName: string): PoetrySource[] {\n let pyprojectFile: PoetryFile;\n try {\n pyprojectFile = parseToml(massageToml(content)) as PoetryFile;\n } catch (err) {\n logger.debug({ err }, 'Error parsing pyproject.toml file');\n return [];\n }\n if (!pyprojectFile.tool?.poetry) {\n logger.debug(`${fileName} contains no poetry section`);\n return [];\n }\n\n const sources = coerceArray(pyprojectFile.tool?.poetry?.source);\n const sourceArray: PoetrySource[] = [];\n for (const source of sources) {\n if (source.name && source.url) {\n sourceArray.push({ name: source.name, url: source.url });\n }\n }\n return sourceArray;\n}\n\nasync function getSourceCredentialVars(\n pyprojectContent: string,\n packageFileName: string,\n): Promise<NodeJS.ProcessEnv> {\n const poetrySources = getPoetrySources(pyprojectContent, packageFileName);\n const envVars: NodeJS.ProcessEnv = {};\n\n for (const source of poetrySources) {\n const matchingHostRule = await findPypiIndexCredentials(source.url);\n const formattedSourceName = source.name\n .replace(regEx(/(?:\\.|-)+/g), '_')\n .toUpperCase();\n if (matchingHostRule.username) {\n envVars[`POETRY_HTTP_BASIC_${formattedSourceName}_USERNAME`] =\n matchingHostRule.username;\n }\n if (matchingHostRule.password) {\n envVars[`POETRY_HTTP_BASIC_${formattedSourceName}_PASSWORD`] =\n matchingHostRule.password;\n }\n }\n return envVars;\n}\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`poetry.updateArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (!isNonEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated poetry deps - returning null');\n return null;\n }\n // Try poetry.lock first\n let lockFileName = getSiblingFileName(packageFileName, 'poetry.lock');\n let existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n // Try pyproject.lock next\n lockFileName = getSiblingFileName(packageFileName, 'pyproject.lock');\n existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n logger.debug(`No lock file found`);\n return null;\n }\n }\n // a const, so the closure below keeps the narrowing to string\n const lockFileContent = existingLockFileContent;\n logger.debug(`Updating ${lockFileName}`);\n const cmd: string[] = [];\n if (isLockFileMaintenance) {\n cmd.push('poetry update --lock --no-interaction');\n } else {\n cmd.push(\n `poetry update --lock --no-interaction ${updatedDeps\n .map((dep) => dep.depName)\n .filter(isString)\n .map((dep) => quote(dep))\n .join(' ')}`,\n );\n }\n\n try {\n return await updateLockFile({\n lockFileName,\n existingLockFileContent,\n packageFile: { path: packageFileName, contents: newPackageFileContent },\n deleteLockFile: isLockFileMaintenance,\n run: async () => {\n const pythonConstraint = await resolveToolConstraint(\n config,\n 'python',\n () => getPythonConstraint(newPackageFileContent, lockFileContent),\n );\n const poetryConstraint = await resolveToolConstraint(\n config,\n 'poetry',\n () => getPoetryRequirement(newPackageFileContent, lockFileContent),\n );\n const extraEnv: NodeJS.ProcessEnv = {\n ...(await getSourceCredentialVars(\n newPackageFileContent,\n packageFileName,\n )),\n PIP_CACHE_DIR: await ensureCacheDir('pip'),\n };\n\n if (config.minimumReleaseAge) {\n const ageMs = toMs(config.minimumReleaseAge);\n if (isNumber(ageMs)) {\n const days = Math.ceil(Duration.fromMillis(ageMs).as('days'));\n extraEnv.POETRY_SOLVER_MIN_RELEASE_AGE = days.toString();\n } else {\n logger.debug(\n { minimumReleaseAge: config.minimumReleaseAge },\n 'Invalid minimumReleaseAge, skipping POETRY_SOLVER_MIN_RELEASE_AGE',\n );\n }\n }\n\n const execOptions: ExecOptions = {\n cwdFile: packageFileName,\n extraEnv,\n docker: {},\n toolConstraints: [\n { toolName: 'python', constraint: pythonConstraint },\n { toolName: 'poetry', constraint: poetryConstraint },\n ],\n };\n await gitExec(cmd, execOptions);\n },\n });\n } catch (err) {\n /* v8 ignore if -- defensive rethrow, not reproduced in the poetry specs */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, `Failed to update ${lockFileName} file`);\n return artifactErrorResult(lockFileName, err);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+BA,MAAM,UAAU,mBAAmB,CAAC,QAAQ,CAAC;AAE7C,SAAgB,oBACd,kBACA,yBACe;CAEf,MAAM,4BAA4B,OAAO,MACvCA,QAAY,gBAAgB,GAC5B,gBAAgB,WACb,EAAE,yBACD,mBAAmB,KAAK,MAAM,QAAQ,IAAI,YAAY,QAAQ,CAAC,EAC3D,YACR,CACF,CAAC,CAAC,aAAa;CACf,IAAI,2BAA2B;EAC7B,OAAO,MAAM,0CAA0C;EACvD,OAAO;CACT;CAEA,MAAM,2BAA2B,OAAO,MACtC,yBACA,SAAS,WAAW,EAAE,qBAAqB,cAAc,CAC3D,CAAC,CAAC,aAAa;CACf,IAAI,0BAA0B;EAC5B,OAAO,MAAM,uCAAuC;EACpD,OAAO;CACT;CAEA,OAAO;AACT;AAEA,SAAgB,qBACd,kBACA,yBAC2B;CAC3B,MAAM,wBAAwB,yBAC5B,uBACF;CACA,IAAI,uBAAuB;EACzB,OAAO,MACL,wBAAwB,sBAAsB,kBAChD;EACA,OAAO;CACT;CAEA,MAAM,EAAE,KAAK,8BAA8B,OAAO,MAChDA,QAAY,gBAAgB,GAC5B,gBAAgB,WAAW,EAAE,wBAAwB,iBAAiB,CACxE,CAAC,CAAC,OAAO;CACT,IAAI,2BAA2B;EAC7B,OAAO,MACL,wBAAwB,0BAA0B,qBACpD;EACA,OAAO;CACT;CAEA,OAAO;AACT;AAEA,SAAS,iBAAiB,SAAiB,UAAkC;CAC3E,IAAI;CACJ,IAAI;EACF,gBAAgBC,MAAUD,QAAY,OAAO,CAAC;CAChD,SAAS,KAAK;EACZ,OAAO,MAAM,EAAE,IAAI,GAA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;AACF"}
|
|
@@ -2,14 +2,25 @@ import { logger } from "../../../logger/index.js";
|
|
|
2
2
|
import { massage } from "../../../util/toml.js";
|
|
3
3
|
import { getSiblingFileName, localPathExists, readLocalFile } from "../../../util/fs/index.js";
|
|
4
4
|
import { filterMap } from "../../../util/filter-map.js";
|
|
5
|
+
import { api } from "../../versioning/poetry/index.js";
|
|
5
6
|
import { Result } from "../../../util/result.js";
|
|
6
7
|
import { GithubReleasesDatasource } from "../../datasource/github-releases/index.js";
|
|
7
|
-
import { Lockfile, PoetryPyProject } from "./schema.js";
|
|
8
|
+
import { Lockfile, PoetryPyProject, getRegistryUrls, withImplicitPypi } from "./schema.js";
|
|
9
|
+
import { getLockfilePoetryVersion } from "./utils.js";
|
|
8
10
|
import { isNonEmptyString } from "@sindresorhus/is";
|
|
9
11
|
//#region lib/modules/manager/poetry/extract.ts
|
|
12
|
+
/**
|
|
13
|
+
* Before Poetry 1.8, PyPI was implicitly added as a secondary source
|
|
14
|
+
* even when a primary source was configured.
|
|
15
|
+
*/
|
|
16
|
+
function isLegacyPoetry(lockContents) {
|
|
17
|
+
const version = lockContents && getLockfilePoetryVersion(lockContents);
|
|
18
|
+
if (!version) return false;
|
|
19
|
+
return !api.isVersion(version) || api.isGreaterThan("1.8.0", version);
|
|
20
|
+
}
|
|
10
21
|
async function extractPackageFile(content, packageFile) {
|
|
11
22
|
logger.trace(`poetry.extractPackageFile(${packageFile})`);
|
|
12
|
-
const { val:
|
|
23
|
+
const { val: parsed, err } = Result.parse(massage(content), PoetryPyProject).unwrap();
|
|
13
24
|
if (err) {
|
|
14
25
|
logger.debug({
|
|
15
26
|
packageFile,
|
|
@@ -17,9 +28,11 @@ async function extractPackageFile(content, packageFile) {
|
|
|
17
28
|
}, `Poetry: error parsing pyproject.toml`);
|
|
18
29
|
return null;
|
|
19
30
|
}
|
|
31
|
+
const { packageFileContent: res, poetrySources } = parsed;
|
|
20
32
|
const lockfileName = getSiblingFileName(packageFile, "poetry.lock");
|
|
21
33
|
const lockContents = await readLocalFile(lockfileName, "utf8");
|
|
22
34
|
const lockfileMapping = Result.parse(lockContents, Lockfile.transform(({ lock }) => lock)).unwrapOr({});
|
|
35
|
+
if (poetrySources?.length && isLegacyPoetry(lockContents)) res.registryUrls = getRegistryUrls(withImplicitPypi(poetrySources, true));
|
|
23
36
|
let pythonVersion;
|
|
24
37
|
filterMap(res.deps, (dep) => {
|
|
25
38
|
if (dep.depName === "python") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","names":["massageToml"],"sources":["../../../../lib/modules/manager/poetry/extract.ts"],"sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport type { ConstraintName } from '../../../util/exec/types.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport {\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n} from '../../../util/fs/index.ts';\nimport { Result } from '../../../util/result.ts';\nimport { massage as massageToml } from '../../../util/toml.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport type { PackageFileContent } from '../types.ts';\nimport {
|
|
1
|
+
{"version":3,"file":"extract.js","names":["massageToml"],"sources":["../../../../lib/modules/manager/poetry/extract.ts"],"sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport type { ConstraintName } from '../../../util/exec/types.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport {\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n} from '../../../util/fs/index.ts';\nimport { Result } from '../../../util/result.ts';\nimport { massage as massageToml } from '../../../util/toml.ts';\nimport { GithubReleasesDatasource } from '../../datasource/github-releases/index.ts';\nimport * as poetryVersioning from '../../versioning/poetry/index.ts';\nimport type { PackageFileContent } from '../types.ts';\nimport {\n Lockfile,\n PoetryPyProject,\n getRegistryUrls,\n withImplicitPypi,\n} from './schema.ts';\nimport { getLockfilePoetryVersion } from './utils.ts';\n\n/**\n * Before Poetry 1.8, PyPI was implicitly added as a secondary source\n * even when a primary source was configured.\n */\nfunction isLegacyPoetry(lockContents: string | undefined): boolean {\n const version = lockContents && getLockfilePoetryVersion(lockContents);\n if (!version) {\n return false;\n }\n\n // a non-exact value is a constraint inferred from lock-version, i.e. < 1.4\n return (\n !poetryVersioning.api.isVersion(version) ||\n poetryVersioning.api.isGreaterThan('1.8.0', version)\n );\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n): Promise<PackageFileContent | null> {\n logger.trace(`poetry.extractPackageFile(${packageFile})`);\n const { val: parsed, err } = Result.parse(\n massageToml(content),\n PoetryPyProject,\n ).unwrap();\n if (err) {\n logger.debug({ packageFile, err }, `Poetry: error parsing pyproject.toml`);\n return null;\n }\n const { packageFileContent: res, poetrySources } = parsed;\n\n const lockfileName = getSiblingFileName(packageFile, 'poetry.lock');\n const lockContents = (await readLocalFile(lockfileName, 'utf8'))!;\n const lockfileMapping = Result.parse(\n lockContents,\n Lockfile.transform(({ lock }) => lock),\n ).unwrapOr({});\n\n if (poetrySources?.length && isLegacyPoetry(lockContents)) {\n res.registryUrls = getRegistryUrls(withImplicitPypi(poetrySources, true));\n }\n\n let pythonVersion: string | undefined;\n filterMap(res.deps, (dep) => {\n if (dep.depName === 'python') {\n // v8 ignore else -- a python dep always carries a current value\n if (dep.currentValue) {\n pythonVersion = dep.currentValue;\n }\n return {\n ...dep,\n // We use containerbase python as source, as there are a lot docker tags which can cause\n // issues with poetry versioning.\n packageName: 'containerbase/python-prebuild',\n datasource: GithubReleasesDatasource.id,\n commitMessageTopic: 'Python',\n registryUrls: null,\n };\n }\n\n const packageName = dep.packageName ?? dep.depName;\n if (packageName && packageName in lockfileMapping) {\n dep.lockedVersion = lockfileMapping[packageName];\n }\n\n return dep;\n });\n\n if (!res.deps.length) {\n return null;\n }\n\n const extractedConstraints: Partial<Record<ConstraintName, string>> = {};\n\n if (isNonEmptyString(pythonVersion)) {\n extractedConstraints.python = pythonVersion;\n }\n res.extractedConstraints = extractedConstraints;\n\n // Try poetry.lock first\n let lockFile = getSiblingFileName(packageFile, 'poetry.lock');\n // istanbul ignore next\n if (await localPathExists(lockFile)) {\n res.lockFiles = [lockFile];\n } else {\n // Try pyproject.lock next\n lockFile = getSiblingFileName(packageFile, 'pyproject.lock');\n if (await localPathExists(lockFile)) {\n res.lockFiles = [lockFile];\n }\n }\n return res;\n}\n"],"mappings":";;;;;;;;;;;;;;;AA0BA,SAAS,eAAe,cAA2C;CACjE,MAAM,UAAU,gBAAgB,yBAAyB,YAAY;CACrE,IAAI,CAAC,SACH,OAAO;CAIT,OACE,CAAA,IAAsB,UAAU,OAAO,KAAA,IAClB,cAAc,SAAS,OAAO;AAEvD;AAEA,eAAsB,mBACpB,SACA,aACoC;CACpC,OAAO,MAAM,6BAA6B,YAAY,EAAE;CACxD,MAAM,EAAE,KAAK,QAAQ,QAAQ,OAAO,MAClCA,QAAY,OAAO,GACnB,eACF,CAAC,CAAC,OAAO;CACT,IAAI,KAAK;EACP,OAAO,MAAM;GAAE;GAAa;EAAI,GAAG,sCAAsC;EACzE,OAAO;CACT;CACA,MAAM,EAAE,oBAAoB,KAAK,kBAAkB;CAEnD,MAAM,eAAe,mBAAmB,aAAa,aAAa;CAClE,MAAM,eAAgB,MAAM,cAAc,cAAc,MAAM;CAC9D,MAAM,kBAAkB,OAAO,MAC7B,cACA,SAAS,WAAW,EAAE,WAAW,IAAI,CACvC,CAAC,CAAC,SAAS,CAAC,CAAC;CAEb,IAAI,eAAe,UAAU,eAAe,YAAY,GACtD,IAAI,eAAe,gBAAgB,iBAAiB,eAAe,IAAI,CAAC;CAG1E,IAAI;CACJ,UAAU,IAAI,OAAO,QAAQ;EAC3B,IAAI,IAAI,YAAY,UAAU;;GAE5B,IAAI,IAAI,cACN,gBAAgB,IAAI;GAEtB,OAAO;IACL,GAAG;IAGH,aAAa;IACb,YAAY,yBAAyB;IACrC,oBAAoB;IACpB,cAAc;GAChB;EACF;EAEA,MAAM,cAAc,IAAI,eAAe,IAAI;EAC3C,IAAI,eAAe,eAAe,iBAChC,IAAI,gBAAgB,gBAAgB;EAGtC,OAAO;CACT,CAAC;CAED,IAAI,CAAC,IAAI,KAAK,QACZ,OAAO;CAGT,MAAM,uBAAgE,CAAC;CAEvE,IAAI,iBAAiB,aAAa,GAChC,qBAAqB,SAAS;CAEhC,IAAI,uBAAuB;CAG3B,IAAI,WAAW,mBAAmB,aAAa,aAAa;;CAE5D,IAAI,MAAM,gBAAgB,QAAQ,GAChC,IAAI,YAAY,CAAC,QAAQ;MACpB;EAEL,WAAW,mBAAmB,aAAa,gBAAgB;EAC3D,IAAI,MAAM,gBAAgB,QAAQ,GAChC,IAAI,YAAY,CAAC,QAAQ;CAE7B;CACA,OAAO;AACT"}
|
|
@@ -155,31 +155,42 @@ const PoetrySource = z.object({
|
|
|
155
155
|
url: z.string().optional(),
|
|
156
156
|
priority: z.enum(PoetrySourceOrder).default("primary")
|
|
157
157
|
});
|
|
158
|
+
function getPypiUrl() {
|
|
159
|
+
return getEnv().PIP_INDEX_URL ?? "https://pypi.org/pypi/";
|
|
160
|
+
}
|
|
161
|
+
function sortSources(sources) {
|
|
162
|
+
return sources.sort((a, b) => PoetrySourceOrder.indexOf(a.priority) - PoetrySourceOrder.indexOf(b.priority));
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Adds the implicit PyPI source when the project does not configure it.
|
|
166
|
+
*
|
|
167
|
+
* Poetry >= 1.8 only adds PyPI when there is no primary source.
|
|
168
|
+
* Before 1.8, PyPI was also added as a secondary source next to a primary one.
|
|
169
|
+
*/
|
|
170
|
+
function withImplicitPypi(sources, legacyPoetry) {
|
|
171
|
+
if (sources.some(({ name, priority }) => name === "pypi" || priority === "default")) return sources;
|
|
172
|
+
const hasPrimarySource = sources.some(({ priority }) => priority === "primary");
|
|
173
|
+
if (hasPrimarySource && !legacyPoetry) return sources;
|
|
174
|
+
return sortSources([...sources, {
|
|
175
|
+
name: "pypi",
|
|
176
|
+
priority: hasPrimarySource ? "secondary" : "default",
|
|
177
|
+
url: getPypiUrl()
|
|
178
|
+
}]);
|
|
179
|
+
}
|
|
180
|
+
function getRegistryUrls(sources) {
|
|
181
|
+
return uniq(sources.filter(({ priority }) => priority !== "explicit").map(({ url }) => url));
|
|
182
|
+
}
|
|
158
183
|
const PoetrySources = LooseArray(PoetrySource, { onError: ({ error: err }) => {
|
|
159
184
|
logger.debug({ err }, "Poetry: error parsing sources array");
|
|
160
185
|
} }).transform((sources) => {
|
|
161
|
-
const pypiUrl =
|
|
186
|
+
const pypiUrl = getPypiUrl();
|
|
162
187
|
const result = [];
|
|
163
|
-
let overridesPyPi = false;
|
|
164
|
-
let hasDefaultSource = false;
|
|
165
|
-
let hasPrimarySource = false;
|
|
166
188
|
for (const source of sources) {
|
|
167
|
-
if (source.name === "pypi")
|
|
168
|
-
source.url = pypiUrl;
|
|
169
|
-
overridesPyPi = true;
|
|
170
|
-
}
|
|
189
|
+
if (source.name === "pypi") source.url = pypiUrl;
|
|
171
190
|
if (!source.url) continue;
|
|
172
|
-
if (source.priority === "default") hasDefaultSource = true;
|
|
173
|
-
else if (source.priority === "primary") hasPrimarySource = true;
|
|
174
191
|
result.push(source);
|
|
175
192
|
}
|
|
176
|
-
|
|
177
|
-
name: "pypi",
|
|
178
|
-
priority: hasPrimarySource ? "secondary" : "default",
|
|
179
|
-
url: pypiUrl
|
|
180
|
-
});
|
|
181
|
-
result.sort((a, b) => PoetrySourceOrder.indexOf(a.priority) - PoetrySourceOrder.indexOf(b.priority));
|
|
182
|
-
return result;
|
|
193
|
+
return sortSources(sources.length ? withImplicitPypi(result, false) : result);
|
|
183
194
|
}).catch([]);
|
|
184
195
|
const PoetrySection = z.object({
|
|
185
196
|
version: z.string().optional().catch(void 0),
|
|
@@ -245,11 +256,12 @@ const PoetryPyProject = Toml.pipe(z.object({
|
|
|
245
256
|
const sourceUrl = sourceUrls.find(({ name }) => name === dep.managerData?.sourceName);
|
|
246
257
|
if (sourceUrl?.url) dep.registryUrls = [sourceUrl.url];
|
|
247
258
|
}
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
259
|
+
const registryUrls = getRegistryUrls(sourceUrls);
|
|
260
|
+
if (registryUrls.length) packageFileContent.registryUrls = registryUrls;
|
|
250
261
|
}
|
|
251
262
|
return {
|
|
252
263
|
packageFileContent,
|
|
264
|
+
poetrySources: sourceUrls,
|
|
253
265
|
poetryRequirement: buildSystem?.poetryRequirement
|
|
254
266
|
};
|
|
255
267
|
}));
|
|
@@ -279,6 +291,6 @@ const Lockfile = Toml.pipe(z.object({
|
|
|
279
291
|
pythonVersions
|
|
280
292
|
}));
|
|
281
293
|
//#endregion
|
|
282
|
-
export { Lockfile, PoetryDependencies, PoetryGroupDependencies, PoetryPyProject, PoetrySection, PoetrySource, PoetrySources };
|
|
294
|
+
export { Lockfile, PoetryDependencies, PoetryGroupDependencies, PoetryPyProject, PoetrySection, PoetrySource, PoetrySources, getPypiUrl, getRegistryUrls, withImplicitPypi };
|
|
283
295
|
|
|
284
296
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":["pep440Versioning.isValid","pep440Versioning.id","poetryVersioning.isValid","poetryVersioning.id","deepmerge"],"sources":["../../../../lib/modules/manager/poetry/schema.ts"],"sourcesContent":["import deepmerge from 'deepmerge';\nimport { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { parseGitUrl } from '../../../util/git/url.ts';\nimport {\n LooseArray,\n LooseRecord,\n Toml,\n withDepType,\n} from '../../../util/schema-utils/index.ts';\nimport { uniq } from '../../../util/uniq.ts';\nimport { GitRefsDatasource } from '../../datasource/git-refs/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { normalizePythonDepName } from '../../datasource/pypi/common.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport * as gitVersioning from '../../versioning/git/index.ts';\nimport * as pep440Versioning from '../../versioning/pep440/index.ts';\nimport * as poetryVersioning from '../../versioning/poetry/index.ts';\nimport { DependencyGroup, ProjectSection } from '../pep621/schema.ts';\nimport { depTypes, pep508ToPackageDependency } from '../pep621/utils.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport type { PoetryManagerData } from './types.ts';\n\nconst PoetryOptionalDependencyMixin = z\n .object({\n optional: z.boolean().optional().catch(false),\n })\n .transform(({ optional }): PackageDependency<PoetryManagerData> =>\n optional ? { depType: 'extras' } : {},\n );\n\nconst PoetryPathDependency = z\n .object({\n path: z.string(),\n version: z.string().optional().catch(undefined),\n })\n .transform(({ version }): PackageDependency<PoetryManagerData> => {\n const dep: PackageDependency<PoetryManagerData> = {\n datasource: PypiDatasource.id,\n skipReason: 'path-dependency',\n };\n\n if (version) {\n dep.currentValue = version;\n }\n\n return dep;\n })\n .and(PoetryOptionalDependencyMixin);\n\nconst PoetryGitDependency = z\n .object({\n git: z.string(),\n tag: z.string().optional().catch(undefined),\n version: z.string().optional().catch(undefined),\n branch: z.string().optional().catch(undefined),\n rev: z.string().optional().catch(undefined),\n })\n .transform(\n ({\n git,\n tag,\n version,\n branch,\n rev,\n }): PackageDependency<PoetryManagerData> => {\n if (tag) {\n const { source, owner, name } = parseGitUrl(git);\n const repo = `${owner}/${name}`;\n if (source === 'github.com') {\n return {\n datasource: GithubTagsDatasource.id,\n currentValue: tag,\n packageName: repo,\n };\n }\n if (source === 'gitlab.com') {\n return {\n datasource: GitlabTagsDatasource.id,\n currentValue: tag,\n packageName: repo,\n };\n }\n return {\n datasource: GitTagsDatasource.id,\n currentValue: tag,\n packageName: git,\n };\n }\n\n if (rev) {\n return {\n datasource: GitRefsDatasource.id,\n currentValue: branch,\n currentDigest: rev,\n replaceString: rev,\n packageName: git,\n };\n }\n\n return {\n datasource: GitRefsDatasource.id,\n currentValue: version,\n packageName: git,\n skipReason: 'git-dependency',\n };\n },\n )\n .and(PoetryOptionalDependencyMixin);\n\nconst PoetryPypiDependency = z.union([\n z\n .object({ version: z.string().optional(), source: z.string().optional() })\n .transform(\n ({\n version: currentValue,\n source,\n }): PackageDependency<PoetryManagerData> => {\n const managerData = source ? { sourceName: source.toLowerCase() } : {};\n\n if (!currentValue) {\n return { datasource: PypiDatasource.id, managerData };\n }\n\n return {\n datasource: PypiDatasource.id,\n managerData: { ...managerData, nestedVersion: true },\n currentValue,\n };\n },\n )\n .and(PoetryOptionalDependencyMixin),\n z.string().transform((version): PackageDependency<PoetryManagerData> => ({\n datasource: PypiDatasource.id,\n currentValue: version,\n managerData: { nestedVersion: false },\n })),\n]);\n\nconst PoetryArrayDependency = z\n .array(z.unknown())\n .transform((): PackageDependency<PoetryManagerData> => ({\n datasource: PypiDatasource.id,\n skipReason: 'multiple-constraint-dep',\n }));\n\nconst PoetryDependency = z.union([\n PoetryPathDependency,\n PoetryGitDependency,\n PoetryPypiDependency,\n PoetryArrayDependency,\n]);\n\nexport const PoetryDependencies = LooseRecord(\n z.string(),\n PoetryDependency.transform((dep) => {\n if (dep.skipReason) {\n return dep;\n }\n\n if (dep.datasource === GitRefsDatasource.id && dep.currentDigest) {\n dep.versioning = gitVersioning.id;\n return dep;\n }\n\n // istanbul ignore if: normaly should not happen\n if (!dep.currentValue) {\n dep.skipReason = 'unspecified-version';\n return dep;\n }\n\n if (pep440Versioning.isValid(dep.currentValue)) {\n dep.versioning = pep440Versioning.id;\n return dep;\n }\n\n if (poetryVersioning.isValid(dep.currentValue)) {\n dep.versioning = poetryVersioning.id;\n return dep;\n }\n\n dep.skipReason = 'invalid-version';\n return dep;\n }),\n).transform((record) => {\n const deps: PackageDependency<PoetryManagerData>[] = [];\n for (const [depName, dep] of Object.entries(record)) {\n dep.depName = depName;\n if (!dep.packageName) {\n const packageName = normalizePythonDepName(depName);\n if (depName !== packageName) {\n dep.packageName = packageName;\n }\n }\n deps.push(dep);\n }\n return deps;\n});\n\nexport const PoetryGroupDependencies = LooseRecord(\n z.string(),\n z\n .object({ dependencies: PoetryDependencies })\n .transform(({ dependencies }) => dependencies),\n).transform((record) => {\n const deps: PackageDependency<PoetryManagerData>[] = [];\n for (const [name, val] of Object.entries(record)) {\n for (const dep of Object.values(val)) {\n dep.depType = name;\n deps.push(dep);\n }\n }\n return deps;\n});\n\nconst PoetrySourceOrder = [\n 'default',\n 'primary',\n 'secondary',\n 'supplemental',\n 'explicit',\n] as const;\n\nexport const PoetrySource = z.object({\n name: z.string().toLowerCase(),\n url: z.string().optional(),\n priority: z.enum(PoetrySourceOrder).default('primary'),\n});\nexport type PoetrySource = z.infer<typeof PoetrySource>;\n\nexport const PoetrySources = LooseArray(PoetrySource, {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Poetry: error parsing sources array');\n },\n})\n .transform((sources) => {\n const pypiUrl = getEnv().PIP_INDEX_URL ?? 'https://pypi.org/pypi/';\n const result: PoetrySource[] = [];\n\n let overridesPyPi = false;\n let hasDefaultSource = false;\n let hasPrimarySource = false;\n for (const source of sources) {\n if (source.name === 'pypi') {\n source.url = pypiUrl;\n overridesPyPi = true;\n }\n\n if (!source.url) {\n continue;\n }\n\n if (source.priority === 'default') {\n hasDefaultSource = true;\n } else if (source.priority === 'primary') {\n hasPrimarySource = true;\n }\n\n result.push(source);\n }\n\n if (sources.length && !hasDefaultSource && !overridesPyPi) {\n result.push({\n name: 'pypi',\n priority: hasPrimarySource ? 'secondary' : 'default',\n url: pypiUrl,\n });\n }\n\n result.sort(\n (a, b) =>\n PoetrySourceOrder.indexOf(a.priority) -\n PoetrySourceOrder.indexOf(b.priority),\n );\n\n return result;\n })\n .catch([]);\n\nexport const PoetrySection = z.object({\n version: z.string().optional().catch(undefined),\n dependencies: withDepType(\n PoetryDependencies,\n 'dependencies',\n false,\n ).optional(),\n 'dev-dependencies': withDepType(\n PoetryDependencies,\n 'dev-dependencies',\n ).optional(),\n group: PoetryGroupDependencies.optional(),\n source: PoetrySources,\n});\n\nexport type PoetrySection = z.infer<typeof PoetrySection>;\n\nconst BuildSystemRequires = LooseArray(\n z\n .string()\n .nonempty()\n .transform((val) =>\n pep508ToPackageDependency(depTypes.buildSystemRequires, val),\n )\n .refine((dep) => dep !== null),\n).catch([]);\n\nexport const PoetryPyProject = Toml.pipe(\n z\n .object({\n project: ProjectSection.optional().catch(undefined),\n tool: z.object({ poetry: PoetrySection }).optional().catch(undefined),\n 'dependency-groups': DependencyGroup(depTypes.dependencyGroups).catch([]),\n 'build-system': z\n .object({\n 'build-backend': z.string().refine(\n // https://python-poetry.org/docs/pyproject/#poetry-and-pep-517\n (buildBackend) =>\n buildBackend === 'poetry.masonry.api' ||\n buildBackend === 'poetry.core.masonry.api',\n ),\n requires: BuildSystemRequires,\n })\n .transform(({ requires }) => {\n const req = requires.find(\n ({ depName }) =>\n depName === 'poetry' ||\n depName === 'poetry_core' ||\n depName === 'poetry-core',\n );\n return {\n poetryRequirement: req?.currentValue,\n requires,\n };\n })\n .optional()\n .catch(undefined),\n })\n .transform((pyproject) => {\n const {\n project,\n tool,\n 'build-system': buildSystem,\n 'dependency-groups': dependencyGroups,\n } = pyproject;\n\n const deps: PackageDependency<PoetryManagerData>[] = [];\n const projectDependencies = coerceArray(project?.dependencies);\n const projectOptionalDependencies = coerceArray(\n project?.['optional-dependencies'],\n );\n\n const projectDepsByName: Record<\n string,\n PackageDependency<PoetryManagerData>\n > = {};\n for (const dep of [\n ...projectDependencies,\n ...dependencyGroups,\n ...projectOptionalDependencies,\n ]) {\n projectDepsByName[dep.depName!] = dep;\n }\n\n if (buildSystem?.requires) {\n deps.push(...buildSystem.requires);\n }\n\n const poetryDependencies = coerceArray(tool?.poetry?.dependencies);\n\n const poetryDevDependencies = coerceArray(\n tool?.poetry?.['dev-dependencies'],\n );\n\n const poetryGroupDependencies = coerceArray(tool?.poetry?.group);\n\n for (const poetryDep of [\n ...poetryDependencies,\n ...poetryDevDependencies,\n ...poetryGroupDependencies,\n ]) {\n const depName = poetryDep.depName;\n const projectDep = depName && projectDepsByName[depName];\n // When the same dep exists in project.dependencies or dependency-groups,\n // Poetry just uses the Poetry dep to enrich the project dependency.\n if (projectDep) {\n const mergedDep = deepmerge<PackageDependency<PoetryManagerData>>(\n poetryDep,\n projectDep,\n );\n // Poetry supports specifying the version in project.dependencies and\n // tool.poetry.dependencies *at the same time* and only errors if both\n // are not compatible - we require a single constraint per dependency.\n if (projectDep.currentValue && poetryDep.currentValue) {\n mergedDep.skipReason = 'invalid-dependency-specification';\n }\n // When a skipReason is 'unspecified-version', we defer to the other skipReason,\n // so that 'unspecified-version' only persists if both deps have no version.\n if (mergedDep.skipReason === 'unspecified-version') {\n if (poetryDep.skipReason === 'unspecified-version') {\n mergedDep.skipReason = projectDep.skipReason;\n } else {\n mergedDep.skipReason = poetryDep.skipReason;\n }\n }\n projectDepsByName[depName] = mergedDep;\n } else {\n deps.push(poetryDep);\n }\n }\n\n deps.push(...Object.values(projectDepsByName));\n\n const packageFileVersion = tool?.poetry?.version;\n const packageFileContent: PackageFileContent<PoetryManagerData> = {\n deps,\n packageFileVersion,\n };\n\n const sourceUrls = tool?.poetry?.source;\n if (sourceUrls) {\n for (const dep of deps) {\n if (dep.managerData?.sourceName) {\n const sourceUrl = sourceUrls.find(\n ({ name }) => name === dep.managerData?.sourceName,\n );\n if (sourceUrl?.url) {\n dep.registryUrls = [sourceUrl.url];\n }\n }\n }\n\n const sourceUrlsFiltered = sourceUrls.filter(\n ({ priority }) => priority !== 'explicit',\n );\n if (sourceUrlsFiltered.length) {\n packageFileContent.registryUrls = uniq(\n sourceUrlsFiltered.map(({ url }) => url!),\n );\n }\n }\n\n return {\n packageFileContent,\n poetryRequirement: buildSystem?.poetryRequirement,\n };\n }),\n);\n\nexport type PoetryPyProject = z.infer<typeof PoetryPyProject>;\n\nconst poetryConstraint: Record<string, string> = {\n '1.0': '<1.1.0',\n '1.1': '<1.3.0',\n '2.0': '>=1.3.0 <1.4.0', // 1.4.0 introduced embedding of the poetry version in lock file header\n};\n\nexport const Lockfile = Toml.pipe(\n z.object({\n package: LooseArray(\n z\n .object({\n name: z.string(),\n version: z.string(),\n })\n .transform(({ name, version }): [string, string] => [name, version]),\n )\n .transform((entries) => Object.fromEntries(entries))\n .catch({}),\n metadata: z\n .object({\n 'lock-version': z\n .string()\n .transform((lockVersion) => poetryConstraint[lockVersion])\n .optional()\n .catch(undefined),\n 'python-versions': z.string().optional().catch(undefined),\n })\n .transform(\n ({\n 'lock-version': poetryConstraint,\n 'python-versions': pythonVersions,\n }) => ({\n poetryConstraint,\n pythonVersions,\n }),\n )\n .catch({\n poetryConstraint: undefined,\n pythonVersions: undefined,\n }),\n }),\n).transform(\n ({ package: lock, metadata: { poetryConstraint, pythonVersions } }) => ({\n lock,\n poetryConstraint,\n pythonVersions,\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,gCAAgC,EACnC,OAAO,EACN,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,EAC9C,CAAC,CAAC,CACD,WAAW,EAAE,eACZ,WAAW,EAAE,SAAS,SAAS,IAAI,CAAC,CACtC;AAEF,MAAM,uBAAuB,EAC1B,OAAO;CACN,MAAM,EAAE,OAAO;CACf,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAA,CAAS;AAChD,CAAC,CAAC,CACD,WAAW,EAAE,cAAoD;CAChE,MAAM,MAA4C;EAChD,YAAY,eAAe;EAC3B,YAAY;CACd;CAEA,IAAI,SACF,IAAI,eAAe;CAGrB,OAAO;AACT,CAAC,CAAC,CACD,IAAI,6BAA6B;AAEpC,MAAM,sBAAsB,EACzB,OAAO;CACN,KAAK,EAAE,OAAO;CACd,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAA,CAAS;CAC1C,SAA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AAO;CACP,OAAO;AACT;AAEA,MAAa,WAAW,KAAK,KAC3B,EAAE,OAAO;CACP,SAAS,WACP,EACG,OAAO;EACN,MAAM,EAAE,OAAO;EACf,SAAS,EAAE,OAAO;CACpB,CAAC,CAAC,CACD,WAAW,EAAE,MAAM,cAAgC,CAAC,MAAM,OAAO,CAAC,CACvE,CAAC,CACE,WAAW,YAAY,OAAO,YAAY,OAAO,CAAC,CAAC,CACnD,MAAM,CAAC,CAAC;CACX,UAAU,EACP,OAAO;EACN,gBAAgB,EACb,OAAO,CAAC,CACR,WAAW,gBAAgB,iBAAiB,YAAY,CAAC,CACzD,SAAS,CAAC,CACV,MAAM,KAAA,CAAS;EAClB,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAA,CAAS;CAC1D,CAAC,CAAC,CACD,WACE,EACC,gBAAgB,kBAChB,mBAAmB,sBACd;EACL;EACA;CACF,EACF,CAAC,CACA,MAAM;EACL,kBAAkB,KAAA;EAClB,gBAAgB,KAAA;CAClB,CAAC;AACL,CAAC,CACH,CAAC,CAAC,WACC,EAAE,SAAS,MAAM,UAAU,EAAE,kBAAkB,wBAAwB;CACtE;CACA;CACA;AACF,EACF"}
|
|
1
|
+
{"version":3,"file":"schema.js","names":["pep440Versioning.isValid","pep440Versioning.id","poetryVersioning.isValid","poetryVersioning.id","deepmerge"],"sources":["../../../../lib/modules/manager/poetry/schema.ts"],"sourcesContent":["import deepmerge from 'deepmerge';\nimport { z } from 'zod/v4';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport { parseGitUrl } from '../../../util/git/url.ts';\nimport {\n LooseArray,\n LooseRecord,\n Toml,\n withDepType,\n} from '../../../util/schema-utils/index.ts';\nimport { uniq } from '../../../util/uniq.ts';\nimport { GitRefsDatasource } from '../../datasource/git-refs/index.ts';\nimport { GitTagsDatasource } from '../../datasource/git-tags/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { normalizePythonDepName } from '../../datasource/pypi/common.ts';\nimport { PypiDatasource } from '../../datasource/pypi/index.ts';\nimport * as gitVersioning from '../../versioning/git/index.ts';\nimport * as pep440Versioning from '../../versioning/pep440/index.ts';\nimport * as poetryVersioning from '../../versioning/poetry/index.ts';\nimport { DependencyGroup, ProjectSection } from '../pep621/schema.ts';\nimport { depTypes, pep508ToPackageDependency } from '../pep621/utils.ts';\nimport type { PackageDependency, PackageFileContent } from '../types.ts';\nimport type { PoetryManagerData } from './types.ts';\n\nconst PoetryOptionalDependencyMixin = z\n .object({\n optional: z.boolean().optional().catch(false),\n })\n .transform(({ optional }): PackageDependency<PoetryManagerData> =>\n optional ? { depType: 'extras' } : {},\n );\n\nconst PoetryPathDependency = z\n .object({\n path: z.string(),\n version: z.string().optional().catch(undefined),\n })\n .transform(({ version }): PackageDependency<PoetryManagerData> => {\n const dep: PackageDependency<PoetryManagerData> = {\n datasource: PypiDatasource.id,\n skipReason: 'path-dependency',\n };\n\n if (version) {\n dep.currentValue = version;\n }\n\n return dep;\n })\n .and(PoetryOptionalDependencyMixin);\n\nconst PoetryGitDependency = z\n .object({\n git: z.string(),\n tag: z.string().optional().catch(undefined),\n version: z.string().optional().catch(undefined),\n branch: z.string().optional().catch(undefined),\n rev: z.string().optional().catch(undefined),\n })\n .transform(\n ({\n git,\n tag,\n version,\n branch,\n rev,\n }): PackageDependency<PoetryManagerData> => {\n if (tag) {\n const { source, owner, name } = parseGitUrl(git);\n const repo = `${owner}/${name}`;\n if (source === 'github.com') {\n return {\n datasource: GithubTagsDatasource.id,\n currentValue: tag,\n packageName: repo,\n };\n }\n if (source === 'gitlab.com') {\n return {\n datasource: GitlabTagsDatasource.id,\n currentValue: tag,\n packageName: repo,\n };\n }\n return {\n datasource: GitTagsDatasource.id,\n currentValue: tag,\n packageName: git,\n };\n }\n\n if (rev) {\n return {\n datasource: GitRefsDatasource.id,\n currentValue: branch,\n currentDigest: rev,\n replaceString: rev,\n packageName: git,\n };\n }\n\n return {\n datasource: GitRefsDatasource.id,\n currentValue: version,\n packageName: git,\n skipReason: 'git-dependency',\n };\n },\n )\n .and(PoetryOptionalDependencyMixin);\n\nconst PoetryPypiDependency = z.union([\n z\n .object({ version: z.string().optional(), source: z.string().optional() })\n .transform(\n ({\n version: currentValue,\n source,\n }): PackageDependency<PoetryManagerData> => {\n const managerData = source ? { sourceName: source.toLowerCase() } : {};\n\n if (!currentValue) {\n return { datasource: PypiDatasource.id, managerData };\n }\n\n return {\n datasource: PypiDatasource.id,\n managerData: { ...managerData, nestedVersion: true },\n currentValue,\n };\n },\n )\n .and(PoetryOptionalDependencyMixin),\n z.string().transform((version): PackageDependency<PoetryManagerData> => ({\n datasource: PypiDatasource.id,\n currentValue: version,\n managerData: { nestedVersion: false },\n })),\n]);\n\nconst PoetryArrayDependency = z\n .array(z.unknown())\n .transform((): PackageDependency<PoetryManagerData> => ({\n datasource: PypiDatasource.id,\n skipReason: 'multiple-constraint-dep',\n }));\n\nconst PoetryDependency = z.union([\n PoetryPathDependency,\n PoetryGitDependency,\n PoetryPypiDependency,\n PoetryArrayDependency,\n]);\n\nexport const PoetryDependencies = LooseRecord(\n z.string(),\n PoetryDependency.transform((dep) => {\n if (dep.skipReason) {\n return dep;\n }\n\n if (dep.datasource === GitRefsDatasource.id && dep.currentDigest) {\n dep.versioning = gitVersioning.id;\n return dep;\n }\n\n // istanbul ignore if: normaly should not happen\n if (!dep.currentValue) {\n dep.skipReason = 'unspecified-version';\n return dep;\n }\n\n if (pep440Versioning.isValid(dep.currentValue)) {\n dep.versioning = pep440Versioning.id;\n return dep;\n }\n\n if (poetryVersioning.isValid(dep.currentValue)) {\n dep.versioning = poetryVersioning.id;\n return dep;\n }\n\n dep.skipReason = 'invalid-version';\n return dep;\n }),\n).transform((record) => {\n const deps: PackageDependency<PoetryManagerData>[] = [];\n for (const [depName, dep] of Object.entries(record)) {\n dep.depName = depName;\n if (!dep.packageName) {\n const packageName = normalizePythonDepName(depName);\n if (depName !== packageName) {\n dep.packageName = packageName;\n }\n }\n deps.push(dep);\n }\n return deps;\n});\n\nexport const PoetryGroupDependencies = LooseRecord(\n z.string(),\n z\n .object({ dependencies: PoetryDependencies })\n .transform(({ dependencies }) => dependencies),\n).transform((record) => {\n const deps: PackageDependency<PoetryManagerData>[] = [];\n for (const [name, val] of Object.entries(record)) {\n for (const dep of Object.values(val)) {\n dep.depType = name;\n deps.push(dep);\n }\n }\n return deps;\n});\n\nconst PoetrySourceOrder = [\n 'default',\n 'primary',\n 'secondary',\n 'supplemental',\n 'explicit',\n] as const;\n\nexport const PoetrySource = z.object({\n name: z.string().toLowerCase(),\n url: z.string().optional(),\n priority: z.enum(PoetrySourceOrder).default('primary'),\n});\nexport type PoetrySource = z.infer<typeof PoetrySource>;\n\nexport function getPypiUrl(): string {\n return getEnv().PIP_INDEX_URL ?? 'https://pypi.org/pypi/';\n}\n\nfunction sortSources(sources: PoetrySource[]): PoetrySource[] {\n return sources.sort(\n (a, b) =>\n PoetrySourceOrder.indexOf(a.priority) -\n PoetrySourceOrder.indexOf(b.priority),\n );\n}\n\n/**\n * Adds the implicit PyPI source when the project does not configure it.\n *\n * Poetry >= 1.8 only adds PyPI when there is no primary source.\n * Before 1.8, PyPI was also added as a secondary source next to a primary one.\n */\nexport function withImplicitPypi(\n sources: PoetrySource[],\n legacyPoetry: boolean,\n): PoetrySource[] {\n if (\n sources.some(\n ({ name, priority }) => name === 'pypi' || priority === 'default',\n )\n ) {\n return sources;\n }\n\n const hasPrimarySource = sources.some(\n ({ priority }) => priority === 'primary',\n );\n if (hasPrimarySource && !legacyPoetry) {\n return sources;\n }\n\n return sortSources([\n ...sources,\n {\n name: 'pypi',\n priority: hasPrimarySource ? 'secondary' : 'default',\n url: getPypiUrl(),\n },\n ]);\n}\n\nexport function getRegistryUrls(sources: PoetrySource[]): string[] {\n return uniq(\n sources\n .filter(({ priority }) => priority !== 'explicit')\n .map(({ url }) => url!),\n );\n}\n\nexport const PoetrySources = LooseArray(PoetrySource, {\n onError: ({ error: err }) => {\n logger.debug({ err }, 'Poetry: error parsing sources array');\n },\n})\n .transform((sources) => {\n const pypiUrl = getPypiUrl();\n const result: PoetrySource[] = [];\n\n for (const source of sources) {\n if (source.name === 'pypi') {\n source.url = pypiUrl;\n }\n\n if (!source.url) {\n continue;\n }\n\n result.push(source);\n }\n\n return sortSources(\n sources.length ? withImplicitPypi(result, false) : result,\n );\n })\n .catch([]);\n\nexport const PoetrySection = z.object({\n version: z.string().optional().catch(undefined),\n dependencies: withDepType(\n PoetryDependencies,\n 'dependencies',\n false,\n ).optional(),\n 'dev-dependencies': withDepType(\n PoetryDependencies,\n 'dev-dependencies',\n ).optional(),\n group: PoetryGroupDependencies.optional(),\n source: PoetrySources,\n});\n\nexport type PoetrySection = z.infer<typeof PoetrySection>;\n\nconst BuildSystemRequires = LooseArray(\n z\n .string()\n .nonempty()\n .transform((val) =>\n pep508ToPackageDependency(depTypes.buildSystemRequires, val),\n )\n .refine((dep) => dep !== null),\n).catch([]);\n\nexport const PoetryPyProject = Toml.pipe(\n z\n .object({\n project: ProjectSection.optional().catch(undefined),\n tool: z.object({ poetry: PoetrySection }).optional().catch(undefined),\n 'dependency-groups': DependencyGroup(depTypes.dependencyGroups).catch([]),\n 'build-system': z\n .object({\n 'build-backend': z.string().refine(\n // https://python-poetry.org/docs/pyproject/#poetry-and-pep-517\n (buildBackend) =>\n buildBackend === 'poetry.masonry.api' ||\n buildBackend === 'poetry.core.masonry.api',\n ),\n requires: BuildSystemRequires,\n })\n .transform(({ requires }) => {\n const req = requires.find(\n ({ depName }) =>\n depName === 'poetry' ||\n depName === 'poetry_core' ||\n depName === 'poetry-core',\n );\n return {\n poetryRequirement: req?.currentValue,\n requires,\n };\n })\n .optional()\n .catch(undefined),\n })\n .transform((pyproject) => {\n const {\n project,\n tool,\n 'build-system': buildSystem,\n 'dependency-groups': dependencyGroups,\n } = pyproject;\n\n const deps: PackageDependency<PoetryManagerData>[] = [];\n const projectDependencies = coerceArray(project?.dependencies);\n const projectOptionalDependencies = coerceArray(\n project?.['optional-dependencies'],\n );\n\n const projectDepsByName: Record<\n string,\n PackageDependency<PoetryManagerData>\n > = {};\n for (const dep of [\n ...projectDependencies,\n ...dependencyGroups,\n ...projectOptionalDependencies,\n ]) {\n projectDepsByName[dep.depName!] = dep;\n }\n\n if (buildSystem?.requires) {\n deps.push(...buildSystem.requires);\n }\n\n const poetryDependencies = coerceArray(tool?.poetry?.dependencies);\n\n const poetryDevDependencies = coerceArray(\n tool?.poetry?.['dev-dependencies'],\n );\n\n const poetryGroupDependencies = coerceArray(tool?.poetry?.group);\n\n for (const poetryDep of [\n ...poetryDependencies,\n ...poetryDevDependencies,\n ...poetryGroupDependencies,\n ]) {\n const depName = poetryDep.depName;\n const projectDep = depName && projectDepsByName[depName];\n // When the same dep exists in project.dependencies or dependency-groups,\n // Poetry just uses the Poetry dep to enrich the project dependency.\n if (projectDep) {\n const mergedDep = deepmerge<PackageDependency<PoetryManagerData>>(\n poetryDep,\n projectDep,\n );\n // Poetry supports specifying the version in project.dependencies and\n // tool.poetry.dependencies *at the same time* and only errors if both\n // are not compatible - we require a single constraint per dependency.\n if (projectDep.currentValue && poetryDep.currentValue) {\n mergedDep.skipReason = 'invalid-dependency-specification';\n }\n // When a skipReason is 'unspecified-version', we defer to the other skipReason,\n // so that 'unspecified-version' only persists if both deps have no version.\n if (mergedDep.skipReason === 'unspecified-version') {\n if (poetryDep.skipReason === 'unspecified-version') {\n mergedDep.skipReason = projectDep.skipReason;\n } else {\n mergedDep.skipReason = poetryDep.skipReason;\n }\n }\n projectDepsByName[depName] = mergedDep;\n } else {\n deps.push(poetryDep);\n }\n }\n\n deps.push(...Object.values(projectDepsByName));\n\n const packageFileVersion = tool?.poetry?.version;\n const packageFileContent: PackageFileContent<PoetryManagerData> = {\n deps,\n packageFileVersion,\n };\n\n const sourceUrls = tool?.poetry?.source;\n if (sourceUrls) {\n for (const dep of deps) {\n if (dep.managerData?.sourceName) {\n const sourceUrl = sourceUrls.find(\n ({ name }) => name === dep.managerData?.sourceName,\n );\n if (sourceUrl?.url) {\n dep.registryUrls = [sourceUrl.url];\n }\n }\n }\n\n const registryUrls = getRegistryUrls(sourceUrls);\n if (registryUrls.length) {\n packageFileContent.registryUrls = registryUrls;\n }\n }\n\n return {\n packageFileContent,\n poetrySources: sourceUrls,\n poetryRequirement: buildSystem?.poetryRequirement,\n };\n }),\n);\n\nexport type PoetryPyProject = z.infer<typeof PoetryPyProject>;\n\nconst poetryConstraint: Record<string, string> = {\n '1.0': '<1.1.0',\n '1.1': '<1.3.0',\n '2.0': '>=1.3.0 <1.4.0', // 1.4.0 introduced embedding of the poetry version in lock file header\n};\n\nexport const Lockfile = Toml.pipe(\n z.object({\n package: LooseArray(\n z\n .object({\n name: z.string(),\n version: z.string(),\n })\n .transform(({ name, version }): [string, string] => [name, version]),\n )\n .transform((entries) => Object.fromEntries(entries))\n .catch({}),\n metadata: z\n .object({\n 'lock-version': z\n .string()\n .transform((lockVersion) => poetryConstraint[lockVersion])\n .optional()\n .catch(undefined),\n 'python-versions': z.string().optional().catch(undefined),\n })\n .transform(\n ({\n 'lock-version': poetryConstraint,\n 'python-versions': pythonVersions,\n }) => ({\n poetryConstraint,\n pythonVersions,\n }),\n )\n .catch({\n poetryConstraint: undefined,\n pythonVersions: undefined,\n }),\n }),\n).transform(\n ({ package: lock, metadata: { poetryConstraint, pythonVersions } }) => ({\n lock,\n poetryConstraint,\n pythonVersions,\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,gCAAgC,EACnC,OAAO,EACN,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,EAC9C,CAAC,CAAC,CACD,WAAW,EAAE,eACZ,WAAW,EAAE,SAAS,SAAS,IAAI,CAAC,CACtC;AAEF,MAAM,uBAA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CACF,EACF,CAAC,CACA,MAAM;EACL,kBAAkB,KAAA;EAClB,gBAAgB,KAAA;CAClB,CAAC;AACL,CAAC,CACH,CAAC,CAAC,WACC,EAAE,SAAS,MAAM,UAAU,EAAE,kBAAkB,wBAAwB;CACtE;CACA;CACA;AACF,EACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
2
|
+
import { Result } from "../../../util/result.js";
|
|
3
|
+
import { Lockfile } from "./schema.js";
|
|
4
|
+
//#region lib/modules/manager/poetry/utils.ts
|
|
5
|
+
/**
|
|
6
|
+
* Detects the Poetry version used to write a lock file: the exact version
|
|
7
|
+
* from the header (Poetry 1.4+), or a constraint inferred from `lock-version`.
|
|
8
|
+
*/
|
|
9
|
+
function getLockfilePoetryVersion(lockContents) {
|
|
10
|
+
const firstLine = lockContents.split("\n")[0];
|
|
11
|
+
const headerVersion = regEx(/by Poetry (?<version>[\d\\.]+)/).exec(firstLine)?.groups?.version;
|
|
12
|
+
if (headerVersion) return headerVersion;
|
|
13
|
+
const { val } = Result.parse(lockContents, Lockfile.transform(({ poetryConstraint }) => poetryConstraint)).unwrap();
|
|
14
|
+
return val;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { getLockfilePoetryVersion };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../lib/modules/manager/poetry/utils.ts"],"sourcesContent":["import { regEx } from '../../../util/regex.ts';\nimport { Result } from '../../../util/result.ts';\nimport { Lockfile } from './schema.ts';\n\n/**\n * Detects the Poetry version used to write a lock file: the exact version\n * from the header (Poetry 1.4+), or a constraint inferred from `lock-version`.\n */\nexport function getLockfilePoetryVersion(\n lockContents: string,\n): string | undefined {\n const firstLine = lockContents.split('\\n')[0];\n const headerVersion = regEx(/by Poetry (?<version>[\\d\\\\.]+)/).exec(firstLine)\n ?.groups?.version;\n if (headerVersion) {\n return headerVersion;\n }\n\n const { val } = Result.parse(\n lockContents,\n Lockfile.transform(({ poetryConstraint }) => poetryConstraint),\n ).unwrap();\n return val;\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,yBACd,cACoB;CACpB,MAAM,YAAY,aAAa,MAAM,IAAI,CAAC,CAAC;CAC3C,MAAM,gBAAgB,MAAM,gCAAgC,CAAC,CAAC,KAAK,SAAS,CAAC,EACzE,QAAQ;CACZ,IAAI,eACF,OAAO;CAGT,MAAM,EAAE,QAAQ,OAAO,MACrB,cACA,SAAS,WAAW,EAAE,uBAAuB,gBAAgB,CAC/D,CAAC,CAAC,OAAO;CACT,OAAO;AACT"}
|
package/package.json
CHANGED
package/renovate-schema.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"title": "JSON schema for Renovate 44.161.
|
|
3
|
+
"title": "JSON schema for Renovate 44.161.2 config files (https://renovatebot.com/)",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"x-renovate-version": "44.161.
|
|
5
|
+
"x-renovate-version": "44.161.2",
|
|
6
6
|
"allowComments": true,
|
|
7
7
|
"type": "object",
|
|
8
8
|
"definitions": {
|