renovate 41.151.0 → 41.151.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,7 +95,7 @@ async function filterInternalChecks(config, versioningApi, bucket, sortedRelease
95
95
  depName,
96
96
  versions: candidateVersionsWithoutReleaseTimestamp['timestamp-optional'],
97
97
  check: 'minimumReleaseAge',
98
- }, `${candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length} release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=optional-timestamp, proceeding`);
98
+ }, `${candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length} release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding`);
99
99
  }
100
100
  if (!release) {
101
101
  if (pendingReleases.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"filter-checks.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/process/lookup/filter-checks.ts"],"names":[],"mappings":";;AAyBA,oDAuKC;;AAhMD,kEAAkC;AAClC,+CAAsD;AAEtD,+CAA4C;AAE5C,4FAAwF;AAExF,gDAAqD;AACrD,wEAI2C;AAC3C,oDAAuD;AACvD,kEAAmE;AACnE,8DAAoD;AAEpD,+CAA8C;AAQvC,KAAK,UAAU,oBAAoB,CACxC,MAAkD,EAClD,aAA4B,EAC5B,MAAc,EACd,cAAyB;IAEzB,MAAM,EACJ,cAAc,EACd,UAAU,EACV,OAAO,EACP,WAAW,EACX,oBAAoB,GACrB,GAAG,MAAM,CAAC;IACX,IAAI,OAAO,GAAwB,SAAS,CAAC;IAC7C,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,eAAe,GAAc,EAAE,CAAC;IACpC,IAAI,oBAAoB,KAAK,MAAM,EAAE,CAAC;QACpC,iEAAiE;QACjE,OAAO,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC;IACjC,CAAC;SAAM,CAAC;QACN,MAAM,wCAAwC,GAG1C;YACF,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ACX,CAAC;YACH,CAAC;YACD,sEAAsE;YACtE,OAAO,GAAG,gBAAgB,CAAC;YAC3B,MAAM;QACR,CAAC;QAED,IAAI,wCAAwC,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE,CAAC;YAC1E,eAAM,CAAC,KAAK,CACV;gBACE,OAAO;gBACP,QAAQ,EACN,wCAAwC,CAAC,oBAAoB,CAAC;gBAChE,KAAK,EAAE,mBAAmB;aAC3B,EACD,WAAW,wCAAwC,CAAC,oBAAoB,CAAC,CAAC,MAAM,iIAAiI,CAClN,CAAC;QACJ,CAAC;QAED,IAAI,wCAAwC,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE,CAAC;YAC1E,eAAM,CAAC,IAAI,CACT;gBACE,OAAO;gBACP,QAAQ,EACN,wCAAwC,CAAC,oBAAoB,CAAC;gBAChE,KAAK,EAAE,mBAAmB;aAC3B,EACD,GAAG,wCAAwC,CAAC,oBAAoB,CAAC,CAAC,MAAM,kIAAkI,CAC3M,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,IAAI,eAAe,CAAC,MAAM,EAAE,CAAC;gBAC3B,0DAA0D;gBAC1D,eAAM,CAAC,KAAK,CACV,EAAE,OAAO,EAAE,MAAM,EAAE,EACnB,yCAAyC,CAC1C,CAAC;gBACF,OAAO,GAAG,eAAe,CAAC,GAAG,EAAE,CAAC;gBAChC,0EAA0E;gBAC1E,eAAe,GAAG,EAAE,CAAC;gBACrB,IAAI,oBAAoB,KAAK,QAAQ,EAAE,CAAC;oBACtC,aAAa,GAAG,IAAI,CAAC;gBACvB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AACrD,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { mergeChildConfig } from '../../../../config';\nimport type { MinimumReleaseAgeBehaviour } from '../../../../config/types';\nimport { logger } from '../../../../logger';\nimport type { Release } from '../../../../modules/datasource';\nimport { postprocessRelease } from '../../../../modules/datasource/postprocess-release';\nimport type { VersioningApi } from '../../../../modules/versioning';\nimport { getElapsedMs } from '../../../../util/date';\nimport {\n getMergeConfidenceLevel,\n isActiveConfidenceLevel,\n satisfiesConfidenceLevel,\n} from '../../../../util/merge-confidence';\nimport { coerceNumber } from '../../../../util/number';\nimport { applyPackageRules } from '../../../../util/package-rules';\nimport { toMs } from '../../../../util/pretty-time';\nimport type { LookupUpdateConfig, UpdateResult } from './types';\nimport { getUpdateType } from './update-type';\n\nexport interface InternalChecksResult {\n release?: Release;\n pendingChecks: boolean;\n pendingReleases: Release[];\n}\n\nexport async function filterInternalChecks(\n config: Partial<LookupUpdateConfig & UpdateResult>,\n versioningApi: VersioningApi,\n bucket: string,\n sortedReleases: Release[],\n): Promise<InternalChecksResult> {\n const {\n currentVersion,\n datasource,\n depName,\n packageName,\n internalChecksFilter,\n } = config;\n let release: Release | undefined = undefined;\n let pendingChecks = false;\n let pendingReleases: Release[] = [];\n if (internalChecksFilter === 'none') {\n // Don't care if minimumReleaseAge or minimumConfidence are unmet\n release = sortedReleases.pop();\n } else {\n const candidateVersionsWithoutReleaseTimestamp: Record<\n MinimumReleaseAgeBehaviour,\n string[]\n > = {\n 'timestamp-required': [],\n 'timestamp-optional': [],\n };\n\n // iterate through releases from highest to lowest, looking for the first which will pass checks if present\n for (let candidateRelease of sortedReleases.reverse()) {\n // merge the release data into dependency config\n let releaseConfig = mergeChildConfig(config, candidateRelease);\n // calculate updateType and then apply it\n releaseConfig.updateType = getUpdateType(\n releaseConfig,\n versioningApi,\n // TODO #22198\n currentVersion!,\n candidateRelease.version,\n );\n releaseConfig = mergeChildConfig(\n releaseConfig,\n releaseConfig[releaseConfig.updateType]!,\n );\n // Apply packageRules in case any apply to updateType\n releaseConfig = await applyPackageRules(releaseConfig, 'update-type');\n\n const updatedCandidateRelease = await postprocessRelease(\n releaseConfig,\n candidateRelease,\n );\n if (!updatedCandidateRelease) {\n continue;\n }\n candidateRelease = updatedCandidateRelease;\n\n // Now check for a minimumReleaseAge config\n const { minimumConfidence, minimumReleaseAge, updateType } =\n releaseConfig;\n if (is.nonEmptyString(minimumReleaseAge)) {\n const minimumReleaseAgeBehaviour =\n releaseConfig.minimumReleaseAgeBehaviour;\n\n // if there is a releaseTimestamp, regardless of `minimumReleaseAgeBehaviour`, we should process it\n if (candidateRelease.releaseTimestamp) {\n // we should skip this if we have a timestamp that isn't passing checks:\n if (\n getElapsedMs(candidateRelease.releaseTimestamp) <\n coerceNumber(toMs(minimumReleaseAge), 0)\n ) {\n // Skip it if it doesn't pass checks\n logger.trace(\n { depName, check: 'minimumReleaseAge' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n } // or if there is no timestamp, and we're running in `minimumReleaseAgeBehaviour=timestamp-required`\n else if (\n is.nullOrUndefined(candidateRelease.releaseTimestamp) &&\n minimumReleaseAgeBehaviour === 'timestamp-required'\n ) {\n // Skip it, as we require a timestamp\n candidateVersionsWithoutReleaseTimestamp[\n minimumReleaseAgeBehaviour\n ].push(candidateRelease.version);\n pendingReleases.unshift(candidateRelease);\n continue;\n } // if there is no timestamp, and we're running in `optional` mode, we can allow it\n else if (\n is.nullOrUndefined(candidateRelease.releaseTimestamp) &&\n minimumReleaseAgeBehaviour === 'timestamp-optional'\n ) {\n candidateVersionsWithoutReleaseTimestamp[\n minimumReleaseAgeBehaviour\n ].push(candidateRelease.version);\n }\n }\n\n // TODO #22198\n if (isActiveConfidenceLevel(minimumConfidence!)) {\n const confidenceLevel =\n (await getMergeConfidenceLevel(\n datasource!,\n packageName!,\n currentVersion!,\n candidateRelease.version,\n updateType!,\n )) ?? 'neutral';\n // TODO #22198\n if (!satisfiesConfidenceLevel(confidenceLevel, minimumConfidence!)) {\n logger.trace(\n { depName, check: 'minimumConfidence' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n }\n // If we get to here, then the release is OK and we can stop iterating\n release = candidateRelease;\n break;\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length) {\n logger.debug(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-required'],\n check: 'minimumReleaseAge',\n },\n `Marking ${candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length} release(s) as pending, as they not have a releaseTimestamp and we're running with minimumReleaseAgeBehaviour=require-timestamp`,\n );\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length) {\n logger.warn(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-optional'],\n check: 'minimumReleaseAge',\n },\n `${candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length} release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=optional-timestamp, proceeding`,\n );\n }\n\n if (!release) {\n if (pendingReleases.length) {\n // If all releases were pending then just take the highest\n logger.trace(\n { depName, bucket },\n 'All releases are pending - using latest',\n );\n release = pendingReleases.pop();\n // None are pending anymore because we took the latest, so empty the array\n pendingReleases = [];\n if (internalChecksFilter === 'strict') {\n pendingChecks = true;\n }\n }\n }\n }\n\n return { release, pendingChecks, pendingReleases };\n}\n"]}
1
+ {"version":3,"file":"filter-checks.js","sourceRoot":"","sources":["../../../../../lib/workers/repository/process/lookup/filter-checks.ts"],"names":[],"mappings":";;AAyBA,oDAuKC;;AAhMD,kEAAkC;AAClC,+CAAsD;AAEtD,+CAA4C;AAE5C,4FAAwF;AAExF,gDAAqD;AACrD,wEAI2C;AAC3C,oDAAuD;AACvD,kEAAmE;AACnE,8DAAoD;AAEpD,+CAA8C;AAQvC,KAAK,UAAU,oBAAoB,CACxC,MAAkD,EAClD,aAA4B,EAC5B,MAAc,EACd,cAAyB;IAEzB,MAAM,EACJ,cAAc,EACd,UAAU,EACV,OAAO,EACP,WAAW,EACX,oBAAoB,GACrB,GAAG,MAAM,CAAC;IACX,IAAI,OAAO,GA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,IAAI,CAAC;gBACvB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AACrD,CAAC","sourcesContent":["import is from '@sindresorhus/is';\nimport { mergeChildConfig } from '../../../../config';\nimport type { MinimumReleaseAgeBehaviour } from '../../../../config/types';\nimport { logger } from '../../../../logger';\nimport type { Release } from '../../../../modules/datasource';\nimport { postprocessRelease } from '../../../../modules/datasource/postprocess-release';\nimport type { VersioningApi } from '../../../../modules/versioning';\nimport { getElapsedMs } from '../../../../util/date';\nimport {\n getMergeConfidenceLevel,\n isActiveConfidenceLevel,\n satisfiesConfidenceLevel,\n} from '../../../../util/merge-confidence';\nimport { coerceNumber } from '../../../../util/number';\nimport { applyPackageRules } from '../../../../util/package-rules';\nimport { toMs } from '../../../../util/pretty-time';\nimport type { LookupUpdateConfig, UpdateResult } from './types';\nimport { getUpdateType } from './update-type';\n\nexport interface InternalChecksResult {\n release?: Release;\n pendingChecks: boolean;\n pendingReleases: Release[];\n}\n\nexport async function filterInternalChecks(\n config: Partial<LookupUpdateConfig & UpdateResult>,\n versioningApi: VersioningApi,\n bucket: string,\n sortedReleases: Release[],\n): Promise<InternalChecksResult> {\n const {\n currentVersion,\n datasource,\n depName,\n packageName,\n internalChecksFilter,\n } = config;\n let release: Release | undefined = undefined;\n let pendingChecks = false;\n let pendingReleases: Release[] = [];\n if (internalChecksFilter === 'none') {\n // Don't care if minimumReleaseAge or minimumConfidence are unmet\n release = sortedReleases.pop();\n } else {\n const candidateVersionsWithoutReleaseTimestamp: Record<\n MinimumReleaseAgeBehaviour,\n string[]\n > = {\n 'timestamp-required': [],\n 'timestamp-optional': [],\n };\n\n // iterate through releases from highest to lowest, looking for the first which will pass checks if present\n for (let candidateRelease of sortedReleases.reverse()) {\n // merge the release data into dependency config\n let releaseConfig = mergeChildConfig(config, candidateRelease);\n // calculate updateType and then apply it\n releaseConfig.updateType = getUpdateType(\n releaseConfig,\n versioningApi,\n // TODO #22198\n currentVersion!,\n candidateRelease.version,\n );\n releaseConfig = mergeChildConfig(\n releaseConfig,\n releaseConfig[releaseConfig.updateType]!,\n );\n // Apply packageRules in case any apply to updateType\n releaseConfig = await applyPackageRules(releaseConfig, 'update-type');\n\n const updatedCandidateRelease = await postprocessRelease(\n releaseConfig,\n candidateRelease,\n );\n if (!updatedCandidateRelease) {\n continue;\n }\n candidateRelease = updatedCandidateRelease;\n\n // Now check for a minimumReleaseAge config\n const { minimumConfidence, minimumReleaseAge, updateType } =\n releaseConfig;\n if (is.nonEmptyString(minimumReleaseAge)) {\n const minimumReleaseAgeBehaviour =\n releaseConfig.minimumReleaseAgeBehaviour;\n\n // if there is a releaseTimestamp, regardless of `minimumReleaseAgeBehaviour`, we should process it\n if (candidateRelease.releaseTimestamp) {\n // we should skip this if we have a timestamp that isn't passing checks:\n if (\n getElapsedMs(candidateRelease.releaseTimestamp) <\n coerceNumber(toMs(minimumReleaseAge), 0)\n ) {\n // Skip it if it doesn't pass checks\n logger.trace(\n { depName, check: 'minimumReleaseAge' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n } // or if there is no timestamp, and we're running in `minimumReleaseAgeBehaviour=timestamp-required`\n else if (\n is.nullOrUndefined(candidateRelease.releaseTimestamp) &&\n minimumReleaseAgeBehaviour === 'timestamp-required'\n ) {\n // Skip it, as we require a timestamp\n candidateVersionsWithoutReleaseTimestamp[\n minimumReleaseAgeBehaviour\n ].push(candidateRelease.version);\n pendingReleases.unshift(candidateRelease);\n continue;\n } // if there is no timestamp, and we're running in `optional` mode, we can allow it\n else if (\n is.nullOrUndefined(candidateRelease.releaseTimestamp) &&\n minimumReleaseAgeBehaviour === 'timestamp-optional'\n ) {\n candidateVersionsWithoutReleaseTimestamp[\n minimumReleaseAgeBehaviour\n ].push(candidateRelease.version);\n }\n }\n\n // TODO #22198\n if (isActiveConfidenceLevel(minimumConfidence!)) {\n const confidenceLevel =\n (await getMergeConfidenceLevel(\n datasource!,\n packageName!,\n currentVersion!,\n candidateRelease.version,\n updateType!,\n )) ?? 'neutral';\n // TODO #22198\n if (!satisfiesConfidenceLevel(confidenceLevel, minimumConfidence!)) {\n logger.trace(\n { depName, check: 'minimumConfidence' },\n `Release ${candidateRelease.version} is pending status checks`,\n );\n pendingReleases.unshift(candidateRelease);\n continue;\n }\n }\n // If we get to here, then the release is OK and we can stop iterating\n release = candidateRelease;\n break;\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length) {\n logger.debug(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-required'],\n check: 'minimumReleaseAge',\n },\n `Marking ${candidateVersionsWithoutReleaseTimestamp['timestamp-required'].length} release(s) as pending, as they not have a releaseTimestamp and we're running with minimumReleaseAgeBehaviour=require-timestamp`,\n );\n }\n\n if (candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length) {\n logger.warn(\n {\n depName,\n versions:\n candidateVersionsWithoutReleaseTimestamp['timestamp-optional'],\n check: 'minimumReleaseAge',\n },\n `${candidateVersionsWithoutReleaseTimestamp['timestamp-optional'].length} release(s) did not have a releaseTimestamp, but as we're running with minimumReleaseAgeBehaviour=timestamp-optional, proceeding`,\n );\n }\n\n if (!release) {\n if (pendingReleases.length) {\n // If all releases were pending then just take the highest\n logger.trace(\n { depName, bucket },\n 'All releases are pending - using latest',\n );\n release = pendingReleases.pop();\n // None are pending anymore because we took the latest, so empty the array\n pendingReleases = [];\n if (internalChecksFilter === 'strict') {\n pendingChecks = true;\n }\n }\n }\n }\n\n return { release, pendingChecks, pendingReleases };\n}\n"]}
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": "41.151.0",
4
+ "version": "41.151.2",
5
5
  "type": "commonjs",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "volta": {
89
89
  "node": "22.20.0",
90
- "pnpm": "10.18.1"
90
+ "pnpm": "10.18.2"
91
91
  },
92
92
  "dependencies": {
93
93
  "@aws-sdk/client-codecommit": "3.899.0",
@@ -249,7 +249,7 @@
249
249
  "@types/mdast": "4.0.4",
250
250
  "@types/moo": "0.5.10",
251
251
  "@types/ms": "2.1.0",
252
- "@types/node": "22.18.8",
252
+ "@types/node": "22.18.9",
253
253
  "@types/parse-link-header": "2.0.3",
254
254
  "@types/punycode": "2.1.4",
255
255
  "@types/sax": "1.2.7",
@@ -1,7 +1,7 @@
1
1
  {
2
- "title": "JSON schema for Renovate 41.151.0 config files (https://renovatebot.com/)",
2
+ "title": "JSON schema for Renovate 41.151.2 config files (https://renovatebot.com/)",
3
3
  "$schema": "http://json-schema.org/draft-04/schema#",
4
- "x-renovate-version": "41.151.0",
4
+ "x-renovate-version": "41.151.2",
5
5
  "allowComments": true,
6
6
  "type": "object",
7
7
  "properties": {