renovate 44.61.2 → 44.61.4
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 +2 -2
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/gitlabci/extract.js +1 -7
- package/dist/modules/manager/gitlabci/extract.js.map +1 -1
- package/dist/modules/manager/npm/post-update/index.js +19 -4
- package/dist/modules/manager/npm/post-update/index.js.map +1 -1
- package/dist/modules/platform/github/index.js +56 -47
- package/dist/modules/platform/github/index.js.map +1 -1
- package/dist/modules/platform/github/utils.js +4 -1
- package/dist/modules/platform/github/utils.js.map +1 -1
- package/dist/workers/repository/dependency-dashboard.js +1 -1
- package/dist/workers/repository/dependency-dashboard.js.map +1 -1
- package/dist/workers/repository/process/lookup/index.js +1 -0
- package/dist/workers/repository/process/lookup/index.js.map +1 -1
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js +4 -0
- package/dist/workers/repository/update/branch/execute-post-upgrade-commands.js.map +1 -1
- package/dist/workers/repository/update/branch/index.js +37 -18
- package/dist/workers/repository/update/branch/index.js.map +1 -1
- package/dist/workers/repository/update/pr/index.js +3 -2
- package/dist/workers/repository/update/pr/index.js.map +1 -1
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
|
@@ -44,7 +44,7 @@ hashMap.set("flux", "70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4e
|
|
|
44
44
|
hashMap.set("fvm", "9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90");
|
|
45
45
|
hashMap.set("git-submodules", "f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815");
|
|
46
46
|
hashMap.set("github-actions", "f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d");
|
|
47
|
-
hashMap.set("gitlabci", "
|
|
47
|
+
hashMap.set("gitlabci", "95aa79972153f519b35cf0dda4067125ec12b1c5c378fa7b4b7905cb6040ca3f");
|
|
48
48
|
hashMap.set("gitlabci-include", "ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb");
|
|
49
49
|
hashMap.set("glasskube", "93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30");
|
|
50
50
|
hashMap.set("gleam", "02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39");
|
|
@@ -75,7 +75,7 @@ hashMap.set("mise", "8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150
|
|
|
75
75
|
hashMap.set("mix", "ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0");
|
|
76
76
|
hashMap.set("nix", "f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7");
|
|
77
77
|
hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
|
|
78
|
-
hashMap.set("npm", "
|
|
78
|
+
hashMap.set("npm", "58b3de5d6f22d7d162a01a7aaa3a2668631079236196e696313ee7e2a9bf6131");
|
|
79
79
|
hashMap.set("nuget", "4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89");
|
|
80
80
|
hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
|
|
81
81
|
hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
|
|
@@ -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','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','62b58740b430430a6e1855a8f6601e97892a1c26f490679fb11c401d4a6f40eb');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','3d3affcaab991e9a27916dfbc8bdddb1066be28303c37be781695bfc0645aa81');\nhashMap.set('composer','d84def5d2f07adb0b5c37195fa115a3a9d86194b57eae014d7b43d2d59fe7d1c');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fa2d6c0e45fbe4a74c9c2b2f09043a3214dc87a9771500b781b13fa10417c742');\nhashMap.set('dockerfile','84e3949ac7e9ac94451a103545dc1e8f1a99147283e56d816430efed4bec6cc8');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d');\nhashMap.set('gitlabci','63078857b116b3bd6100f56b403c054ae832c1f3689e3ccf4289503c9e82e7d5');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','c94d93b42874624b4fb166be16025f21dddc99a76fb69f858ac6603a554a22d2');\nhashMap.set('helmfile','0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','575e15b78c4e86c88407b80b5b321954df8d4b93e9a5f53fff5f119a2ff1930f');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','bdbbc89e3ddfee017d6b60dae9ba22f5d9c14a4fab66e62c6c0f6ea970df15b2');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','d61de2851ca925fdbf964e9a6e4cefda727572a41b58344a0728709a0a3cc4a7');\nhashMap.set('nuget','4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','f07c39050e34e8da6084e7f43cb2222e7ef700bb66de895ee206505491cb8f4f');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd');\nhashMap.set('pre-commit','215fdabbc5bae26dffca61a19be984a18386a1059a2220ee092d8efcfef46063');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','9bf0529fde16a9c56c5f151e61622c1e56fe9e8bef27908bf4779da3387d8148');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5');\nhashMap.set('swift','1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','8f4a70b1ee4dbbaee7e249d11912faa2b3ea4cc7c582310b5b636d224ab81fea');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','8901ee24116f7998bddcfc8d2492bff8138d9c66a23caea75c24d594ef4a504d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e');"],"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,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QA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I,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
|
|
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','1d3568f42393d697f8f96d461b72077ee7a1044b654e87667a12f861b3083111');\nhashMap.set('ansible-galaxy','8226d47128f2018825d4d6f84794e3183eb79c706045fa7e88491edd5e64106f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','5cf019f2a8d8572f990875a2834f9542bbc36abf302e931b11f916d9dd14702d');\nhashMap.set('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','6bf7782e8a02fc87dc5d84aab59e517c09df51fd23cf57805e62207dbd5efdb5');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','f7d369015f9028c40cb79f2367d0734f18c0647d1d446d0a165007c3723c3414');\nhashMap.set('bazelisk','d71489650feefb0dbbe7461f924cb50e41c8eef8fe2e11acdec2d42d0212c8ef');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','a93effb1f1c5d65b3277c3b4709924eacde282e8efd028a8e3d8c1ce3ef69407');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','691aa0bd20c20f7e05be5d231ed14dccdf81b9399d062448794176403aa53d94');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','62b58740b430430a6e1855a8f6601e97892a1c26f490679fb11c401d4a6f40eb');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','637adb103a887ad496e469e25182c9cd7f3b4acb9eddfcbca9a1326bac3613cc');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','3d3affcaab991e9a27916dfbc8bdddb1066be28303c37be781695bfc0645aa81');\nhashMap.set('composer','d84def5d2f07adb0b5c37195fa115a3a9d86194b57eae014d7b43d2d59fe7d1c');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','4ceb2d2ef2cea88d81ebf7c959cc8f36691ed148000b4ee7e64573a9ba4ae2c5');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','517b6d7cd75d8cf7a44d4dbac36474333e87a6e22b0f62a5228ee7c1f07e8282');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fa2d6c0e45fbe4a74c9c2b2f09043a3214dc87a9771500b781b13fa10417c742');\nhashMap.set('dockerfile','84e3949ac7e9ac94451a103545dc1e8f1a99147283e56d816430efed4bec6cc8');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','6b091fd5b8c2e9fc5d5b81ba34befec915d585d45cbc175c851ccc1555372925');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','f9906351ecb88ec54ebb51bbc89bdc7499dafdbc3c0337c0265f3290b8094815');\nhashMap.set('github-actions','f5d0459242ef89d72315f87bad2aac5744ee83341290eb771445ca4cbe77743d');\nhashMap.set('gitlabci','95aa79972153f519b35cf0dda4067125ec12b1c5c378fa7b4b7905cb6040ca3f');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','dc59f10824ae55ac4044ea2e487feb6e3ca2d365e1d518a61548d1dd1932e345');\nhashMap.set('gradle','1780fe7560babe735da868a0dd1a013fea76d82abfde62028cd48f9de42fb52c');\nhashMap.set('gradle-wrapper','f6c933eaa5cace6433d30f54ad5804e63a164399e2c1e8a3d3f1cb6218f39142');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','c94d93b42874624b4fb166be16025f21dddc99a76fb69f858ac6603a554a22d2');\nhashMap.set('helmfile','0adc0092400df2075e1c4580ebe35bbc3b638ebee67cc948a4338094cb16a8ae');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','572f7b0b746377e0c5d6f5ad5c0b78cbed6782a561be77263cf45620b6fdad0c');\nhashMap.set('hermit','61e132cfccbe4e3884801a3728f3391455c214811a33c1f733b0dea7122bbbb6');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','9c64a4f1475b1c2052372e566c9190f32ae8acd1c54313031d55ae8772388367');\nhashMap.set('html','67c5f3c5c58e96f5dd257ba5987d900cf7fef81d667c3640e96c847b37de35a8');\nhashMap.set('jenkins','268ebfc8a1caf3edeb2192c2b1b2fa4bf18a78a3e731ba20a6c104940a5539f3');\nhashMap.set('jsonnet-bundler','575e15b78c4e86c88407b80b5b321954df8d4b93e9a5f53fff5f119a2ff1930f');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','bdbbc89e3ddfee017d6b60dae9ba22f5d9c14a4fab66e62c6c0f6ea970df15b2');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','db967206d960b12d7c58d78132808d3c412087ababf5c59444262782e4434c6a');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8509ff587ee410eeb94cbf1d4616c6a174b5f4110d0e748496edd8ed150d8b9b');\nhashMap.set('mix','ca855b0353a8087d91a63fba5cc097d11e0396a963f214a508279aef065707f0');\nhashMap.set('nix','f90bb8943129de40b50564b203df71bb86079dd134e204390a103535de1c5af7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','58b3de5d6f22d7d162a01a7aaa3a2668631079236196e696313ee7e2a9bf6131');\nhashMap.set('nuget','4818fdcf3258a19228004c62a605c3fb4b6665ca09df524ab37f712ea201db89');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','db4dc12af1643b6883819bc8d0b4a7fc4533384e5678a61745710f0087f97ab9');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','a114e2aa275e4e2690b010ea21adef1484fdc696f89f30dedf8c795167e49048');\nhashMap.set('pip_requirements','f07c39050e34e8da6084e7f43cb2222e7ef700bb66de895ee206505491cb8f4f');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','f4c5d17bfcb6f5cb8b85584d4b782379daa69ee85936ca79ef01172e5d6652a2');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','5a638977241e2a8d8a2ba310388b10db533612552ab2c93514cb0960a2b725cd');\nhashMap.set('pre-commit','215fdabbc5bae26dffca61a19be984a18386a1059a2220ee092d8efcfef46063');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','3ade8bf8232eda456e24909b4d1abce066e674c9ea9aa250c567cf621a96bf9b');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','ca60beee2e3b871ea1216fa9df9a501f7ed355fe7da29e12509e56a124a78e69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','9bf0529fde16a9c56c5f151e61622c1e56fe9e8bef27908bf4779da3387d8148');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','e0b799487e3331b91de1fec7dfb975378340b883dc0aeb95b950d289eb4737c5');\nhashMap.set('swift','1e464136321889cdf9a4eb0cf32c459fbf897e0c75bbf44c2ba5a51c0a002bfe');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','8f4a70b1ee4dbbaee7e249d11912faa2b3ea4cc7c582310b5b636d224ab81fea');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','ffcbaa67dd65f064d43f8c121c1006115eab1879c4bd38de263b9b90a009c118');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','31247d37bc80aae17039bfa21bd989c5717730c5ef10cf2a6f09841576d012ec');\nhashMap.set('travis','bb482a0195cd009ec3896a6227bb95617f5c84bedb518c7d971e50c62235d9ca');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','8901ee24116f7998bddcfc8d2492bff8138d9c66a23caea75c24d594ef4a504d');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996fd325416e');"],"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,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,eAAc,kEAAkE;AAC5F,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,QAAO,k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ACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
|
|
@@ -9,7 +9,6 @@ import { GitlabDocument, Job, Jobs, MultiDocumentLocalIncludes } from "./schema.
|
|
|
9
9
|
import { getGitlabDep } from "./utils.js";
|
|
10
10
|
//#region lib/modules/manager/gitlabci/extract.ts
|
|
11
11
|
const componentReferenceRegex = regEx(/(?<fqdn>[^/]+)\/(?<projectPath>.+)\/(?:.+)@(?<specificVersion>.+)/);
|
|
12
|
-
const componentReferenceLatestVersion = "~latest";
|
|
13
12
|
function extractDepFromIncludeComponent(component, registryAliases) {
|
|
14
13
|
let componentUrl = component;
|
|
15
14
|
if (registryAliases) for (const key in registryAliases) componentUrl = componentUrl.replace(key, registryAliases[key]);
|
|
@@ -22,7 +21,7 @@ function extractDepFromIncludeComponent(component, registryAliases) {
|
|
|
22
21
|
logger.debug({ componentReference: componentUrl }, "Ignoring component reference with incomplete project path");
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
|
-
|
|
24
|
+
return {
|
|
26
25
|
datasource: GitlabTagsDatasource.id,
|
|
27
26
|
depName: componentReference.projectPath,
|
|
28
27
|
depType: "repository",
|
|
@@ -30,11 +29,6 @@ function extractDepFromIncludeComponent(component, registryAliases) {
|
|
|
30
29
|
registryUrls: [`https://${componentReference.fqdn}`],
|
|
31
30
|
versioning: id
|
|
32
31
|
};
|
|
33
|
-
if (dep.currentValue === componentReferenceLatestVersion) {
|
|
34
|
-
logger.debug({ componentVersion: dep.currentValue }, "Ignoring component version");
|
|
35
|
-
dep.skipReason = "unsupported-version";
|
|
36
|
-
}
|
|
37
|
-
return dep;
|
|
38
32
|
}
|
|
39
33
|
function extractPackageFile(content, packageFile, config) {
|
|
40
34
|
const deps = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","names":["semverPartialId"],"sources":["../../../../lib/modules/manager/gitlabci/extract.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { Result } from '../../../util/result.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { id as semverPartialId } from '../../versioning/semver-partial/index.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFile,\n PackageFileContent,\n} from '../types.ts';\nimport {\n GitlabDocument,\n Job,\n Jobs,\n MultiDocumentLocalIncludes,\n} from './schema.ts';\nimport { getGitlabDep } from './utils.ts';\n\n// See https://docs.gitlab.com/ee/ci/components/index.html#use-a-component\nconst componentReferenceRegex = regEx(\n /(?<fqdn>[^/]+)\\/(?<projectPath>.+)\\/(?:.+)@(?<specificVersion>.+)/,\n);\
|
|
1
|
+
{"version":3,"file":"extract.js","names":["semverPartialId"],"sources":["../../../../lib/modules/manager/gitlabci/extract.ts"],"sourcesContent":["import { logger } from '../../../logger/index.ts';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { Result } from '../../../util/result.ts';\nimport { parseYaml } from '../../../util/yaml.ts';\nimport { GitlabTagsDatasource } from '../../datasource/gitlab-tags/index.ts';\nimport { id as semverPartialId } from '../../versioning/semver-partial/index.ts';\nimport type {\n ExtractConfig,\n PackageDependency,\n PackageFile,\n PackageFileContent,\n} from '../types.ts';\nimport {\n GitlabDocument,\n Job,\n Jobs,\n MultiDocumentLocalIncludes,\n} from './schema.ts';\nimport { getGitlabDep } from './utils.ts';\n\n// See https://docs.gitlab.com/ee/ci/components/index.html#use-a-component\nconst componentReferenceRegex = regEx(\n /(?<fqdn>[^/]+)\\/(?<projectPath>.+)\\/(?:.+)@(?<specificVersion>.+)/,\n);\n\nfunction extractDepFromIncludeComponent(\n component: string,\n registryAliases?: Record<string, string>,\n): PackageDependency | null {\n let componentUrl = component;\n if (registryAliases) {\n for (const key in registryAliases) {\n componentUrl = componentUrl.replace(key, registryAliases[key]);\n }\n }\n const componentReference = componentReferenceRegex.exec(componentUrl)?.groups;\n if (!componentReference) {\n logger.debug(\n { componentReference: componentUrl },\n 'Ignoring malformed component reference',\n );\n return null;\n }\n const projectPathParts = componentReference.projectPath.split('/');\n if (projectPathParts.length < 2) {\n logger.debug(\n { componentReference: componentUrl },\n 'Ignoring component reference with incomplete project path',\n );\n return null;\n }\n\n const dep: PackageDependency = {\n datasource: GitlabTagsDatasource.id,\n depName: componentReference.projectPath,\n depType: 'repository',\n currentValue: componentReference.specificVersion,\n registryUrls: [`https://${componentReference.fqdn}`],\n versioning: semverPartialId,\n };\n return dep;\n}\n\nexport function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): PackageFileContent | null {\n const deps: PackageDependency[] = [];\n try {\n const docs = parseYaml(content, { uniqueKeys: false });\n\n for (const doc of docs) {\n const topLevel = Job.parse(doc);\n const jobs = Jobs.parse(doc);\n\n for (const job of [topLevel, ...jobs]) {\n const { image, services } = job;\n\n if (image) {\n const dep = getGitlabDep(image.value, config.registryAliases);\n dep.depType = image.type;\n deps.push(dep);\n }\n\n for (const service of services) {\n const dep = getGitlabDep(service, config.registryAliases);\n dep.depType = 'service-image';\n deps.push(dep);\n }\n }\n\n const includedComponents = GitlabDocument.parse(doc);\n for (const includedComponent of includedComponents) {\n const dep = extractDepFromIncludeComponent(\n includedComponent,\n config.registryAliases,\n );\n if (dep) {\n deps.push(dep);\n }\n }\n }\n } catch (err) /* istanbul ignore next */ {\n if (err.stack?.startsWith('YAMLException:')) {\n logger.debug(\n { err, packageFile },\n 'YAML exception extracting GitLab CI includes',\n );\n } else {\n logger.debug(\n { err, packageFile },\n 'Error extracting GitLab CI dependencies',\n );\n }\n }\n\n return deps.length ? { deps } : null;\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile[] | null> {\n const filesToExamine = [...packageFiles];\n const seen = new Set<string>(packageFiles);\n const results: PackageFile[] = [];\n\n // extract all includes from the files\n while (filesToExamine.length > 0) {\n const file = filesToExamine.pop()!;\n\n const content = await readLocalFile(file, 'utf8');\n if (!content) {\n logger.debug(\n { packageFile: file },\n `Empty or non existent gitlabci file`,\n );\n continue;\n }\n\n const { val: docs, err } = Result.wrap(() =>\n parseYaml(content, { uniqueKeys: false }),\n ).unwrap();\n\n if (err) {\n logger.debug(\n { err, packageFile: file },\n 'Error extracting GitLab CI dependencies',\n );\n continue;\n }\n\n const localIncludes = MultiDocumentLocalIncludes.parse(docs);\n for (const file of localIncludes) {\n if (!seen.has(file)) {\n seen.add(file);\n filesToExamine.push(file);\n }\n }\n\n const result = extractPackageFile(content, file, config);\n if (result !== null) {\n results.push({\n packageFile: file,\n deps: result.deps,\n });\n }\n }\n\n logger.trace(\n { packageFiles, files: filesToExamine.entries() },\n 'extracted all GitLab CI files',\n );\n\n if (!results.length) {\n return null;\n }\n\n return results;\n}\n"],"mappings":";;;;;;;;;;AAsBA,MAAM,0BAA0B,MAC9B,mEACF;AAEA,SAAS,+BACP,WACA,iBAC0B;CAC1B,IAAI,eAAe;CACnB,IAAI,iBACF,KAAK,MAAM,OAAO,iBAChB,eAAe,aAAa,QAAQ,KAAK,gBAAgB,IAAI;CAGjE,MAAM,qBAAqB,wBAAwB,KAAK,YAAY,CAAC,EAAE;CACvE,IAAI,CAAC,oBAAoB;EACvB,OAAO,MACL,EAAE,oBAAoB,aAAa,GACnC,wCACF;EACA,OAAO;CACT;CAEA,IADyB,mBAAmB,YAAY,MAAM,GAC3C,CAAC,CAAC,SAAS,GAAG;EAC/B,OAAO,MACL,EAAE,oBAAoB,aAAa,GACnC,2DACF;EACA,OAAO;CACT;CAUA,OAAO;EAPL,YAAY,qBAAqB;EACjC,SAAS,mBAAmB;EAC5B,SAAS;EACT,cAAc,mBAAmB;EACjC,cAAc,CAAC,WAAW,mBAAmB,MAAM;EACnD,YAAYA;CAEL;AACX;AAEA,SAAgB,mBACd,SACA,aACA,QAC2B;CAC3B,MAAM,OAA4B,CAAC;CACnC,IAAI;EACF,MAAM,OAAO,UAAU,SAAS,EAAE,YAAY,MAAM,CAAC;EAErD,KAAK,MAAM,OAAO,MAAM;GACtB,MAAM,WAAW,IAAI,MAAM,GAAG;GAC9B,MAAM,OAAO,KAAK,MAAM,GAAG;GAE3B,KAAK,MAAM,OAAO,CAAC,UAAU,GAAG,IAAI,GAAG;IACrC,MAAM,EAAE,OAAO,aAAa;IAE5B,IAAI,OAAO;KACT,MAAM,MAAM,aAAa,MAAM,OAAO,OAAO,eAAe;KAC5D,IAAI,UAAU,MAAM;KACpB,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vD,IAAI,WAAW,MACb,QAAQ,KAAK;GACX,aAAa;GACb,MAAM,OAAO;EACf,CAAC;CAEL;CAEA,OAAO,MACL;EAAE;EAAc,OAAO,eAAe,QAAQ;CAAE,GAChD,+BACF;CAEA,IAAI,CAAC,QAAQ,QACX,OAAO;CAGT,OAAO;AACT"}
|
|
@@ -105,10 +105,25 @@ async function writeExistingFiles(config, packageFiles) {
|
|
|
105
105
|
if (!upgrade.managerData) continue;
|
|
106
106
|
if (upgrade.rangeStrategy === "widen" && upgrade.managerData.npmLock === npmLock) widens.push(upgrade.depName);
|
|
107
107
|
const { depName } = upgrade;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
const oldVersion = upgrade.lockedVersion ?? upgrade.currentVersion;
|
|
109
|
+
if ("packages" in npmLockParsed) for (const packageName of packageNames) {
|
|
110
|
+
if (packageName === `node_modules/${depName}` || packageName.startsWith(`node_modules/${depName}/`)) {
|
|
111
|
+
logger.trace({ packageName }, "Massaging out package name");
|
|
112
|
+
lockFileChanged = true;
|
|
113
|
+
delete npmLockParsed.packages[packageName];
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (!depName || !oldVersion) continue;
|
|
117
|
+
const entry = npmLockParsed.packages[packageName];
|
|
118
|
+
if (entry?.peerDependencies?.[depName] === oldVersion || entry?.dependencies?.[depName] === oldVersion || entry?.optionalDependencies?.[depName] === oldVersion) {
|
|
119
|
+
logger.trace({
|
|
120
|
+
packageName,
|
|
121
|
+
depName,
|
|
122
|
+
oldVersion
|
|
123
|
+
}, "Massaging out lockstep sibling");
|
|
124
|
+
lockFileChanged = true;
|
|
125
|
+
delete npmLockParsed.packages[packageName];
|
|
126
|
+
}
|
|
112
127
|
}
|
|
113
128
|
}
|
|
114
129
|
// v8 ignore else -- TODO: add test #40625
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["hostRules.find","npm.generateLockFile","deepmerge","yarn.fuzzyMatchAdditionalYarnrcYml","yarn.generateLockFile","yarn.isYarnUpdate","pnpm.generateLockFile"],"sources":["../../../../../lib/modules/manager/npm/post-update/index.ts"],"sourcesContent":["// TODO: types (#22198)\nimport { isNonEmptyStringAndNotWhitespace, isString } from '@sindresorhus/is';\nimport deepmerge from 'deepmerge';\nimport upath from 'upath';\nimport { logger } from '../../../../logger/index.ts';\nimport { ExternalHostError } from '../../../../types/errors/external-host-error.ts';\nimport { getEnv } from '../../../../util/env.ts';\nimport {\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n writeLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { getFile, getRepoStatus } from '../../../../util/git/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport * as hostRules from '../../../../util/host-rules.ts';\nimport { newlineRegex, regEx } from '../../../../util/regex.ts';\nimport { ensureTrailingSlash } from '../../../../util/url.ts';\nimport { dump, parseSingleYaml } from '../../../../util/yaml.ts';\nimport { NpmDatasource } from '../../../datasource/npm/index.ts';\nimport { scm } from '../../../platform/scm.ts';\nimport type {\n ArtifactError,\n ArtifactNotice,\n PackageFile,\n PostUpdateConfig,\n Upgrade,\n} from '../../types.ts';\nimport { artifactErrorMessageFromExecError } from '../../util.ts';\nimport {\n NPM_CACHE_DIR,\n PNPM_CACHE_BASE_DIR,\n YARN_CACHE_DIR,\n YARN_GLOBAL_DIR,\n} from '../constants.ts';\nimport { getZeroInstallPaths } from '../extract/yarn.ts';\nimport type { NpmManagerData } from '../types.ts';\nimport {\n composeLockFile,\n getNpmrcContent,\n parseLockFile,\n resetNpmrcContent,\n updateNpmrcContent,\n} from '../utils.ts';\nimport * as npm from './npm.ts';\nimport * as pnpm from './pnpm.ts';\nimport { processHostRules } from './rules.ts';\nimport type {\n AdditionalPackageFiles,\n DetermineLockFileDirsResult,\n WriteExistingFilesResult,\n YarnRcYmlFile,\n} from './types.ts';\nimport * as yarn from './yarn.ts';\n\n// Strips empty values, deduplicates, and returns the directories from filenames\nfunction getDirs(arr: (string | null | undefined)[]): string[] {\n return Array.from(new Set(arr.filter(isString)));\n}\n\nexport function determineLockFileDirs(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n): DetermineLockFileDirsResult {\n const npmLockDirs: (string | undefined)[] = [];\n const yarnLockDirs: (string | undefined)[] = [];\n const pnpmLockFileDirs: (string | undefined)[] = [];\n\n for (const upgrade of config.upgrades) {\n // v8 ignore else -- TODO: add test #40625\n if (\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isRemediation === true ||\n upgrade.isLockfileUpdate === true\n ) {\n yarnLockDirs.push(upgrade.managerData?.yarnLock);\n npmLockDirs.push(upgrade.managerData?.npmLock);\n pnpmLockFileDirs.push(upgrade.managerData?.pnpmLockFile);\n }\n }\n\n if (\n config.upgrades.every(\n (upgrade: Upgrade) =>\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isLockfileUpdate,\n )\n ) {\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n }\n\n function getPackageFile(\n fileName: string,\n ): Partial<PackageFile<NpmManagerData>> {\n logger.trace(`Looking for packageFile: ${fileName}`);\n\n for (const packageFile of packageFiles.npm!) {\n if (packageFile.packageFile === fileName) {\n logger.trace({ packageFile }, 'Found packageFile');\n return packageFile;\n }\n logger.trace('No match');\n }\n return {};\n }\n\n // TODO #22198\n for (const p of config.updatedPackageFiles!) {\n logger.trace(`Checking ${String(p.path)} for lock files`);\n const packageFile = getPackageFile(p.path);\n /* v8 ignore next -- needs test */\n if (!packageFile.managerData) {\n continue;\n }\n // push full lock file names and convert them later\n yarnLockDirs.push(packageFile.managerData.yarnLock);\n npmLockDirs.push(packageFile.managerData.npmLock);\n pnpmLockFileDirs.push(packageFile.managerData.pnpmLockFile);\n }\n\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n}\n\nexport async function writeExistingFiles(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n): Promise<void> {\n if (!packageFiles.npm) {\n return;\n }\n const npmFiles = packageFiles.npm;\n logger.debug(\n { packageFiles: npmFiles.map((n) => n.packageFile) },\n 'Writing package.json files',\n );\n for (const packageFile of npmFiles) {\n /* v8 ignore if -- TODO: add test #40625 */\n if (!packageFile.managerData) {\n continue;\n }\n // TODO #22198\n const basedir = upath.dirname(packageFile.packageFile!);\n const npmrc = packageFile.npmrc;\n const npmrcFilename = upath.join(basedir, '.npmrc');\n // Write out the file unless the npmrc came from the workspace\n // npmrcFilename will be set whenever the file was read from disk during extract\n if (\n isString(npmrc) &&\n (npmrcFilename === packageFile.managerData.npmrcFileName ||\n !packageFile.managerData.npmrcFileName)\n ) {\n try {\n await writeLocalFile(npmrcFilename, npmrc.replace(regEx(/\\n?$/), '\\n'));\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ npmrcFilename, err }, 'Error writing .npmrc');\n }\n }\n const npmLock = packageFile.managerData.npmLock;\n if (npmLock) {\n const npmLockPath = npmLock;\n logger.debug(`Writing ${npmLock}`);\n let existingNpmLock: string;\n try {\n existingNpmLock = (await getFile(npmLock)) ?? '';\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error reading npm lock file');\n existingNpmLock = '';\n }\n const { detectedIndent, lockFileParsed: npmLockParsed } =\n parseLockFile(existingNpmLock);\n if (npmLockParsed) {\n const packageNames =\n 'packages' in npmLockParsed\n ? Object.keys(npmLockParsed.packages)\n : [];\n const widens: string[] = [];\n let lockFileChanged = false;\n for (const upgrade of config.upgrades) {\n if (upgrade.lockFiles && !upgrade.lockFiles.includes(npmLock)) {\n continue;\n }\n if (!upgrade.managerData) {\n continue;\n }\n if (\n upgrade.rangeStrategy === 'widen' &&\n upgrade.managerData.npmLock === npmLock\n ) {\n // TODO #22198\n widens.push(upgrade.depName!);\n }\n const { depName } = upgrade;\n for (const packageName of packageNames) {\n if (\n 'packages' in npmLockParsed &&\n (packageName === `node_modules/${depName}` ||\n packageName.startsWith(`node_modules/${depName}/`))\n ) {\n logger.trace({ packageName }, 'Massaging out package name');\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n }\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (widens.length) {\n logger.debug(\n `Removing ${String(widens)} from ${npmLock} to force an update`,\n );\n lockFileChanged = true;\n try {\n if ('dependencies' in npmLockParsed && npmLockParsed.dependencies) {\n widens.forEach((depName) => {\n // TODO #22198\n delete npmLockParsed.dependencies![depName];\n });\n }\n } catch /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn(\n { npmLock },\n 'Error massaging package-lock.json for widen',\n );\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (lockFileChanged) {\n logger.debug('Massaging npm lock file before writing to disk');\n existingNpmLock = composeLockFile(npmLockParsed, detectedIndent);\n }\n await writeLocalFile(npmLockPath, existingNpmLock);\n }\n }\n }\n}\n\nexport async function writeUpdatedPackageFiles(\n config: PostUpdateConfig,\n): Promise<void> {\n logger.trace({ config }, 'writeUpdatedPackageFiles');\n logger.debug('Writing any updated package files');\n if (!config.updatedPackageFiles) {\n logger.debug('No files found');\n return;\n }\n // prefer artifact content when it updates the same file (e.g. pnpm-workspace.yaml)\n const artifactContents = new Map<string, string>();\n if (config.updatedArtifacts) {\n for (const artifact of config.updatedArtifacts) {\n if (artifact.type === 'addition' && artifact.contents) {\n artifactContents.set(artifact.path, artifact.contents.toString());\n }\n }\n }\n const supportedLockFiles = ['package-lock.json', 'yarn.lock'];\n for (const packageFile of config.updatedPackageFiles) {\n if (packageFile.type !== 'addition') {\n continue;\n }\n if (\n supportedLockFiles.some((fileName) => packageFile.path.endsWith(fileName))\n ) {\n logger.debug(`Writing lock file: ${packageFile.path}`);\n // TODO #22198\n\n await writeLocalFile(packageFile.path, packageFile.contents!);\n continue;\n }\n if (\n !(\n packageFile.path.endsWith('package.json') ||\n packageFile.path.endsWith('pnpm-workspace.yaml') ||\n packageFile.path.endsWith('.yarnrc.yml')\n )\n ) {\n continue;\n }\n const contents =\n artifactContents.get(packageFile.path) ?? packageFile.contents!;\n logger.debug(`Writing ${packageFile.path}`);\n await writeLocalFile(packageFile.path, contents);\n }\n}\n\n/* v8 ignore next -- needs test */\nasync function updateYarnOffline(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n): Promise<void> {\n try {\n const resolvedPaths: string[] = [];\n const yarnrcYml = await getFile(upath.join(lockFileDir, '.yarnrc.yml'));\n const yarnrc = await getFile(upath.join(lockFileDir, '.yarnrc'));\n\n // As .yarnrc.yml overrides .yarnrc in Yarn 1 (https://git.io/JUcco)\n // both files may exist, so check for .yarnrc.yml first\n if (yarnrcYml) {\n // Yarn 2 (offline cache and zero-installs)\n const paths = getZeroInstallPaths(yarnrcYml);\n resolvedPaths.push(...paths.map((p) => upath.join(lockFileDir, p)));\n } else if (yarnrc) {\n // Yarn 1 (offline mirror)\n const mirrorLine = yarnrc\n .split(newlineRegex)\n .find((line) => line.startsWith('yarn-offline-mirror '));\n if (mirrorLine) {\n const mirrorPath = ensureTrailingSlash(\n mirrorLine.split(' ')[1].replace(regEx(/\"/g), ''),\n );\n resolvedPaths.push(upath.join(lockFileDir, mirrorPath));\n }\n }\n logger.debug({ resolvedPaths }, 'updateYarnOffline resolvedPaths');\n\n if (resolvedPaths.length) {\n const status = await getRepoStatus();\n for (const f of status.modified.concat(status.not_added)) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n });\n }\n }\n for (const f of status.deleted || []) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({ type: 'deletion', path: f });\n }\n }\n }\n } catch (err) {\n logger.error({ err }, 'Error updating yarn offline packages');\n }\n}\n\n// TODO: move to ./yarn.ts\n// exported for testing\nexport async function updateYarnBinary(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n existingYarnrcYmlContent: string | undefined | null,\n): Promise<string | undefined | null> {\n let yarnrcYml = existingYarnrcYmlContent;\n try {\n const yarnrcYmlFilename = upath.join(lockFileDir, '.yarnrc.yml');\n yarnrcYml ??= (await getFile(yarnrcYmlFilename)) ?? undefined;\n const newYarnrcYml = await readLocalFile(yarnrcYmlFilename, 'utf8');\n if (!isString(yarnrcYml) || !isString(newYarnrcYml)) {\n return existingYarnrcYmlContent;\n }\n\n // TODO: use schema (#9610)\n const oldYarnPath = parseSingleYaml<YarnRcYmlFile>(yarnrcYml)?.yarnPath;\n const newYarnPath = parseSingleYaml<YarnRcYmlFile>(newYarnrcYml)?.yarnPath;\n if (\n !isNonEmptyStringAndNotWhitespace(oldYarnPath) ||\n !isNonEmptyStringAndNotWhitespace(newYarnPath)\n ) {\n return existingYarnrcYmlContent;\n }\n\n const oldYarnFullPath = upath.join(lockFileDir, oldYarnPath);\n const newYarnFullPath = upath.join(lockFileDir, newYarnPath);\n logger.debug({ oldYarnPath, newYarnPath }, 'Found updated Yarn binary');\n\n yarnrcYml = yarnrcYml.replace(oldYarnPath, newYarnPath);\n updatedArtifacts.push(\n {\n type: 'addition',\n path: yarnrcYmlFilename,\n contents: yarnrcYml,\n },\n {\n type: 'deletion',\n path: oldYarnFullPath,\n },\n {\n type: 'addition',\n path: newYarnFullPath,\n contents: await readLocalFile(newYarnFullPath, 'utf8'),\n isExecutable: true,\n },\n );\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.error({ err }, 'Error updating Yarn binary');\n }\n return existingYarnrcYmlContent && yarnrcYml;\n}\n\nexport async function getAdditionalFiles(\n config: PostUpdateConfig<NpmManagerData>,\n packageFiles: AdditionalPackageFiles,\n): Promise<WriteExistingFilesResult> {\n logger.trace({ config }, 'getAdditionalFiles');\n const artifactErrors: ArtifactError[] = [];\n const artifactNotices: ArtifactNotice[] = [];\n const updatedArtifacts: FileChange[] = [];\n if (!packageFiles.npm?.length) {\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n if (config.skipArtifactsUpdate) {\n logger.debug('Skipping lock file generation');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n logger.debug('Getting updated lock files');\n if (\n config.isLockFileMaintenance &&\n config.reuseExistingBranch &&\n (await scm.branchExists(config.branchName))\n ) {\n logger.debug('Skipping lockFileMaintenance update');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n const dirs = determineLockFileDirs(config, packageFiles);\n logger.trace({ dirs }, 'lock file dirs');\n await writeExistingFiles(config, packageFiles);\n await writeUpdatedPackageFiles(config);\n\n const { additionalNpmrcContent, additionalYarnRcYml } = processHostRules();\n\n // This isn't passed directly to the child process, so no need to filter.\n // But pass custom env and user vars.\n const env = {\n ...getEnv(),\n NPM_CONFIG_CACHE: await ensureCacheDir(NPM_CACHE_DIR),\n YARN_CACHE_FOLDER: await ensureCacheDir(YARN_CACHE_DIR),\n YARN_GLOBAL_FOLDER: await ensureCacheDir(YARN_GLOBAL_DIR),\n npm_config_store: await ensureCacheDir(PNPM_CACHE_BASE_DIR),\n NODE_ENV: 'dev',\n };\n\n let token: string | undefined;\n try {\n ({ token } = hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n }));\n // v8 ignore next -- TODO: add test #40625\n token = token ? `${token}@` : token;\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error getting token for packageFile');\n }\n const tokenRe = regEx(`${token ?? ''}`, 'g', false);\n for (const npmLock of dirs.npmLockDirs) {\n const lockFileDir = upath.dirname(npmLock);\n const npmrcContent = await getNpmrcContent(lockFileDir);\n await updateNpmrcContent(lockFileDir, npmrcContent, additionalNpmrcContent);\n const fileName = upath.basename(npmLock);\n logger.debug(`Generating ${fileName} for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.npmLock === npmLock,\n );\n const res = await npm.generateLockFile(\n lockFileDir,\n env,\n fileName,\n config,\n upgrades,\n npmrcContent,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes('No matching version found for')) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `No matching version found for ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'npm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n const err = new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(err, NpmDatasource.id);\n }\n }\n }\n\n artifactErrors.push({\n fileName: npmLock,\n stderr: res.stderr,\n });\n } else if (res.lockFile) {\n if (res.beforeFallback) {\n const message =\n 'npm `--before` could not be enforced because existing locked packages were published after the `minimumReleaseAge` cutoff. This will resolve after the next lock file maintenance run.';\n logger.warn({ npmLock }, message);\n artifactNotices.push({ file: npmLock, message });\n }\n const existingContent = await getFile(\n npmLock,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(`${npmLock} hasn't changed`);\n } else {\n logger.debug(`${npmLock} needs updating`);\n updatedArtifacts.push({\n type: 'addition',\n path: npmLock,\n // TODO: can this be undefined? (#22198)\n\n contents: res.lockFile.replace(tokenRe, ''),\n });\n }\n }\n await resetNpmrcContent(lockFileDir, npmrcContent);\n }\n\n for (const yarnLock of dirs.yarnLockDirs) {\n const lockFileDir = upath.dirname(yarnLock);\n const npmrcContent = await getNpmrcContent(lockFileDir);\n await updateNpmrcContent(lockFileDir, npmrcContent, additionalNpmrcContent);\n let yarnRcYmlFilename: string | undefined;\n let existingYarnrcYmlContent: string | undefined | null;\n if (additionalYarnRcYml) {\n yarnRcYmlFilename = getSiblingFileName(yarnLock, '.yarnrc.yml');\n existingYarnrcYmlContent = await readLocalFile(yarnRcYmlFilename, 'utf8');\n // v8 ignore else -- TODO: add test #40625\n if (existingYarnrcYmlContent) {\n try {\n // TODO: use schema (#9610)\n const existingYarnrRcYml = parseSingleYaml<Record<string, unknown>>(\n existingYarnrcYmlContent,\n );\n\n const updatedYarnYrcYml = deepmerge(\n existingYarnrRcYml,\n yarn.fuzzyMatchAdditionalYarnrcYml(\n additionalYarnRcYml,\n existingYarnrRcYml,\n ),\n );\n\n await writeLocalFile(yarnRcYmlFilename, dump(updatedYarnYrcYml));\n logger.debug('Added authentication to .yarnrc.yml');\n } catch (err) {\n logger.warn({ err }, 'Error appending .yarnrc.yml content');\n }\n }\n }\n logger.debug(`Generating yarn.lock for ${lockFileDir}`);\n const lockFileName = upath.join(lockFileDir, 'yarn.lock');\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.yarnLock === yarnLock,\n );\n const res = await yarn.generateLockFile(lockFileDir, env, config, upgrades);\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes(`Couldn't find any versions for`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `Couldn't find any versions for \\\\\"${upgrade.depName}\\\\\"`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'yarn' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: yarnLock,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n lockFileName,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"yarn.lock hasn't changed\");\n } else {\n logger.debug('yarn.lock needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: lockFileName,\n // TODO #22198\n contents: res.lockFile!,\n });\n await updateYarnOffline(lockFileDir, updatedArtifacts);\n }\n\n /* v8 ignore next -- needs test */\n if (upgrades.some(yarn.isYarnUpdate)) {\n existingYarnrcYmlContent = await updateYarnBinary(\n lockFileDir,\n updatedArtifacts,\n existingYarnrcYmlContent,\n );\n }\n }\n await resetNpmrcContent(lockFileDir, npmrcContent);\n /* v8 ignore next -- needs test */\n if (existingYarnrcYmlContent) {\n // TODO #22198\n await writeLocalFile(yarnRcYmlFilename!, existingYarnrcYmlContent);\n }\n }\n\n for (const pnpmLockFile of dirs.pnpmLockFileDirs) {\n const lockFileDir = upath.dirname(pnpmLockFile);\n const npmrcContent = await getNpmrcContent(lockFileDir);\n await updateNpmrcContent(lockFileDir, npmrcContent, additionalNpmrcContent);\n logger.debug(`Generating pnpm-lock.yaml for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.pnpmLockFile === pnpmLockFile,\n );\n const res = await pnpm.generateLockFile(lockFileDir, env, config, upgrades);\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stdout?.includes(`No compatible version found:`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stdout.includes(\n `No compatible version found: ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'pnpm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: pnpmLockFile,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n pnpmLockFile,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"pnpm-lock.yaml hasn't changed\");\n } else {\n logger.debug('pnpm-lock.yaml needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: pnpmLockFile,\n // TODO: can be undefined? (#22198)\n contents: res.lockFile!,\n });\n }\n }\n await resetNpmrcContent(lockFileDir, npmrcContent);\n }\n\n return { artifactErrors, artifactNotices, updatedArtifacts };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAS,QAAQ,KAA8C;CAC7D,OAAO,MAAM,KAAK,IAAI,IAAI,IAA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,MAAM,gBAAgB,KAAK,kBAAkB;EAChD,MAAM,cAAc,MAAM,QAAQ,YAAY;EAC9C,MAAM,eAAe,MAAM,gBAAgB,WAAW;EACtD,MAAM,mBAAmB,aAAa,cAAc,sBAAsB;EAC1E,OAAO,MAAM,iCAAiC,aAAa;EAC3D,MAAM,WAAW,OAAO,SAAS,QAC9B,YAAY,QAAQ,aAAa,iBAAiB,YACrD;EACA,MAAM,MAAM,MAAMC,mBAAsB,aAAa,KAAK,QAAQ,QAAQ;EAC1E,IAAI,IAAI,OAAO;;GAEb,IAAI,IAAI,QAAQ,SAAS,8BAA8B,GAChD;SAAA,MAAM,WAAW,OAAO,UAC3B,IACE,IAAI,OAAO,SACT,gCAAgC,QAAQ,SAC1C,GACA;KACA,OAAO,MACL;MAAE,YAAY,QAAQ;MAAS,MAAM;KAAO,GAC5C,8EACF;KACA,MAAM,IAAI,kBACR,MACE,8EACF,GACA,cAAc,EAChB;IACF;;GAIJ,eAAe,KAAK;IAClB,UAAU;IACV,QAAQ,kCAAkC,KAAK,EAAE;GACnD,CAAC;EACH,OAAO;GACL,MAAM,kBAAkB,MAAM,QAC5B,cACA,OAAO,sBAAsB,OAAO,aAAa,OAAO,UAC1D;GACA,IAAI,IAAI,aAAa,iBACnB,OAAO,MAAM,+BAA+B;QACvC;IACL,OAAO,MAAM,+BAA+B;IAC5C,iBAAiB,KAAK;KACpB,MAAM;KACN,MAAM;KAEN,UAAU,IAAI;IAChB,CAAC;GACH;EACF;EACA,MAAM,kBAAkB,aAAa,YAAY;CACnD;CAEA,OAAO;EAAE;EAAgB;EAAiB;CAAiB;AAC7D"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["hostRules.find","npm.generateLockFile","deepmerge","yarn.fuzzyMatchAdditionalYarnrcYml","yarn.generateLockFile","yarn.isYarnUpdate","pnpm.generateLockFile"],"sources":["../../../../../lib/modules/manager/npm/post-update/index.ts"],"sourcesContent":["// TODO: types (#22198)\nimport { isNonEmptyStringAndNotWhitespace, isString } from '@sindresorhus/is';\nimport deepmerge from 'deepmerge';\nimport upath from 'upath';\nimport { logger } from '../../../../logger/index.ts';\nimport { ExternalHostError } from '../../../../types/errors/external-host-error.ts';\nimport { getEnv } from '../../../../util/env.ts';\nimport {\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n writeLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { getFile, getRepoStatus } from '../../../../util/git/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport * as hostRules from '../../../../util/host-rules.ts';\nimport { newlineRegex, regEx } from '../../../../util/regex.ts';\nimport { ensureTrailingSlash } from '../../../../util/url.ts';\nimport { dump, parseSingleYaml } from '../../../../util/yaml.ts';\nimport { NpmDatasource } from '../../../datasource/npm/index.ts';\nimport { scm } from '../../../platform/scm.ts';\nimport type {\n ArtifactError,\n ArtifactNotice,\n PackageFile,\n PostUpdateConfig,\n Upgrade,\n} from '../../types.ts';\nimport { artifactErrorMessageFromExecError } from '../../util.ts';\nimport {\n NPM_CACHE_DIR,\n PNPM_CACHE_BASE_DIR,\n YARN_CACHE_DIR,\n YARN_GLOBAL_DIR,\n} from '../constants.ts';\nimport { getZeroInstallPaths } from '../extract/yarn.ts';\nimport type { NpmManagerData } from '../types.ts';\nimport {\n composeLockFile,\n getNpmrcContent,\n parseLockFile,\n resetNpmrcContent,\n updateNpmrcContent,\n} from '../utils.ts';\nimport * as npm from './npm.ts';\nimport * as pnpm from './pnpm.ts';\nimport { processHostRules } from './rules.ts';\nimport type {\n AdditionalPackageFiles,\n DetermineLockFileDirsResult,\n WriteExistingFilesResult,\n YarnRcYmlFile,\n} from './types.ts';\nimport * as yarn from './yarn.ts';\n\n// Strips empty values, deduplicates, and returns the directories from filenames\nfunction getDirs(arr: (string | null | undefined)[]): string[] {\n return Array.from(new Set(arr.filter(isString)));\n}\n\nexport function determineLockFileDirs(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n): DetermineLockFileDirsResult {\n const npmLockDirs: (string | undefined)[] = [];\n const yarnLockDirs: (string | undefined)[] = [];\n const pnpmLockFileDirs: (string | undefined)[] = [];\n\n for (const upgrade of config.upgrades) {\n // v8 ignore else -- TODO: add test #40625\n if (\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isRemediation === true ||\n upgrade.isLockfileUpdate === true\n ) {\n yarnLockDirs.push(upgrade.managerData?.yarnLock);\n npmLockDirs.push(upgrade.managerData?.npmLock);\n pnpmLockFileDirs.push(upgrade.managerData?.pnpmLockFile);\n }\n }\n\n if (\n config.upgrades.every(\n (upgrade: Upgrade) =>\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isLockfileUpdate,\n )\n ) {\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n }\n\n function getPackageFile(\n fileName: string,\n ): Partial<PackageFile<NpmManagerData>> {\n logger.trace(`Looking for packageFile: ${fileName}`);\n\n for (const packageFile of packageFiles.npm!) {\n if (packageFile.packageFile === fileName) {\n logger.trace({ packageFile }, 'Found packageFile');\n return packageFile;\n }\n logger.trace('No match');\n }\n return {};\n }\n\n // TODO #22198\n for (const p of config.updatedPackageFiles!) {\n logger.trace(`Checking ${String(p.path)} for lock files`);\n const packageFile = getPackageFile(p.path);\n /* v8 ignore next -- needs test */\n if (!packageFile.managerData) {\n continue;\n }\n // push full lock file names and convert them later\n yarnLockDirs.push(packageFile.managerData.yarnLock);\n npmLockDirs.push(packageFile.managerData.npmLock);\n pnpmLockFileDirs.push(packageFile.managerData.pnpmLockFile);\n }\n\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n}\n\nexport async function writeExistingFiles(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n): Promise<void> {\n if (!packageFiles.npm) {\n return;\n }\n const npmFiles = packageFiles.npm;\n logger.debug(\n { packageFiles: npmFiles.map((n) => n.packageFile) },\n 'Writing package.json files',\n );\n for (const packageFile of npmFiles) {\n /* v8 ignore if -- TODO: add test #40625 */\n if (!packageFile.managerData) {\n continue;\n }\n // TODO #22198\n const basedir = upath.dirname(packageFile.packageFile!);\n const npmrc = packageFile.npmrc;\n const npmrcFilename = upath.join(basedir, '.npmrc');\n // Write out the file unless the npmrc came from the workspace\n // npmrcFilename will be set whenever the file was read from disk during extract\n if (\n isString(npmrc) &&\n (npmrcFilename === packageFile.managerData.npmrcFileName ||\n !packageFile.managerData.npmrcFileName)\n ) {\n try {\n await writeLocalFile(npmrcFilename, npmrc.replace(regEx(/\\n?$/), '\\n'));\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ npmrcFilename, err }, 'Error writing .npmrc');\n }\n }\n const npmLock = packageFile.managerData.npmLock;\n if (npmLock) {\n const npmLockPath = npmLock;\n logger.debug(`Writing ${npmLock}`);\n let existingNpmLock: string;\n try {\n existingNpmLock = (await getFile(npmLock)) ?? '';\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error reading npm lock file');\n existingNpmLock = '';\n }\n const { detectedIndent, lockFileParsed: npmLockParsed } =\n parseLockFile(existingNpmLock);\n if (npmLockParsed) {\n const packageNames =\n 'packages' in npmLockParsed\n ? Object.keys(npmLockParsed.packages)\n : [];\n const widens: string[] = [];\n let lockFileChanged = false;\n for (const upgrade of config.upgrades) {\n if (upgrade.lockFiles && !upgrade.lockFiles.includes(npmLock)) {\n continue;\n }\n if (!upgrade.managerData) {\n continue;\n }\n if (\n upgrade.rangeStrategy === 'widen' &&\n upgrade.managerData.npmLock === npmLock\n ) {\n // TODO #22198\n widens.push(upgrade.depName!);\n }\n const { depName } = upgrade;\n const oldVersion = upgrade.lockedVersion ?? upgrade.currentVersion;\n if ('packages' in npmLockParsed) {\n for (const packageName of packageNames) {\n if (\n packageName === `node_modules/${depName}` ||\n packageName.startsWith(`node_modules/${depName}/`)\n ) {\n logger.trace({ packageName }, 'Massaging out package name');\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n continue;\n }\n if (!depName || !oldVersion) {\n continue;\n }\n // Lockstep monorepo siblings (e.g. vue -> @vue/server-renderer)\n // pin the updated dep to its exact old version. Left in the lock\n // they cannot resolve against the new version and npm fails with\n // ERESOLVE, so massage them out too and let npm re-resolve them.\n const entry = npmLockParsed.packages[packageName];\n const pinned =\n entry?.peerDependencies?.[depName] === oldVersion ||\n entry?.dependencies?.[depName] === oldVersion ||\n entry?.optionalDependencies?.[depName] === oldVersion;\n if (pinned) {\n logger.trace(\n { packageName, depName, oldVersion },\n 'Massaging out lockstep sibling',\n );\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n }\n }\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (widens.length) {\n logger.debug(\n `Removing ${String(widens)} from ${npmLock} to force an update`,\n );\n lockFileChanged = true;\n try {\n if ('dependencies' in npmLockParsed && npmLockParsed.dependencies) {\n widens.forEach((depName) => {\n // TODO #22198\n delete npmLockParsed.dependencies![depName];\n });\n }\n } catch /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn(\n { npmLock },\n 'Error massaging package-lock.json for widen',\n );\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (lockFileChanged) {\n logger.debug('Massaging npm lock file before writing to disk');\n existingNpmLock = composeLockFile(npmLockParsed, detectedIndent);\n }\n await writeLocalFile(npmLockPath, existingNpmLock);\n }\n }\n }\n}\n\nexport async function writeUpdatedPackageFiles(\n config: PostUpdateConfig,\n): Promise<void> {\n logger.trace({ config }, 'writeUpdatedPackageFiles');\n logger.debug('Writing any updated package files');\n if (!config.updatedPackageFiles) {\n logger.debug('No files found');\n return;\n }\n // prefer artifact content when it updates the same file (e.g. pnpm-workspace.yaml)\n const artifactContents = new Map<string, string>();\n if (config.updatedArtifacts) {\n for (const artifact of config.updatedArtifacts) {\n if (artifact.type === 'addition' && artifact.contents) {\n artifactContents.set(artifact.path, artifact.contents.toString());\n }\n }\n }\n const supportedLockFiles = ['package-lock.json', 'yarn.lock'];\n for (const packageFile of config.updatedPackageFiles) {\n if (packageFile.type !== 'addition') {\n continue;\n }\n if (\n supportedLockFiles.some((fileName) => packageFile.path.endsWith(fileName))\n ) {\n logger.debug(`Writing lock file: ${packageFile.path}`);\n // TODO #22198\n\n await writeLocalFile(packageFile.path, packageFile.contents!);\n continue;\n }\n if (\n !(\n packageFile.path.endsWith('package.json') ||\n packageFile.path.endsWith('pnpm-workspace.yaml') ||\n packageFile.path.endsWith('.yarnrc.yml')\n )\n ) {\n continue;\n }\n const contents =\n artifactContents.get(packageFile.path) ?? packageFile.contents!;\n logger.debug(`Writing ${packageFile.path}`);\n await writeLocalFile(packageFile.path, contents);\n }\n}\n\n/* v8 ignore next -- needs test */\nasync function updateYarnOffline(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n): Promise<void> {\n try {\n const resolvedPaths: string[] = [];\n const yarnrcYml = await getFile(upath.join(lockFileDir, '.yarnrc.yml'));\n const yarnrc = await getFile(upath.join(lockFileDir, '.yarnrc'));\n\n // As .yarnrc.yml overrides .yarnrc in Yarn 1 (https://git.io/JUcco)\n // both files may exist, so check for .yarnrc.yml first\n if (yarnrcYml) {\n // Yarn 2 (offline cache and zero-installs)\n const paths = getZeroInstallPaths(yarnrcYml);\n resolvedPaths.push(...paths.map((p) => upath.join(lockFileDir, p)));\n } else if (yarnrc) {\n // Yarn 1 (offline mirror)\n const mirrorLine = yarnrc\n .split(newlineRegex)\n .find((line) => line.startsWith('yarn-offline-mirror '));\n if (mirrorLine) {\n const mirrorPath = ensureTrailingSlash(\n mirrorLine.split(' ')[1].replace(regEx(/\"/g), ''),\n );\n resolvedPaths.push(upath.join(lockFileDir, mirrorPath));\n }\n }\n logger.debug({ resolvedPaths }, 'updateYarnOffline resolvedPaths');\n\n if (resolvedPaths.length) {\n const status = await getRepoStatus();\n for (const f of status.modified.concat(status.not_added)) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n });\n }\n }\n for (const f of status.deleted || []) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({ type: 'deletion', path: f });\n }\n }\n }\n } catch (err) {\n logger.error({ err }, 'Error updating yarn offline packages');\n }\n}\n\n// TODO: move to ./yarn.ts\n// exported for testing\nexport async function updateYarnBinary(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n existingYarnrcYmlContent: string | undefined | null,\n): Promise<string | undefined | null> {\n let yarnrcYml = existingYarnrcYmlContent;\n try {\n const yarnrcYmlFilename = upath.join(lockFileDir, '.yarnrc.yml');\n yarnrcYml ??= (await getFile(yarnrcYmlFilename)) ?? undefined;\n const newYarnrcYml = await readLocalFile(yarnrcYmlFilename, 'utf8');\n if (!isString(yarnrcYml) || !isString(newYarnrcYml)) {\n return existingYarnrcYmlContent;\n }\n\n // TODO: use schema (#9610)\n const oldYarnPath = parseSingleYaml<YarnRcYmlFile>(yarnrcYml)?.yarnPath;\n const newYarnPath = parseSingleYaml<YarnRcYmlFile>(newYarnrcYml)?.yarnPath;\n if (\n !isNonEmptyStringAndNotWhitespace(oldYarnPath) ||\n !isNonEmptyStringAndNotWhitespace(newYarnPath)\n ) {\n return existingYarnrcYmlContent;\n }\n\n const oldYarnFullPath = upath.join(lockFileDir, oldYarnPath);\n const newYarnFullPath = upath.join(lockFileDir, newYarnPath);\n logger.debug({ oldYarnPath, newYarnPath }, 'Found updated Yarn binary');\n\n yarnrcYml = yarnrcYml.replace(oldYarnPath, newYarnPath);\n updatedArtifacts.push(\n {\n type: 'addition',\n path: yarnrcYmlFilename,\n contents: yarnrcYml,\n },\n {\n type: 'deletion',\n path: oldYarnFullPath,\n },\n {\n type: 'addition',\n path: newYarnFullPath,\n contents: await readLocalFile(newYarnFullPath, 'utf8'),\n isExecutable: true,\n },\n );\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.error({ err }, 'Error updating Yarn binary');\n }\n return existingYarnrcYmlContent && yarnrcYml;\n}\n\nexport async function getAdditionalFiles(\n config: PostUpdateConfig<NpmManagerData>,\n packageFiles: AdditionalPackageFiles,\n): Promise<WriteExistingFilesResult> {\n logger.trace({ config }, 'getAdditionalFiles');\n const artifactErrors: ArtifactError[] = [];\n const artifactNotices: ArtifactNotice[] = [];\n const updatedArtifacts: FileChange[] = [];\n if (!packageFiles.npm?.length) {\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n if (config.skipArtifactsUpdate) {\n logger.debug('Skipping lock file generation');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n logger.debug('Getting updated lock files');\n if (\n config.isLockFileMaintenance &&\n config.reuseExistingBranch &&\n (await scm.branchExists(config.branchName))\n ) {\n logger.debug('Skipping lockFileMaintenance update');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n const dirs = determineLockFileDirs(config, packageFiles);\n logger.trace({ dirs }, 'lock file dirs');\n await writeExistingFiles(config, packageFiles);\n await writeUpdatedPackageFiles(config);\n\n const { additionalNpmrcContent, additionalYarnRcYml } = processHostRules();\n\n // This isn't passed directly to the child process, so no need to filter.\n // But pass custom env and user vars.\n const env = {\n ...getEnv(),\n NPM_CONFIG_CACHE: await ensureCacheDir(NPM_CACHE_DIR),\n YARN_CACHE_FOLDER: await ensureCacheDir(YARN_CACHE_DIR),\n YARN_GLOBAL_FOLDER: await ensureCacheDir(YARN_GLOBAL_DIR),\n npm_config_store: await ensureCacheDir(PNPM_CACHE_BASE_DIR),\n NODE_ENV: 'dev',\n };\n\n let token: string | undefined;\n try {\n ({ token } = hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n }));\n // v8 ignore next -- TODO: add test #40625\n token = token ? `${token}@` : token;\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error getting token for packageFile');\n }\n const tokenRe = regEx(`${token ?? ''}`, 'g', false);\n for (const npmLock of dirs.npmLockDirs) {\n const lockFileDir = upath.dirname(npmLock);\n const npmrcContent = await getNpmrcContent(lockFileDir);\n await updateNpmrcContent(lockFileDir, npmrcContent, additionalNpmrcContent);\n const fileName = upath.basename(npmLock);\n logger.debug(`Generating ${fileName} for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.npmLock === npmLock,\n );\n const res = await npm.generateLockFile(\n lockFileDir,\n env,\n fileName,\n config,\n upgrades,\n npmrcContent,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes('No matching version found for')) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `No matching version found for ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'npm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n const err = new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(err, NpmDatasource.id);\n }\n }\n }\n\n artifactErrors.push({\n fileName: npmLock,\n stderr: res.stderr,\n });\n } else if (res.lockFile) {\n if (res.beforeFallback) {\n const message =\n 'npm `--before` could not be enforced because existing locked packages were published after the `minimumReleaseAge` cutoff. This will resolve after the next lock file maintenance run.';\n logger.warn({ npmLock }, message);\n artifactNotices.push({ file: npmLock, message });\n }\n const existingContent = await getFile(\n npmLock,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(`${npmLock} hasn't changed`);\n } else {\n logger.debug(`${npmLock} needs updating`);\n updatedArtifacts.push({\n type: 'addition',\n path: npmLock,\n // TODO: can this be undefined? (#22198)\n\n contents: res.lockFile.replace(tokenRe, ''),\n });\n }\n }\n await resetNpmrcContent(lockFileDir, npmrcContent);\n }\n\n for (const yarnLock of dirs.yarnLockDirs) {\n const lockFileDir = upath.dirname(yarnLock);\n const npmrcContent = await getNpmrcContent(lockFileDir);\n await updateNpmrcContent(lockFileDir, npmrcContent, additionalNpmrcContent);\n let yarnRcYmlFilename: string | undefined;\n let existingYarnrcYmlContent: string | undefined | null;\n if (additionalYarnRcYml) {\n yarnRcYmlFilename = getSiblingFileName(yarnLock, '.yarnrc.yml');\n existingYarnrcYmlContent = await readLocalFile(yarnRcYmlFilename, 'utf8');\n // v8 ignore else -- TODO: add test #40625\n if (existingYarnrcYmlContent) {\n try {\n // TODO: use schema (#9610)\n const existingYarnrRcYml = parseSingleYaml<Record<string, unknown>>(\n existingYarnrcYmlContent,\n );\n\n const updatedYarnYrcYml = deepmerge(\n existingYarnrRcYml,\n yarn.fuzzyMatchAdditionalYarnrcYml(\n additionalYarnRcYml,\n existingYarnrRcYml,\n ),\n );\n\n await writeLocalFile(yarnRcYmlFilename, dump(updatedYarnYrcYml));\n logger.debug('Added authentication to .yarnrc.yml');\n } catch (err) {\n logger.warn({ err }, 'Error appending .yarnrc.yml content');\n }\n }\n }\n logger.debug(`Generating yarn.lock for ${lockFileDir}`);\n const lockFileName = upath.join(lockFileDir, 'yarn.lock');\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.yarnLock === yarnLock,\n );\n const res = await yarn.generateLockFile(lockFileDir, env, config, upgrades);\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes(`Couldn't find any versions for`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `Couldn't find any versions for \\\\\"${upgrade.depName}\\\\\"`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'yarn' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: yarnLock,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n lockFileName,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"yarn.lock hasn't changed\");\n } else {\n logger.debug('yarn.lock needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: lockFileName,\n // TODO #22198\n contents: res.lockFile!,\n });\n await updateYarnOffline(lockFileDir, updatedArtifacts);\n }\n\n /* v8 ignore next -- needs test */\n if (upgrades.some(yarn.isYarnUpdate)) {\n existingYarnrcYmlContent = await updateYarnBinary(\n lockFileDir,\n updatedArtifacts,\n existingYarnrcYmlContent,\n );\n }\n }\n await resetNpmrcContent(lockFileDir, npmrcContent);\n /* v8 ignore next -- needs test */\n if (existingYarnrcYmlContent) {\n // TODO #22198\n await writeLocalFile(yarnRcYmlFilename!, existingYarnrcYmlContent);\n }\n }\n\n for (const pnpmLockFile of dirs.pnpmLockFileDirs) {\n const lockFileDir = upath.dirname(pnpmLockFile);\n const npmrcContent = await getNpmrcContent(lockFileDir);\n await updateNpmrcContent(lockFileDir, npmrcContent, additionalNpmrcContent);\n logger.debug(`Generating pnpm-lock.yaml for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.pnpmLockFile === pnpmLockFile,\n );\n const res = await pnpm.generateLockFile(lockFileDir, env, config, upgrades);\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stdout?.includes(`No compatible version found:`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stdout.includes(\n `No compatible version found: ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'pnpm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: pnpmLockFile,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n pnpmLockFile,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"pnpm-lock.yaml hasn't changed\");\n } else {\n logger.debug('pnpm-lock.yaml needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: pnpmLockFile,\n // TODO: can be undefined? (#22198)\n contents: res.lockFile!,\n });\n }\n }\n await resetNpmrcContent(lockFileDir, npmrcContent);\n }\n\n return { artifactErrors, artifactNotices, updatedArtifacts };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAS,QAAQ,KAA8C;CAC7D,OAAO,MAAM,KAAK,IAAI,IAAI,IAAI,OAAO,QAAQ,CAAC,CAAC;AACjD;AAEA,SAAgB,sBACd,QACA,cAC6B;CAC7B,MAAM,cAAsC,CAAC;CAC7C,MAAM,eAAuC,CAAC;CAC9C,MAAM,mBAA2C,CAAC;CAElD,KAAK,MAAM,WAAW,OAAO;;CAE3B,IACE,QAAQ,eAAe,yBACvB,QAAQ,kBAAkB,QAC1B,QAAQ,qBAAqB,MAC7B;EACA,aAAa,KAAK,QAAQ,aAAa,QAAQ;EAC/C,YAAY,KAAK,QAAQ,aAAa,OAAO;EAC7C,iBAAiB,KAAK,QAAQ,aAAa,YAAY;CACzD;CAGF,IACE,OAAO,SAAS,OACb,YACC,QAAQ,eAAe,yBACvB,QAAQ,gBACZ,GAEA,OAAO;EACL,cAAc,QAAQ,YAAY;EAClC,aAAa,QAAQ,WAAW;EAChC,kBAAkB,QAAQ,gBAAgB;CAC5C;CAGF,SAAS,eACP,UACsC;EACtC,OAAO,MAAM,4BAA4B,UAAU;EAEnD,KAAK,MAAM,eAAe,aAAa,KAAM;GAC3C,IAAI,YAAY,gBAAgB,UAAU;IACxC,OAAO,MAAM,EAAE,YAAY,GAAG,mBAAmB;IACjD,OAAO;GACT;GACA,OAAO,MAAM,UAAU;EACzB;EACA,OAAO,CAAC;CACV;CAGA,KAAK,MAAM,KAAK,OAAO,qBAAsB;EAC3C,OAAO,MAAM,YAAY,OAAO,EAAE,IAAI,EAAE,gBAAgB;EACxD,MAAM,cAAc,eAAe,EAAE,IAAI;;EAEzC,IAAI,CAAC,YAAY,aACf;EAGF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C,KAAK,EAAE;GACnD,CAAC;EACH,OAAO;GACL,MAAM,kBAAkB,MAAM,QAC5B,cACA,OAAO,sBAAsB,OAAO,aAAa,OAAO,UAC1D;GACA,IAAI,IAAI,aAAa,iBACnB,OAAO,MAAM,+BAA+B;QACvC;IACL,OAAO,MAAM,+BAA+B;IAC5C,iBAAiB,KAAK;KACpB,MAAM;KACN,MAAM;KAEN,UAAU,IAAI;IAChB,CAAC;GACH;EACF;EACA,MAAM,kBAAkB,aAAa,YAAY;CACnD;CAEA,OAAO;EAAE;EAAgB;EAAiB;CAAiB;AAC7D"}
|
|
@@ -33,7 +33,7 @@ import { GithubIssueCache } from "./issue.js";
|
|
|
33
33
|
import { massageMarkdownLinks } from "./massage-markdown-links.js";
|
|
34
34
|
import { getPrCache, isPrInMergeQueue, updatePrCache } from "./pr.js";
|
|
35
35
|
import { getAppDetails, getUserDetails, getUserEmail } from "./user.js";
|
|
36
|
-
import { getRepoUrl, warnIfDefaultGitAuthorEmail } from "./utils.js";
|
|
36
|
+
import { getRepoUrl, isGithubEnterpriseServer, warnIfDefaultGitAuthorEmail } from "./utils.js";
|
|
37
37
|
import { isArray, isNonEmptyObject, isNonEmptyString } from "@sindresorhus/is";
|
|
38
38
|
import semver from "semver";
|
|
39
39
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -47,7 +47,6 @@ var github_exports = /* @__PURE__ */ __exportAll({
|
|
|
47
47
|
createFork: () => createFork,
|
|
48
48
|
createPr: () => createPr,
|
|
49
49
|
deleteLabel: () => deleteLabel,
|
|
50
|
-
detectGhe: () => detectGhe,
|
|
51
50
|
ensureComment: () => ensureComment,
|
|
52
51
|
ensureCommentRemoval: () => ensureCommentRemoval,
|
|
53
52
|
ensureIssue: () => ensureIssue,
|
|
@@ -84,13 +83,14 @@ var github_exports = /* @__PURE__ */ __exportAll({
|
|
|
84
83
|
const id = "github";
|
|
85
84
|
let config;
|
|
86
85
|
let platformConfig;
|
|
86
|
+
const defaultGithubApiUrl = "https://api.github.com/";
|
|
87
87
|
const GitHubMaxPrBodyLen = 58e3;
|
|
88
88
|
function resetConfigs() {
|
|
89
89
|
config = {};
|
|
90
|
-
platformConfig = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
};
|
|
90
|
+
platformConfig = { host: {
|
|
91
|
+
type: "github",
|
|
92
|
+
apiUrl: parseUrl(defaultGithubApiUrl)
|
|
93
|
+
} };
|
|
94
94
|
}
|
|
95
95
|
resetConfigs();
|
|
96
96
|
function escapeHash(input) {
|
|
@@ -99,51 +99,61 @@ function escapeHash(input) {
|
|
|
99
99
|
function isGHApp() {
|
|
100
100
|
return !!platformConfig.isGHApp;
|
|
101
101
|
}
|
|
102
|
-
async function
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
platformConfig.gheVersion = semver.valid(gheVersionHeader?.[1]) ?? null;
|
|
115
|
-
logger.debug(`Detected GitHub Enterprise Server, version: ${platformConfig.gheVersion}`);
|
|
102
|
+
async function detectGithubHost(apiUrl, token) {
|
|
103
|
+
const { hostname } = apiUrl;
|
|
104
|
+
if (hostname === "api.github.com") return {
|
|
105
|
+
type: "github",
|
|
106
|
+
apiUrl
|
|
107
|
+
};
|
|
108
|
+
if (hostname.endsWith(".ghe.com")) {
|
|
109
|
+
logger.debug("Detected GitHub Enterprise Cloud");
|
|
110
|
+
return {
|
|
111
|
+
type: "ghec",
|
|
112
|
+
apiUrl
|
|
113
|
+
};
|
|
116
114
|
}
|
|
115
|
+
const gheHeaderKey = "x-github-enterprise-version";
|
|
116
|
+
const gheQueryRes = await githubApi.headJson("/", { token });
|
|
117
|
+
const gheHeaders = coerceObject(gheQueryRes?.headers);
|
|
118
|
+
const gheVersionHeader = Object.entries(gheHeaders).find(([k]) => k.toLowerCase() === gheHeaderKey);
|
|
119
|
+
const version = semver.valid(gheVersionHeader?.[1]) ?? null;
|
|
120
|
+
logger.debug(`Detected GitHub Enterprise Server, version: ${version}`);
|
|
121
|
+
return {
|
|
122
|
+
type: "ghes",
|
|
123
|
+
apiUrl,
|
|
124
|
+
version
|
|
125
|
+
};
|
|
117
126
|
}
|
|
118
127
|
async function initPlatform({ endpoint, token: originalToken, username, gitAuthor }) {
|
|
119
128
|
let token = originalToken;
|
|
120
129
|
if (!token) throw new Error("Init: You must configure a GitHub token");
|
|
121
130
|
token = token.replace(regEx(/^ghs_/), "x-access-token:ghs_");
|
|
122
131
|
platformConfig.isGHApp = token.startsWith("x-access-token:");
|
|
132
|
+
let githubApiUrl = platformConfig.host.apiUrl;
|
|
123
133
|
if (endpoint) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
134
|
+
const parsedApiUrl = parseUrl(ensureTrailingSlash(endpoint));
|
|
135
|
+
if (!parsedApiUrl || !isHttpUrl(parsedApiUrl)) throw new Error(`Init: Invalid GitHub endpoint URL: ${endpoint}`);
|
|
136
|
+
githubApiUrl = parsedApiUrl;
|
|
137
|
+
setBaseUrl(githubApiUrl.href);
|
|
138
|
+
} else logger.debug(`Using default github endpoint: ${githubApiUrl.href}`);
|
|
139
|
+
platformConfig.host = await detectGithubHost(githubApiUrl, token);
|
|
129
140
|
/**
|
|
130
141
|
* GHE requires version >=3.10 to support fine-grained access tokens
|
|
131
142
|
* https://docs.github.com/en/enterprise-server@3.10/admin/release-notes#authentication
|
|
132
143
|
*/
|
|
133
|
-
if (isGithubFineGrainedPersonalAccessToken(token) && platformConfig.
|
|
144
|
+
if (isGithubFineGrainedPersonalAccessToken(token) && isGithubEnterpriseServer(platformConfig.host) && (!platformConfig.host.version || semver.lt(platformConfig.host.version, "3.10.0"))) throw new Error("Init: Fine-grained Personal Access Tokens do not support GitHub Enterprise Server API version <3.10 and cannot be used with Renovate.");
|
|
134
145
|
let renovateUsername;
|
|
135
146
|
if (username) renovateUsername = username;
|
|
136
147
|
else if (platformConfig.isGHApp) {
|
|
137
148
|
platformConfig.userDetails ??= await getAppDetails(token);
|
|
138
149
|
renovateUsername = platformConfig.userDetails.username;
|
|
139
150
|
} else {
|
|
140
|
-
platformConfig.userDetails ??= await getUserDetails(platformConfig.
|
|
151
|
+
platformConfig.userDetails ??= await getUserDetails(platformConfig.host.apiUrl.href, token);
|
|
141
152
|
renovateUsername = platformConfig.userDetails.username;
|
|
142
153
|
}
|
|
143
154
|
let ghHostname;
|
|
144
|
-
|
|
145
|
-
if (platformConfig.
|
|
146
|
-
else if (platformConfig.isGhe) ghHostname = parseUrl(platformConfig.endpoint).hostname;
|
|
155
|
+
if (platformConfig.host.type === "ghec") ghHostname = "ghe.com";
|
|
156
|
+
else if (platformConfig.host.type === "ghes") ghHostname = platformConfig.host.apiUrl.hostname;
|
|
147
157
|
else ghHostname = "github.com";
|
|
148
158
|
let discoveredGitAuthor;
|
|
149
159
|
if (!gitAuthor) {
|
|
@@ -151,9 +161,9 @@ async function initPlatform({ endpoint, token: originalToken, username, gitAutho
|
|
|
151
161
|
platformConfig.userDetails ??= await getAppDetails(token);
|
|
152
162
|
discoveredGitAuthor = `${platformConfig.userDetails.name} <${platformConfig.userDetails.id}+${platformConfig.userDetails.username}@users.noreply.${ghHostname}>`;
|
|
153
163
|
} else {
|
|
154
|
-
platformConfig.userDetails ??= await getUserDetails(platformConfig.
|
|
164
|
+
platformConfig.userDetails ??= await getUserDetails(platformConfig.host.apiUrl.href, token);
|
|
155
165
|
// v8 ignore next -- TODO: coverage error #40625
|
|
156
|
-
platformConfig.userEmail = platformConfig.userDetails.email ?? await getUserEmail(platformConfig.
|
|
166
|
+
platformConfig.userEmail = platformConfig.userDetails.email ?? await getUserEmail(platformConfig.host.apiUrl.href, token);
|
|
157
167
|
if (platformConfig.userEmail) discoveredGitAuthor = `${platformConfig.userDetails.name} <${platformConfig.userEmail}>`;
|
|
158
168
|
}
|
|
159
169
|
}
|
|
@@ -163,12 +173,12 @@ async function initPlatform({ endpoint, token: originalToken, username, gitAutho
|
|
|
163
173
|
renovateUsername
|
|
164
174
|
}, "Platform config");
|
|
165
175
|
const platformResult = {
|
|
166
|
-
endpoint: platformConfig.
|
|
176
|
+
endpoint: platformConfig.host.apiUrl.href,
|
|
167
177
|
gitAuthor: gitAuthor ?? discoveredGitAuthor,
|
|
168
178
|
renovateUsername,
|
|
169
179
|
token
|
|
170
180
|
};
|
|
171
|
-
warnIfDefaultGitAuthorEmail(platformResult.gitAuthor, platformConfig.
|
|
181
|
+
warnIfDefaultGitAuthorEmail(platformResult.gitAuthor, platformConfig.host.type !== "github");
|
|
172
182
|
if (getEnv().RENOVATE_X_GITHUB_HOST_RULES && platformResult.endpoint === "https://api.github.com/") {
|
|
173
183
|
logger.debug("Adding GitHub token as GHCR password");
|
|
174
184
|
platformResult.hostRules = [{
|
|
@@ -282,7 +292,7 @@ async function findFork(token, repository, forkOrg) {
|
|
|
282
292
|
}
|
|
283
293
|
logger.debug(`Searching for forked repo in user account`);
|
|
284
294
|
try {
|
|
285
|
-
const { username } = await getUserDetails(platformConfig.
|
|
295
|
+
const { username } = await getUserDetails(platformConfig.host.apiUrl.href, token);
|
|
286
296
|
const forkedRepo = forks.find((repo) => repo.owner.login === username);
|
|
287
297
|
if (forkedRepo) {
|
|
288
298
|
logger.debug(`Found repo in user account: ${forkedRepo.full_name}`);
|
|
@@ -325,7 +335,7 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
325
335
|
};
|
|
326
336
|
const opts = find({
|
|
327
337
|
hostType: "github",
|
|
328
|
-
url: platformConfig.
|
|
338
|
+
url: platformConfig.host.apiUrl.href,
|
|
329
339
|
readOnly: true
|
|
330
340
|
});
|
|
331
341
|
config.renovateUsername = renovateUsername;
|
|
@@ -334,12 +344,12 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
334
344
|
let forkSshUrl = null;
|
|
335
345
|
try {
|
|
336
346
|
let infoQuery = repoInfoQuery;
|
|
337
|
-
if (platformConfig.
|
|
347
|
+
if (isGithubEnterpriseServer(platformConfig.host) && semver.satisfies(platformConfig.host.version ?? "", "<3.3.0")) {
|
|
338
348
|
infoQuery = infoQuery.replace(regEx(/\n\s*autoMergeAllowed\s*\n/), "\n");
|
|
339
349
|
infoQuery = infoQuery.replace(regEx(/\n\s*hasIssuesEnabled\s*\n/), "\n");
|
|
340
350
|
}
|
|
341
|
-
if (platformConfig.
|
|
342
|
-
if (platformConfig.
|
|
351
|
+
if (isGithubEnterpriseServer(platformConfig.host) && semver.satisfies(platformConfig.host.version ?? "", "<3.9.0")) infoQuery = infoQuery.replace(regEx(/\n\s*hasVulnerabilityAlertsEnabled\s*\n/), "\n");
|
|
352
|
+
if (isGithubEnterpriseServer(platformConfig.host) && semver.satisfies(platformConfig.host.version ?? "", "<3.12.0")) infoQuery = infoQuery.replace(regEx(/\n\s*mergeQueue\s*\{\s*id\s*\}\s*\n/), "\n");
|
|
343
353
|
const res = await githubApi.requestGraphql(infoQuery, {
|
|
344
354
|
variables: {
|
|
345
355
|
owner: config.repositoryOwner,
|
|
@@ -473,11 +483,10 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
473
483
|
logger.debug(`Using ${tokenType} token for git init`);
|
|
474
484
|
authToken = opts.token ?? null;
|
|
475
485
|
}
|
|
476
|
-
const parsedEndpoint = parseUrl(platformConfig.endpoint);
|
|
477
486
|
const workingSshUrl = forkToken ? forkSshUrl : repo.sshUrl;
|
|
478
|
-
const url = getRepoUrl(config.repository, gitUrl, workingSshUrl,
|
|
487
|
+
const url = getRepoUrl(config.repository, gitUrl, workingSshUrl, platformConfig.host.apiUrl, authToken);
|
|
479
488
|
let upstreamUrl;
|
|
480
|
-
if (forkCreation && config.parentRepo) upstreamUrl = getRepoUrl(config.parentRepo, gitUrl, repo.sshUrl,
|
|
489
|
+
if (forkCreation && config.parentRepo) upstreamUrl = getRepoUrl(config.parentRepo, gitUrl, repo.sshUrl, platformConfig.host.apiUrl, authToken);
|
|
481
490
|
await initRepo$1({
|
|
482
491
|
...config,
|
|
483
492
|
url,
|
|
@@ -486,7 +495,7 @@ async function initRepo({ repository, forkCreation, forkOrg, forkToken, gitUrl,
|
|
|
486
495
|
return {
|
|
487
496
|
defaultBranch: config.defaultBranch,
|
|
488
497
|
isFork: repo.isFork === true,
|
|
489
|
-
repoFingerprint: repoFingerprint(repo.id, platformConfig.
|
|
498
|
+
repoFingerprint: repoFingerprint(repo.id, platformConfig.host.apiUrl.href)
|
|
490
499
|
};
|
|
491
500
|
}
|
|
492
501
|
async function checkRulesetsForForceRebase(branchName) {
|
|
@@ -1153,7 +1162,7 @@ async function ensureCommentRemoval(deleteConfig) {
|
|
|
1153
1162
|
}
|
|
1154
1163
|
async function tryPrAutomerge(prNumber, prNodeId, platformPrOptions) {
|
|
1155
1164
|
if (!platformPrOptions?.usePlatformAutomerge) return;
|
|
1156
|
-
if (platformConfig.
|
|
1165
|
+
if (isGithubEnterpriseServer(platformConfig.host) && semver.satisfies(platformConfig.host.version ?? "", "<3.3.0")) {
|
|
1157
1166
|
logger.debug({ prNumber }, "GitHub-native automerge: not supported on this version of GHE. Use 3.3.0 or newer.");
|
|
1158
1167
|
return;
|
|
1159
1168
|
}
|
|
@@ -1240,7 +1249,7 @@ async function createPr({ sourceBranch, targetBranch, prTitle: title, prBody: ra
|
|
|
1240
1249
|
async function isMergeQueueEnabled(baseBranch) {
|
|
1241
1250
|
const cachedResult = config.mergeQueueEnabled[baseBranch];
|
|
1242
1251
|
if (cachedResult !== void 0) return cachedResult;
|
|
1243
|
-
if (platformConfig.
|
|
1252
|
+
if (isGithubEnterpriseServer(platformConfig.host) && semver.satisfies(platformConfig.host.version ?? "", "<3.12.0")) {
|
|
1244
1253
|
config.mergeQueueEnabled[baseBranch] = false;
|
|
1245
1254
|
return false;
|
|
1246
1255
|
}
|
|
@@ -1400,7 +1409,7 @@ async function mergePr({ branchName, id: prNo, strategy }) {
|
|
|
1400
1409
|
return true;
|
|
1401
1410
|
}
|
|
1402
1411
|
function massageMarkdown(input) {
|
|
1403
|
-
if (platformConfig.
|
|
1412
|
+
if (platformConfig.host.type !== "github") return smartTruncate(input, maxBodyLength());
|
|
1404
1413
|
const massagedInput = massageMarkdownLinks(input).replace(regEx(/href="https?:\/\/github.com\//g), "href=\"https://redirect.github.com/").replace(regEx(/]\(https:\/\/github\.com\//g), "](https://redirect.github.com/").replace(regEx(/]: https:\/\/github\.com\//g), "]: https://redirect.github.com/").replaceAll("> ℹ **Note**\n> \n", "> [!NOTE]\n").replaceAll("> ℹ️ **Note**\n> \n", "> [!NOTE]\n").replaceAll("> ⚠ **Warning**\n> \n", "> [!WARNING]\n").replaceAll("> ⚠️ **Warning**\n> \n", "> [!WARNING]\n").replaceAll("> ❗ **Caution**\n> \n", "> [!CAUTION]\n").replaceAll("> ❗ **Important**\n> \n", "> [!IMPORTANT]\n");
|
|
1405
1414
|
return smartTruncate(massagedInput, maxBodyLength());
|
|
1406
1415
|
}
|
|
@@ -1494,6 +1503,6 @@ async function commitFiles(config) {
|
|
|
1494
1503
|
return await fetchBranch(branchName);
|
|
1495
1504
|
}
|
|
1496
1505
|
//#endregion
|
|
1497
|
-
export { addAssignees, addLabels, addReviewers, assertPrNotInMergeQueue, commitFiles, createFork, createPr, deleteLabel,
|
|
1506
|
+
export { addAssignees, addLabels, addReviewers, assertPrNotInMergeQueue, commitFiles, createFork, createPr, deleteLabel, ensureComment, ensureCommentRemoval, ensureIssue, ensureIssueClosing, findFork, findIssue, findPr, getBranchForceRebase, getBranchPr, getBranchStatus, getBranchStatusCheck, getIssue, getIssueList, getJsonFile, getPr, getPrList, getRawFile, getRepos, getVulnerabilityAlerts, github_exports, id, initPlatform, initRepo, isGHApp, listForks, massageMarkdown, maxBodyLength, mergePr, reattemptPlatformAutomerge, resetConfigs, setBranchStatus, tryReuseAutoclosedPr, updatePr };
|
|
1498
1507
|
|
|
1499
1508
|
//# sourceMappingURL=index.js.map
|