From 4c2ce97bb4aa55c080d96a25361a37f7c2414d3b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 21 Jan 2024 08:20:41 +0000 Subject: [PATCH] build(deps): update dependency prettier to v3.2.2 (#26755) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Rhys Arkins <rhys@arkins.net> --- lib/modules/datasource/cpan/index.ts | 5 +++-- lib/modules/datasource/nuget/common.ts | 5 +++-- lib/modules/manager/asdf/upgradeable-tooling.ts | 10 ++++++---- lib/modules/manager/composer/schema.ts | 5 +++-- lib/modules/manager/dockerfile/extract.spec.ts | 14 ++++++++++---- lib/modules/manager/maven-wrapper/artifacts.ts | 5 +++-- .../manager/npm/extract/post/monorepo.spec.ts | 4 ++-- lib/modules/manager/npm/post-update/yarn.spec.ts | 6 +++--- lib/modules/manager/nuget/package-tree.spec.ts | 6 +++--- lib/modules/platform/azure/index.ts | 6 ++++-- lib/modules/platform/github/index.ts | 4 ++-- lib/util/git/private-key.spec.ts | 6 +++--- lib/util/http/github.ts | 4 ++-- lib/util/package-rules/sourceurl-prefixes.ts | 4 ++-- lib/util/template/index.ts | 5 ++--- .../repository/config-migration/pr/index.ts | 5 +++-- lib/workers/repository/update/pr/index.ts | 5 ++--- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 19 files changed, 61 insertions(+), 48 deletions(-) diff --git a/lib/modules/datasource/cpan/index.ts b/lib/modules/datasource/cpan/index.ts index 777da99563..ee8a808da5 100644 --- a/lib/modules/datasource/cpan/index.ts +++ b/lib/modules/datasource/cpan/index.ts @@ -79,8 +79,9 @@ export class CpanDatasource extends Datasource { deprecated: isDeprecated, maturity, } = hit; - const version = module.find(({ name }) => name === packageName) - ?.version; + const version = module.find( + ({ name }) => name === packageName, + )?.version; if (version) { // https://metacpan.org/pod/CPAN::DistnameInfo#maturity const isStable = maturity === 'released'; diff --git a/lib/modules/datasource/nuget/common.ts b/lib/modules/datasource/nuget/common.ts index cc9db0aee3..55ce19a78f 100644 --- a/lib/modules/datasource/nuget/common.ts +++ b/lib/modules/datasource/nuget/common.ts @@ -33,8 +33,9 @@ export function parseRegistryUrl(registryUrl: string): ParsedRegistryUrl { return { feedUrl: registryUrl, protocolVersion: null }; } let protocolVersion = 2; - const protocolVersionMatch = protocolVersionRegExp.exec(parsedUrl.hash) - ?.groups; + const protocolVersionMatch = protocolVersionRegExp.exec( + parsedUrl.hash, + )?.groups; if (protocolVersionMatch) { const { protocol } = protocolVersionMatch; parsedUrl.hash = ''; diff --git a/lib/modules/manager/asdf/upgradeable-tooling.ts b/lib/modules/manager/asdf/upgradeable-tooling.ts index 65c5099cd8..cabeec20c9 100644 --- a/lib/modules/manager/asdf/upgradeable-tooling.ts +++ b/lib/modules/manager/asdf/upgradeable-tooling.ts @@ -305,8 +305,9 @@ export const upgradeableTooling: Record<string, ToolingDefinition> = { currentValue: semeruJreMatches.version, }; } - const temurinJdkMatches = version.match(/^temurin-(?<version>\d\S+)/) - ?.groups; + const temurinJdkMatches = version.match( + /^temurin-(?<version>\d\S+)/, + )?.groups; if (temurinJdkMatches) { return { datasource: JavaVersionDatasource.id, @@ -314,8 +315,9 @@ export const upgradeableTooling: Record<string, ToolingDefinition> = { currentValue: temurinJdkMatches.version, }; } - const temurinJreMatches = version.match(/^temurin-jre-(?<version>\d\S+)/) - ?.groups; + const temurinJreMatches = version.match( + /^temurin-jre-(?<version>\d\S+)/, + )?.groups; if (temurinJreMatches) { return { datasource: JavaVersionDatasource.id, diff --git a/lib/modules/manager/composer/schema.ts b/lib/modules/manager/composer/schema.ts index ca074dad97..e1d9ffa47f 100644 --- a/lib/modules/manager/composer/schema.ts +++ b/lib/modules/manager/composer/schema.ts @@ -309,8 +309,9 @@ export const ComposerExtract = z const gitRepo = gitRepos[depName]; if (gitRepo) { - const bitbucketMatchGroups = bitbucketUrlRegex.exec(gitRepo.url) - ?.groups; + const bitbucketMatchGroups = bitbucketUrlRegex.exec( + gitRepo.url, + )?.groups; if (bitbucketMatchGroups) { dep.datasource = BitbucketTagsDatasource.id; diff --git a/lib/modules/manager/dockerfile/extract.spec.ts b/lib/modules/manager/dockerfile/extract.spec.ts index fab901c893..787afe2cd3 100644 --- a/lib/modules/manager/dockerfile/extract.spec.ts +++ b/lib/modules/manager/dockerfile/extract.spec.ts @@ -108,8 +108,11 @@ describe('modules/manager/dockerfile/extract', () => { }); it('handles from as', () => { - const res = extractPackageFile('FROM node:8.9.0-alpine as base\n', '', {}) - ?.deps; + const res = extractPackageFile( + 'FROM node:8.9.0-alpine as base\n', + '', + {}, + )?.deps; expect(res).toEqual([ { autoReplaceStringTemplate: @@ -721,8 +724,11 @@ describe('modules/manager/dockerfile/extract', () => { }); it('handles FROM without ARG default value', () => { - const res = extractPackageFile('ARG img_base\nFROM $img_base\n', '', {}) - ?.deps; + const res = extractPackageFile( + 'ARG img_base\nFROM $img_base\n', + '', + {}, + )?.deps; expect(res).toEqual([ { autoReplaceStringTemplate: diff --git a/lib/modules/manager/maven-wrapper/artifacts.ts b/lib/modules/manager/maven-wrapper/artifacts.ts index 4d1e9fcc16..cd9b21035f 100644 --- a/lib/modules/manager/maven-wrapper/artifacts.ts +++ b/lib/modules/manager/maven-wrapper/artifacts.ts @@ -176,8 +176,9 @@ function getExtraEnvOptions(deps: PackageDependency[]): ExtraEnv { function getCustomMavenWrapperRepoUrl( deps: PackageDependency[], ): string | null { - const replaceString = deps.find((dep) => dep.depName === 'maven-wrapper') - ?.replaceString; + const replaceString = deps.find( + (dep) => dep.depName === 'maven-wrapper', + )?.replaceString; if (!replaceString) { return null; diff --git a/lib/modules/manager/npm/extract/post/monorepo.spec.ts b/lib/modules/manager/npm/extract/post/monorepo.spec.ts index 7adce0b7a2..07c79f83c6 100644 --- a/lib/modules/manager/npm/extract/post/monorepo.spec.ts +++ b/lib/modules/manager/npm/extract/post/monorepo.spec.ts @@ -65,8 +65,8 @@ describe('modules/manager/npm/extract/post/monorepo', () => { ]; await detectMonorepos(packageFiles); expect( - packageFiles.some( - (packageFile) => packageFile.deps?.some((dep) => dep.isInternal), + packageFiles.some((packageFile) => + packageFile.deps?.some((dep) => dep.isInternal), ), ).toBeTrue(); }); diff --git a/lib/modules/manager/npm/post-update/yarn.spec.ts b/lib/modules/manager/npm/post-update/yarn.spec.ts index b220368240..f832ca6570 100644 --- a/lib/modules/manager/npm/post-update/yarn.spec.ts +++ b/lib/modules/manager/npm/post-update/yarn.spec.ts @@ -18,9 +18,9 @@ import * as yarnHelper from './yarn'; jest.mock('fs-extra', () => jest - .requireActual<typeof import('../../../../../test/fixtures')>( - '../../../../../test/fixtures', - ) + .requireActual< + typeof import('../../../../../test/fixtures') + >('../../../../../test/fixtures') .fsExtra(), ); jest.mock('../../../../util/exec/env'); diff --git a/lib/modules/manager/nuget/package-tree.spec.ts b/lib/modules/manager/nuget/package-tree.spec.ts index 8cf2cd9e6f..c687184d3b 100644 --- a/lib/modules/manager/nuget/package-tree.spec.ts +++ b/lib/modules/manager/nuget/package-tree.spec.ts @@ -9,9 +9,9 @@ import { getDependentPackageFiles } from './package-tree'; jest.mock('fs', () => memfs); jest.mock('fs-extra', () => jest - .requireActual<typeof import('../../../../test/fixtures')>( - '../../../../test/fixtures', - ) + .requireActual< + typeof import('../../../../test/fixtures') + >('../../../../test/fixtures') .fsExtra(), ); jest.mock('../../../util/git'); diff --git a/lib/modules/platform/azure/index.ts b/lib/modules/platform/azure/index.ts index fe9fa26c19..0ce8a4052f 100644 --- a/lib/modules/platform/azure/index.ts +++ b/lib/modules/platform/azure/index.ts @@ -764,8 +764,10 @@ export async function mergePr({ logger.trace( `Updating PR ${pullRequestId} to status ${PullRequestStatus.Completed} (${ PullRequestStatus[PullRequestStatus.Completed] - }) with lastMergeSourceCommit ${// TODO: types (#22198) - pr.lastMergeSourceCommit?.commitId} using mergeStrategy ${mergeStrategy} (${ + }) with lastMergeSourceCommit ${ + // TODO: types (#22198) + pr.lastMergeSourceCommit?.commitId + } using mergeStrategy ${mergeStrategy} (${ GitPullRequestMergeStrategy[mergeStrategy] })`, ); diff --git a/lib/modules/platform/github/index.ts b/lib/modules/platform/github/index.ts index 4117a7be10..c2c0f32393 100644 --- a/lib/modules/platform/github/index.ts +++ b/lib/modules/platform/github/index.ts @@ -283,8 +283,8 @@ export async function getRepos(config?: AutodiscoverConfig): Promise<string[]> { } logger.debug({ topics: config.topics }, 'Filtering by topics'); - const topicRepositories = nonArchivedRepositories.filter( - (repo) => repo.topics?.some((topic) => config?.topics?.includes(topic)), + const topicRepositories = nonArchivedRepositories.filter((repo) => + repo.topics?.some((topic) => config?.topics?.includes(topic)), ); if (topicRepositories.length < nonArchivedRepositories.length) { diff --git a/lib/util/git/private-key.spec.ts b/lib/util/git/private-key.spec.ts index fb8bea0667..36fb4ba75e 100644 --- a/lib/util/git/private-key.spec.ts +++ b/lib/util/git/private-key.spec.ts @@ -5,9 +5,9 @@ import { setPrivateKey } from '.'; jest.mock('fs-extra', () => jest - .requireActual<typeof import('../../../test/fixtures')>( - '../../../test/fixtures', - ) + .requireActual< + typeof import('../../../test/fixtures') + >('../../../test/fixtures') .fsExtra(), ); jest.mock('../exec'); diff --git a/lib/util/http/github.ts b/lib/util/http/github.ts index bb313b12a6..75afbefd51 100644 --- a/lib/util/http/github.ts +++ b/lib/util/http/github.ts @@ -139,8 +139,8 @@ function handleGotError( logger.debug({ err }, 'Received invalid response - aborting'); return new Error(REPOSITORY_CHANGED); } else if ( - err.body?.errors?.find( - (e: any) => e.message?.startsWith('A pull request already exists'), + err.body?.errors?.find((e: any) => + e.message?.startsWith('A pull request already exists'), ) ) { return err; diff --git a/lib/util/package-rules/sourceurl-prefixes.ts b/lib/util/package-rules/sourceurl-prefixes.ts index dc8be4f242..13d6d4801c 100644 --- a/lib/util/package-rules/sourceurl-prefixes.ts +++ b/lib/util/package-rules/sourceurl-prefixes.ts @@ -15,8 +15,8 @@ export class SourceUrlPrefixesMatcher extends Matcher { } const upperCaseSourceUrl = sourceUrl?.toUpperCase(); - return matchSourceUrlPrefixes.some( - (prefix) => upperCaseSourceUrl?.startsWith(prefix.toUpperCase()), + return matchSourceUrlPrefixes.some((prefix) => + upperCaseSourceUrl?.startsWith(prefix.toUpperCase()), ); } } diff --git a/lib/util/template/index.ts b/lib/util/template/index.ts index f9a7c21521..66ff1847ed 100644 --- a/lib/util/template/index.ts +++ b/lib/util/template/index.ts @@ -22,9 +22,8 @@ handlebars.registerHelper('replace', (find, replace, context) => handlebars.registerHelper('lowercase', (str: string) => str?.toLowerCase()); -handlebars.registerHelper( - 'containsString', - (str, subStr) => str?.includes(subStr), +handlebars.registerHelper('containsString', (str, subStr) => + str?.includes(subStr), ); handlebars.registerHelper('equals', (arg1, arg2) => arg1 === arg2); diff --git a/lib/workers/repository/config-migration/pr/index.ts b/lib/workers/repository/config-migration/pr/index.ts index 3fde6d57c6..aaf2892378 100644 --- a/lib/workers/repository/config-migration/pr/index.ts +++ b/lib/workers/repository/config-migration/pr/index.ts @@ -50,8 +50,9 @@ ${ :no_bell: **Ignore**: Close this PR and you won't be reminded about config migration again, but one day your current config may no longer be valid. -:question: Got questions? Does something look wrong to you? Please don't hesitate to [request help here](${config - .productLinks?.help}).\n\n`, +:question: Got questions? Does something look wrong to you? Please don't hesitate to [request help here](${ + config.productLinks?.help + }).\n\n`, ); if (is.string(config.prHeader)) { diff --git a/lib/workers/repository/update/pr/index.ts b/lib/workers/repository/update/pr/index.ts index e9dccd6b4a..0629f0bc68 100644 --- a/lib/workers/repository/update/pr/index.ts +++ b/lib/workers/repository/update/pr/index.ts @@ -450,9 +450,8 @@ export async function ensurePr( if ( err.body?.message === 'Validation failed' && err.body.errors?.length && - err.body.errors.some( - (error: { message?: string }) => - error.message?.startsWith('A pull request already exists'), + err.body.errors.some((error: { message?: string }) => + error.message?.startsWith('A pull request already exists'), ) ) { logger.warn('A pull requests already exists'); diff --git a/package.json b/package.json index 8666d6fbab..6e9ffa8f2e 100644 --- a/package.json +++ b/package.json @@ -230,7 +230,7 @@ "p-queue": "6.6.2", "p-throttle": "4.1.1", "parse-link-header": "2.0.0", - "prettier": "3.1.1", + "prettier": "3.2.2", "redis": "4.6.12", "remark": "13.0.0", "remark-github": "10.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 51db01b6c5..76d0e83aea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -264,8 +264,8 @@ importers: specifier: 2.0.0 version: 2.0.0 prettier: - specifier: 3.1.1 - version: 3.1.1 + specifier: 3.2.2 + version: 3.2.2 redis: specifier: 4.6.12 version: 4.6.12 @@ -8979,8 +8979,8 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier@3.1.1: - resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + /prettier@3.2.2: + resolution: {integrity: sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A==} engines: {node: '>=14'} hasBin: true dev: false -- GitLab