From be0bd3d63e12a38b54f684f8d2692bfef393c527 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 20 Jul 2024 16:51:43 +0000 Subject: [PATCH] build(deps): update dependency prettier to v3.3.3 (#30272) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Rhys Arkins <rhys@arkins.net> --- lib/config/global.ts | 4 +++- lib/config/validation.ts | 4 ++-- lib/modules/datasource/docker/index.ts | 2 +- lib/modules/datasource/index.ts | 2 +- lib/modules/manager/custom/regex/strategies.ts | 2 +- lib/util/number.ts | 2 +- lib/util/package-rules/current-version.ts | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 9 files changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/config/global.ts b/lib/config/global.ts index b1b1205dbd..47d959020f 100644 --- a/lib/config/global.ts +++ b/lib/config/global.ts @@ -54,7 +54,9 @@ export class GlobalConfig { key?: Key, defaultValue?: RepoGlobalConfig[Key], ): RepoGlobalConfig | RepoGlobalConfig[Key] { - return key ? GlobalConfig.config[key] ?? defaultValue : GlobalConfig.config; + return key + ? (GlobalConfig.config[key] ?? defaultValue) + : GlobalConfig.config; } static set(config: RenovateConfig | RepoGlobalConfig): RenovateConfig { diff --git a/lib/config/validation.ts b/lib/config/validation.ts index cec5ce1918..62d1aa6c3c 100644 --- a/lib/config/validation.ts +++ b/lib/config/validation.ts @@ -693,7 +693,7 @@ export async function validateConfig( } else if (key === 'env') { const allowedEnvVars = configType === 'global' - ? (config.allowedEnv as string[]) ?? [] + ? ((config.allowedEnv as string[]) ?? []) : GlobalConfig.get('allowedEnv', []); for (const [envVarName, envVarValue] of Object.entries(val)) { if (!is.string(envVarValue)) { @@ -811,7 +811,7 @@ export async function validateConfig( if (key === 'hostRules' && is.array(val)) { const allowedHeaders = configType === 'global' - ? (config.allowedHeaders as string[]) ?? [] + ? ((config.allowedHeaders as string[]) ?? []) : GlobalConfig.get('allowedHeaders', []); for (const rule of val as HostRule[]) { if (is.nonEmptyString(rule.matchHost)) { diff --git a/lib/modules/datasource/docker/index.ts b/lib/modules/datasource/docker/index.ts index 6c30b66fdf..86465d94bb 100644 --- a/lib/modules/datasource/docker/index.ts +++ b/lib/modules/datasource/docker/index.ts @@ -1099,7 +1099,7 @@ export class DockerDatasource extends Datasource { const tags = releases.map((release) => release.version); const latestTag = tags.includes('latest') ? 'latest' - : findLatestStable(tags) ?? tags[tags.length - 1]; + : (findLatestStable(tags) ?? tags[tags.length - 1]); // istanbul ignore if: needs test if (!latestTag) { diff --git a/lib/modules/datasource/index.ts b/lib/modules/datasource/index.ts index df84151bca..006a0023c2 100644 --- a/lib/modules/datasource/index.ts +++ b/lib/modules/datasource/index.ts @@ -227,7 +227,7 @@ function resolveRegistryUrls( } return is.function_(datasource.defaultRegistryUrls) ? datasource.defaultRegistryUrls() - : datasource.defaultRegistryUrls ?? []; + : (datasource.defaultRegistryUrls ?? []); } const customUrls = registryUrls?.filter(Boolean); let resolvedUrls: string[] = []; diff --git a/lib/modules/manager/custom/regex/strategies.ts b/lib/modules/manager/custom/regex/strategies.ts index 1424745417..2e489e43bf 100644 --- a/lib/modules/manager/custom/regex/strategies.ts +++ b/lib/modules/manager/custom/regex/strategies.ts @@ -53,7 +53,7 @@ export function handleCombination( .map((match) => ({ groups: match.groups ?? /* istanbul ignore next: can this happen? */ {}, replaceString: - match?.groups?.currentValue ?? match?.groups?.currentDigest + (match?.groups?.currentValue ?? match?.groups?.currentDigest) ? match[0] : undefined, })) diff --git a/lib/util/number.ts b/lib/util/number.ts index 6e8ebb742d..e9ef0cbd06 100644 --- a/lib/util/number.ts +++ b/lib/util/number.ts @@ -27,5 +27,5 @@ export function parseInteger( // Number.parseInt returns NaN if the value is not a finite integer. const parsed = is.string(val) && /^\d+$/.test(val) ? Number.parseInt(val, 10) : Number.NaN; - return Number.isFinite(parsed) ? parsed : def ?? 0; + return Number.isFinite(parsed) ? parsed : (def ?? 0); } diff --git a/lib/util/package-rules/current-version.ts b/lib/util/package-rules/current-version.ts index 6be3688cc7..71473053d9 100644 --- a/lib/util/package-rules/current-version.ts +++ b/lib/util/package-rules/current-version.ts @@ -48,7 +48,7 @@ export class CurrentVersionMatcher extends Matcher { const compareVersion = version.isVersion(currentValue) ? currentValue // it's a version so we can match against it - : lockedVersion ?? currentVersion; // need to match against this currentVersion, if available + : (lockedVersion ?? currentVersion); // need to match against this currentVersion, if available if (is.nullOrUndefined(compareVersion)) { return false; } diff --git a/package.json b/package.json index 5db4309a3a..d88b77f355 100644 --- a/package.json +++ b/package.json @@ -227,7 +227,7 @@ "p-queue": "6.6.2", "p-throttle": "4.1.1", "parse-link-header": "2.0.0", - "prettier": "3.3.2", + "prettier": "3.3.3", "redis": "4.6.15", "remark": "13.0.0", "remark-github": "10.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 448d3a6888..668a1b7ce4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -268,8 +268,8 @@ importers: specifier: 2.0.0 version: 2.0.0 prettier: - specifier: 3.3.2 - version: 3.3.2 + specifier: 3.3.3 + version: 3.3.3 redis: specifier: 4.6.15 version: 4.6.15 @@ -5051,8 +5051,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.3.2: - resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} hasBin: true @@ -11955,7 +11955,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.3.2: {} + prettier@3.3.3: {} pretty-format@29.7.0: dependencies: -- GitLab