renovate 39.248.2 → 39.248.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,10 @@ class RepoCacheBase {
50
50
  logger_1.logger.debug(`RepoCacheBase.load() - expecting data of type 'string' received '${typeof oldCache}' instead - skipping`);
51
51
  return;
52
52
  }
53
+ if (!is_1.default.nonEmptyString(oldCache)) {
54
+ logger_1.logger.debug('RepoCacheBase.load() - cache file is empty - skipping');
55
+ return;
56
+ }
53
57
  const cacheV13 = schema_1.RepoCacheV13.safeParse(oldCache);
54
58
  if (cacheV13.success) {
55
59
  await this.restore(cacheV13.data);
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../lib/util/cache/repository/impl/base.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,sDAAyD;AACzD,+CAA4C;AAC5C,gDAA2E;AAC3E,wCAAqC;AACrC,kDAAmD;AACnD,sCAA2C;AAC3C,8CAAiD;AAEjD,sCAAyC;AAGzC,MAAsB,aAAa;IAMZ;IACA;IANX,QAAQ,GAAG,qBAAY,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;IAC3C,OAAO,GAAkB,IAAI,CAAC;IAC9B,IAAI,GAAkB,EAAE,CAAC;IAEjC,YACqB,UAAkB,EAClB,WAAmB;QADnB,eAAU,GAAV,UAAU,CAAQ;QAClB,gBAAW,GAAX,WAAW,CAAQ;IACrC,CAAC;IAMI,MAAM,CAAC,SAAS,CAAC,KAAa;QACpC,MAAM,IAAI,GAAkB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9C,uBAAuB;QACvB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnC,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;oBAC7B,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,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C,EAAE,GAAG,EAAE,EAAE,gCAAgC,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAA,6BAAgB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,MAAM,OAAO,GAAG,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,CAAC;QACpC,IAAI,aAAa,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,MAAM,QAAQ,GAAG,uBAAc,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAErC,MAAM,OAAO,GAAG,MAAM,IAAA,2BAAgB,EAAC,OAAO,CAAC,CAAC;QAEhD,MAAM,IAAI,CAAC,KAAK,CAAC;YACf,QAAQ;YACR,UAAU;YACV,WAAW;YACX,OAAO;YACP,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,OAAO,GAAG,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC;IACxC,CAAC;CACF;AA/FD,sCA+FC","sourcesContent":["import is from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../../config/global';\nimport { logger } from '../../../../logger';\nimport { compressToBase64, decompressFromBase64 } from '../../../compress';\nimport { hash } from '../../../hash';\nimport { safeStringify } from '../../../stringify';\nimport { CACHE_REVISION } from '../common';\nimport { cleanupHttpCache } from '../http-cache';\nimport type { RepoCacheRecord } from '../schema';\nimport { RepoCacheV13 } from '../schema';\nimport type { RepoCache, RepoCacheData } from '../types';\n\nexport abstract class RepoCacheBase implements RepoCache {\n protected platform = GlobalConfig.get('platform')!;\n private oldHash: string | null = null;\n private data: RepoCacheData = {};\n\n protected constructor(\n protected readonly repository: string,\n protected readonly fingerprint: string,\n ) {}\n\n protected abstract read(): Promise<string | null>;\n\n protected abstract write(data: RepoCacheRecord): Promise<void>;\n\n private static parseData(input: string): RepoCacheData {\n const data: RepoCacheData = JSON.parse(input);\n // istanbul ignore next\n if (data.branches) {\n for (const branch of data.branches) {\n if (branch.branchFingerprint) {\n branch.commitFingerprint = branch.branchFingerprint;\n delete branch.branchFingerprint;\n }\n }\n }\n return data;\n }\n\n private async restore(oldCache: RepoCacheRecord): Promise<void> {\n if (oldCache.fingerprint !== this.fingerprint) {\n logger.debug('Repository cache fingerprint is invalid');\n return;\n }\n const jsonStr = await decompressFromBase64(oldCache.payload);\n this.data = RepoCacheBase.parseData(jsonStr);\n this.oldHash = oldCache.hash;\n }\n\n async load(): Promise<void> {\n try {\n const oldCache = await this.read();\n if (!is.string(oldCache)) {\n logger.debug(\n `RepoCacheBase.load() - expecting data of type 'string' received '${typeof oldCache}' instead - skipping`,\n );\n return;\n }\n\n const cacheV13 = RepoCacheV13.safeParse(oldCache);\n if (cacheV13.success) {\n await this.restore(cacheV13.data);\n logger.debug('Repository cache is restored from revision 13');\n return;\n }\n\n logger.warn({ err: cacheV13.error }, 'Repository cache is invalid');\n } catch (err) /* istanbul ignore next: not easily testable */ {\n logger.debug({ err }, 'Error reading repository cache');\n }\n }\n\n async save(): Promise<void> {\n cleanupHttpCache(this.data);\n const jsonStr = safeStringify(this.data);\n const hashedJsonStr = hash(jsonStr);\n if (hashedJsonStr === this.oldHash) {\n return;\n }\n\n const revision = CACHE_REVISION;\n const repository = this.repository;\n const fingerprint = this.fingerprint;\n\n const payload = await compressToBase64(jsonStr);\n\n await this.write({\n revision,\n repository,\n fingerprint,\n payload,\n hash: hashedJsonStr,\n });\n }\n\n getData(): RepoCacheData {\n return this.data;\n }\n\n isModified(): boolean | undefined {\n if (!this.oldHash) {\n return undefined;\n }\n const jsonStr = safeStringify(this.data);\n return hash(jsonStr) !== this.oldHash;\n }\n}\n"]}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../lib/util/cache/repository/impl/base.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAClC,sDAAyD;AACzD,+CAA4C;AAC5C,gDAA2E;AAC3E,wCAAqC;AACrC,kDAAmD;AACnD,sCAA2C;AAC3C,8CAAiD;AAEjD,sCAAyC;AAGzC,MAAsB,aAAa;IAMZ;IACA;IANX,QAAQ,GAAG,qBAAY,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;IAC3C,OAAO,GAAkB,IAAI,CAAC;IAC9B,IAAI,GAAkB,EAAE,CAAC;IAEjC,YACqB,UAAkB,EAClB,WAAmB;QADnB,eAAU,GAAV,UAAU,CAAQ;QAClB,gBAAW,GAAX,WAAW,CAAQ;IACrC,CAAC;IAMI,MAAM,CAAC,SAAS,CAAC,KAAa;QACpC,MAAM,IAAI,GAAkB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9C,uBAAuB;QACvB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACnC,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;oBAC7B,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;oBACpD,OAAO,MAAM,CAAC,iBAAiB,CAAC;gBAClC,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,OAAO,CAAC,QAAyB;QAC7C,IAAI,QAAQ,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;YAC9C,eAAM,CAAC,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BAAgB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,MAAM,OAAO,GAAG,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,CAAC;QACpC,IAAI,aAAa,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,MAAM,QAAQ,GAAG,uBAAc,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAErC,MAAM,OAAO,GAAG,MAAM,IAAA,2BAAgB,EAAC,OAAO,CAAC,CAAC;QAEhD,MAAM,IAAI,CAAC,KAAK,CAAC;YACf,QAAQ;YACR,UAAU;YACV,WAAW;YACX,OAAO;YACP,IAAI,EAAE,aAAa;SACpB,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,MAAM,OAAO,GAAG,IAAA,yBAAa,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC;IACxC,CAAC;CACF;AApGD,sCAoGC","sourcesContent":["import is from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../../config/global';\nimport { logger } from '../../../../logger';\nimport { compressToBase64, decompressFromBase64 } from '../../../compress';\nimport { hash } from '../../../hash';\nimport { safeStringify } from '../../../stringify';\nimport { CACHE_REVISION } from '../common';\nimport { cleanupHttpCache } from '../http-cache';\nimport type { RepoCacheRecord } from '../schema';\nimport { RepoCacheV13 } from '../schema';\nimport type { RepoCache, RepoCacheData } from '../types';\n\nexport abstract class RepoCacheBase implements RepoCache {\n protected platform = GlobalConfig.get('platform')!;\n private oldHash: string | null = null;\n private data: RepoCacheData = {};\n\n protected constructor(\n protected readonly repository: string,\n protected readonly fingerprint: string,\n ) {}\n\n protected abstract read(): Promise<string | null>;\n\n protected abstract write(data: RepoCacheRecord): Promise<void>;\n\n private static parseData(input: string): RepoCacheData {\n const data: RepoCacheData = JSON.parse(input);\n // istanbul ignore next\n if (data.branches) {\n for (const branch of data.branches) {\n if (branch.branchFingerprint) {\n branch.commitFingerprint = branch.branchFingerprint;\n delete branch.branchFingerprint;\n }\n }\n }\n return data;\n }\n\n private async restore(oldCache: RepoCacheRecord): Promise<void> {\n if (oldCache.fingerprint !== this.fingerprint) {\n logger.debug('Repository cache fingerprint is invalid');\n return;\n }\n const jsonStr = await decompressFromBase64(oldCache.payload);\n this.data = RepoCacheBase.parseData(jsonStr);\n this.oldHash = oldCache.hash;\n }\n\n async load(): Promise<void> {\n try {\n const oldCache = await this.read();\n if (!is.string(oldCache)) {\n logger.debug(\n `RepoCacheBase.load() - expecting data of type 'string' received '${typeof oldCache}' instead - skipping`,\n );\n return;\n }\n\n if (!is.nonEmptyString(oldCache)) {\n logger.debug('RepoCacheBase.load() - cache file is empty - skipping');\n return;\n }\n\n const cacheV13 = RepoCacheV13.safeParse(oldCache);\n if (cacheV13.success) {\n await this.restore(cacheV13.data);\n logger.debug('Repository cache is restored from revision 13');\n return;\n }\n\n logger.warn({ err: cacheV13.error }, 'Repository cache is invalid');\n } catch (err) /* istanbul ignore next: not easily testable */ {\n logger.debug({ err }, 'Error reading repository cache');\n }\n }\n\n async save(): Promise<void> {\n cleanupHttpCache(this.data);\n const jsonStr = safeStringify(this.data);\n const hashedJsonStr = hash(jsonStr);\n if (hashedJsonStr === this.oldHash) {\n return;\n }\n\n const revision = CACHE_REVISION;\n const repository = this.repository;\n const fingerprint = this.fingerprint;\n\n const payload = await compressToBase64(jsonStr);\n\n await this.write({\n revision,\n repository,\n fingerprint,\n payload,\n hash: hashedJsonStr,\n });\n }\n\n getData(): RepoCacheData {\n return this.data;\n }\n\n isModified(): boolean | undefined {\n if (!this.oldHash) {\n return undefined;\n }\n const jsonStr = safeStringify(this.data);\n return hash(jsonStr) !== this.oldHash;\n }\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": "39.248.2",
4
+ "version": "39.248.4",
5
5
  "type": "commonjs",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -323,7 +323,7 @@
323
323
  "emojibase-data": "16.0.2",
324
324
  "esbuild": "0.25.2",
325
325
  "eslint": "9.24.0",
326
- "eslint-config-prettier": "10.1.1",
326
+ "eslint-config-prettier": "10.1.2",
327
327
  "eslint-formatter-gha": "1.5.2",
328
328
  "eslint-import-resolver-typescript": "4.3.2",
329
329
  "eslint-plugin-import": "2.31.0",