renovate 44.26.3 → 44.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/options/index.js +2 -1
- package/dist/config/options/index.js.map +1 -1
- package/dist/global-config-option-defaults.generated.js +1 -1
- package/dist/global-config-option-defaults.generated.js.map +1 -1
- package/dist/modules/manager/fingerprint.generated.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/gomod/artifacts.js +24 -2
- package/dist/modules/manager/gomod/artifacts.js.map +1 -1
- package/dist/modules/manager/gomod/package-tree.js +52 -0
- package/dist/modules/manager/gomod/package-tree.js.map +1 -0
- package/dist/modules/manager/nuget/package-tree.js +4 -15
- package/dist/modules/manager/nuget/package-tree.js.map +1 -1
- package/dist/util/fs/util.js +19 -1
- package/dist/util/fs/util.js.map +1 -1
- package/dist/util/minimatch.js +1 -11
- package/dist/util/minimatch.js.map +1 -1
- package/package.json +2 -2
- package/renovate-schema.json +3 -2
|
@@ -23,7 +23,7 @@ const globalConfigOptionDefaults = {
|
|
|
23
23
|
"detectHostRulesFromEnv": false,
|
|
24
24
|
"dockerChildPrefix": "renovate_",
|
|
25
25
|
"dockerMaxPages": 20,
|
|
26
|
-
"dockerSidecarImage": "ghcr.io/renovatebot/base-image:13.
|
|
26
|
+
"dockerSidecarImage": "ghcr.io/renovatebot/base-image:13.86.0",
|
|
27
27
|
"dockerUser": "12021",
|
|
28
28
|
"executionTimeout": 15,
|
|
29
29
|
"exposeAllEnv": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-config-option-defaults.generated.js","names":[],"sources":["../lib/global-config-option-defaults.generated.ts"],"sourcesContent":["\nexport const globalConfigOptionDefaults: Record<string, unknown> = {\n \"allowCustomCrateRegistries\": false,\n \"allowedCommands\": [],\n \"allowedEnv\": [],\n \"allowedHeaders\": [\n \"X-*\"\n ],\n \"allowedUnsafeExecutions\": [],\n \"allowPlugins\": false,\n \"allowScripts\": false,\n \"allowShellExecutorForPostUpgradeCommands\": false,\n \"autodiscover\": false,\n \"bbUseDevelopmentBranch\": false,\n \"binarySource\": \"install\",\n \"cacheHardTtlMinutes\": 10080,\n \"cachePrivatePackages\": false,\n \"cacheTtlOverride\": {},\n \"checkedBranches\": [],\n \"configValidationError\": false,\n \"customEnvVariables\": {},\n \"deleteAdditionalConfigFile\": false,\n \"deleteConfigFile\": false,\n \"detectGlobalManagerConfig\": false,\n \"detectHostRulesFromEnv\": false,\n \"dockerChildPrefix\": \"renovate_\",\n \"dockerMaxPages\": 20,\n \"dockerSidecarImage\": \"ghcr.io/renovatebot/base-image:13.
|
|
1
|
+
{"version":3,"file":"global-config-option-defaults.generated.js","names":[],"sources":["../lib/global-config-option-defaults.generated.ts"],"sourcesContent":["\nexport const globalConfigOptionDefaults: Record<string, unknown> = {\n \"allowCustomCrateRegistries\": false,\n \"allowedCommands\": [],\n \"allowedEnv\": [],\n \"allowedHeaders\": [\n \"X-*\"\n ],\n \"allowedUnsafeExecutions\": [],\n \"allowPlugins\": false,\n \"allowScripts\": false,\n \"allowShellExecutorForPostUpgradeCommands\": false,\n \"autodiscover\": false,\n \"bbUseDevelopmentBranch\": false,\n \"binarySource\": \"install\",\n \"cacheHardTtlMinutes\": 10080,\n \"cachePrivatePackages\": false,\n \"cacheTtlOverride\": {},\n \"checkedBranches\": [],\n \"configValidationError\": false,\n \"customEnvVariables\": {},\n \"deleteAdditionalConfigFile\": false,\n \"deleteConfigFile\": false,\n \"detectGlobalManagerConfig\": false,\n \"detectHostRulesFromEnv\": false,\n \"dockerChildPrefix\": \"renovate_\",\n \"dockerMaxPages\": 20,\n \"dockerSidecarImage\": \"ghcr.io/renovatebot/base-image:13.86.0\",\n \"dockerUser\": \"12021\",\n \"executionTimeout\": 15,\n \"exposeAllEnv\": false,\n \"forceCli\": true,\n \"forkCreation\": true,\n \"githubTokenWarn\": true,\n \"gitNoVerify\": [\n \"commit\",\n \"push\"\n ],\n \"gitTimeout\": 0,\n \"gitUrl\": \"default\",\n \"httpCacheTtlDays\": 90,\n \"ignorePrAuthor\": false,\n \"includeMirrors\": false,\n \"inheritConfig\": false,\n \"inheritConfigFileName\": \"org-inherited-config.json\",\n \"inheritConfigRepoName\": \"{{parentOrg}}/renovate-config\",\n \"inheritConfigStrict\": false,\n \"mergeConfidenceDatasources\": [\n \"go\",\n \"maven\",\n \"npm\",\n \"nuget\",\n \"packagist\",\n \"pypi\",\n \"rubygems\"\n ],\n \"mergeConfidenceEndpoint\": \"https://developer.mend.io/\",\n \"migratePresets\": {},\n \"onboardingBranch\": \"renovate/configure\",\n \"onboardingConfig\": {\n \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\"\n },\n \"onboardingConfigFileName\": \"renovate.json\",\n \"onboardingNoDeps\": \"auto\",\n \"onboardingPrTitle\": \"Configure Renovate\",\n \"onboardingRebaseCheckbox\": false,\n \"optimizeForDisabled\": false,\n \"persistRepoData\": false,\n \"platform\": \"github\",\n \"prCacheSyncMaxPages\": 100,\n \"prCommitsPerRunLimit\": 0,\n \"presetCachePersistence\": false,\n \"processEnv\": {},\n \"productLinks\": {\n \"documentation\": \"https://docs.renovatebot.com/\",\n \"help\": \"https://github.com/renovatebot/renovate/discussions\",\n \"homepage\": \"https://github.com/renovatebot/renovate\"\n },\n \"rebaseAllOpenBranches\": false,\n \"reportFormatting\": false,\n \"repositoryCache\": \"disabled\",\n \"repositoryCacheForceLocal\": false,\n \"repositoryCacheType\": \"local\",\n \"requireConfig\": \"required\",\n \"s3PathStyle\": false,\n \"secrets\": {},\n \"unicodeEmoji\": true,\n \"useCloudMetadataServices\": true,\n \"userAgent\": \"Renovate/{{renovateVersion}} (https://github.com/renovatebot/renovate)\",\n \"variables\": {}\n};\n"],"mappings":";AACA,MAAa,6BAAsD;CACjE,8BAA8B;CAC9B,mBAAmB,CAAC;CACpB,cAAc,CAAC;CACf,kBAAkB,CAChB,KACF;CACA,2BAA2B,CAAC;CAC5B,gBAAgB;CAChB,gBAAgB;CAChB,4CAA4C;CAC5C,gBAAgB;CAChB,0BAA0B;CAC1B,gBAAgB;CAChB,uBAAuB;CACvB,wBAAwB;CACxB,oBAAoB,CAAC;CACrB,mBAAmB,CAAC;CACpB,yBAAyB;CACzB,sBAAsB,CAAC;CACvB,8BAA8B;CAC9B,oBAAoB;CACpB,6BAA6B;CAC7B,0BAA0B;CAC1B,qBAAqB;CACrB,kBAAkB;CAClB,sBAAsB;CACtB,cAAc;CACd,oBAAoB;CACpB,gBAAgB;CAChB,YAAY;CACZ,gBAAgB;CAChB,mBAAmB;CACnB,eAAe,CACb,UACA,MACF;CACA,cAAc;CACd,UAAU;CACV,oBAAoB;CACpB,kBAAkB;CAClB,kBAAkB;CAClB,iBAAiB;CACjB,yBAAyB;CACzB,yBAAyB;CACzB,uBAAuB;CACvB,8BAA8B;EAC5B;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,2BAA2B;CAC3B,kBAAkB,CAAC;CACnB,oBAAoB;CACpB,oBAAoB,EAClB,WAAW,oDACb;CACA,4BAA4B;CAC5B,oBAAoB;CACpB,qBAAqB;CACrB,4BAA4B;CAC5B,uBAAuB;CACvB,mBAAmB;CACnB,YAAY;CACZ,uBAAuB;CACvB,wBAAwB;CACxB,0BAA0B;CAC1B,cAAc,CAAC;CACf,gBAAgB;EACd,iBAAiB;EACjB,QAAQ;EACR,YAAY;CACd;CACA,yBAAyB;CACzB,oBAAoB;CACpB,mBAAmB;CACnB,6BAA6B;CAC7B,uBAAuB;CACvB,iBAAiB;CACjB,eAAe;CACf,WAAW,CAAC;CACZ,gBAAgB;CAChB,4BAA4B;CAC5B,aAAa;CACb,aAAa,CAAC;AAChB"}
|
|
@@ -47,7 +47,7 @@ hashMap.set("gitlabci", "33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356
|
|
|
47
47
|
hashMap.set("gitlabci-include", "ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb");
|
|
48
48
|
hashMap.set("glasskube", "93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30");
|
|
49
49
|
hashMap.set("gleam", "02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39");
|
|
50
|
-
hashMap.set("gomod", "
|
|
50
|
+
hashMap.set("gomod", "7e9befd57c32420da2061445defde5a02bebf4898bef0106614bab95a8713a2f");
|
|
51
51
|
hashMap.set("gradle", "550f1107f0ac27d18fa76a7d5c0c0b317b5df4156fc12cfd378573ccfe26fca0");
|
|
52
52
|
hashMap.set("gradle-wrapper", "799d9bb8d9dead673fb513ba4936395f14da30897d33a9df46b3266e1b835d5d");
|
|
53
53
|
hashMap.set("haskell-cabal", "f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891");
|
|
@@ -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('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','b2acfc0a6164e9a279daa724777c423f84572dafb0df09b1b0cf6f205f9eb6d0');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','40f6a862b4e72fcc7262ee41f8b570ea3fd5600d6d552b94ed3301bb201f5db5');\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','4f70ac0377893683eb30013bf4d23a8bd7213a883847c9eaadf1217f5f190ee1');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','13377c53df158cdfc58330f73682fadc3e88e57f0d22c9245c0ffd62a495edf1');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','cf48ab5a573a28bf14d5e6c84eed9ca08b7f0cb5b7fc51d795c21c7254bb9dd1');\nhashMap.set('composer','869aab556d9b2ca2b743a790a7c0d7d104d62bbcbcc2185c44c64543d70413ba');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','06a52206ba5542f99f056c832245196afd4b78bffeca088f710a5df958a9693d');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','a43016a9a469e0472f00855c8db64bb65ef5ffa773e7bbfade02a21400f67690');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','e95bbc9b69a36dee82e255e8983640b7179cb5f17d24b035c6cf01d9635b35bd');\nhashMap.set('github-actions','0a77751d4307d7e923bf2d05bf49084e77a23d7f1e498a1373202dd1ebdcc48a');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','073cf874c14d8f323aa7dc467e757b39e249e4617be1ce10926ee68763f89381');\nhashMap.set('gradle','550f1107f0ac27d18fa76a7d5c0c0b317b5df4156fc12cfd378573ccfe26fca0');\nhashMap.set('gradle-wrapper','799d9bb8d9dead673fb513ba4936395f14da30897d33a9df46b3266e1b835d5d');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','ab828a1877cfe029ed5f8dd2a026409cd5e6431705af3aac3f56a3bc4f827508');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','4088a90bd8be4ae1bcb85dc4d34d3fbbb75e72bd33d144284e7e1f0e726c8d3b');\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','4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','fb5f6fbf45b318ca277d6d9f7fee22680f4b99c7ff9170a50315122918d2e007');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','779344a4e259e0c28bfadfeb435dd72feb7224d7346d038a1c35f02deb1357bc');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8463d355091f5f167e3f4a8adbebfe49310ad9ac45c89d60455ef8e110df4a49');\nhashMap.set('mix','5eb001e2af7cd664d811ad2d9928bf785527ed292de1e567de57f7e2cecc1ecc');\nhashMap.set('nix','d3283c2b948695a16c1089da4e2689faacd50eaa7d734d6fa5d6661aef6db7e7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','95ddcec26d4db9ee54028f00fdcac118c458cd1513623737dd1b3f79d05a11a4');\nhashMap.set('nuget','d4f3c5cbc0f6e6e8baf80b8ad8e184d186ff6686486b1c97995a0c87151abbe3');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','f5dc3c8434845dd814bc649c619323dcb69e3ec5da2d361d353bdf6ae3cc5d88');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','9711b1c00da18ff785e624c50e4b042519e7ad615c5f018f08459fac8394fec5');\nhashMap.set('pip_requirements','537ef9d7b43b5adcfbfbb86392e0c7a8a0ee91c804118af83cf92e1868949e1a');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','a7d45859427263c17f1109a08c8b48a1f24812290f9853013ec1774f2484a769');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','6cf6bc5116458761b2d6779caf465d6e26768fbe6e2ffba54b5da981aa8c385f');\nhashMap.set('pre-commit','17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','a2ded51959d48e053b811b3b9330b2460fc61d0fc2e74a400a546e4f82d25767');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','eb5f7c3c4dabf28eed36916269ca9be16ab9ddb83993db03ea66b9195ad7bdc6');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','b6723d78863803e688d2b85cc72bc43657d79ff0cca3bc719e7d96cfd34ceb69');\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','ee9cc316c73ab0944da494bf36cfeafba8e79a36ec77753b9f341c8e80f1d602');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('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vF,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('argocd','5d35b1992e53130bf83b0e59a0f90ccd3a78919974c69044f306dc5d162f48ce');\nhashMap.set('asdf','b2acfc0a6164e9a279daa724777c423f84572dafb0df09b1b0cf6f205f9eb6d0');\nhashMap.set('azure-pipelines','4f635b0ecd388ee266d992e8281fd40e3db2f5867d86fc1cbce72dc33a66e796');\nhashMap.set('batect','bd9208444eff1a4958061484db66a47b616c31f15a8d49d23b75c4560fcee83e');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','4994a8bd86d5bfb169d67c08efd8509b58c368c2bf3dd9bbe42553c0fabc3f1a');\nhashMap.set('bazel-module','40f6a862b4e72fcc7262ee41f8b570ea3fd5600d6d552b94ed3301bb201f5db5');\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','4f70ac0377893683eb30013bf4d23a8bd7213a883847c9eaadf1217f5f190ee1');\nhashMap.set('cake','ed6d14c96161f1d3d927adc7e333b96585164e1f25151a87990914d57ae17fe1');\nhashMap.set('cargo','13377c53df158cdfc58330f73682fadc3e88e57f0d22c9245c0ffd62a495edf1');\nhashMap.set('cdnurl','d3edf6cdc38e92eb43ff5a2b4e8df6a6a13154cf83244725c39e28d7e6ea9177');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','8c0c739f7e4082bbfe8e3fdffebaf43e26f70a1314d95b306e9b93e4f4297886');\nhashMap.set('cocoapods','cf48ab5a573a28bf14d5e6c84eed9ca08b7f0cb5b7fc51d795c21c7254bb9dd1');\nhashMap.set('composer','869aab556d9b2ca2b743a790a7c0d7d104d62bbcbcc2185c44c64543d70413ba');\nhashMap.set('conan','74ca922a0ffdf1a9dd44b83eb2b3a36c56c7d792031e3a4a484f293046be3ecd');\nhashMap.set('copier','06a52206ba5542f99f056c832245196afd4b78bffeca088f710a5df958a9693d');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','a43016a9a469e0472f00855c8db64bb65ef5ffa773e7bbfade02a21400f67690');\nhashMap.set('deps-edn','c87dd5e88587147ad1a78f047b814f3c4aa60d6de30d0c49d849391eeaf1b64c');\nhashMap.set('devbox','a608d1e6db93a8f997d41f8dee7b67533452a956057865978342e2819272e0a9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','5441af5b5abf8d347e46002d47f02f85743401bda28232f49fb7b3bbb772a4fb');\nhashMap.set('dockerfile','54122792bf8ea0be98e0a0716e627e3115b40a5f0155ccd7ae0cfc52424a3478');\nhashMap.set('droneci','237c8de87b9bf653fb943b56e84e99c45f6d86ae27d86e599b3f3f99c35ba8ee');\nhashMap.set('fleet','d73d5d35f10df0599a561d9c8d25f3935350407d0e3bd3a1d1545295f278912e');\nhashMap.set('flux','70833dd068ea0a746a9392469e7904021562c7629428d0cd554603bad4eb6ce5');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','e95bbc9b69a36dee82e255e8983640b7179cb5f17d24b035c6cf01d9635b35bd');\nhashMap.set('github-actions','0a77751d4307d7e923bf2d05bf49084e77a23d7f1e498a1373202dd1ebdcc48a');\nhashMap.set('gitlabci','33c264edf7837fb8fbc4cf0078c8bd2d5a75431039b1db65bf47356df7753125');\nhashMap.set('gitlabci-include','ef696c478c2ac1723b3aca070ba9779be0e702fff0844054251ba0029523d0eb');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','02389785183c39d2896d7893414c5e1060023f95c1fe7b595bd06cc5c1186d39');\nhashMap.set('gomod','7e9befd57c32420da2061445defde5a02bebf4898bef0106614bab95a8713a2f');\nhashMap.set('gradle','550f1107f0ac27d18fa76a7d5c0c0b317b5df4156fc12cfd378573ccfe26fca0');\nhashMap.set('gradle-wrapper','799d9bb8d9dead673fb513ba4936395f14da30897d33a9df46b3266e1b835d5d');\nhashMap.set('haskell-cabal','f232d0e883235f74ed71fd9de4a7468e5fcbda9a1af5beb56c24657f7bf2e891');\nhashMap.set('helm-requirements','4d90e5e18a380876ad48e21e1ad88ea62e25d973a1ddaa3763447fc0a9f9915b');\nhashMap.set('helm-values','b5c52c6a27d805557418c585c5d3030c95ee641d53057021f3fe060f81b6e1af');\nhashMap.set('helmfile','ab828a1877cfe029ed5f8dd2a026409cd5e6431705af3aac3f56a3bc4f827508');\nhashMap.set('helmsman','ef9680c612f702c7f07aea9b6e5d811e91214dcfa5755c9f3803e9528090935e');\nhashMap.set('helmv3','4088a90bd8be4ae1bcb85dc4d34d3fbbb75e72bd33d144284e7e1f0e726c8d3b');\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','4023ef4cac55fe58f8d9744ae86b13532298926e35e22d250334cde55c3386ff');\nhashMap.set('kotlin-script','99ef296792a0ca575ed31d3defb514b05a58083dc01c52ea0890c69d867ba1dd');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','fb5f6fbf45b318ca277d6d9f7fee22680f4b99c7ff9170a50315122918d2e007');\nhashMap.set('leiningen','133fca2c3423f53f2ccc22518153ddbcafbf0f4812376c77e952eb3d24d81f85');\nhashMap.set('maven','f084cdc88320ca1e82af957d0008e7c9ce991d3282cb428f3108a5722239cead');\nhashMap.set('maven-wrapper','779344a4e259e0c28bfadfeb435dd72feb7224d7346d038a1c35f02deb1357bc');\nhashMap.set('meteor','4a93a326b27bedfe52118e27e06f39fecd7c55bd4cd7fccec4cb120cac14cec4');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','8463d355091f5f167e3f4a8adbebfe49310ad9ac45c89d60455ef8e110df4a49');\nhashMap.set('mix','5eb001e2af7cd664d811ad2d9928bf785527ed292de1e567de57f7e2cecc1ecc');\nhashMap.set('nix','d3283c2b948695a16c1089da4e2689faacd50eaa7d734d6fa5d6661aef6db7e7');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','95ddcec26d4db9ee54028f00fdcac118c458cd1513623737dd1b3f79d05a11a4');\nhashMap.set('nuget','d4f3c5cbc0f6e6e8baf80b8ad8e184d186ff6686486b1c97995a0c87151abbe3');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','32233a1a8a2725699d7448ba438e3d0b78141f7799cd2b588de278d41e26ed10');\nhashMap.set('pep621','f5dc3c8434845dd814bc649c619323dcb69e3ec5da2d361d353bdf6ae3cc5d88');\nhashMap.set('pep723','b96683163de63ed93207ec0538066705b1e58a1cd5b8bd11c63fc28b26bddba1');\nhashMap.set('pip-compile','9711b1c00da18ff785e624c50e4b042519e7ad615c5f018f08459fac8394fec5');\nhashMap.set('pip_requirements','537ef9d7b43b5adcfbfbb86392e0c7a8a0ee91c804118af83cf92e1868949e1a');\nhashMap.set('pip_setup','0175fe550c19d9bd31c978bd83fdc088cb40fcacd5d6751f640164274ae64e61');\nhashMap.set('pipenv','a7d45859427263c17f1109a08c8b48a1f24812290f9853013ec1774f2484a769');\nhashMap.set('pixi','3732f052617efd5007ddbe31091a2ba026909288bac4cbbe6d2bd6ac64d85393');\nhashMap.set('poetry','6cf6bc5116458761b2d6779caf465d6e26768fbe6e2ffba54b5da981aa8c385f');\nhashMap.set('pre-commit','17a5f183985ebffe98785a541d3609bf25efedc387deb3d50e9f00f02b25f615');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','a2ded51959d48e053b811b3b9330b2460fc61d0fc2e74a400a546e4f82d25767');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','e1fc88a4e14cd595e89bb3d79b4adf2add3ce5eb80f75276e712c32598cca53d');\nhashMap.set('renovate-config','2a4e4fb671aed5d0c900b8d54c31bfef46ca36d0f4e16b00ff73377b9c09fb69');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e508c2e2fb8d44e6cbec20f449c8eed096728566e6058187269c637930d388fb');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','7dea08c5708625e753bd56918bc214df7fb4d8543a26e936926a21ab43b5f785');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','05b3158e88771ed4629e171592cf4f1bf0ff342f8aeae89be0b340c630cc6d8e');\nhashMap.set('swift','eb5f7c3c4dabf28eed36916269ca9be16ab9ddb83993db03ea66b9195ad7bdc6');\nhashMap.set('tekton','fdc5b9b5edec2a90cda2f858f3ebc532aa8efb1187d1e0b7c89b07796e9cb6cd');\nhashMap.set('terraform','b6723d78863803e688d2b85cc72bc43657d79ff0cca3bc719e7d96cfd34ceb69');\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','ee9cc316c73ab0944da494bf36cfeafba8e79a36ec77753b9f341c8e80f1d602');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','dbe6889ea021a05127fed06226d73366fdada2ae577147a5c027996f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Q,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"}
|
|
@@ -10,6 +10,7 @@ import { isValid as isVersion } from "../../versioning/semver/index.js";
|
|
|
10
10
|
import { getRepoStatus } from "../../../util/git/index.js";
|
|
11
11
|
import { withGitEnvironment } from "../../../util/git/exec.js";
|
|
12
12
|
import { getExtraDepsNotice } from "./artifacts-extra.js";
|
|
13
|
+
import { getGoModulesInTidyOrder } from "./package-tree.js";
|
|
13
14
|
import { isString } from "@sindresorhus/is";
|
|
14
15
|
import { quote } from "shlex";
|
|
15
16
|
import upath from "upath";
|
|
@@ -129,7 +130,8 @@ async function updateArtifacts({ packageFileName: goModFileName, updatedDeps, ne
|
|
|
129
130
|
let tidyOpts = "";
|
|
130
131
|
if (config.postUpdateOptions?.includes("gomodTidy1.17")) tidyOpts += " -compat=1.17";
|
|
131
132
|
if (config.postUpdateOptions?.includes("gomodTidyE")) tidyOpts += " -e";
|
|
132
|
-
const
|
|
133
|
+
const isGoModTidyAllRequired = config.postUpdateOptions?.includes("gomodTidyAll") === true;
|
|
134
|
+
const isGoModTidyRequired = !mustSkipGoModTidy && (config.postUpdateOptions?.includes("gomodTidy") === true || config.postUpdateOptions?.includes("gomodTidy1.17") === true || config.postUpdateOptions?.includes("gomodTidyE") === true || isGoModTidyAllRequired || config.updateType === "major" && isImportPathUpdateRequired);
|
|
133
135
|
if (isGoModTidyRequired) {
|
|
134
136
|
args = `mod tidy${modFileFlag}${tidyOpts}`;
|
|
135
137
|
logger.debug("go mod tidy command included");
|
|
@@ -162,13 +164,25 @@ async function updateArtifacts({ packageFileName: goModFileName, updatedDeps, ne
|
|
|
162
164
|
logger.debug("go mod tidy command included");
|
|
163
165
|
execCommands.push(`${cmd} ${args}`);
|
|
164
166
|
}
|
|
167
|
+
let dependentModules = [];
|
|
168
|
+
if (isGoModTidyAllRequired) try {
|
|
169
|
+
dependentModules = await getGoModulesInTidyOrder(goModFileName);
|
|
170
|
+
for (const dependent of dependentModules) {
|
|
171
|
+
const dir = upath.relative(goModDir, upath.dirname(dependent));
|
|
172
|
+
execCommands.push(`${cmd} -C ${quote(dir)} mod tidy${tidyOpts}`);
|
|
173
|
+
}
|
|
174
|
+
logger.debug({ dependentModules }, "go mod tidy commands included");
|
|
175
|
+
} catch (err) {
|
|
176
|
+
logger.warn({ err }, "Failed to find dependent Go modules");
|
|
177
|
+
}
|
|
165
178
|
if (useGoGenerate) if (goGenerateAllowed) {
|
|
166
179
|
logger.debug("go generate command included");
|
|
167
180
|
execCommands.push(`${cmd} generate ./...`);
|
|
168
181
|
} else logger.once.warn(`go generate command requested as a post update action, but goGenerate is not permitted in the allowedUnsafeExecutions`);
|
|
169
182
|
await gitExec(execCommands, execOptions);
|
|
170
183
|
const status = await getRepoStatus();
|
|
171
|
-
|
|
184
|
+
const dependentFiles = dependentModules.flatMap((f) => [f, f.replace(regEx(/\.mod$/), ".sum")]);
|
|
185
|
+
if (!status.modified.includes(sumFileName) && !status.modified.includes(goModFileName) && !status.modified.includes(goWorkSumFileName) && !dependentFiles.some((f) => status.modified.includes(f))) return null;
|
|
172
186
|
const res = [];
|
|
173
187
|
if (status.modified.includes(sumFileName)) {
|
|
174
188
|
logger.debug("Returning updated go.sum");
|
|
@@ -186,6 +200,14 @@ async function updateArtifacts({ packageFileName: goModFileName, updatedDeps, ne
|
|
|
186
200
|
contents: await readLocalFile(goWorkSumFileName)
|
|
187
201
|
} });
|
|
188
202
|
}
|
|
203
|
+
for (const f of dependentFiles) if (status.modified.includes(f)) {
|
|
204
|
+
logger.trace(`Returning updated ${f}`);
|
|
205
|
+
res.push({ file: {
|
|
206
|
+
type: "addition",
|
|
207
|
+
path: f,
|
|
208
|
+
contents: await readLocalFile(f)
|
|
209
|
+
} });
|
|
210
|
+
}
|
|
189
211
|
if (isImportPathUpdateRequired) {
|
|
190
212
|
logger.debug("Returning updated go source files for import path changes");
|
|
191
213
|
for (const f of status.modified) if (f.endsWith(".go")) res.push({ file: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","names":["valid","major","isValid"],"sources":["../../../../lib/modules/manager/gomod/artifacts.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport semver from 'semver';\nimport { quote } from 'shlex';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport {\n ensureCacheDir,\n findLocalSiblingOrParent,\n isValidLocalPath,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../util/git/exec.ts';\nimport { getRepoStatus } from '../../../util/git/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { isValid } from '../../versioning/semver/index.ts';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsConfig,\n UpdateArtifactsResult,\n} from '../types.ts';\nimport { getExtraDepsNotice } from './artifacts-extra.ts';\n\nconst { major, valid } = semver;\nconst gitExec = withGitEnvironment(['go']);\n\nfunction getUpdateImportPathCmds(\n updatedDeps: PackageDependency[],\n { constraints }: UpdateArtifactsConfig,\n): string[] {\n // Check if we fail to parse any major versions and log that they're skipped\n const invalidMajorDeps = updatedDeps.filter(\n ({ newVersion }) => !valid(newVersion),\n );\n if (invalidMajorDeps.length > 0) {\n invalidMajorDeps.forEach(({ depName }) =>\n logger.warn(\n { depName },\n 'Ignoring dependency: Could not get major version',\n ),\n );\n }\n\n const updateImportCommands = updatedDeps\n .filter(\n ({ newVersion }) =>\n valid(newVersion) && !newVersion!.endsWith('+incompatible'),\n )\n .map(({ depName, newVersion }) => ({\n depName: depName!,\n newMajor: major(newVersion!),\n }))\n // Skip path updates going from v0 to v1\n .filter(\n ({ depName, newMajor }) =>\n depName.startsWith('gopkg.in/') || newMajor > 1,\n )\n\n .map(\n ({ depName, newMajor }) =>\n `mod upgrade --mod-name=${quote(depName)} -t=${newMajor}`,\n );\n\n if (updateImportCommands.length > 0) {\n let installMarwanModArgs =\n 'install github.com/marwan-at-work/mod/cmd/mod@latest';\n const gomodModCompatibility = constraints?.gomodMod;\n if (gomodModCompatibility) {\n if (\n gomodModCompatibility.startsWith('v') &&\n isValid(gomodModCompatibility.replace(regEx(/^v/), ''))\n ) {\n installMarwanModArgs = installMarwanModArgs.replace(\n regEx(/@latest$/),\n `@${gomodModCompatibility}`,\n );\n } else {\n logger.debug(\n { gomodModCompatibility },\n 'marwan-at-work/mod compatibility range is not valid - skipping',\n );\n }\n } else {\n logger.debug(\n 'No marwan-at-work/mod compatibility range found - installing marwan-at-work/mod latest',\n );\n }\n updateImportCommands.unshift(`go ${installMarwanModArgs}`);\n }\n\n return updateImportCommands;\n}\n\nfunction useModcacherw(goVersion: string | undefined): boolean {\n if (!isString(goVersion)) {\n return true;\n }\n\n return semver.intersects(goVersion, `>=1.14`);\n}\n\nexport async function updateArtifacts({\n packageFileName: goModFileName,\n updatedDeps,\n newPackageFileContent: newGoModContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`gomod.updateArtifacts(${goModFileName})`);\n\n const sumFileName = goModFileName.replace(regEx(/\\.mod$/), '.sum');\n const existingGoSumContent = await readLocalFile(sumFileName);\n if (!existingGoSumContent) {\n logger.debug('No go.sum found');\n return null;\n }\n const goModDir = upath.dirname(goModFileName);\n const goModFileBaseName = upath.basename(goModFileName);\n const modFileFlag =\n goModFileBaseName === 'go.mod'\n ? ''\n : ` -modfile=${quote(goModFileBaseName)}`;\n\n // The \"vendor\" directory can be next to the go.mod, but also in the parent directory in case\n // the go workspaces are used.\n const vendorDir = await findLocalSiblingOrParent(goModFileName, 'vendor');\n const vendorModulesFileName = upath.join(vendorDir ?? '', 'modules.txt');\n const useVendor =\n !!config.postUpdateOptions?.includes('gomodVendor') ||\n (!config.postUpdateOptions?.includes('gomodSkipVendor') &&\n vendorDir &&\n (await readLocalFile(vendorModulesFileName)) !== null);\n let massagedGoMod = newGoModContent;\n const useGoGenerate = !!config.postUpdateOptions?.includes('goGenerate');\n const allowedUnsafeExecutions = GlobalConfig.get('allowedUnsafeExecutions');\n const goGenerateAllowed = allowedUnsafeExecutions?.includes('goGenerate');\n\n if (config.postUpdateOptions?.includes('gomodMassage')) {\n // Regex match inline replace directive, example:\n // replace golang.org/x/net v1.2.3 => example.com/fork/net v1.4.5\n // https://go.dev/ref/mod#go-mod-file-replace\n\n // replace bracket after comments, so it doesn't break the regex, doing a complex regex causes problems\n // when there's a comment and \")\" after it, the regex will read replace block until comment.. and stop.\n massagedGoMod = massagedGoMod\n .split('\\n')\n .map((line) => {\n if (line.trim().startsWith('//')) {\n return line.replace(')', 'renovate-replace-bracket');\n }\n return line;\n })\n .join('\\n');\n\n const inlineReplaceRegEx = regEx(\n /(\\r?\\n)(replace\\s+[^\\s]+\\s+=>\\s+\\.\\.\\/.*)/g,\n );\n\n // $1 will be matched with the (\\r?n) group\n // $2 will be matched with the inline replace match, example\n // \"// renovate-replace replace golang.org/x/net v1.2.3 => example.com/fork/net v1.4.5\"\n const inlineCommentOut = '$1// renovate-replace $2';\n\n // Regex match replace directive block, example:\n // replace (\n // golang.org/x/net v1.2.3 => example.com/fork/net v1.4.5\n // )\n const blockReplaceRegEx = regEx(/(\\r?\\n)replace\\s*\\([^)]+\\s*\\)/g);\n\n /**\n * replacerFunction for commenting out replace blocks\n * @param match A string representing a golang replace directive block\n * @returns A commented out block with // renovate-replace\n */\n function blockCommentOut(match: string): string {\n return match.replace(/(\\r?\\n)/g, '$1// renovate-replace ');\n }\n\n // Comment out golang replace directives\n massagedGoMod = massagedGoMod\n .replace(inlineReplaceRegEx, inlineCommentOut)\n .replace(blockReplaceRegEx, blockCommentOut);\n\n if (massagedGoMod !== newGoModContent) {\n logger.debug(\n 'Removed some relative replace statements and comments from go.mod',\n );\n }\n }\n const goConstraints = deriveGoToolchainConstraints(config, newGoModContent);\n\n try {\n await writeLocalFile(goModFileName, massagedGoMod);\n\n const cmd = 'go';\n const env = getEnv();\n const execOptions: ExecOptions = {\n cwdFile: goModFileName,\n extraEnv: {\n GOPATH: await ensureCacheDir('go'),\n GOPROXY: env.GOPROXY,\n GOPRIVATE: env.GOPRIVATE,\n GONOPROXY: env.GONOPROXY,\n GONOSUMDB: env.GONOSUMDB,\n GOSUMDB: env.GOSUMDB,\n GOINSECURE: env.GOINSECURE,\n /* v8 ignore next -- TODO: add test */\n GOFLAGS: useModcacherw(goConstraints) ? '-modcacherw' : null,\n CGO_ENABLED: GlobalConfig.get('binarySource') === 'docker' ? '0' : null,\n },\n docker: {},\n toolConstraints: [\n {\n toolName: 'golang',\n constraint: goConstraints,\n },\n ],\n };\n\n const execCommands: string[] = [];\n\n let goGetDirs: string | undefined;\n if (config.goGetDirs) {\n goGetDirs = config.goGetDirs\n .filter((dir) => {\n const isValid = isValidLocalPath(dir);\n if (!isValid) {\n logger.warn({ dir }, 'Invalid path in goGetDirs');\n }\n return isValid;\n })\n .map(quote)\n .join(' ');\n\n if (goGetDirs === '') {\n throw new Error('Invalid goGetDirs');\n }\n }\n\n let args = `get${modFileFlag} `;\n\n if (goConstraints && !semver.intersects(goConstraints, `>=1.18`)) {\n // For Go versions < 1.18, we need to use the -d flag to avoid builds or installs\n // https://go.dev/doc/go1.18#go-get\n args += `-d `;\n }\n\n args += `-t ${goGetDirs ?? './...'}`;\n logger.trace({ cmd, args }, 'go get command included');\n execCommands.push(`${cmd} ${args}`);\n\n // Update import paths on major updates\n const isImportPathUpdateRequired =\n config.postUpdateOptions?.includes('gomodUpdateImportPaths') &&\n config.updateType === 'major';\n\n if (isImportPathUpdateRequired) {\n const updateImportCmds = getUpdateImportPathCmds(updatedDeps, config);\n if (updateImportCmds.length > 0) {\n logger.debug(updateImportCmds, 'update import path commands included');\n // The updates\n execCommands.push(...updateImportCmds);\n }\n }\n\n const mustSkipGoModTidy =\n !config.postUpdateOptions?.includes('gomodUpdateImportPaths') &&\n config.updateType === 'major';\n if (mustSkipGoModTidy) {\n logger.debug('go mod tidy command skipped');\n }\n\n let tidyOpts = '';\n if (config.postUpdateOptions?.includes('gomodTidy1.17')) {\n tidyOpts += ' -compat=1.17';\n }\n if (config.postUpdateOptions?.includes('gomodTidyE')) {\n tidyOpts += ' -e';\n }\n\n const isGoModTidyRequired =\n !mustSkipGoModTidy &&\n (config.postUpdateOptions?.includes('gomodTidy') === true ||\n config.postUpdateOptions?.includes('gomodTidy1.17') === true ||\n config.postUpdateOptions?.includes('gomodTidyE') === true ||\n (config.updateType === 'major' && isImportPathUpdateRequired));\n if (isGoModTidyRequired) {\n args = `mod tidy${modFileFlag}${tidyOpts}`;\n logger.debug('go mod tidy command included');\n execCommands.push(`${cmd} ${args}`);\n }\n\n let goWorkSumFileName = upath.join(goModDir, 'go.work.sum');\n if (useVendor) {\n // If we find a go.work, then use go workspace vendoring.\n const goWorkFile = await findLocalSiblingOrParent(\n goModFileName,\n 'go.work',\n );\n\n if (goWorkFile) {\n goWorkSumFileName = upath.join(\n upath.dirname(goWorkFile),\n 'go.work.sum',\n );\n\n args = 'work vendor';\n logger.debug('using go work vendor');\n execCommands.push(`${cmd} ${args}`);\n\n args = 'work sync';\n logger.debug('using go work sync');\n execCommands.push(`${cmd} ${args}`);\n } else {\n args = `mod vendor${modFileFlag}`;\n logger.debug('using go mod vendor');\n execCommands.push(`${cmd} ${args}`);\n }\n\n if (isGoModTidyRequired) {\n args = `mod tidy${modFileFlag}${tidyOpts}`;\n logger.debug('go mod tidy command included');\n execCommands.push(`${cmd} ${args}`);\n }\n }\n\n // We tidy one more time as a solution for #6795\n if (isGoModTidyRequired) {\n args = `mod tidy${modFileFlag}${tidyOpts}`;\n logger.debug('go mod tidy command included');\n execCommands.push(`${cmd} ${args}`);\n }\n\n if (useGoGenerate) {\n if (goGenerateAllowed) {\n logger.debug('go generate command included');\n execCommands.push(`${cmd} generate ./...`);\n } else {\n logger.once.warn(\n `go generate command requested as a post update action, but goGenerate is not permitted in the allowedUnsafeExecutions`,\n );\n }\n }\n\n await gitExec(execCommands, execOptions);\n\n const status = await getRepoStatus();\n if (\n !status.modified.includes(sumFileName) &&\n !status.modified.includes(goModFileName) &&\n !status.modified.includes(goWorkSumFileName)\n ) {\n return null;\n }\n\n const res: UpdateArtifactsResult[] = [];\n if (status.modified.includes(sumFileName)) {\n logger.debug('Returning updated go.sum');\n res.push({\n file: {\n type: 'addition',\n path: sumFileName,\n contents: await readLocalFile(sumFileName),\n },\n });\n }\n\n if (status.modified.includes(goWorkSumFileName)) {\n logger.debug('Returning updated go.work.sum');\n res.push({\n file: {\n type: 'addition',\n path: goWorkSumFileName,\n contents: await readLocalFile(goWorkSumFileName),\n },\n });\n }\n\n // Include all the .go file import changes\n if (isImportPathUpdateRequired) {\n logger.debug('Returning updated go source files for import path changes');\n for (const f of status.modified) {\n if (f.endsWith('.go')) {\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n }\n\n const alreadyAdded = new Set<string>();\n const alreadyDeleted = new Set<string>();\n if (useVendor) {\n for (const f of status.modified.concat(status.not_added)) {\n if (vendorDir && f.startsWith(vendorDir)) {\n alreadyAdded.add(f);\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n for (const f of coerceArray(status.deleted)) {\n if (vendorDir && f.startsWith(vendorDir)) {\n alreadyDeleted.add(f);\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n }\n }\n\n // TODO: throws in tests (#22198)\n const finalGoModContent = (await readLocalFile(goModFileName, 'utf8'))!\n .replace(regEx(/\\/\\/ renovate-replace /g), '')\n .replace(regEx(/renovate-replace-bracket/g), ')');\n if (finalGoModContent !== newGoModContent) {\n const artifactResult: UpdateArtifactsResult = {\n file: {\n type: 'addition',\n path: goModFileName,\n contents: finalGoModContent,\n },\n };\n\n const updatedDepNames = filterMap(updatedDeps, (dep) => dep?.depName);\n const extraDepsNotice = getExtraDepsNotice(\n newGoModContent,\n finalGoModContent,\n updatedDepNames,\n );\n\n if (extraDepsNotice) {\n artifactResult.notice = {\n file: goModFileName,\n message: extraDepsNotice,\n };\n }\n\n logger.debug('Found updated go.mod after go.sum update');\n res.push(artifactResult);\n alreadyAdded.add(goModFileName);\n }\n\n // add all files added when in `go generate` mode.\n // unfortunately there is not a good way as there is with vendoring or go import path updates to detect this.\n // Do this at the very very end to ensure we only capture files which would have been explicitly\n // modified, added, or deleted from a `go generate` invocation\n if (useGoGenerate && goGenerateAllowed) {\n logger.debug(\n 'Updating all modified files since generated files were added',\n );\n for (const f of status.modified.concat(status.created)) {\n if (!alreadyAdded.has(f)) {\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n for (const f of coerceArray(status.deleted)) {\n if (!alreadyDeleted.has(f)) {\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n }\n }\n return res;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update go.sum');\n return [\n {\n artifactError: {\n fileName: sumFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n\nfunction getGoConstraints(content: string): string | undefined {\n // prefer toolchain directive when go.mod has one\n const toolchainMatch = regEx(/^toolchain\\s*go(?<gover>\\d+\\.\\d+\\.\\d+)$/m).exec(\n content,\n );\n const toolchainVer = toolchainMatch?.groups?.gover;\n if (toolchainVer) {\n logger.debug(\n `Using go version ${toolchainVer} found in toolchain directive`,\n );\n return toolchainVer;\n }\n\n // If go.mod doesn't have toolchain directive and has a full go version spec,\n // for example `go 1.23.6`, pick this version, this doesn't match major.minor version spec.\n //\n // This is because when go.mod have same version defined in go directive and toolchain directive,\n // go will remove toolchain directive from go.mod.\n //\n // For example, go will rewrite `go 1.23.5\\ntoolchain go1.23.5` to `go 1.23.5` by default,\n // in this case, the go directive is the toolchain directive.\n const goFullVersion = regEx(/^go\\s*(?<gover>\\d+\\.\\d+\\.\\d+)$/m).exec(content)\n ?.groups?.gover;\n if (goFullVersion) {\n return goFullVersion;\n }\n\n const re = regEx(/^go\\s*(?<gover>\\d+\\.\\d+)$/m);\n const match = re.exec(content);\n if (!match?.groups?.gover) {\n return undefined;\n }\n return `^${match.groups.gover}`;\n}\n\n/**\n * Derive the version of the Go toolchain needed to run this project.\n *\n * This matches with the `golang` Containerbase tool.\n *\n * In precedence order:\n *\n * 1. config: \\`constraints.go\\`\n * 1. \\`go.mod\\`: \\`toolchain\\` directive\n * 1. \\`go.mod\\`: \\`go\\` directive\n *\n * NOTE that the \\`constraints.golang\\` is not used (TODO #42601)\n */\nexport function deriveGoToolchainConstraints(\n config: UpdateArtifactsConfig,\n newGoModContent: string,\n): string | undefined {\n return config.constraints?.go ?? getGoConstraints(newGoModContent);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BA,MAAM,EAAE,OAAA,SAAO,OAAA,YAAU;AACzB,MAAM,UAAU,mBAAmB,CAAC,IAAI,CAAC;AAEzC,SAAS,wBACP,aACA,EAAE,eACQ;CAEV,MAAM,mBAAmB,YAAY,QAClC,EAAE,iBAAiB,CAACA,QAAM,UAAU,CACvC;CACA,IAAI,iBAAiB,SAAS,GAC5B,iBAAiB,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AC,KAAK,OAAO;CAC7B,IAAI,CAAC,OAAO,QAAQ,OAClB;CAEF,OAAO,IAAI,MAAM,OAAO;AAC1B;;;;;;;;;;;;;;AAeA,SAAgB,6BACd,QACA,iBACoB;CACpB,OAAO,OAAO,aAAa,MAAM,iBAAiB,eAAe;AACnE"}
|
|
1
|
+
{"version":3,"file":"artifacts.js","names":["valid","major","isValid"],"sources":["../../../../lib/modules/manager/gomod/artifacts.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport semver from 'semver';\nimport { quote } from 'shlex';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { coerceArray } from '../../../util/array.ts';\nimport { getEnv } from '../../../util/env.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport { filterMap } from '../../../util/filter-map.ts';\nimport {\n ensureCacheDir,\n findLocalSiblingOrParent,\n isValidLocalPath,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../util/git/exec.ts';\nimport { getRepoStatus } from '../../../util/git/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { isValid } from '../../versioning/semver/index.ts';\nimport type {\n PackageDependency,\n UpdateArtifact,\n UpdateArtifactsConfig,\n UpdateArtifactsResult,\n} from '../types.ts';\nimport { getExtraDepsNotice } from './artifacts-extra.ts';\nimport { getGoModulesInTidyOrder } from './package-tree.ts';\n\nconst { major, valid } = semver;\nconst gitExec = withGitEnvironment(['go']);\n\nfunction getUpdateImportPathCmds(\n updatedDeps: PackageDependency[],\n { constraints }: UpdateArtifactsConfig,\n): string[] {\n // Check if we fail to parse any major versions and log that they're skipped\n const invalidMajorDeps = updatedDeps.filter(\n ({ newVersion }) => !valid(newVersion),\n );\n if (invalidMajorDeps.length > 0) {\n invalidMajorDeps.forEach(({ depName }) =>\n logger.warn(\n { depName },\n 'Ignoring dependency: Could not get major version',\n ),\n );\n }\n\n const updateImportCommands = updatedDeps\n .filter(\n ({ newVersion }) =>\n valid(newVersion) && !newVersion!.endsWith('+incompatible'),\n )\n .map(({ depName, newVersion }) => ({\n depName: depName!,\n newMajor: major(newVersion!),\n }))\n // Skip path updates going from v0 to v1\n .filter(\n ({ depName, newMajor }) =>\n depName.startsWith('gopkg.in/') || newMajor > 1,\n )\n\n .map(\n ({ depName, newMajor }) =>\n `mod upgrade --mod-name=${quote(depName)} -t=${newMajor}`,\n );\n\n if (updateImportCommands.length > 0) {\n let installMarwanModArgs =\n 'install github.com/marwan-at-work/mod/cmd/mod@latest';\n const gomodModCompatibility = constraints?.gomodMod;\n if (gomodModCompatibility) {\n if (\n gomodModCompatibility.startsWith('v') &&\n isValid(gomodModCompatibility.replace(regEx(/^v/), ''))\n ) {\n installMarwanModArgs = installMarwanModArgs.replace(\n regEx(/@latest$/),\n `@${gomodModCompatibility}`,\n );\n } else {\n logger.debug(\n { gomodModCompatibility },\n 'marwan-at-work/mod compatibility range is not valid - skipping',\n );\n }\n } else {\n logger.debug(\n 'No marwan-at-work/mod compatibility range found - installing marwan-at-work/mod latest',\n );\n }\n updateImportCommands.unshift(`go ${installMarwanModArgs}`);\n }\n\n return updateImportCommands;\n}\n\nfunction useModcacherw(goVersion: string | undefined): boolean {\n if (!isString(goVersion)) {\n return true;\n }\n\n return semver.intersects(goVersion, `>=1.14`);\n}\n\nexport async function updateArtifacts({\n packageFileName: goModFileName,\n updatedDeps,\n newPackageFileContent: newGoModContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`gomod.updateArtifacts(${goModFileName})`);\n\n const sumFileName = goModFileName.replace(regEx(/\\.mod$/), '.sum');\n const existingGoSumContent = await readLocalFile(sumFileName);\n if (!existingGoSumContent) {\n logger.debug('No go.sum found');\n return null;\n }\n const goModDir = upath.dirname(goModFileName);\n const goModFileBaseName = upath.basename(goModFileName);\n const modFileFlag =\n goModFileBaseName === 'go.mod'\n ? ''\n : ` -modfile=${quote(goModFileBaseName)}`;\n\n // The \"vendor\" directory can be next to the go.mod, but also in the parent directory in case\n // the go workspaces are used.\n const vendorDir = await findLocalSiblingOrParent(goModFileName, 'vendor');\n const vendorModulesFileName = upath.join(vendorDir ?? '', 'modules.txt');\n const useVendor =\n !!config.postUpdateOptions?.includes('gomodVendor') ||\n (!config.postUpdateOptions?.includes('gomodSkipVendor') &&\n vendorDir &&\n (await readLocalFile(vendorModulesFileName)) !== null);\n let massagedGoMod = newGoModContent;\n const useGoGenerate = !!config.postUpdateOptions?.includes('goGenerate');\n const allowedUnsafeExecutions = GlobalConfig.get('allowedUnsafeExecutions');\n const goGenerateAllowed = allowedUnsafeExecutions?.includes('goGenerate');\n\n if (config.postUpdateOptions?.includes('gomodMassage')) {\n // Regex match inline replace directive, example:\n // replace golang.org/x/net v1.2.3 => example.com/fork/net v1.4.5\n // https://go.dev/ref/mod#go-mod-file-replace\n\n // replace bracket after comments, so it doesn't break the regex, doing a complex regex causes problems\n // when there's a comment and \")\" after it, the regex will read replace block until comment.. and stop.\n massagedGoMod = massagedGoMod\n .split('\\n')\n .map((line) => {\n if (line.trim().startsWith('//')) {\n return line.replace(')', 'renovate-replace-bracket');\n }\n return line;\n })\n .join('\\n');\n\n const inlineReplaceRegEx = regEx(\n /(\\r?\\n)(replace\\s+[^\\s]+\\s+=>\\s+\\.\\.\\/.*)/g,\n );\n\n // $1 will be matched with the (\\r?n) group\n // $2 will be matched with the inline replace match, example\n // \"// renovate-replace replace golang.org/x/net v1.2.3 => example.com/fork/net v1.4.5\"\n const inlineCommentOut = '$1// renovate-replace $2';\n\n // Regex match replace directive block, example:\n // replace (\n // golang.org/x/net v1.2.3 => example.com/fork/net v1.4.5\n // )\n const blockReplaceRegEx = regEx(/(\\r?\\n)replace\\s*\\([^)]+\\s*\\)/g);\n\n /**\n * replacerFunction for commenting out replace blocks\n * @param match A string representing a golang replace directive block\n * @returns A commented out block with // renovate-replace\n */\n function blockCommentOut(match: string): string {\n return match.replace(/(\\r?\\n)/g, '$1// renovate-replace ');\n }\n\n // Comment out golang replace directives\n massagedGoMod = massagedGoMod\n .replace(inlineReplaceRegEx, inlineCommentOut)\n .replace(blockReplaceRegEx, blockCommentOut);\n\n if (massagedGoMod !== newGoModContent) {\n logger.debug(\n 'Removed some relative replace statements and comments from go.mod',\n );\n }\n }\n const goConstraints = deriveGoToolchainConstraints(config, newGoModContent);\n\n try {\n await writeLocalFile(goModFileName, massagedGoMod);\n\n const cmd = 'go';\n const env = getEnv();\n const execOptions: ExecOptions = {\n cwdFile: goModFileName,\n extraEnv: {\n GOPATH: await ensureCacheDir('go'),\n GOPROXY: env.GOPROXY,\n GOPRIVATE: env.GOPRIVATE,\n GONOPROXY: env.GONOPROXY,\n GONOSUMDB: env.GONOSUMDB,\n GOSUMDB: env.GOSUMDB,\n GOINSECURE: env.GOINSECURE,\n /* v8 ignore next -- TODO: add test */\n GOFLAGS: useModcacherw(goConstraints) ? '-modcacherw' : null,\n CGO_ENABLED: GlobalConfig.get('binarySource') === 'docker' ? '0' : null,\n },\n docker: {},\n toolConstraints: [\n {\n toolName: 'golang',\n constraint: goConstraints,\n },\n ],\n };\n\n const execCommands: string[] = [];\n\n let goGetDirs: string | undefined;\n if (config.goGetDirs) {\n goGetDirs = config.goGetDirs\n .filter((dir) => {\n const isValid = isValidLocalPath(dir);\n if (!isValid) {\n logger.warn({ dir }, 'Invalid path in goGetDirs');\n }\n return isValid;\n })\n .map(quote)\n .join(' ');\n\n if (goGetDirs === '') {\n throw new Error('Invalid goGetDirs');\n }\n }\n\n let args = `get${modFileFlag} `;\n\n if (goConstraints && !semver.intersects(goConstraints, `>=1.18`)) {\n // For Go versions < 1.18, we need to use the -d flag to avoid builds or installs\n // https://go.dev/doc/go1.18#go-get\n args += `-d `;\n }\n\n args += `-t ${goGetDirs ?? './...'}`;\n logger.trace({ cmd, args }, 'go get command included');\n execCommands.push(`${cmd} ${args}`);\n\n // Update import paths on major updates\n const isImportPathUpdateRequired =\n config.postUpdateOptions?.includes('gomodUpdateImportPaths') &&\n config.updateType === 'major';\n\n if (isImportPathUpdateRequired) {\n const updateImportCmds = getUpdateImportPathCmds(updatedDeps, config);\n if (updateImportCmds.length > 0) {\n logger.debug(updateImportCmds, 'update import path commands included');\n // The updates\n execCommands.push(...updateImportCmds);\n }\n }\n\n const mustSkipGoModTidy =\n !config.postUpdateOptions?.includes('gomodUpdateImportPaths') &&\n config.updateType === 'major';\n if (mustSkipGoModTidy) {\n logger.debug('go mod tidy command skipped');\n }\n\n let tidyOpts = '';\n if (config.postUpdateOptions?.includes('gomodTidy1.17')) {\n tidyOpts += ' -compat=1.17';\n }\n if (config.postUpdateOptions?.includes('gomodTidyE')) {\n tidyOpts += ' -e';\n }\n\n // dependent modules can only be tidied once the updated module is settled\n const isGoModTidyAllRequired =\n config.postUpdateOptions?.includes('gomodTidyAll') === true;\n const isGoModTidyRequired =\n !mustSkipGoModTidy &&\n (config.postUpdateOptions?.includes('gomodTidy') === true ||\n config.postUpdateOptions?.includes('gomodTidy1.17') === true ||\n config.postUpdateOptions?.includes('gomodTidyE') === true ||\n isGoModTidyAllRequired ||\n (config.updateType === 'major' && isImportPathUpdateRequired));\n if (isGoModTidyRequired) {\n args = `mod tidy${modFileFlag}${tidyOpts}`;\n logger.debug('go mod tidy command included');\n execCommands.push(`${cmd} ${args}`);\n }\n\n let goWorkSumFileName = upath.join(goModDir, 'go.work.sum');\n if (useVendor) {\n // If we find a go.work, then use go workspace vendoring.\n const goWorkFile = await findLocalSiblingOrParent(\n goModFileName,\n 'go.work',\n );\n\n if (goWorkFile) {\n goWorkSumFileName = upath.join(\n upath.dirname(goWorkFile),\n 'go.work.sum',\n );\n\n args = 'work vendor';\n logger.debug('using go work vendor');\n execCommands.push(`${cmd} ${args}`);\n\n args = 'work sync';\n logger.debug('using go work sync');\n execCommands.push(`${cmd} ${args}`);\n } else {\n args = `mod vendor${modFileFlag}`;\n logger.debug('using go mod vendor');\n execCommands.push(`${cmd} ${args}`);\n }\n\n if (isGoModTidyRequired) {\n args = `mod tidy${modFileFlag}${tidyOpts}`;\n logger.debug('go mod tidy command included');\n execCommands.push(`${cmd} ${args}`);\n }\n }\n\n // We tidy one more time as a solution for #6795\n if (isGoModTidyRequired) {\n args = `mod tidy${modFileFlag}${tidyOpts}`;\n logger.debug('go mod tidy command included');\n execCommands.push(`${cmd} ${args}`);\n }\n\n let dependentModules: string[] = [];\n if (isGoModTidyAllRequired) {\n try {\n dependentModules = await getGoModulesInTidyOrder(goModFileName);\n for (const dependent of dependentModules) {\n const dir = upath.relative(goModDir, upath.dirname(dependent));\n execCommands.push(`${cmd} -C ${quote(dir)} mod tidy${tidyOpts}`);\n }\n logger.debug({ dependentModules }, 'go mod tidy commands included');\n } catch (err) {\n logger.warn({ err }, 'Failed to find dependent Go modules');\n }\n }\n\n if (useGoGenerate) {\n if (goGenerateAllowed) {\n logger.debug('go generate command included');\n execCommands.push(`${cmd} generate ./...`);\n } else {\n logger.once.warn(\n `go generate command requested as a post update action, but goGenerate is not permitted in the allowedUnsafeExecutions`,\n );\n }\n }\n\n await gitExec(execCommands, execOptions);\n\n const status = await getRepoStatus();\n const dependentFiles = dependentModules.flatMap((f) => [\n f,\n f.replace(regEx(/\\.mod$/), '.sum'),\n ]);\n\n if (\n !status.modified.includes(sumFileName) &&\n !status.modified.includes(goModFileName) &&\n !status.modified.includes(goWorkSumFileName) &&\n !dependentFiles.some((f) => status.modified.includes(f))\n ) {\n return null;\n }\n\n const res: UpdateArtifactsResult[] = [];\n if (status.modified.includes(sumFileName)) {\n logger.debug('Returning updated go.sum');\n res.push({\n file: {\n type: 'addition',\n path: sumFileName,\n contents: await readLocalFile(sumFileName),\n },\n });\n }\n\n if (status.modified.includes(goWorkSumFileName)) {\n logger.debug('Returning updated go.work.sum');\n res.push({\n file: {\n type: 'addition',\n path: goWorkSumFileName,\n contents: await readLocalFile(goWorkSumFileName),\n },\n });\n }\n\n for (const f of dependentFiles) {\n if (status.modified.includes(f)) {\n logger.trace(`Returning updated ${f}`);\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n\n // Include all the .go file import changes\n if (isImportPathUpdateRequired) {\n logger.debug('Returning updated go source files for import path changes');\n for (const f of status.modified) {\n if (f.endsWith('.go')) {\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n }\n\n const alreadyAdded = new Set<string>();\n const alreadyDeleted = new Set<string>();\n if (useVendor) {\n for (const f of status.modified.concat(status.not_added)) {\n if (vendorDir && f.startsWith(vendorDir)) {\n alreadyAdded.add(f);\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n for (const f of coerceArray(status.deleted)) {\n if (vendorDir && f.startsWith(vendorDir)) {\n alreadyDeleted.add(f);\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n }\n }\n\n // TODO: throws in tests (#22198)\n const finalGoModContent = (await readLocalFile(goModFileName, 'utf8'))!\n .replace(regEx(/\\/\\/ renovate-replace /g), '')\n .replace(regEx(/renovate-replace-bracket/g), ')');\n if (finalGoModContent !== newGoModContent) {\n const artifactResult: UpdateArtifactsResult = {\n file: {\n type: 'addition',\n path: goModFileName,\n contents: finalGoModContent,\n },\n };\n\n const updatedDepNames = filterMap(updatedDeps, (dep) => dep?.depName);\n const extraDepsNotice = getExtraDepsNotice(\n newGoModContent,\n finalGoModContent,\n updatedDepNames,\n );\n\n if (extraDepsNotice) {\n artifactResult.notice = {\n file: goModFileName,\n message: extraDepsNotice,\n };\n }\n\n logger.debug('Found updated go.mod after go.sum update');\n res.push(artifactResult);\n alreadyAdded.add(goModFileName);\n }\n\n // add all files added when in `go generate` mode.\n // unfortunately there is not a good way as there is with vendoring or go import path updates to detect this.\n // Do this at the very very end to ensure we only capture files which would have been explicitly\n // modified, added, or deleted from a `go generate` invocation\n if (useGoGenerate && goGenerateAllowed) {\n logger.debug(\n 'Updating all modified files since generated files were added',\n );\n for (const f of status.modified.concat(status.created)) {\n if (!alreadyAdded.has(f)) {\n res.push({\n file: {\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n },\n });\n }\n }\n for (const f of coerceArray(status.deleted)) {\n if (!alreadyDeleted.has(f)) {\n res.push({\n file: {\n type: 'deletion',\n path: f,\n },\n });\n }\n }\n }\n return res;\n } catch (err) {\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n logger.debug({ err }, 'Failed to update go.sum');\n return [\n {\n artifactError: {\n fileName: sumFileName,\n stderr: err.message,\n },\n },\n ];\n }\n}\n\nfunction getGoConstraints(content: string): string | undefined {\n // prefer toolchain directive when go.mod has one\n const toolchainMatch = regEx(/^toolchain\\s*go(?<gover>\\d+\\.\\d+\\.\\d+)$/m).exec(\n content,\n );\n const toolchainVer = toolchainMatch?.groups?.gover;\n if (toolchainVer) {\n logger.debug(\n `Using go version ${toolchainVer} found in toolchain directive`,\n );\n return toolchainVer;\n }\n\n // If go.mod doesn't have toolchain directive and has a full go version spec,\n // for example `go 1.23.6`, pick this version, this doesn't match major.minor version spec.\n //\n // This is because when go.mod have same version defined in go directive and toolchain directive,\n // go will remove toolchain directive from go.mod.\n //\n // For example, go will rewrite `go 1.23.5\\ntoolchain go1.23.5` to `go 1.23.5` by default,\n // in this case, the go directive is the toolchain directive.\n const goFullVersion = regEx(/^go\\s*(?<gover>\\d+\\.\\d+\\.\\d+)$/m).exec(content)\n ?.groups?.gover;\n if (goFullVersion) {\n return goFullVersion;\n }\n\n const re = regEx(/^go\\s*(?<gover>\\d+\\.\\d+)$/m);\n const match = re.exec(content);\n if (!match?.groups?.gover) {\n return undefined;\n }\n return `^${match.groups.gover}`;\n}\n\n/**\n * Derive the version of the Go toolchain needed to run this project.\n *\n * This matches with the `golang` Containerbase tool.\n *\n * In precedence order:\n *\n * 1. config: \\`constraints.go\\`\n * 1. \\`go.mod\\`: \\`toolchain\\` directive\n * 1. \\`go.mod\\`: \\`go\\` directive\n *\n * NOTE that the \\`constraints.golang\\` is not used (TODO #42601)\n */\nexport function deriveGoToolchainConstraints(\n config: UpdateArtifactsConfig,\n newGoModContent: string,\n): string | undefined {\n return config.constraints?.go ?? getGoConstraints(newGoModContent);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,MAAM,EAAE,OAAA,SAAO,OAAA,YAAU;AACzB,MAAM,UAAU,mBAAmB,CAAC,IAAI,CAAC;AAEzC,SAAS,wBACP,aACA,EAAE,eACQ;CAEV,MAAM,mBAAmB,YAAY,QAClC,EAAE,iBAAiB,CAACA,QAAM,UAAU,CACvC;CACA,IAAI,iBAAiB,SAAS,GAC5B,iBAAiB,SAAS,EAAE,cAC1B,OAAO,KACL,EAAE,QAAQ,GACV,kDACF,CACF;CAGF,MAAM,uBAAuB,YAC1B,QACE,EAAE,iBACDA,QAAM,UAAU,KAAK,CAAC,WAAY,SAAS,eAAe,CAC9D,CAAC,CACA,KAAK,EAAE,SAAS,kBAAkB;EACxB;EACT,UAAUC,QAAM,UAAW;CAC7B,EAAE,CAAC,CAEF,QACE,EAAE,SAAS,eACV,QAAQ,WAAW,WAAW,KAAK,WAAW,CAClD,CAAC,CAEA,KACE,EAAE,SAAS,eACV,0BAA0B,MAAM,OAAO,EAAE,MAAM,UACnD;CAEF,IAAI,qBAAqB,SAAS,GAAG;EACnC,IAAI,uBACF;EACF,MAAM,wBAAwB,aAAa;EAC3C,IAAI,uBACF,IACE,sBAAsB,WAAW,GAAG,KACpCC,UAAQ,sBAAsB,QAAQ,MAAM,IAAI,GAAG,EAAE,CAAC,GAEtD,uBAAuB,qBAAqB,QAC1C,MAAM,UAAU,GAChB,IAAI,uBACN;OAEA,OAAO,MACL,EAAE,sBAAsB,GACxB,gEACF;OAGF,OAAO,MACL,wFACF;EAEF,qBAAqB,QAAQ,MAAM,sBAAsB;CAC3D;CAEA,OAAO;AACT;AAEA,SAAS,cAAc,WAAwC;CAC7D,IAAI,CAAC,SAA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AAK,OAAO;CAC7B,IAAI,CAAC,OAAO,QAAQ,OAClB;CAEF,OAAO,IAAI,MAAM,OAAO;AAC1B;;;;;;;;;;;;;;AAeA,SAAgB,6BACd,QACA,iBACoB;CACpB,OAAO,OAAO,aAAa,MAAM,iBAAiB,eAAe;AACnE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { regEx } from "../../../util/regex.js";
|
|
2
|
+
import { getMatchingFiles, resolveRelativePathToRoot } from "../../../util/fs/util.js";
|
|
3
|
+
import { readLocalFile } from "../../../util/fs/index.js";
|
|
4
|
+
import { scm } from "../../platform/scm.js";
|
|
5
|
+
import upath from "upath";
|
|
6
|
+
import { Graph, depthFirstSearch, topologicalSort } from "graph-data-structure";
|
|
7
|
+
//#region lib/modules/manager/gomod/package-tree.ts
|
|
8
|
+
const localReplace = regEx(/^[^\S\n]*(?:replace[^\S\n]+)?[^\s/]\S*(?:[^\S\n]+\S+)?[^\S\n]+=>[^\S\n]+(?<localPath>\.{1,2}\/\S+)/gm);
|
|
9
|
+
/**
|
|
10
|
+
* Get the target paths of all `replace` directives which point to a local directory.
|
|
11
|
+
*/
|
|
12
|
+
function parseLocalReplacePaths(content) {
|
|
13
|
+
return Array.from(content.matchAll(localReplace), (match) => match.groups.localPath);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Build a graph of all `go.mod` files based on their local `replace` directives.
|
|
17
|
+
* Edges point from a module to the modules which depend on it, so
|
|
18
|
+
* `graph.adjacent(x)` returns the dependents of `x`.
|
|
19
|
+
*/
|
|
20
|
+
async function buildDependencyGraph() {
|
|
21
|
+
const graph = new Graph();
|
|
22
|
+
const goModFiles = getMatchingFiles("**/go.mod", await scm.getFileList());
|
|
23
|
+
const known = new Set(goModFiles);
|
|
24
|
+
for (const f of goModFiles) graph.addNode(f);
|
|
25
|
+
for (const f of goModFiles) {
|
|
26
|
+
const content = await readLocalFile(f, "utf8");
|
|
27
|
+
if (!content) continue;
|
|
28
|
+
for (const localPath of parseLocalReplacePaths(content)) {
|
|
29
|
+
const dependency = upath.join(resolveRelativePathToRoot(f, localPath), "go.mod");
|
|
30
|
+
if (known.has(dependency)) graph.addEdge(dependency, f);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return graph;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get all `go.mod` files which transitively depend on `packageFileName`, ordered
|
|
37
|
+
* so that a module always comes before the modules which depend on it.
|
|
38
|
+
* The given `packageFileName` is not included.
|
|
39
|
+
*/
|
|
40
|
+
async function getGoModulesInTidyOrder(packageFileName) {
|
|
41
|
+
const graph = await buildDependencyGraph();
|
|
42
|
+
if (!graph.adjacent(packageFileName)) return [];
|
|
43
|
+
const dependents = new Set(depthFirstSearch(graph, {
|
|
44
|
+
sourceNodes: [packageFileName],
|
|
45
|
+
includeSourceNodes: false
|
|
46
|
+
}));
|
|
47
|
+
return topologicalSort(graph).filter((f) => dependents.has(f));
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { getGoModulesInTidyOrder, parseLocalReplacePaths };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=package-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-tree.js","names":[],"sources":["../../../../lib/modules/manager/gomod/package-tree.ts"],"sourcesContent":["import { Graph, depthFirstSearch, topologicalSort } from 'graph-data-structure';\nimport upath from 'upath';\nimport { readLocalFile } from '../../../util/fs/index.ts';\nimport {\n getMatchingFiles,\n resolveRelativePathToRoot,\n} from '../../../util/fs/util.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { scm } from '../../platform/scm.ts';\n\n// `[^\\S\\n]` is horizontal whitespace, so a match never crosses a line boundary.\n// `[^\\s/]` rules out comment lines, and lets this match the single line form as\n// well as the lines inside a `replace (...)` block.\nconst localReplace = regEx(\n /^[^\\S\\n]*(?:replace[^\\S\\n]+)?[^\\s/]\\S*(?:[^\\S\\n]+\\S+)?[^\\S\\n]+=>[^\\S\\n]+(?<localPath>\\.{1,2}\\/\\S+)/gm,\n);\n\n/**\n * Get the target paths of all `replace` directives which point to a local directory.\n */\nexport function parseLocalReplacePaths(content: string): string[] {\n return Array.from(\n content.matchAll(localReplace),\n (match) => match.groups!.localPath,\n );\n}\n\n/**\n * Build a graph of all `go.mod` files based on their local `replace` directives.\n * Edges point from a module to the modules which depend on it, so\n * `graph.adjacent(x)` returns the dependents of `x`.\n */\nasync function buildDependencyGraph(): Promise<Graph> {\n const graph = new Graph();\n const goModFiles = getMatchingFiles('**/go.mod', await scm.getFileList());\n const known = new Set(goModFiles);\n\n for (const f of goModFiles) {\n graph.addNode(f);\n }\n\n for (const f of goModFiles) {\n const content = await readLocalFile(f, 'utf8');\n if (!content) {\n continue;\n }\n\n for (const localPath of parseLocalReplacePaths(content)) {\n const dependency = upath.join(\n resolveRelativePathToRoot(f, localPath),\n 'go.mod',\n );\n if (known.has(dependency)) {\n graph.addEdge(dependency, f);\n }\n }\n }\n\n return graph;\n}\n\n/**\n * Get all `go.mod` files which transitively depend on `packageFileName`, ordered\n * so that a module always comes before the modules which depend on it.\n * The given `packageFileName` is not included.\n */\nexport async function getGoModulesInTidyOrder(\n packageFileName: string,\n): Promise<string[]> {\n const graph = await buildDependencyGraph();\n if (!graph.adjacent(packageFileName)) {\n return [];\n }\n\n const dependents = new Set(\n depthFirstSearch(graph, {\n sourceNodes: [packageFileName],\n includeSourceNodes: false,\n }),\n );\n\n return topologicalSort(graph).filter((f) => dependents.has(f));\n}\n"],"mappings":";;;;;;;AAaA,MAAM,eAAe,MACnB,sGACF;;;;AAKA,SAAgB,uBAAuB,SAA2B;CAChE,OAAO,MAAM,KACX,QAAQ,SAAS,YAAY,IAC5B,UAAU,MAAM,OAAQ,SAC3B;AACF;;;;;;AAOA,eAAe,uBAAuC;CACpD,MAAM,QAAQ,IAAI,MAAM;CACxB,MAAM,aAAa,iBAAiB,aAAa,MAAM,IAAI,YAAY,CAAC;CACxE,MAAM,QAAQ,IAAI,IAAI,UAAU;CAEhC,KAAK,MAAM,KAAK,YACd,MAAM,QAAQ,CAAC;CAGjB,KAAK,MAAM,KAAK,YAAY;EAC1B,MAAM,UAAU,MAAM,cAAc,GAAG,MAAM;EAC7C,IAAI,CAAC,SACH;EAGF,KAAK,MAAM,aAAa,uBAAuB,OAAO,GAAG;GACvD,MAAM,aAAa,MAAM,KACvB,0BAA0B,GAAG,SAAS,GACtC,QACF;GACA,IAAI,MAAM,IAAI,UAAU,GACtB,MAAM,QAAQ,YAAY,CAAC;EAE/B;CACF;CAEA,OAAO;AACT;;;;;;AAOA,eAAsB,wBACpB,iBACmB;CACnB,MAAM,QAAQ,MAAM,qBAAqB;CACzC,IAAI,CAAC,MAAM,SAAS,eAAe,GACjC,OAAO,CAAC;CAGV,MAAM,aAAa,IAAI,IACrB,iBAAiB,OAAO;EACtB,aAAa,CAAC,eAAe;EAC7B,oBAAoB;CACtB,CAAC,CACH;CAEA,OAAO,gBAAgB,KAAK,CAAC,CAAC,QAAQ,MAAM,WAAW,IAAI,CAAC,CAAC;AAC/D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { minimatchFilter } from "../../../util/minimatch.js";
|
|
2
1
|
import { logger } from "../../../logger/index.js";
|
|
2
|
+
import { getMatchingFiles, resolveRelativePathToRoot } from "../../../util/fs/util.js";
|
|
3
3
|
import { readFileAsXmlDocument } from "./util.js";
|
|
4
4
|
import { scm } from "../../platform/scm.js";
|
|
5
5
|
import { isNonEmptyString } from "@sindresorhus/is";
|
|
@@ -26,7 +26,7 @@ async function getDependentPackageFiles(packageFileName, isPropsFile = false, is
|
|
|
26
26
|
for (const f of packageFiles) {
|
|
27
27
|
const doc = await readFileAsXmlDocument(f);
|
|
28
28
|
if (!doc) continue;
|
|
29
|
-
const normalizedRelativeProjectReferences = doc.childrenNamed("ItemGroup").map((ig) => ig.childrenNamed("ProjectReference")).flat().map((pf) => pf.attr.Include).filter(isNonEmptyString).map((a) => upath.normalize(a)).map((r) =>
|
|
29
|
+
const normalizedRelativeProjectReferences = doc.childrenNamed("ItemGroup").map((ig) => ig.childrenNamed("ProjectReference")).flat().map((pf) => pf.attr.Include).filter(isNonEmptyString).map((a) => upath.normalize(a)).map((r) => resolveRelativePathToRoot(f, r));
|
|
30
30
|
for (const ref of normalizedRelativeProjectReferences) graph.addEdge(ref, f);
|
|
31
31
|
if (hasCycle(graph)) throw new Error("Circular reference detected in NuGet package files");
|
|
32
32
|
}
|
|
@@ -52,22 +52,11 @@ function recursivelyGetDependentPackageFiles(packageFileName, graph, deps) {
|
|
|
52
52
|
for (const dep of dependents) recursivelyGetDependentPackageFiles(dep, graph, deps);
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* Take the path relative from a project file, and make it relative from the root of the repo
|
|
56
|
-
*/
|
|
57
|
-
function reframeRelativePathToRootOfRepo(dependentProjectRelativePath, projectReference) {
|
|
58
|
-
const virtualRepoRoot = "/";
|
|
59
|
-
const absoluteDependentProjectPath = upath.resolve(virtualRepoRoot, dependentProjectRelativePath);
|
|
60
|
-
const absoluteProjectReferencePath = upath.resolve(upath.dirname(absoluteDependentProjectPath), projectReference);
|
|
61
|
-
return upath.relative(virtualRepoRoot, absoluteProjectReferencePath);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
55
|
* Get a list of package files in localDir
|
|
65
56
|
*/
|
|
66
57
|
async function getAllPackageFiles() {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
nocase: true
|
|
70
|
-
}));
|
|
58
|
+
const allFiles = await scm.getFileList();
|
|
59
|
+
const filteredPackageFiles = getMatchingFiles("**/*.{cs,vb,fs}proj", allFiles);
|
|
71
60
|
logger.trace({ filteredPackageFiles }, "Found package files");
|
|
72
61
|
return filteredPackageFiles;
|
|
73
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-tree.js","names":[],"sources":["../../../../lib/modules/manager/nuget/package-tree.ts"],"sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { Graph, hasCycle } from 'graph-data-structure';\nimport upath from 'upath';\nimport { logger } from '../../../logger/index.ts';\nimport {
|
|
1
|
+
{"version":3,"file":"package-tree.js","names":[],"sources":["../../../../lib/modules/manager/nuget/package-tree.ts"],"sourcesContent":["import { isNonEmptyString } from '@sindresorhus/is';\nimport { Graph, hasCycle } from 'graph-data-structure';\nimport upath from 'upath';\nimport { logger } from '../../../logger/index.ts';\nimport {\n getMatchingFiles,\n resolveRelativePathToRoot,\n} from '../../../util/fs/util.ts';\nimport { scm } from '../../platform/scm.ts';\nimport type { ProjectFile } from './types.ts';\nimport { readFileAsXmlDocument } from './util.ts';\n\nexport const GLOBAL_JSON = 'global.json';\nexport const NUGET_CENTRAL_FILE = 'Directory.Packages.props';\nexport const MSBUILD_CENTRAL_FILE = 'Packages.props';\nexport const DIRECTORY_BUILD_PROPS = 'Directory.Build.props';\n\n/**\n * Get all leaf package files of ancestry that depend on packageFileName.\n */\nexport async function getDependentPackageFiles(\n packageFileName: string,\n isPropsFile = false,\n isGlobalJson = false,\n): Promise<ProjectFile[]> {\n const packageFiles = await getAllPackageFiles();\n const graph = new Graph();\n\n if (isPropsFile) {\n graph.addNode(packageFileName);\n }\n\n if (isGlobalJson) {\n graph.addNode(GLOBAL_JSON);\n }\n\n const parentDir =\n packageFileName === NUGET_CENTRAL_FILE ||\n packageFileName === MSBUILD_CENTRAL_FILE ||\n packageFileName === GLOBAL_JSON ||\n packageFileName === DIRECTORY_BUILD_PROPS\n ? ''\n : upath.dirname(packageFileName);\n\n for (const f of packageFiles) {\n graph.addNode(f);\n\n if (\n (isPropsFile || isGlobalJson) &&\n upath.dirname(f).startsWith(parentDir)\n ) {\n graph.addEdge(packageFileName, f);\n }\n }\n\n for (const f of packageFiles) {\n const doc = await readFileAsXmlDocument(f);\n if (!doc) {\n continue;\n }\n\n const projectReferenceAttributes = doc\n .childrenNamed('ItemGroup')\n .map((ig) => ig.childrenNamed('ProjectReference'))\n .flat()\n .map((pf) => pf.attr.Include)\n .filter(isNonEmptyString);\n\n const projectReferences = projectReferenceAttributes.map((a) =>\n upath.normalize(a),\n );\n const normalizedRelativeProjectReferences = projectReferences.map((r) =>\n resolveRelativePathToRoot(f, r),\n );\n\n for (const ref of normalizedRelativeProjectReferences) {\n graph.addEdge(ref, f);\n }\n\n if (hasCycle(graph)) {\n throw new Error('Circular reference detected in NuGet package files');\n }\n }\n\n const deps = new Map<string, boolean>();\n recursivelyGetDependentPackageFiles(packageFileName, graph, deps);\n\n if (isPropsFile || isGlobalJson) {\n // remove props file, as we don't need it\n deps.delete(packageFileName);\n }\n\n // deduplicate\n return Array.from(deps).map(([name, isLeaf]) => ({ name, isLeaf }));\n}\n\n/**\n * Traverse graph and find dependent package files at any level of ancestry\n */\nfunction recursivelyGetDependentPackageFiles(\n packageFileName: string,\n graph: Graph,\n deps: Map<string, boolean>,\n): void {\n if (deps.has(packageFileName)) {\n // we have already visited this package file\n return;\n }\n\n const dependents = graph.adjacent(packageFileName);\n\n if (!dependents || dependents.size === 0) {\n deps.set(packageFileName, true);\n return;\n }\n\n deps.set(packageFileName, false);\n\n for (const dep of dependents) {\n recursivelyGetDependentPackageFiles(dep, graph, deps);\n }\n}\n\n/**\n * Get a list of package files in localDir\n */\nasync function getAllPackageFiles(): Promise<string[]> {\n const allFiles = await scm.getFileList();\n const filteredPackageFiles = getMatchingFiles(\n '**/*.{cs,vb,fs}proj',\n allFiles,\n );\n\n logger.trace({ filteredPackageFiles }, 'Found package files');\n\n return filteredPackageFiles;\n}\n"],"mappings":";;;;;;;;AAYA,MAAa,cAAc;AAC3B,MAAa,qBAAqB;AAClC,MAAa,uBAAuB;AACpC,MAAa,wBAAwB;;;;AAKrC,eAAsB,yBACpB,iBACA,cAAc,OACd,eAAe,OACS;CACxB,MAAM,eAAe,MAAM,mBAAmB;CAC9C,MAAM,QAAQ,IAAI,MAAM;CAExB,IAAI,aACF,MAAM,QAAQ,eAAe;CAG/B,IAAI,cACF,MAA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YAChB,oCAAoC,KAAK,OAAO,IAAI;AAExD;;;;AAKA,eAAe,qBAAwC;CACrD,MAAM,WAAW,MAAM,IAAI,YAAY;CACvC,MAAM,uBAAuB,iBAC3B,uBACA,QACF;CAEA,OAAO,MAAM,EAAE,qBAAqB,GAAG,qBAAqB;CAE5D,OAAO;AACT"}
|
package/dist/util/fs/util.js
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
import { FILE_ACCESS_VIOLATION_ERROR } from "../../constants/error-messages.js";
|
|
2
2
|
import { GlobalConfig } from "../../config/global.js";
|
|
3
|
+
import { matchRegexOrGlob } from "../string-match.js";
|
|
3
4
|
import { logger } from "../../logger/index.js";
|
|
4
5
|
import upath from "upath";
|
|
5
6
|
//#region lib/util/fs/util.ts
|
|
7
|
+
/**
|
|
8
|
+
* Take a relative path reference from a repo-relative file and resolve it
|
|
9
|
+
* to a repo-relative path. Uses a virtual root to avoid upath.resolve
|
|
10
|
+
* prepending the real cwd for relative paths.
|
|
11
|
+
*/
|
|
12
|
+
function resolveRelativePathToRoot(baseFilePath, relativePath) {
|
|
13
|
+
const virtualRoot = "/";
|
|
14
|
+
const absoluteBase = upath.resolve(virtualRoot, baseFilePath);
|
|
15
|
+
const absoluteResolved = upath.resolve(upath.dirname(absoluteBase), relativePath);
|
|
16
|
+
return upath.relative(virtualRoot, absoluteResolved);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Filter a list of repo-relative file paths by a glob or regex pattern.
|
|
20
|
+
*/
|
|
21
|
+
function getMatchingFiles(pattern, allFiles) {
|
|
22
|
+
return allFiles.filter((file) => matchRegexOrGlob(file, pattern));
|
|
23
|
+
}
|
|
6
24
|
function assertBaseDir(path, allowedDir) {
|
|
7
25
|
if (!path.startsWith(allowedDir)) {
|
|
8
26
|
logger.debug({
|
|
@@ -29,6 +47,6 @@ function isValidPath(path, key) {
|
|
|
29
47
|
return upath.resolve(upath.isAbsolute(path) ? path : upath.join(baseDir, path)).startsWith(baseDir);
|
|
30
48
|
}
|
|
31
49
|
//#endregion
|
|
32
|
-
export { ensureCachePath, ensureLocalPath, isValidPath };
|
|
50
|
+
export { ensureCachePath, ensureLocalPath, getMatchingFiles, isValidPath, resolveRelativePathToRoot };
|
|
33
51
|
|
|
34
52
|
//# sourceMappingURL=util.js.map
|
package/dist/util/fs/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":[],"sources":["../../../lib/util/fs/util.ts"],"sourcesContent":["import upath from 'upath';\nimport { GlobalConfig } from '../../config/global.ts';\nimport { FILE_ACCESS_VIOLATION_ERROR } from '../../constants/error-messages.ts';\nimport { logger } from '../../logger/index.ts';\n\nfunction assertBaseDir(path: string, allowedDir: string): void {\n if (!path.startsWith(allowedDir)) {\n logger.debug(\n { path, allowedDir },\n 'Preventing access to file outside allowed directory',\n );\n throw new Error(FILE_ACCESS_VIOLATION_ERROR);\n }\n}\n\nfunction ensurePath(path: string, key: 'localDir' | 'cacheDir'): string {\n const baseDir = upath.resolve(GlobalConfig.get(key));\n const fullPath = upath.resolve(\n upath.isAbsolute(path) ? path : upath.join(baseDir, path),\n );\n assertBaseDir(fullPath, baseDir);\n return fullPath;\n}\n\nexport function ensureLocalPath(path: string): string {\n return ensurePath(path, 'localDir');\n}\n\nexport function ensureCachePath(path: string): string {\n return ensurePath(path, 'cacheDir');\n}\n\nexport function isValidPath(\n path: string,\n key: 'localDir' | 'cacheDir',\n): boolean {\n const baseDir = upath.resolve(GlobalConfig.get(key));\n const fullPath = upath.resolve(\n upath.isAbsolute(path) ? path : upath.join(baseDir, path),\n );\n\n return fullPath.startsWith(baseDir);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","names":[],"sources":["../../../lib/util/fs/util.ts"],"sourcesContent":["import upath from 'upath';\nimport { GlobalConfig } from '../../config/global.ts';\nimport { FILE_ACCESS_VIOLATION_ERROR } from '../../constants/error-messages.ts';\nimport { logger } from '../../logger/index.ts';\nimport { matchRegexOrGlob } from '../string-match.ts';\n\n/**\n * Take a relative path reference from a repo-relative file and resolve it\n * to a repo-relative path. Uses a virtual root to avoid upath.resolve\n * prepending the real cwd for relative paths.\n */\nexport function resolveRelativePathToRoot(\n baseFilePath: string,\n relativePath: string,\n): string {\n const virtualRoot = '/';\n const absoluteBase = upath.resolve(virtualRoot, baseFilePath);\n const absoluteResolved = upath.resolve(\n upath.dirname(absoluteBase),\n relativePath,\n );\n return upath.relative(virtualRoot, absoluteResolved);\n}\n\n/**\n * Filter a list of repo-relative file paths by a glob or regex pattern.\n */\nexport function getMatchingFiles(\n pattern: string,\n allFiles: string[],\n): string[] {\n return allFiles.filter((file) => matchRegexOrGlob(file, pattern));\n}\n\nfunction assertBaseDir(path: string, allowedDir: string): void {\n if (!path.startsWith(allowedDir)) {\n logger.debug(\n { path, allowedDir },\n 'Preventing access to file outside allowed directory',\n );\n throw new Error(FILE_ACCESS_VIOLATION_ERROR);\n }\n}\n\nfunction ensurePath(path: string, key: 'localDir' | 'cacheDir'): string {\n const baseDir = upath.resolve(GlobalConfig.get(key));\n const fullPath = upath.resolve(\n upath.isAbsolute(path) ? path : upath.join(baseDir, path),\n );\n assertBaseDir(fullPath, baseDir);\n return fullPath;\n}\n\nexport function ensureLocalPath(path: string): string {\n return ensurePath(path, 'localDir');\n}\n\nexport function ensureCachePath(path: string): string {\n return ensurePath(path, 'cacheDir');\n}\n\nexport function isValidPath(\n path: string,\n key: 'localDir' | 'cacheDir',\n): boolean {\n const baseDir = upath.resolve(GlobalConfig.get(key));\n const fullPath = upath.resolve(\n upath.isAbsolute(path) ? path : upath.join(baseDir, path),\n );\n\n return fullPath.startsWith(baseDir);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,0BACd,cACA,cACQ;CACR,MAAM,cAAc;CACpB,MAAM,eAAe,MAAM,QAAQ,aAAa,YAAY;CAC5D,MAAM,mBAAmB,MAAM,QAC7B,MAAM,QAAQ,YAAY,GAC1B,YACF;CACA,OAAO,MAAM,SAAS,aAAa,gBAAgB;AACrD;;;;AAKA,SAAgB,iBACd,SACA,UACU;CACV,OAAO,SAAS,QAAQ,SAAS,iBAAiB,MAAM,OAAO,CAAC;AAClE;AAEA,SAAS,cAAc,MAAc,YAA0B;CAC7D,IAAI,CAAC,KAAK,WAAW,UAAU,GAAG;EAChC,OAAO,MACL;GAAE;GAAM;EAAW,GACnB,qDACF;EACA,MAAM,IAAI,MAAM,2BAA2B;CAC7C;AACF;AAEA,SAAS,WAAW,MAAc,KAAsC;CACtE,MAAM,UAAU,MAAM,QAAQ,aAAa,IAAI,GAAG,CAAC;CACnD,MAAM,WAAW,MAAM,QACrB,MAAM,WAAW,IAAI,IAAI,OAAO,MAAM,KAAK,SAAS,IAAI,CAC1D;CACA,cAAc,UAAU,OAAO;CAC/B,OAAO;AACT;AAEA,SAAgB,gBAAgB,MAAsB;CACpD,OAAO,WAAW,MAAM,UAAU;AACpC;AAEA,SAAgB,gBAAgB,MAAsB;CACpD,OAAO,WAAW,MAAM,UAAU;AACpC;AAEA,SAAgB,YACd,MACA,KACS;CACT,MAAM,UAAU,MAAM,QAAQ,aAAa,IAAI,GAAG,CAAC;CAKnD,OAJiB,MAAM,QACrB,MAAM,WAAW,IAAI,IAAI,OAAO,MAAM,KAAK,SAAS,IAAI,CAG5C,CAAC,CAAC,WAAW,OAAO;AACpC"}
|
package/dist/util/minimatch.js
CHANGED
|
@@ -11,17 +11,7 @@ function minimatch(pattern, options, useCache = true) {
|
|
|
11
11
|
if (useCache) cache.set(key, instance);
|
|
12
12
|
return instance;
|
|
13
13
|
}
|
|
14
|
-
function minimatchFilter(pattern, options, useCache = true) {
|
|
15
|
-
const key = options ? `${pattern}:${JSON.stringify(options)}` : pattern;
|
|
16
|
-
if (useCache) {
|
|
17
|
-
const cachedResult = cache.get(key);
|
|
18
|
-
if (cachedResult) return (fileName) => cachedResult.match(fileName);
|
|
19
|
-
}
|
|
20
|
-
const instance = new Minimatch(pattern, options);
|
|
21
|
-
if (useCache) cache.set(key, instance);
|
|
22
|
-
return (fileName) => instance.match(fileName);
|
|
23
|
-
}
|
|
24
14
|
//#endregion
|
|
25
|
-
export { minimatch
|
|
15
|
+
export { minimatch };
|
|
26
16
|
|
|
27
17
|
//# sourceMappingURL=minimatch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimatch.js","names":[],"sources":["../../lib/util/minimatch.ts"],"sourcesContent":["import type { MinimatchOptions } from 'minimatch';\nimport { Minimatch } from 'minimatch';\n\nconst cache = new Map<string, Minimatch>();\n\nexport function minimatch(\n pattern: string,\n options?: MinimatchOptions,\n useCache = true,\n): Minimatch {\n const key = options ? `${pattern}:${JSON.stringify(options)}` : pattern;\n\n if (useCache) {\n const cachedResult = cache.get(key);\n if (cachedResult) {\n return cachedResult;\n }\n }\n\n const instance = new Minimatch(pattern, options);\n if (useCache) {\n cache.set(key, instance);\n }\n return instance;\n}\n\nexport function minimatchFilter(\n pattern: string,\n options?: MinimatchOptions,\n useCache = true,\n): (fileName: string) => boolean {\n const key = options ? `${pattern}:${JSON.stringify(options)}` : pattern;\n\n if (useCache) {\n const cachedResult = cache.get(key);\n if (cachedResult) {\n return (fileName) => cachedResult.match(fileName);\n }\n }\n\n const instance = new Minimatch(pattern, options);\n if (useCache) {\n cache.set(key, instance);\n }\n return (fileName) => instance.match(fileName);\n}\n"],"mappings":";;AAGA,MAAM,wBAAQ,IAAI,IAAuB;AAEzC,SAAgB,UACd,SACA,SACA,WAAW,MACA;CACX,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,UAAU,OAAO,MAAM;CAEhE,IAAI,UAAU;EACZ,MAAM,eAAe,MAAM,IAAI,GAAG;EAClC,IAAI,cACF,OAAO;CAEX;CAEA,MAAM,WAAW,IAAI,UAAU,SAAS,OAAO;CAC/C,IAAI,UACF,MAAM,IAAI,KAAK,QAAQ;CAEzB,OAAO;AACT
|
|
1
|
+
{"version":3,"file":"minimatch.js","names":[],"sources":["../../lib/util/minimatch.ts"],"sourcesContent":["import type { MinimatchOptions } from 'minimatch';\nimport { Minimatch } from 'minimatch';\n\nconst cache = new Map<string, Minimatch>();\n\nexport function minimatch(\n pattern: string,\n options?: MinimatchOptions,\n useCache = true,\n): Minimatch {\n const key = options ? `${pattern}:${JSON.stringify(options)}` : pattern;\n\n if (useCache) {\n const cachedResult = cache.get(key);\n if (cachedResult) {\n return cachedResult;\n }\n }\n\n const instance = new Minimatch(pattern, options);\n if (useCache) {\n cache.set(key, instance);\n }\n return instance;\n}\n\nexport function minimatchFilter(\n pattern: string,\n options?: MinimatchOptions,\n useCache = true,\n): (fileName: string) => boolean {\n const key = options ? `${pattern}:${JSON.stringify(options)}` : pattern;\n\n if (useCache) {\n const cachedResult = cache.get(key);\n if (cachedResult) {\n return (fileName) => cachedResult.match(fileName);\n }\n }\n\n const instance = new Minimatch(pattern, options);\n if (useCache) {\n cache.set(key, instance);\n }\n return (fileName) => instance.match(fileName);\n}\n"],"mappings":";;AAGA,MAAM,wBAAQ,IAAI,IAAuB;AAEzC,SAAgB,UACd,SACA,SACA,WAAW,MACA;CACX,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,UAAU,OAAO,MAAM;CAEhE,IAAI,UAAU;EACZ,MAAM,eAAe,MAAM,IAAI,GAAG;EAClC,IAAI,cACF,OAAO;CAEX;CAEA,MAAM,WAAW,IAAI,UAAU,SAAS,OAAO;CAC/C,IAAI,UACF,MAAM,IAAI,KAAK,QAAQ;CAEzB,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "renovate",
|
|
3
3
|
"description": "Automated dependency updates. Flexible so you don't need to be.",
|
|
4
|
-
"version": "44.
|
|
4
|
+
"version": "44.28.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"renovate": "dist/renovate.js",
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
"lint-staged": "17.3.0",
|
|
274
274
|
"markdownlint-cli2": "0.23.2",
|
|
275
275
|
"markdownlint-cli2-formatter-template": "0.0.4",
|
|
276
|
-
"memfs": "4.
|
|
276
|
+
"memfs": "4.68.0",
|
|
277
277
|
"nock": "14.0.17",
|
|
278
278
|
"npm-run-all2": "9.0.3",
|
|
279
279
|
"nyc": "18.0.0",
|
package/renovate-schema.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"title": "JSON schema for Renovate 44.
|
|
3
|
+
"title": "JSON schema for Renovate 44.28.0 config files (https://renovatebot.com/)",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"x-renovate-version": "44.
|
|
5
|
+
"x-renovate-version": "44.28.0",
|
|
6
6
|
"allowComments": true,
|
|
7
7
|
"type": "object",
|
|
8
8
|
"definitions": {
|
|
@@ -6417,6 +6417,7 @@
|
|
|
6417
6417
|
"gomodMassage",
|
|
6418
6418
|
"gomodTidy",
|
|
6419
6419
|
"gomodTidy1.17",
|
|
6420
|
+
"gomodTidyAll",
|
|
6420
6421
|
"gomodTidyE",
|
|
6421
6422
|
"gomodUpdateImportPaths",
|
|
6422
6423
|
"gomodSkipVendor",
|