diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a4d452bd7a76e7..cc585ee518f902 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM containerbase/node:18.12.0@sha256:dab36a9935ce28f0e2cdf25083a3d810fff98877832f13a239a1e30714829b12 +FROM containerbase/node:18.12.1@sha256:fe459c9670594c2beb3dfbbd23c51905e6f85c865735f88265790d47bc569a9e USER root diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9e239cb1660e72..d20ffdfd80f1c4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,7 +30,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@18fe527fa8b29f134bb91f32f1a5dc5abb15ed7f # tag=v2.1.30 + uses: github/codeql-action/init@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # tag=v2.1.31 with: languages: javascript @@ -40,7 +40,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@18fe527fa8b29f134bb91f32f1a5dc5abb15ed7f # tag=v2.1.30 + uses: github/codeql-action/autobuild@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # tag=v2.1.31 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -54,4 +54,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@18fe527fa8b29f134bb91f32f1a5dc5abb15ed7f # tag=v2.1.30 + uses: github/codeql-action/analyze@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # tag=v2.1.31 diff --git a/data/azure-pipelines-tasks.json b/data/azure-pipelines-tasks.json index 3c1c417bb063d9..41bce3a451b271 100644 --- a/data/azure-pipelines-tasks.json +++ b/data/azure-pipelines-tasks.json @@ -162,6 +162,8 @@ "1.131.0" ], "archivefiles": [ + "2.213.0", + "2.211.1", "2.211.0", "2.206.0", "2.201.2", @@ -1323,6 +1325,7 @@ "3.0.0" ], "azurermwebappdeployment": [ + "3.213.0", "3.208.0", "3.198.0", "3.195.1", @@ -1373,6 +1376,7 @@ "3.4.2", "3.4.1", "3.4.0", + "4.213.0", "4.212.0", "4.208.1", "4.208.0", @@ -2544,6 +2548,7 @@ "0.148.0" ], "downloadpackage": [ + "0.213.0", "0.210.0", "0.208.1", "0.208.0", @@ -2751,6 +2756,8 @@ "0.0.1" ], "extractfiles": [ + "1.213.0", + "1.211.1", "1.211.0", "1.200.0", "1.198.0", @@ -4172,6 +4179,7 @@ "1.0.0" ], "nodetool": [ + "0.213.0", "0.211.0", "0.210.1", "0.210.0", @@ -4273,6 +4281,7 @@ "0.2.25", "0.2.24", "0.2.23", + "1.213.0", "1.208.1", "1.208.0", "1.202.0", @@ -5114,6 +5123,7 @@ "0.135.0" ], "pythonscript": [ + "0.213.0", "0.200.0", "0.198.0", "0.182.0", @@ -5396,6 +5406,7 @@ "1.0.0" ], "ssh": [ + "0.213.0", "0.207.1", "0.207.0", "0.200.0", @@ -5620,6 +5631,7 @@ "1.0.0" ], "usenode": [ + "1.213.0", "1.210.0", "1.208.1", "1.208.0", @@ -5664,6 +5676,8 @@ "1.0.0" ], "usepythonversion": [ + "0.213.1", + "0.213.0", "0.206.0", "0.205.0", "0.200.0", @@ -5696,6 +5710,7 @@ "0.134.2" ], "userubyversion": [ + "0.213.0", "0.200.0", "0.198.0", "0.193.0", @@ -5948,6 +5963,7 @@ "2.1.0" ], "xamarinandroid": [ + "1.213.0", "1.212.0", "1.208.0", "1.200.0", @@ -5987,6 +6003,7 @@ "1.135.0" ], "xamarinios": [ + "2.213.0", "2.200.1", "2.200.0", "2.198.0", @@ -6027,6 +6044,7 @@ "1.135.0" ], "xcode": [ + "5.213.0", "5.200.0", "5.198.1", "5.198.0", diff --git a/data/debian-distro-info.json b/data/debian-distro-info.json index 26e6896960d824..9a8798813dea5e 100644 --- a/data/debian-distro-info.json +++ b/data/debian-distro-info.json @@ -129,5 +129,10 @@ "codename": "Trixie", "series": "trixie", "created": "2023-08-01" + }, + "v14": { + "codename": "Forky", + "series": "forky", + "created": "2025-08-01" } } diff --git a/data/node-js-schedule.json b/data/node-js-schedule.json index 853060b4e70759..6a7dd84816f4d5 100644 --- a/data/node-js-schedule.json +++ b/data/node-js-schedule.json @@ -100,7 +100,7 @@ "lts": "2022-10-25", "maintenance": "2023-10-18", "end": "2025-04-30", - "codename": "" + "codename": "Hydrogen" }, "v19": { "start": "2022-10-18", diff --git a/data/ubuntu-distro-info.json b/data/ubuntu-distro-info.json index 42a0bdd179c0c2..2127a7dfa71d3a 100644 --- a/data/ubuntu-distro-info.json +++ b/data/ubuntu-distro-info.json @@ -274,10 +274,10 @@ "eol": "2023-07-20" }, "v23.04": { - "codename": "L L", - "series": "l-series", + "codename": "Lunar Lobster", + "series": "lunar", "created": "2022-10-20", - "release": "2023-04-27", + "release": "2023-04-20", "eol": "2024-01-25" } } diff --git a/docs/usage/docker.md b/docs/usage/docker.md index cb2bc7818435ac..5a9c22fabda282 100644 --- a/docs/usage/docker.md +++ b/docs/usage/docker.md @@ -369,7 +369,7 @@ To get access to the token a custom Renovate Docker image is needed that include The Dockerfile to create such an image can look like this: ```Dockerfile -FROM renovate/renovate:34.9.1 +FROM renovate/renovate:34.20.0 # Include the "Docker tip" which you can find here https://cloud.google.com/sdk/docs/install # under "Installation" for "Debian/Ubuntu" RUN ... diff --git a/lib/constants/programming-language.ts b/lib/constants/programming-language.ts index f34b5aabc6c3fd..f481973a7e8690 100644 --- a/lib/constants/programming-language.ts +++ b/lib/constants/programming-language.ts @@ -1,15 +1,16 @@ -// eslint-disable-next-line typescript-enum/no-enum -export enum ProgrammingLanguage { - Dart = 'dart', - Docker = 'docker', - Elixir = 'elixir', - Golang = 'golang', - Java = 'java', - JavaScript = 'js', - NET = 'dotnet', - NodeJS = 'node', - PHP = 'php', - Python = 'python', - Ruby = 'ruby', - Rust = 'rust', -} +export const programmingLanguages = [ + 'dart', + 'docker', + 'elixir', + 'golang', + 'java', + 'js', + 'dotnet', + 'node', + 'php', + 'python', + 'ruby', + 'rust', +] as const; + +export type ProgrammingLanguage = typeof programmingLanguages[number]; diff --git a/lib/modules/datasource/crate/index.spec.ts b/lib/modules/datasource/crate/index.spec.ts index d115b12c796392..c8d0637391734f 100644 --- a/lib/modules/datasource/crate/index.spec.ts +++ b/lib/modules/datasource/crate/index.spec.ts @@ -10,7 +10,7 @@ import { GlobalConfig } from '../../../config/global'; import type { RepoGlobalConfig } from '../../../config/types'; import { EXTERNAL_HOST_ERROR } from '../../../constants/error-messages'; import * as memCache from '../../../util/cache/memory'; -import { RegistryFlavor, RegistryInfo } from './types'; +import type { RegistryInfo } from './types'; import { CrateDatasource } from '.'; jest.mock('simple-git'); @@ -361,7 +361,7 @@ describe('modules/datasource/crate/index', () => { const info: RegistryInfo = { rawUrl: 'https://example.com', url: new URL('https://example.com'), - flavor: RegistryFlavor.Cloudsmith, + flavor: 'cloudsmith', }; const crateDatasource = new CrateDatasource(); await expect( diff --git a/lib/modules/datasource/crate/index.ts b/lib/modules/datasource/crate/index.ts index 2cd9c59338ef12..3c6e67a52067f2 100644 --- a/lib/modules/datasource/crate/index.ts +++ b/lib/modules/datasource/crate/index.ts @@ -12,7 +12,7 @@ import { parseUrl } from '../../../util/url'; import * as cargoVersioning from '../../versioning/cargo'; import { Datasource } from '../datasource'; import type { GetReleasesConfig, Release, ReleaseResult } from '../types'; -import { +import type { CrateMetadata, CrateRecord, RegistryFlavor, @@ -125,7 +125,7 @@ export class CrateDatasource extends Datasource { info: RegistryInfo, packageName: string ): Promise { - if (info.flavor !== RegistryFlavor.CratesIo) { + if (info.flavor !== 'crates.io') { return null; } @@ -165,7 +165,7 @@ export class CrateDatasource extends Datasource { return readCacheFile(path, 'utf8'); } - if (info.flavor === RegistryFlavor.CratesIo) { + if (info.flavor === 'crates.io') { const crateUrl = CrateDatasource.CRATES_IO_BASE_URL + CrateDatasource.getIndexSuffix(packageName.toLowerCase()).join('/'); @@ -187,9 +187,9 @@ export class CrateDatasource extends Datasource { packageName: string ): string { switch (info.flavor) { - case RegistryFlavor.CratesIo: + case 'crates.io': return `https://crates.io/crates/${packageName}`; - case RegistryFlavor.Cloudsmith: { + case 'cloudsmith': { // input: https://dl.cloudsmith.io/basic/$org/$repo/cargo/index.git const tokens = info.url.pathname.split('/'); const org = tokens[2]; @@ -238,11 +238,11 @@ export class CrateDatasource extends Datasource { let flavor: RegistryFlavor; if (url.hostname === 'crates.io') { - flavor = RegistryFlavor.CratesIo; + flavor = 'crates.io'; } else if (url.hostname === 'dl.cloudsmith.io') { - flavor = RegistryFlavor.Cloudsmith; + flavor = 'cloudsmith'; } else { - flavor = RegistryFlavor.Other; + flavor = 'other'; } const registry: RegistryInfo = { @@ -251,7 +251,7 @@ export class CrateDatasource extends Datasource { url, }; - if (flavor !== RegistryFlavor.CratesIo) { + if (flavor !== 'crates.io') { if (!GlobalConfig.get('allowCustomCrateRegistries')) { logger.warn( 'crate datasource: allowCustomCrateRegistries=true is required for registries other than crates.io, bailing out' diff --git a/lib/modules/datasource/crate/types.ts b/lib/modules/datasource/crate/types.ts index f1a24368422bf7..b8a99d1440cf67 100644 --- a/lib/modules/datasource/crate/types.ts +++ b/lib/modules/datasource/crate/types.ts @@ -1,14 +1,12 @@ -// eslint-disable-next-line typescript-enum/no-enum -export enum RegistryFlavor { +export type RegistryFlavor = /** https://crates.io, supports rawgit access */ - CratesIo, + | 'crates.io' /** https://cloudsmith.io, needs git clone */ - Cloudsmith, + | 'cloudsmith' /** unknown, assuming private git repository */ - Other, -} + | 'other'; export interface RegistryInfo { flavor: RegistryFlavor; diff --git a/lib/modules/datasource/go/base.ts b/lib/modules/datasource/go/base.ts index c7e11c898598ac..c8e8e557388392 100644 --- a/lib/modules/datasource/go/base.ts +++ b/lib/modules/datasource/go/base.ts @@ -89,7 +89,7 @@ export class BaseGoDatasource { logger.trace({ goModule }, 'go-source header prefix not match'); return null; } - logger.debug({ goModule, goSourceUrl }, 'Go lookup source url'); + logger.debug(`Go lookup source url ${goSourceUrl} for module ${goModule}`); return this.detectDatasource(goSourceUrl, goModule); } @@ -186,7 +186,7 @@ export class BaseGoDatasource { return null; } - logger.debug({ goModule, goImportURL }, 'Go lookup import url'); + logger.debug(`Go module: ${goModule} lookup import url ${goImportURL}`); // get server base url from import url const parsedUrl = URL.parse(goImportURL); diff --git a/lib/modules/datasource/go/common.ts b/lib/modules/datasource/go/common.ts index 97f4bc3c38bb83..049478ba49748a 100644 --- a/lib/modules/datasource/go/common.ts +++ b/lib/modules/datasource/go/common.ts @@ -6,11 +6,9 @@ import { getSourceUrl as gitlabSourceUrl } from '../gitlab-tags/util'; import type { DataSource } from './types'; -// eslint-disable-next-line typescript-enum/no-enum -export enum GoproxyFallback { - WhenNotFoundOrGone = ',', - Always = '|', -} +export type GoproxyFallback = + | ',' // WhenNotFoundOrGone + | '|'; // Always export function getSourceUrl( dataSource?: DataSource | null diff --git a/lib/modules/datasource/go/releases-goproxy.ts b/lib/modules/datasource/go/releases-goproxy.ts index d1b468c59db4f1..dd562ee997c1fc 100644 --- a/lib/modules/datasource/go/releases-goproxy.ts +++ b/lib/modules/datasource/go/releases-goproxy.ts @@ -8,7 +8,7 @@ import { newlineRegex, regEx } from '../../../util/regex'; import { Datasource } from '../datasource'; import type { GetReleasesConfig, Release, ReleaseResult } from '../types'; import { BaseGoDatasource } from './base'; -import { GoproxyFallback, getSourceUrl } from './common'; +import { getSourceUrl } from './common'; import { GoDirectDatasource } from './releases-direct'; import type { GoproxyItem, VersionInfo } from './types'; @@ -84,9 +84,7 @@ export class GoProxyDatasource extends Datasource { } catch (err) { const statusCode = err?.response?.statusCode; const canFallback = - fallback === GoproxyFallback.Always - ? true - : statusCode === 404 || statusCode === 410; + fallback === '|' ? true : statusCode === 404 || statusCode === 410; const msg = canFallback ? 'Goproxy error: trying next URL provided with GOPROXY' : 'Goproxy error: skipping other URLs provided with GOPROXY'; @@ -128,10 +126,7 @@ export class GoProxyDatasource extends Datasource { .map((s) => s.split(/(?=,|\|)/)) // TODO: #12872 lookahead .map(([url, separator]) => ({ url, - fallback: - separator === ',' - ? GoproxyFallback.WhenNotFoundOrGone - : GoproxyFallback.Always, + fallback: separator === ',' ? ',' : '|', })); parsedGoproxy[input] = result; diff --git a/lib/modules/datasource/hermit/index.ts b/lib/modules/datasource/hermit/index.ts index 6afdd997ff81bf..f2015d3385674b 100644 --- a/lib/modules/datasource/hermit/index.ts +++ b/lib/modules/datasource/hermit/index.ts @@ -73,7 +73,9 @@ export class HermitDatasource extends Datasource { const res = items.find((i) => i.Name === packageName); if (!res) { - logger.debug({ packageName, registryUrl }, 'cannot find hermit package'); + logger.debug( + `Could not find hermit package ${packageName} at URL ${registryUrl}` + ); return null; } diff --git a/lib/modules/datasource/pod/index.ts b/lib/modules/datasource/pod/index.ts index 6c70a74d0a73fb..82a96b5b355fa1 100644 --- a/lib/modules/datasource/pod/index.ts +++ b/lib/modules/datasource/pod/index.ts @@ -10,13 +10,11 @@ import { Datasource } from '../datasource'; import { massageGithubUrl } from '../metadata'; import type { GetReleasesConfig, ReleaseResult } from '../types'; -// eslint-disable-next-line typescript-enum/no-enum, typescript-enum/no-const-enum -const enum URLFormatOptions { - WithShardWithSpec, - WithShardWithoutSpec, - WithSpecsWithoutShard, - WithoutSpecsWithoutShard, -} +type URLFormatOptions = + | 'withShardWithSpec' + | 'withShardWithoutSpec' + | 'withSpecsWithoutShard' + | 'withoutSpecsWithoutShard'; function shardParts(packageName: string): string[] { return crypto @@ -144,7 +142,7 @@ export class PodDatasource extends Datasource { opts: { hostURL: string; account: string; repo: string }, useShard = true, useSpecs = true, - urlFormatOptions = URLFormatOptions.WithShardWithSpec + urlFormatOptions: URLFormatOptions = 'withShardWithSpec' ): Promise { const url = releasesGithubUrl(packageName, { ...opts, useShard, useSpecs }); const resp = await this.requestGithub<{ name: string }[]>(url, packageName); @@ -153,33 +151,33 @@ export class PodDatasource extends Datasource { return { releases }; } - // iterating through enum to support different url formats + // support different url formats switch (urlFormatOptions) { - case URLFormatOptions.WithShardWithSpec: + case 'withShardWithSpec': return this.getReleasesFromGithub( packageName, opts, true, false, - URLFormatOptions.WithShardWithoutSpec + 'withShardWithoutSpec' ); - case URLFormatOptions.WithShardWithoutSpec: + case 'withShardWithoutSpec': return this.getReleasesFromGithub( packageName, opts, false, true, - URLFormatOptions.WithSpecsWithoutShard + 'withSpecsWithoutShard' ); - case URLFormatOptions.WithSpecsWithoutShard: + case 'withSpecsWithoutShard': return this.getReleasesFromGithub( packageName, opts, false, false, - URLFormatOptions.WithoutSpecsWithoutShard + 'withoutSpecsWithoutShard' ); - case URLFormatOptions.WithoutSpecsWithoutShard: + case 'withoutSpecsWithoutShard': default: return null; } diff --git a/lib/modules/datasource/rubygems/get-rubygems-org.ts b/lib/modules/datasource/rubygems/get-rubygems-org.ts index 7e416fa94f1800..c43c4002ed6e62 100644 --- a/lib/modules/datasource/rubygems/get-rubygems-org.ts +++ b/lib/modules/datasource/rubygems/get-rubygems-org.ts @@ -58,7 +58,7 @@ export class RubyGemsOrgDatasource extends Datasource { const startTime = Date.now(); newLines = (await this.http.get(url, options)).body; const durationMs = Math.round(Date.now() - startTime); - logger.debug({ durationMs }, 'Rubygems: Fetched rubygems.org versions'); + logger.debug(`Rubygems: Fetched rubygems.org versions in ${durationMs}`); } catch (err) /* istanbul ignore next */ { if (err.statusCode !== 416) { contentLength = 0; diff --git a/lib/modules/datasource/sbt-package/index.spec.ts b/lib/modules/datasource/sbt-package/index.spec.ts index 847ab5bfeddb31..55f65dae6960a3 100644 --- a/lib/modules/datasource/sbt-package/index.spec.ts +++ b/lib/modules/datasource/sbt-package/index.spec.ts @@ -32,6 +32,8 @@ describe('modules/datasource/sbt-package/index', () => { .get('/maven/org/scalatest/') .reply(404) .get('/maven/org.scalatest/') + .reply(404) + .get('/maven/org/scalatest/scalatest/maven-metadata.xml') .reply(404); const res = await getPkgReleases({ @@ -52,6 +54,10 @@ describe('modules/datasource/sbt-package/index', () => { .get('/maven2/com/example/empty/') .reply(200, '') .get('/maven2/com.example/') + .reply(404) + .get('/maven2/com/example/empty/maven-metadata.xml') + .reply(404) + .get('/maven2/com/example/empty/index.html') .reply(404); const res = await getPkgReleases({ @@ -206,10 +212,14 @@ describe('modules/datasource/sbt-package/index', () => { }); }); - it('falls back to Maven for GitLab-hosted packages', async () => { + it('falls back to Maven for orgarization root folder non-listable repositories', async () => { httpMock .scope('https://gitlab.com/api/v4/projects/123/packages/maven/') - .get('/org/example/example/maven-metadata.xml') + .get('/org/example/') + .reply(404) + .get('/org.example/') + .reply(404) + .get('/org/example/example_2.13/maven-metadata.xml') .reply( 200, ` @@ -227,15 +237,15 @@ describe('modules/datasource/sbt-package/index', () => { ` ) - .head('/org/example/example/1.2.3/example-1.2.3.pom') + .head('/org/example/example_2.13/1.2.3/example_2.13-1.2.3.pom') .reply(200) - .get('/org/example/example/1.2.3/example-1.2.3.pom') + .get('/org/example/example_2.13/1.2.3/example_2.13-1.2.3.pom') .reply(200); const res = await getPkgReleases({ versioning: mavenVersioning.id, datasource: SbtPackageDatasource.id, - depName: 'org.example:example', + depName: 'org.example:example_2.13', registryUrls: [ 'https://gitlab.com/api/v4/projects/123/packages/maven/', ], diff --git a/lib/modules/datasource/sbt-package/index.ts b/lib/modules/datasource/sbt-package/index.ts index 6342567e8f16d0..36818864ed581f 100644 --- a/lib/modules/datasource/sbt-package/index.ts +++ b/lib/modules/datasource/sbt-package/index.ts @@ -1,6 +1,5 @@ import { XmlDocument } from 'xmldoc'; import { logger } from '../../../logger'; -import { detectPlatform } from '../../../util/common'; import { Http } from '../../../util/http'; import { regEx } from '../../../util/regex'; import { ensureTrailingSlash } from '../../../util/url'; @@ -153,12 +152,6 @@ export class SbtPackageDatasource extends MavenDatasource { return null; } - const platform = detectPlatform(registryUrl); - if (platform === 'gitlab') { - const mavenReleases = await super.getReleases(config); - return mavenReleases; - } - const [groupId, artifactId] = packageName.split(':'); const groupIdSplit = groupId.split('.'); const artifactIdSplit = artifactId.split('_'); @@ -200,6 +193,14 @@ export class SbtPackageDatasource extends MavenDatasource { } } + logger.debug( + `No versions discovered for ${packageName} listing organization root package folder, fallback to maven datasource for version discovery` + ); + const mavenReleaseResult = await super.getReleases(config); + if (mavenReleaseResult) { + return mavenReleaseResult; + } + logger.debug( `No versions found for ${packageName} in ${searchRoots.length} repositories` ); diff --git a/lib/modules/manager/ansible/index.ts b/lib/modules/manager/ansible/index.ts index e602eb37b71f98..c81d5468ca7b89 100644 --- a/lib/modules/manager/ansible/index.ts +++ b/lib/modules/manager/ansible/index.ts @@ -1,8 +1,8 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export const defaultConfig = { fileMatch: ['(^|/)tasks/[^/]+\\.ya?ml$'], diff --git a/lib/modules/manager/asdf/readme.md b/lib/modules/manager/asdf/readme.md index 23dcb02114c6b4..d2db91d440e01e 100644 --- a/lib/modules/manager/asdf/readme.md +++ b/lib/modules/manager/asdf/readme.md @@ -1,10 +1,10 @@ -Keeps the [asdf](https://asdf-vm.com/manage/configuration.html#tool-versions) -`.tool-versions` file updated. +Keeps the [asdf](https://asdf-vm.com/manage/configuration.html#tool-versions) `.tool-versions` file updated. -Because `asdf` supports the version management of many different tools, specific tool support needs to be added one by one. - -Only the following tools are currently supported +Because `asdf` supports versioning for many different tools, specific tool support must be added one-by-one. +The following tools are currently supported: - [nodejs](https://github.com/asdf-vm/asdf-nodejs) -NOTE: Because `.tool-versions` can support fallback versions only the first version entry for each supported tool is managed + +!!! note + Only the first version entry for each supported tool is managed, this is because `.tool-versions` supports fallback versions. diff --git a/lib/modules/manager/batect-wrapper/artifacts.ts b/lib/modules/manager/batect-wrapper/artifacts.ts index d8b70c64cfee8b..06a4ac25632957 100644 --- a/lib/modules/manager/batect-wrapper/artifacts.ts +++ b/lib/modules/manager/batect-wrapper/artifacts.ts @@ -36,7 +36,9 @@ export async function updateArtifacts({ }: UpdateArtifact): Promise { const version = config.newVersion!; - logger.debug({ version, packageFileName }, 'Updating Batect wrapper scripts'); + logger.debug( + `Updating Batect wrapper scripts for ${packageFileName} to ${version}` + ); return [ await updateArtifact(packageFileName, 'batect', version), diff --git a/lib/modules/manager/bazel/update.ts b/lib/modules/manager/bazel/update.ts index 873733a4515e80..3bf0bb4890ebe7 100644 --- a/lib/modules/manager/bazel/update.ts +++ b/lib/modules/manager/bazel/update.ts @@ -154,7 +154,7 @@ export async function updateDependency({ const urlFragments = getUrlFragments(rule); if (!urlFragments?.length) { - logger.debug({ def: rule.value }, 'urls is empty'); + logger.debug(`def: ${rule.value}, urls is empty`); return null; } diff --git a/lib/modules/manager/bundler/index.ts b/lib/modules/manager/bundler/index.ts index 8f3ffc212b63cd..aeaba3cec117f1 100644 --- a/lib/modules/manager/bundler/index.ts +++ b/lib/modules/manager/bundler/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { RubyVersionDatasource } from '../../datasource/ruby-version'; import { RubyGemsDatasource } from '../../datasource/rubygems'; import * as rubyVersioning from '../../versioning/ruby'; @@ -6,7 +6,7 @@ import { updateArtifacts } from './artifacts'; import { extractPackageFile } from './extract'; import { updateLockedDependency } from './update-locked'; -export const language = ProgrammingLanguage.Ruby; +export const language: ProgrammingLanguage = 'ruby'; export const supportsLockFileMaintenance = true; /* diff --git a/lib/modules/manager/cake/index.ts b/lib/modules/manager/cake/index.ts index 858a811d846242..10b22ec435e66b 100644 --- a/lib/modules/manager/cake/index.ts +++ b/lib/modules/manager/cake/index.ts @@ -1,10 +1,10 @@ import moo from 'moo'; -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { regEx } from '../../../util/regex'; import { NugetDatasource } from '../../datasource/nuget'; import type { PackageDependency, PackageFile } from '../types'; -export const language = ProgrammingLanguage.NET; +export const language: ProgrammingLanguage = 'dotnet'; export const defaultConfig = { fileMatch: ['\\.cake$'], diff --git a/lib/modules/manager/cargo/index.ts b/lib/modules/manager/cargo/index.ts index c910bbb819c388..c7768858e33808 100644 --- a/lib/modules/manager/cargo/index.ts +++ b/lib/modules/manager/cargo/index.ts @@ -1,10 +1,10 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { CrateDatasource } from '../../datasource/crate'; import * as cargoVersioning from '../../versioning/cargo'; import { updateArtifacts } from './artifacts'; import { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Rust; +export const language: ProgrammingLanguage = 'rust'; export const supportsLockFileMaintenance = true; export { extractPackageFile, updateArtifacts }; diff --git a/lib/modules/manager/composer/index.ts b/lib/modules/manager/composer/index.ts index 90a5a327423fb6..54289b89769168 100644 --- a/lib/modules/manager/composer/index.ts +++ b/lib/modules/manager/composer/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GitTagsDatasource } from '../../datasource/git-tags'; import { PackagistDatasource } from '../../datasource/packagist'; import { updateArtifacts } from './artifacts'; @@ -7,7 +7,7 @@ import { getRangeStrategy } from './range'; import { updateLockedDependency } from './update-locked'; import { composerVersioningId } from './utils'; -export const language = ProgrammingLanguage.PHP; +export const language: ProgrammingLanguage = 'php'; export const supportsLockFileMaintenance = true; export { diff --git a/lib/modules/manager/docker-compose/extract.ts b/lib/modules/manager/docker-compose/extract.ts index ba716a50940a44..812ac63be3fb14 100644 --- a/lib/modules/manager/docker-compose/extract.ts +++ b/lib/modules/manager/docker-compose/extract.ts @@ -54,7 +54,7 @@ export function extractPackageFile( } } catch (err) { logger.debug({ err }, 'err'); - logger.debug({ fileName }, 'Parsing Docker Compose config YAML'); + logger.debug(`Parsing Docker Compose config YAML in ${fileName}`); return null; } try { diff --git a/lib/modules/manager/docker-compose/index.ts b/lib/modules/manager/docker-compose/index.ts index a8f9644764837c..69d28ba6a35a33 100644 --- a/lib/modules/manager/docker-compose/index.ts +++ b/lib/modules/manager/docker-compose/index.ts @@ -1,8 +1,8 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export { extractPackageFile }; diff --git a/lib/modules/manager/dockerfile/extract.spec.ts b/lib/modules/manager/dockerfile/extract.spec.ts index 7a67c8db7cf4ff..440ff682129930 100644 --- a/lib/modules/manager/dockerfile/extract.spec.ts +++ b/lib/modules/manager/dockerfile/extract.spec.ts @@ -750,13 +750,13 @@ describe('modules/manager/dockerfile/extract', () => { expect(res).toEqual([ { autoReplaceStringTemplate: - 'FROM nginx:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}${patch1}$patch2', + 'FROM nginx:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}${patch1}$patch2\n', currentDigest: undefined, currentValue: '1.20', datasource: 'docker', depName: 'nginx', depType: 'final', - replaceString: 'FROM nginx:1.20${patch1}$patch2', + replaceString: 'FROM nginx:1.20${patch1}$patch2\n', }, ]); }); @@ -770,13 +770,13 @@ describe('modules/manager/dockerfile/extract', () => { expect(res).toEqual([ { autoReplaceStringTemplate: - 'ARG\tVARIANT="{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}" ', + 'ARG\tVARIANT="{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}" \n', currentDigest: undefined, currentValue: '1.60.0-bullseye', datasource: 'docker', depName: 'rust', depType: 'final', - replaceString: 'ARG\tVARIANT="1.60.0-bullseye" ', + replaceString: 'ARG\tVARIANT="1.60.0-bullseye" \n', }, ]); }); @@ -790,12 +790,12 @@ describe('modules/manager/dockerfile/extract', () => { expect(res).toEqual([ { autoReplaceStringTemplate: - 'ARG IMAGE_VERSION=${IMAGE_VERSION:-ubuntu:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}}', + 'ARG IMAGE_VERSION=${IMAGE_VERSION:-ubuntu:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}}\n', currentValue: 'xenial', datasource: 'docker', depName: 'ubuntu', depType: 'final', - replaceString: 'ARG IMAGE_VERSION=${IMAGE_VERSION:-ubuntu:xenial}', + replaceString: 'ARG IMAGE_VERSION=${IMAGE_VERSION:-ubuntu:xenial}\n', versioning: 'ubuntu', }, ]); @@ -833,23 +833,23 @@ describe('modules/manager/dockerfile/extract', () => { expect(res).toEqual([ { autoReplaceStringTemplate: - 'ARG base=nginx:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}', + 'ARG base=nginx:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}\n', currentDigest: undefined, currentValue: '1.19', datasource: 'docker', depName: 'nginx', depType: 'stage', - replaceString: 'ARG base=nginx:1.19', + replaceString: 'ARG base=nginx:1.19\n', }, { autoReplaceStringTemplate: - 'ARG base=nginx:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}', + 'ARG base=nginx:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}\n', currentDigest: undefined, currentValue: '1.20', datasource: 'docker', depName: 'nginx', depType: 'final', - replaceString: 'ARG base=nginx:1.20', + replaceString: 'ARG base=nginx:1.20\n', }, ]); }); @@ -890,7 +890,7 @@ describe('modules/manager/dockerfile/extract', () => { autoReplaceStringTemplate: ' ARG \\\n' + '\t# multi-line arg\n' + - ' ALPINE_VERSION=alpine:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}', + ' ALPINE_VERSION=alpine:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}\n', currentDigest: undefined, currentValue: '3.15.4', datasource: 'docker', @@ -899,7 +899,7 @@ describe('modules/manager/dockerfile/extract', () => { replaceString: ' ARG \\\n' + '\t# multi-line arg\n' + - ' ALPINE_VERSION=alpine:3.15.4', + ' ALPINE_VERSION=alpine:3.15.4\n', }, { autoReplaceStringTemplate: @@ -951,7 +951,7 @@ describe('modules/manager/dockerfile/extract', () => { autoReplaceStringTemplate: ' ARG `\n' + '\t# multi-line arg\n' + - ' ALPINE_VERSION=alpine:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}', + ' ALPINE_VERSION=alpine:{{#if newValue}}{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}\n', currentDigest: undefined, currentValue: '3.15.4', datasource: 'docker', @@ -960,7 +960,7 @@ describe('modules/manager/dockerfile/extract', () => { replaceString: ' ARG `\n' + '\t# multi-line arg\n' + - ' ALPINE_VERSION=alpine:3.15.4', + ' ALPINE_VERSION=alpine:3.15.4\n', }, { autoReplaceStringTemplate: diff --git a/lib/modules/manager/dockerfile/extract.ts b/lib/modules/manager/dockerfile/extract.ts index 1628125d4820bc..c13f4fd93a72b3 100644 --- a/lib/modules/manager/dockerfile/extract.ts +++ b/lib/modules/manager/dockerfile/extract.ts @@ -89,6 +89,10 @@ function processDepForAutoReplace( .map((lineNumber) => lines[lineNumber]) .join(linefeed); + if (!dep.currentDigest) { + dep.replaceString += linefeed; + } + dep.autoReplaceStringTemplate = getAutoReplaceTemplate(dep); } diff --git a/lib/modules/manager/dockerfile/index.ts b/lib/modules/manager/dockerfile/index.ts index 4a012201876bc8..0f6e68b7f61ca3 100644 --- a/lib/modules/manager/dockerfile/index.ts +++ b/lib/modules/manager/dockerfile/index.ts @@ -1,8 +1,8 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export { extractPackageFile }; diff --git a/lib/modules/manager/droneci/index.ts b/lib/modules/manager/droneci/index.ts index 85f60b8c42710d..d7e7fa405c5fc7 100644 --- a/lib/modules/manager/droneci/index.ts +++ b/lib/modules/manager/droneci/index.ts @@ -1,8 +1,8 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export { extractPackageFile }; diff --git a/lib/modules/manager/github-actions/__fixtures__/workflow_4.yml b/lib/modules/manager/github-actions/__fixtures__/workflow_4.yml new file mode 100644 index 00000000000000..ae34907103bdcf --- /dev/null +++ b/lib/modules/manager/github-actions/__fixtures__/workflow_4.yml @@ -0,0 +1,19 @@ +jobs: + test: + steps: + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # 1.2.3 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # 1.2 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # 1 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v1.2.3 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v1.2 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v1 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # @v2.1.0 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # pin @v2.1.0 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # tag=v2.1.0 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v2.1.0 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 #v2.1.0 + - uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 #v2.1.0 + - uses: actions/checkout@1e204e # v2.1.0 + - uses: actions/checkout@01aecc#v2.1.0 + - uses: actions/checkout@689fcce700ae7ffc576f2b029b51b2ffb66d3abd # comment containing 2.1.0 + - uses: actions/checkout@689fcce700ae7ffc576f2b029b51b2ffb66d3abd # v2.1.0 additional comment diff --git a/lib/modules/manager/github-actions/__snapshots__/extract.spec.ts.snap b/lib/modules/manager/github-actions/__snapshots__/extract.spec.ts.snap index 19d013d7f76b88..47d08862bf3823 100644 --- a/lib/modules/manager/github-actions/__snapshots__/extract.spec.ts.snap +++ b/lib/modules/manager/github-actions/__snapshots__/extract.spec.ts.snap @@ -3,7 +3,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts multiple action tag lines from yaml configuration file 1`] = ` [ { - "autoReplaceStringTemplate": "{{depName}}/shellcheck@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}/shellcheck@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentValue": "master", "datasource": "github-tags", @@ -14,7 +14,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentDigest": "c308fdd69d26ed66f4506ebd74b180abe5362145", "currentValue": "v1.1.0", @@ -25,7 +25,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentValue": "1.0.0", "datasource": "github-tags", @@ -35,7 +35,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentDigest": "c308fdd69d26ed66f4506ebd74b180abe5362145", "currentValue": undefined, @@ -46,7 +46,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentValue": "v2", "datasource": "github-tags", @@ -56,7 +56,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentDigest": "ec3a7ce113134d7a93b817d10a8272cb61118579", "currentValue": "v2.4.0", @@ -67,7 +67,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentDigest": "16499b5e05bf2e26879000db0c1d13f7e13fa3af", "currentValue": "v1.0.7", @@ -78,7 +78,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "versioning": "docker", }, { - "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentValue": "v1.0.3", "datasource": "github-tags", @@ -93,7 +93,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu exports[`modules/manager/github-actions/extract extractPackageFile() extracts multiple docker image lines from yaml configuration file 1`] = ` [ { - "autoReplaceStringTemplate": "{{depName}}/shellcheck@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}/shellcheck@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentValue": "master", "datasource": "github-tags", @@ -113,7 +113,7 @@ exports[`modules/manager/github-actions/extract extractPackageFile() extracts mu "replaceString": "replicated/dockerfilelint", }, { - "autoReplaceStringTemplate": "{{depName}}/cli@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", + "autoReplaceStringTemplate": "{{depName}}/cli@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}", "commitMessageTopic": "{{{depName}}} action", "currentValue": "master", "datasource": "github-tags", diff --git a/lib/modules/manager/github-actions/extract.spec.ts b/lib/modules/manager/github-actions/extract.spec.ts index 61fa2510c032d3..10a3e036ba92ba 100644 --- a/lib/modules/manager/github-actions/extract.spec.ts +++ b/lib/modules/manager/github-actions/extract.spec.ts @@ -106,7 +106,7 @@ describe('modules/manager/github-actions/extract', () => { replaceString: 'actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # tag=v3.1.1', autoReplaceStringTemplate: - '{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}', + '{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}', currentValue: 'v3.1.1', currentDigest: '56337c425554a6be30cdef71bf441f15be286854', }, @@ -119,7 +119,7 @@ describe('modules/manager/github-actions/extract', () => { replaceString: "'actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561' # tag=v3.1.1", autoReplaceStringTemplate: - "'{{depName}}@{{#if newDigest}}{{newDigest}}'{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}'{{/unless}}", + "'{{depName}}@{{#if newDigest}}{{newDigest}}'{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}'{{/unless}}", currentValue: 'v3.1.1', currentDigest: '1f8c6b94b26d0feae1e387ca63ccbdc44d27b561', }, @@ -132,7 +132,7 @@ describe('modules/manager/github-actions/extract', () => { replaceString: '"actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561" # tag=v2.5.1', autoReplaceStringTemplate: - '"{{depName}}@{{#if newDigest}}{{newDigest}}"{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}"{{/unless}}', + '"{{depName}}@{{#if newDigest}}{{newDigest}}"{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}"{{/unless}}', currentValue: 'v2.5.1', currentDigest: '1f8c6b94b26d0feae1e387ca63ccbdc44d27b561', }, @@ -144,7 +144,7 @@ describe('modules/manager/github-actions/extract', () => { depType: 'action', replaceString: '"actions/checkout@v2"', autoReplaceStringTemplate: - '"{{depName}}@{{#if newDigest}}{{newDigest}}"{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}"{{/unless}}', + '"{{depName}}@{{#if newDigest}}{{newDigest}}"{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}"{{/unless}}', currentValue: 'v2', }, { @@ -155,10 +155,112 @@ describe('modules/manager/github-actions/extract', () => { depType: 'action', replaceString: '"actions/setup-java@v2"', autoReplaceStringTemplate: - '"{{depName}}@{{#if newDigest}}{{newDigest}}"{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}"{{/unless}}', + '"{{depName}}@{{#if newDigest}}{{newDigest}}"{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}"{{/unless}}', currentValue: 'v2', }, ]); }); + + it('extracts tags in different formats', () => { + const res = extractPackageFile( + Fixtures.get('workflow_4.yml'), + 'workflow_4.yml' + ); + expect(res?.deps).toMatchObject([ + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: '1.2.3', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # 1.2.3', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: '1.2', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # 1.2', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: '1', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # 1', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v1.2.3', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v1.2.3', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v1.2', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v1.2', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v1', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v1', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # @v2.1.0', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # pin @v2.1.0', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # tag=v2.1.0', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 # v2.1.0', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 #v2.1.0', + }, + { + currentDigest: '1e204e9a9253d643386038d443f96446fa156a97', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97 #v2.1.0', + }, + { + currentDigest: '1e204e', + currentValue: 'v2.1.0', + replaceString: 'actions/checkout@1e204e # v2.1.0', + }, + { + currentValue: '01aecc#v2.1.0', + replaceString: 'actions/checkout@01aecc#v2.1.0', + }, + { + currentDigest: '689fcce700ae7ffc576f2b029b51b2ffb66d3abd', + currentValue: undefined, + replaceString: + 'actions/checkout@689fcce700ae7ffc576f2b029b51b2ffb66d3abd', + }, + { + currentDigest: '689fcce700ae7ffc576f2b029b51b2ffb66d3abd', + currentValue: 'v2.1.0', + replaceString: + 'actions/checkout@689fcce700ae7ffc576f2b029b51b2ffb66d3abd # v2.1.0', + }, + ]); + }); }); }); diff --git a/lib/modules/manager/github-actions/extract.ts b/lib/modules/manager/github-actions/extract.ts index 0651a889685a93..205c61be428388 100644 --- a/lib/modules/manager/github-actions/extract.ts +++ b/lib/modules/manager/github-actions/extract.ts @@ -9,11 +9,11 @@ import type { Container, Workflow } from './types'; const dockerActionRe = regEx(/^\s+uses: ['"]?docker:\/\/([^'"]+)\s*$/); const actionRe = regEx( - /^\s+-?\s+?uses: (?['"]?(?[\w-]+\/[\w-]+)(?\/.*)?@(?[^\s'"]+)['"]?(?:\s+#\s+(?:renovate:\s+)?tag=(?\S+))?)/ + /^\s+-?\s+?uses: (?['"]?(?[\w-]+\/[\w-]+)(?\/.*)?@(?[^\s'"]+)['"]?(?:\s+#\s*(?:renovate\s*:\s*)?(?:pin\s+|tag\s*=\s*)?@?(?v?\d+(?:\.\d+(?:\.\d+)?)?))?)/ ); // SHA1 or SHA256, see https://github.blog/2020-10-19-git-2-29-released/ -const shaRe = regEx(/^[a-z0-9]{40}|[a-z0-9]{64}$/); +const shaRe = regEx(/^(?:[a-f0-9]{6,7}|[a-f0-9]{40}|[a-f0-9]{64})$/); function extractWithRegex(content: string): PackageDependency[] { logger.trace('github-actions.extractWithRegex()'); @@ -55,7 +55,7 @@ function extractWithRegex(content: string): PackageDependency[] { versioning: dockerVersioning.id, depType: 'action', replaceString, - autoReplaceStringTemplate: `${quotes}{{depName}}${path}@{{#if newDigest}}{{newDigest}}${quotes}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}${quotes}{{/unless}}`, + autoReplaceStringTemplate: `${quotes}{{depName}}${path}@{{#if newDigest}}{{newDigest}}${quotes}{{#if newValue}} # {{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}${quotes}{{/unless}}`, }; if (shaRe.test(currentValue)) { dep.currentValue = tag; diff --git a/lib/modules/manager/gitlabci/index.ts b/lib/modules/manager/gitlabci/index.ts index 5c998edc038154..0bfa5b49432b73 100644 --- a/lib/modules/manager/gitlabci/index.ts +++ b/lib/modules/manager/gitlabci/index.ts @@ -1,8 +1,8 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import { extractAllPackageFiles, extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export { extractAllPackageFiles, extractPackageFile }; diff --git a/lib/modules/manager/gomod/index.ts b/lib/modules/manager/gomod/index.ts index 271b5c125819f2..a5a79f1e928ee8 100644 --- a/lib/modules/manager/gomod/index.ts +++ b/lib/modules/manager/gomod/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GoDatasource } from '../../datasource/go'; import { GolangVersionDatasource } from '../../datasource/golang-version'; import { updateArtifacts } from './artifacts'; @@ -10,7 +10,7 @@ export { extractPackageFile, updateDependency, updateArtifacts }; export const displayName = 'Go Modules'; export const url = 'https://go.dev/ref/mod'; -export const language = ProgrammingLanguage.Golang; +export const language: ProgrammingLanguage = 'golang'; export const defaultConfig = { fileMatch: ['(^|/)go\\.mod$'], diff --git a/lib/modules/manager/gradle/index.ts b/lib/modules/manager/gradle/index.ts index 5fbb018fce520a..291e4d0c07f227 100644 --- a/lib/modules/manager/gradle/index.ts +++ b/lib/modules/manager/gradle/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { MavenDatasource } from '../../datasource/maven'; import * as gradleVersioning from '../../versioning/gradle'; @@ -6,7 +6,7 @@ export { extractAllPackageFiles } from './extract'; export { updateDependency } from './update'; export { updateArtifacts } from './artifacts'; -export const language = ProgrammingLanguage.Java; +export const language: ProgrammingLanguage = 'java'; export const supportsLockFileMaintenance = true; export const defaultConfig = { diff --git a/lib/modules/manager/gradle/parser.spec.ts b/lib/modules/manager/gradle/parser.spec.ts index 756d12fca4be76..fe8e1eca53805c 100644 --- a/lib/modules/manager/gradle/parser.spec.ts +++ b/lib/modules/manager/gradle/parser.spec.ts @@ -184,7 +184,7 @@ describe('modules/manager/gradle/parser', () => { ${''} | ${'library("foo", "bar", "baz", "qux"]).version("1.2.3")'} | ${null} ${''} | ${'library("foo.bar", "foo", "bar").version("1.2.3", "4.5.6")'} | ${null} ${'group = "foo"; artifact="bar"'} | ${'library("foo.bar", group, artifact).version("1.2.3")'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} - ${'library("foo-bar_baz-qux", "foo", "bar")'} | ${'"${foo.bar.baz.qux}:1.2.3"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} + ${'library("foo-bar_baz-qux", "foo", "bar")'} | ${'"${libs.foo.bar.baz.qux}:1.2.3"'} | ${{ depName: 'foo:bar', currentValue: '1.2.3' }} `('$def | $str', async ({ def, str, output }) => { const input = [def, str].join('\n'); const { deps } = await parseGradle(input); diff --git a/lib/modules/manager/gradle/parser.ts b/lib/modules/manager/gradle/parser.ts index 5790dbae678396..4f064761f15cbc 100644 --- a/lib/modules/manager/gradle/parser.ts +++ b/lib/modules/manager/gradle/parser.ts @@ -377,7 +377,7 @@ function processLibraryDep(input: SyntaxHandlerInput): SyntaxHandlerOutput { const { tokenMap } = input; const varNameToken = tokenMap.varName; - const key = varNameToken.value.replace(regEx(/[-_]/g), '.'); + const key = `libs.${varNameToken.value.replace(regEx(/[-_]/g), '.')}`; const fileReplacePosition = varNameToken.offset; const packageFile = input.packageFile; diff --git a/lib/modules/manager/helm-requirements/extract.ts b/lib/modules/manager/helm-requirements/extract.ts index 0eef769f9b9931..f53f0485e43cf8 100644 --- a/lib/modules/manager/helm-requirements/extract.ts +++ b/lib/modules/manager/helm-requirements/extract.ts @@ -15,11 +15,11 @@ export function extractPackageFile( try { doc = load(content, { json: true }); // TODO #9610 } catch (err) { - logger.debug({ fileName }, 'Failed to parse helm requirements.yaml'); + logger.debug(`Failed to parse helm requirements.yaml in ${fileName}`); return null; } if (!(doc && is.array(doc.dependencies))) { - logger.debug({ fileName }, 'requirements.yaml has no dependencies'); + logger.debug(`requirements.yaml in ${fileName} has no dependencies`); return null; } deps = doc.dependencies.map((dep: Record) => { diff --git a/lib/modules/manager/helmv3/extract.ts b/lib/modules/manager/helmv3/extract.ts index c525c8a787620e..fe59cda8e3d1de 100644 --- a/lib/modules/manager/helmv3/extract.ts +++ b/lib/modules/manager/helmv3/extract.ts @@ -35,13 +35,13 @@ export async function extractPackageFile( return null; } } catch (err) { - logger.debug({ fileName }, 'Failed to parse helm Chart.yaml'); + logger.debug(`Failed to parse helm Chart.yaml from ${fileName}`); return null; } const packageFileVersion = chart.version; let deps: PackageDependency[] = []; if (!is.nonEmptyArray(chart?.dependencies)) { - logger.debug({ fileName }, 'Chart has no dependencies'); + logger.debug(`Chart has no dependencies in ${fileName}`); return null; } const validDependencies = chart.dependencies.filter( diff --git a/lib/modules/manager/index.ts b/lib/modules/manager/index.ts index e8ee94bbaf0500..b4e833abce8ac0 100644 --- a/lib/modules/manager/index.ts +++ b/lib/modules/manager/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../constants'; +import { programmingLanguages } from '../../constants'; import type { RangeStrategy } from '../../types'; import managers from './api'; import type { @@ -12,7 +12,7 @@ import type { export { hashMap } from './fingerprint.generated'; const managerList = Array.from(managers.keys()); -const languageList = Object.values(ProgrammingLanguage); +const languageList = programmingLanguages.concat(); export function get( manager: string, diff --git a/lib/modules/manager/kubernetes/index.ts b/lib/modules/manager/kubernetes/index.ts index 9e0bb7442ec50e..1ab2c8dc6d70b3 100644 --- a/lib/modules/manager/kubernetes/index.ts +++ b/lib/modules/manager/kubernetes/index.ts @@ -1,10 +1,10 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import { KubernetesApiDatasource } from '../../datasource/kubernetes-api'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export const defaultConfig = { fileMatch: [], diff --git a/lib/modules/manager/maven/index.ts b/lib/modules/manager/maven/index.ts index 9111471aebdb1b..b6feaa85f99673 100644 --- a/lib/modules/manager/maven/index.ts +++ b/lib/modules/manager/maven/index.ts @@ -1,11 +1,11 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { MavenDatasource } from '../../datasource/maven'; import * as mavenVersioning from '../../versioning/maven'; export { extractAllPackageFiles } from './extract'; export { bumpPackageVersion, updateDependency } from './update'; -export const language = ProgrammingLanguage.Java; +export const language: ProgrammingLanguage = 'java'; export const defaultConfig = { fileMatch: ['(^|/|\\.)pom\\.xml$', '^(((\\.mvn)|(\\.m2))/)?settings\\.xml$'], diff --git a/lib/modules/manager/meteor/index.ts b/lib/modules/manager/meteor/index.ts index c922b28096d51a..a1826cc334e2a9 100644 --- a/lib/modules/manager/meteor/index.ts +++ b/lib/modules/manager/meteor/index.ts @@ -1,9 +1,9 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { NpmDatasource } from '../../datasource/npm'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.JavaScript; +export const language: ProgrammingLanguage = 'js'; export const defaultConfig = { fileMatch: ['(^|/)package\\.js$'], diff --git a/lib/modules/manager/mix/index.ts b/lib/modules/manager/mix/index.ts index ef6040b2a85531..7820dcded9a951 100644 --- a/lib/modules/manager/mix/index.ts +++ b/lib/modules/manager/mix/index.ts @@ -1,11 +1,11 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { HexDatasource } from '../../datasource/hex'; import * as hexVersioning from '../../versioning/hex'; export { extractPackageFile } from './extract'; export { updateArtifacts } from './artifacts'; -export const language = ProgrammingLanguage.Elixir; +export const language: ProgrammingLanguage = 'elixir'; export const defaultConfig = { fileMatch: ['(^|/)mix\\.exs$'], diff --git a/lib/modules/manager/nodenv/index.ts b/lib/modules/manager/nodenv/index.ts index c5bbc91460a577..093d18e922faee 100644 --- a/lib/modules/manager/nodenv/index.ts +++ b/lib/modules/manager/nodenv/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import * as nodeVersioning from '../../versioning/node'; @@ -7,7 +7,7 @@ export { extractPackageFile } from './extract'; export const displayName = 'nodenv'; export const url = 'https://github.com/nodenv/nodenv'; -export const language = ProgrammingLanguage.NodeJS; +export const language: ProgrammingLanguage = 'node'; export const defaultConfig = { fileMatch: ['(^|/)\\.node-version$'], diff --git a/lib/modules/manager/npm/extract/index.ts b/lib/modules/manager/npm/extract/index.ts index 237d3b83177a98..f436af566d2616 100644 --- a/lib/modules/manager/npm/extract/index.ts +++ b/lib/modules/manager/npm/extract/index.ts @@ -46,7 +46,7 @@ export async function extractPackageFile( try { packageJson = JSON.parse(content); } catch (err) { - logger.debug({ fileName }, 'Invalid JSON'); + logger.debug(`Invalid JSON in ${fileName}`); return null; } @@ -493,7 +493,7 @@ export async function extractAllPackageFiles( }); } } else { - logger.debug({ packageFile }, 'packageFile has no content'); + logger.debug(`No content found in ${packageFile}`); } } diff --git a/lib/modules/manager/npm/index.ts b/lib/modules/manager/npm/index.ts index 24a12df8d96b7b..3ac8a7f281b4ea 100644 --- a/lib/modules/manager/npm/index.ts +++ b/lib/modules/manager/npm/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import { NpmDatasource } from '../../datasource/npm'; import * as npmVersioning from '../../versioning/npm'; @@ -12,7 +12,7 @@ export { } from './update'; export { getRangeStrategy } from './range'; -export const language = ProgrammingLanguage.JavaScript; +export const language: ProgrammingLanguage = 'js'; export const supportsLockFileMaintenance = true; export const defaultConfig = { diff --git a/lib/modules/manager/npm/post-update/pnpm.ts b/lib/modules/manager/npm/post-update/pnpm.ts index ac29a8e505f61d..28b34696ef9037 100644 --- a/lib/modules/manager/npm/post-update/pnpm.ts +++ b/lib/modules/manager/npm/post-update/pnpm.ts @@ -61,7 +61,7 @@ export async function generateLockFile( args += ' --ignore-scripts'; args += ' --ignore-pnpmfile'; } - logger.debug({ cmd, args }, 'pnpm command'); + logger.trace({ cmd, args }, 'pnpm command'); if (upgrades.find((upgrade) => upgrade.isLockFileMaintenance)) { logger.debug( diff --git a/lib/modules/manager/npm/update/locked-dependency/index.ts b/lib/modules/manager/npm/update/locked-dependency/index.ts index fdbe887feb2984..1cba1b8f0df566 100644 --- a/lib/modules/manager/npm/update/locked-dependency/index.ts +++ b/lib/modules/manager/npm/update/locked-dependency/index.ts @@ -19,6 +19,6 @@ export async function updateLockedDependency( if (lockFile.endsWith('yarn.lock')) { return yarnLock.updateLockedDependency(config); } - logger.debug({ lockFile }, 'Unsupported lock file'); + logger.debug(`Unsupported lock file: ${lockFile}`); return { status: 'update-failed' }; } diff --git a/lib/modules/manager/npm/update/package-version/index.ts b/lib/modules/manager/npm/update/package-version/index.ts index 2ef5845cdfd16e..83dc96007ed356 100644 --- a/lib/modules/manager/npm/update/package-version/index.ts +++ b/lib/modules/manager/npm/update/package-version/index.ts @@ -31,7 +31,8 @@ export function bumpPackageVersion( } else { newPjVersion = semver.inc(currentValue, bumpVersion as ReleaseType); } - logger.debug({ newPjVersion }); + // TODO: fix types (#7154) + logger.debug(`newPjVersion: ${newPjVersion!}`); bumpedContent = content.replace( regEx(`(?"version":\\s*")[^"]*`), `$${newPjVersion!}` diff --git a/lib/modules/manager/nuget/extract.ts b/lib/modules/manager/nuget/extract.ts index d5b8c2422d4581..6f1c1bc7a01276 100644 --- a/lib/modules/manager/nuget/extract.ts +++ b/lib/modules/manager/nuget/extract.ts @@ -86,7 +86,7 @@ export async function extractPackageFile( try { manifest = JSON.parse(content); } catch (err) { - logger.debug({ fileName: packageFile }, 'Invalid JSON'); + logger.debug(`Invalid JSON in ${packageFile}`); return null; } diff --git a/lib/modules/manager/nuget/extract/global-manifest.ts b/lib/modules/manager/nuget/extract/global-manifest.ts index cec633137ad04c..d238aa38751fe7 100644 --- a/lib/modules/manager/nuget/extract/global-manifest.ts +++ b/lib/modules/manager/nuget/extract/global-manifest.ts @@ -14,7 +14,7 @@ export function extractMsbuildGlobalManifest( try { manifest = JSON.parse(content); } catch (err) { - logger.debug({ fileName: packageFile }, 'Invalid JSON'); + logger.debug(`Invalid JSON in ${packageFile}`); return null; } diff --git a/lib/modules/manager/nuget/index.ts b/lib/modules/manager/nuget/index.ts index ba268b29109dde..0f09b1258532f0 100644 --- a/lib/modules/manager/nuget/index.ts +++ b/lib/modules/manager/nuget/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DotnetDatasource } from '../../datasource/dotnet'; import { NugetDatasource } from '../../datasource/nuget'; @@ -6,7 +6,7 @@ export { extractPackageFile } from './extract'; export { updateArtifacts } from './artifacts'; export { bumpPackageVersion } from './update'; -export const language = ProgrammingLanguage.NET; +export const language: ProgrammingLanguage = 'dotnet'; export const defaultConfig = { fileMatch: [ diff --git a/lib/modules/manager/nuget/update.ts b/lib/modules/manager/nuget/update.ts index 1b5158b6d03a42..4921abdd1e7600 100644 --- a/lib/modules/manager/nuget/update.ts +++ b/lib/modules/manager/nuget/update.ts @@ -39,7 +39,7 @@ export function bumpPackageVersion( throw new Error('semver inc failed'); } - logger.debug({ newProjVersion }); + logger.debug(`newProjVersion: ${newProjVersion}`); bumpedContent = replaceAt( content, versionPosition, diff --git a/lib/modules/manager/nuget/util.ts b/lib/modules/manager/nuget/util.ts index f15fd024275a6f..f21c787d54c55b 100644 --- a/lib/modules/manager/nuget/util.ts +++ b/lib/modules/manager/nuget/util.ts @@ -42,7 +42,7 @@ export async function getConfiguredRegistries( return undefined; } - logger.debug({ nuGetConfigPath }, 'found NuGet.config'); + logger.debug(`Found NuGet.config at ${nuGetConfigPath}`); const nuGetConfig = await readFileAsXmlDocument(nuGetConfigPath); if (!nuGetConfig) { return undefined; @@ -66,7 +66,7 @@ export async function getConfiguredRegistries( if (child.attr.protocolVersion) { registryUrl += `#protocolVersion=${child.attr.protocolVersion}`; } - logger.debug({ registryUrl }, 'adding registry URL'); + logger.debug(`Adding registry URL ${registryUrl}`); registries.push({ name: child.attr.key, url: registryUrl, diff --git a/lib/modules/manager/nvm/index.ts b/lib/modules/manager/nvm/index.ts index 70aaf8540a7d8a..0c9001f40c0a3b 100644 --- a/lib/modules/manager/nvm/index.ts +++ b/lib/modules/manager/nvm/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import * as nodeVersioning from '../../versioning/node'; @@ -7,7 +7,7 @@ export { extractPackageFile } from './extract'; export const displayName = 'nvm'; export const url = 'https://github.com/nvm-sh/nvm'; -export const language = ProgrammingLanguage.NodeJS; +export const language: ProgrammingLanguage = 'node'; export const defaultConfig = { fileMatch: ['(^|/)\\.nvmrc$'], diff --git a/lib/modules/manager/pip-compile/artifacts.ts b/lib/modules/manager/pip-compile/artifacts.ts index 7f376e0acac48b..fa91796e5dc3d6 100644 --- a/lib/modules/manager/pip-compile/artifacts.ts +++ b/lib/modules/manager/pip-compile/artifacts.ts @@ -63,7 +63,7 @@ export function constructPipCompileCmd( const headers = constraintLineRegex.exec(content); const args = ['pip-compile']; if (headers?.groups) { - logger.debug({ header: headers[0] }, 'Found pip-compile header'); + logger.debug(`Found pip-compile header: ${headers[0]}`); for (const argument of split(headers.groups.arguments)) { if (allowedPipArguments.includes(argument)) { args.push(argument); @@ -141,7 +141,7 @@ export async function updateArtifacts({ PIP_CACHE_DIR: await ensureCacheDir('pip'), }, }; - logger.debug({ cmd }, 'pip-compile command'); + logger.trace({ cmd }, 'pip-compile command'); await exec(cmd, execOptions); const status = await getRepoStatus(); if (!status?.modified.includes(outputFileName)) { diff --git a/lib/modules/manager/pip-compile/index.ts b/lib/modules/manager/pip-compile/index.ts index dd5bb5ea676290..fdde176cb50f34 100644 --- a/lib/modules/manager/pip-compile/index.ts +++ b/lib/modules/manager/pip-compile/index.ts @@ -1,10 +1,10 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { PypiDatasource } from '../../datasource/pypi'; export { extractPackageFile } from '../pip_requirements/extract'; export { updateArtifacts } from './artifacts'; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const supportsLockFileMaintenance = true; export const supportedDatasources = [PypiDatasource.id]; diff --git a/lib/modules/manager/pip_requirements/index.ts b/lib/modules/manager/pip_requirements/index.ts index 688ffbd3f8c7d6..4fe319227f5bc2 100644 --- a/lib/modules/manager/pip_requirements/index.ts +++ b/lib/modules/manager/pip_requirements/index.ts @@ -1,11 +1,11 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GitTagsDatasource } from '../../datasource/git-tags'; import { PypiDatasource } from '../../datasource/pypi'; export { updateArtifacts } from './artifacts'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const defaultConfig = { fileMatch: ['(^|/)([\\w-]*)requirements\\.(txt|pip)$'], diff --git a/lib/modules/manager/pip_setup/index.ts b/lib/modules/manager/pip_setup/index.ts index 261eced13db456..0e3a926f9cc0f4 100644 --- a/lib/modules/manager/pip_setup/index.ts +++ b/lib/modules/manager/pip_setup/index.ts @@ -1,9 +1,9 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { PypiDatasource } from '../../datasource/pypi'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const defaultConfig = { fileMatch: ['(^|/)setup\\.py$'], diff --git a/lib/modules/manager/pipenv/artifacts.ts b/lib/modules/manager/pipenv/artifacts.ts index e6beb1b0999462..331844296d1e9d 100644 --- a/lib/modules/manager/pipenv/artifacts.ts +++ b/lib/modules/manager/pipenv/artifacts.ts @@ -112,7 +112,7 @@ export async function updateArtifacts({ }, ], }; - logger.debug({ cmd }, 'pipenv lock command'); + logger.trace({ cmd }, 'pipenv lock command'); await exec(cmd, execOptions); const status = await getRepoStatus(); if (!status?.modified.includes(lockFileName)) { diff --git a/lib/modules/manager/pipenv/index.ts b/lib/modules/manager/pipenv/index.ts index 3d9c1ff8d9e7a1..857579477d700f 100644 --- a/lib/modules/manager/pipenv/index.ts +++ b/lib/modules/manager/pipenv/index.ts @@ -1,10 +1,10 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { PypiDatasource } from '../../datasource/pypi'; export { extractPackageFile } from './extract'; export { updateArtifacts } from './artifacts'; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const supportsLockFileMaintenance = true; export const supportedDatasources = [PypiDatasource.id]; diff --git a/lib/modules/manager/poetry/index.ts b/lib/modules/manager/poetry/index.ts index 5b607d8d9d92f9..122ebb1d37a823 100644 --- a/lib/modules/manager/poetry/index.ts +++ b/lib/modules/manager/poetry/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { PypiDatasource } from '../../datasource/pypi'; export { extractPackageFile } from './extract'; @@ -7,7 +7,7 @@ export { updateLockedDependency } from './update-locked'; export const supportedDatasources = [PypiDatasource.id]; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const supportsLockFileMaintenance = true; export const defaultConfig = { diff --git a/lib/modules/manager/pre-commit/extract.ts b/lib/modules/manager/pre-commit/extract.ts index 5ad6a74fac24fd..a97a248499ff0b 100644 --- a/lib/modules/manager/pre-commit/extract.ts +++ b/lib/modules/manager/pre-commit/extract.ts @@ -80,7 +80,7 @@ function extractDependency( skipReason?: SkipReason; currentValue?: string; } { - logger.debug({ tag }, 'Found version'); + logger.debug(`Found version ${tag}`); const urlMatchers = [ // This splits "http://my.github.com/user/repo" -> "my.github.com" "user/repo diff --git a/lib/modules/manager/pub/extract.ts b/lib/modules/manager/pub/extract.ts index a0b6c73d6483c1..2a406e9032e35b 100644 --- a/lib/modules/manager/pub/extract.ts +++ b/lib/modules/manager/pub/extract.ts @@ -59,7 +59,7 @@ export function extractPackageFile( }; } } catch (e) { - logger.debug({ packageFile }, 'Can not parse dependency'); + logger.debug(`Could not parse dependency from ${packageFile}`); } return null; } diff --git a/lib/modules/manager/puppet/index.ts b/lib/modules/manager/puppet/index.ts index 3340bbcb2f6531..8743d2d408cfde 100644 --- a/lib/modules/manager/puppet/index.ts +++ b/lib/modules/manager/puppet/index.ts @@ -1,11 +1,11 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GitTagsDatasource } from '../../datasource/git-tags'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import { PuppetForgeDatasource } from '../../datasource/puppet-forge'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Ruby; +export const language: ProgrammingLanguage = 'ruby'; export const defaultConfig = { fileMatch: ['(^|\\/)Puppetfile$'], diff --git a/lib/modules/manager/pyenv/index.ts b/lib/modules/manager/pyenv/index.ts index e235d493492ffa..59d75f11cd74c8 100644 --- a/lib/modules/manager/pyenv/index.ts +++ b/lib/modules/manager/pyenv/index.ts @@ -1,10 +1,10 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import * as dockerVersioning from '../../versioning/docker'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const supportedDatasources = [DockerDatasource.id]; diff --git a/lib/modules/manager/ruby-version/index.ts b/lib/modules/manager/ruby-version/index.ts index 4f339bfcee898c..68eaee26ae1947 100644 --- a/lib/modules/manager/ruby-version/index.ts +++ b/lib/modules/manager/ruby-version/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { RubyVersionDatasource } from '../../datasource/ruby-version'; import * as rubyVersioning from '../../versioning/ruby'; @@ -6,7 +6,7 @@ export { extractPackageFile } from './extract'; export const supportedDatasources = [RubyVersionDatasource.id]; -export const language = ProgrammingLanguage.Ruby; +export const language: ProgrammingLanguage = 'ruby'; export const defaultConfig = { fileMatch: ['(^|/)\\.ruby-version$'], diff --git a/lib/modules/manager/sbt/update.ts b/lib/modules/manager/sbt/update.ts index 6b167d72173a6e..91ab867c3946c8 100644 --- a/lib/modules/manager/sbt/update.ts +++ b/lib/modules/manager/sbt/update.ts @@ -26,7 +26,7 @@ export function bumpPackageVersion( if (bumpedContent === content) { logger.debug('Version was already bumped'); } else { - logger.debug({ bumpedVersion }, 'Bumped build.sbt version'); + logger.debug(`Bumped build.sbt version to ${bumpedVersion}`); } return { bumpedContent }; diff --git a/lib/modules/manager/setup-cfg/index.ts b/lib/modules/manager/setup-cfg/index.ts index d3143e204145dc..c8b40c2a0c7238 100644 --- a/lib/modules/manager/setup-cfg/index.ts +++ b/lib/modules/manager/setup-cfg/index.ts @@ -1,4 +1,4 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { PypiDatasource } from '../../datasource/pypi'; import { id as versioning } from '../../versioning/pep440'; @@ -6,7 +6,7 @@ export { extractPackageFile } from './extract'; export const supportedDatasources = [PypiDatasource.id]; -export const language = ProgrammingLanguage.Python; +export const language: ProgrammingLanguage = 'python'; export const defaultConfig = { fileMatch: ['(^|/)setup\\.cfg$'], diff --git a/lib/modules/manager/terragrunt/common.ts b/lib/modules/manager/terragrunt/common.ts index d846b2d4df1511..cb7d0133370beb 100644 --- a/lib/modules/manager/terragrunt/common.ts +++ b/lib/modules/manager/terragrunt/common.ts @@ -1,13 +1,2 @@ -// FIXME #12556 -/* eslint-disable @typescript-eslint/naming-convention */ - -// eslint-disable-next-line typescript-enum/no-enum -export enum TerragruntResourceTypes { - unknown = 'unknown', -} - -// eslint-disable-next-line typescript-enum/no-enum -export enum TerragruntDependencyTypes { - unknown = 'unknown', - terragrunt = 'terraform', -} +export type TerragruntResourceTypes = 'unknown'; +export type TerragruntDependencyTypes = 'unknown' | 'terraform'; diff --git a/lib/modules/manager/terragrunt/extract.ts b/lib/modules/manager/terragrunt/extract.ts index f9a06462d93b25..e6b389e3b6569e 100644 --- a/lib/modules/manager/terragrunt/extract.ts +++ b/lib/modules/manager/terragrunt/extract.ts @@ -1,7 +1,6 @@ import { logger } from '../../../logger'; import { newlineRegex, regEx } from '../../../util/regex'; import type { PackageDependency, PackageFile } from '../types'; -import { TerragruntDependencyTypes } from './common'; import { analyseTerragruntModule, extractTerragruntModule } from './modules'; import type { ExtractionResult, TerraformManagerData } from './types'; import { @@ -32,7 +31,7 @@ export function extractPackageFile(content: string): PackageFile | null { ); let result: ExtractionResult | null = null; switch (tfDepType) { - case TerragruntDependencyTypes.terragrunt: { + case 'terraform': { result = extractTerragruntModule(lineNumber, lines); break; } @@ -56,7 +55,7 @@ export function extractPackageFile(content: string): PackageFile | null { deps.forEach((dep) => { // TODO #7154 switch (dep.managerData!.terragruntDependencyType) { - case TerragruntDependencyTypes.terragrunt: + case 'terraform': analyseTerragruntModule(dep); break; /* istanbul ignore next */ diff --git a/lib/modules/manager/terragrunt/modules.ts b/lib/modules/manager/terragrunt/modules.ts index 877b2c050c183c..e4bd9901a739b9 100644 --- a/lib/modules/manager/terragrunt/modules.ts +++ b/lib/modules/manager/terragrunt/modules.ts @@ -4,7 +4,6 @@ import { GitTagsDatasource } from '../../datasource/git-tags'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import { TerraformModuleDatasource } from '../../datasource/terraform-module'; import type { PackageDependency } from '../types'; -import { TerragruntDependencyTypes } from './common'; import { extractTerragruntProvider } from './providers'; import type { ExtractionResult, TerraformManagerData } from './types'; @@ -24,8 +23,7 @@ export function extractTerragruntModule( const result = extractTerragruntProvider(startingLine, lines, moduleName); result.dependencies.forEach((dep) => { // TODO #7154 - dep.managerData!.terragruntDependencyType = - TerragruntDependencyTypes.terragrunt; + dep.managerData!.terragruntDependencyType = 'terraform'; }); return result; } diff --git a/lib/modules/manager/terragrunt/providers.ts b/lib/modules/manager/terragrunt/providers.ts index b009439eb28aa9..914b1917d1cdf6 100644 --- a/lib/modules/manager/terragrunt/providers.ts +++ b/lib/modules/manager/terragrunt/providers.ts @@ -1,6 +1,5 @@ import { newlineRegex, regEx } from '../../../util/regex'; import type { PackageDependency } from '../types'; -import { TerragruntDependencyTypes } from './common'; import type { ExtractionResult, TerraformManagerData } from './types'; import { keyValueExtractionRegex } from './util'; @@ -34,7 +33,7 @@ export function extractTerragruntProvider( const deps: PackageDependency[] = []; const managerData: TerraformManagerData = { moduleName, - terragruntDependencyType: TerragruntDependencyTypes.terragrunt, + terragruntDependencyType: 'terraform', }; const dep: PackageDependency = { managerData }; const teraformContent = lines diff --git a/lib/modules/manager/terragrunt/util.spec.ts b/lib/modules/manager/terragrunt/util.spec.ts index 44f88676619a43..65577b8503af4e 100644 --- a/lib/modules/manager/terragrunt/util.spec.ts +++ b/lib/modules/manager/terragrunt/util.spec.ts @@ -1,29 +1,22 @@ -import { TerragruntDependencyTypes } from './common'; import { getTerragruntDependencyType } from './util'; describe('modules/manager/terragrunt/util', () => { describe('getTerragruntDependencyType()', () => { - it('returns TerragruntDependencyTypes.terragrunt', () => { - expect(getTerragruntDependencyType('terraform')).toBe( - TerragruntDependencyTypes.terragrunt - ); + it('returns terraform', () => { + expect(getTerragruntDependencyType('terraform')).toBe('terraform'); }); - it('returns TerragruntDependencyTypes.unknown', () => { - expect(getTerragruntDependencyType('unknown')).toBe( - TerragruntDependencyTypes.unknown - ); + it('returns unknown', () => { + expect(getTerragruntDependencyType('unknown')).toBe('unknown'); }); - it('returns TerragruntDependencyTypes.unknown on empty string', () => { - expect(getTerragruntDependencyType('')).toBe( - TerragruntDependencyTypes.unknown - ); + it('returns unknown on empty string', () => { + expect(getTerragruntDependencyType('')).toBe('unknown'); }); - it('returns TerragruntDependencyTypes.unknown on string with random chars', () => { + it('returns unknown on string with random chars', () => { expect(getTerragruntDependencyType('sdfsgdsfadfhfghfhgdfsdf')).toBe( - TerragruntDependencyTypes.unknown + 'unknown' ); }); }); diff --git a/lib/modules/manager/terragrunt/util.ts b/lib/modules/manager/terragrunt/util.ts index 95a790171f7e55..e9dd1d382cf678 100644 --- a/lib/modules/manager/terragrunt/util.ts +++ b/lib/modules/manager/terragrunt/util.ts @@ -1,5 +1,5 @@ import { regEx } from '../../../util/regex'; -import { TerragruntDependencyTypes } from './common'; +import type { TerragruntDependencyTypes } from './common'; export const keyValueExtractionRegex = regEx( /^\s*source\s+=\s+"(?[^"]+)"\s*$/ @@ -10,10 +10,10 @@ export function getTerragruntDependencyType( ): TerragruntDependencyTypes { switch (value) { case 'terraform': { - return TerragruntDependencyTypes.terragrunt; + return 'terraform'; } default: { - return TerragruntDependencyTypes.unknown; + return 'unknown'; } } } diff --git a/lib/modules/manager/travis/index.ts b/lib/modules/manager/travis/index.ts index 4a03418b5d04ee..baa3937b545125 100644 --- a/lib/modules/manager/travis/index.ts +++ b/lib/modules/manager/travis/index.ts @@ -1,10 +1,10 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import * as nodeVersioning from '../../versioning/node'; export { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.NodeJS; +export const language: ProgrammingLanguage = 'node'; export const supportedDatasources = [GithubTagsDatasource.id]; diff --git a/lib/modules/manager/woodpecker/index.ts b/lib/modules/manager/woodpecker/index.ts index 12b959e5de084d..fc9d97bb666797 100644 --- a/lib/modules/manager/woodpecker/index.ts +++ b/lib/modules/manager/woodpecker/index.ts @@ -1,8 +1,8 @@ -import { ProgrammingLanguage } from '../../../constants'; +import type { ProgrammingLanguage } from '../../../constants'; import { DockerDatasource } from '../../datasource/docker'; import { extractPackageFile } from './extract'; -export const language = ProgrammingLanguage.Docker; +export const language: ProgrammingLanguage = 'docker'; export { extractPackageFile }; diff --git a/lib/modules/platform/azure/index.ts b/lib/modules/platform/azure/index.ts index 1418d0403aa1fc..25388c0f0cdc87 100644 --- a/lib/modules/platform/azure/index.ts +++ b/lib/modules/platform/azure/index.ts @@ -260,7 +260,7 @@ export async function getPrList(): Promise { } while (fetchedPrs.length > 0); config.prList = prs.map(getRenovatePRFormat); - logger.debug({ length: config.prList.length }, 'Retrieved Pull Requests'); + logger.debug(`Retrieved Pull Requests count: ${config.prList.length}`); } return config.prList; } diff --git a/lib/modules/platform/bitbucket-server/index.ts b/lib/modules/platform/bitbucket-server/index.ts index 9ae76d64d8cd43..131103f3903e2c 100644 --- a/lib/modules/platform/bitbucket-server/index.ts +++ b/lib/modules/platform/bitbucket-server/index.ts @@ -311,7 +311,7 @@ export async function getPrList(refreshCache?: boolean): Promise { ); config.prList = values.map(utils.prInfo); - logger.debug({ length: config.prList.length }, 'Retrieved Pull Requests'); + logger.debug(`Retrieved Pull Requests, count: ${config.prList.length}`); } else { logger.debug('returning cached PR list'); } @@ -966,7 +966,7 @@ export async function mergePr({ } } - logger.debug({ pr: prNo }, 'PR merged'); + logger.debug(`PR merged, PrNo:${prNo}`); return true; } diff --git a/lib/modules/platform/bitbucket-server/utils.ts b/lib/modules/platform/bitbucket-server/utils.ts index 6c98f803149893..e3324634fd6a6f 100644 --- a/lib/modules/platform/bitbucket-server/utils.ts +++ b/lib/modules/platform/bitbucket-server/utils.ts @@ -164,7 +164,7 @@ function generateUrlFromEndpoint( }scm`, repository, }); - logger.debug({ url: generatedUrl }, `using generated endpoint URL`); + logger.debug(`Using generated endpoint URL: ${generatedUrl}`); return generatedUrl; } @@ -192,7 +192,7 @@ export function getRepoGitUrl( if (sshUrl === undefined) { throw new Error(CONFIG_GIT_URL_UNAVAILABLE); } - logger.debug({ url: sshUrl.href }, `using ssh URL`); + logger.debug(`Using ssh URL: ${sshUrl.href}`); return sshUrl.href; } let cloneUrl = info.links.clone?.find(({ name }) => name === 'http'); diff --git a/lib/modules/platform/bitbucket/index.ts b/lib/modules/platform/bitbucket/index.ts index b23bf7008963d8..3d07056f2998cf 100644 --- a/lib/modules/platform/bitbucket/index.ts +++ b/lib/modules/platform/bitbucket/index.ts @@ -251,7 +251,7 @@ export async function getPrList(): Promise { } const prs = await utils.accumulateValues(url, undefined, undefined, 50); config.prList = prs.map(utils.prInfo); - logger.debug({ length: config.prList.length }, 'Retrieved Pull Requests'); + logger.debug(`Retrieved Pull Requests, count: ${config.prList.length}`); } return config.prList; } @@ -501,7 +501,7 @@ export async function ensureIssue({ /* istanbul ignore if */ if (!config.has_issues) { logger.warn('Issues are disabled - cannot ensureIssue'); - logger.debug({ title }, 'Failed to ensure Issue'); + logger.debug(`Failed to ensure Issue with title:${title}`); return null; } try { diff --git a/lib/modules/platform/codecommit/index.ts b/lib/modules/platform/codecommit/index.ts index a5dfdff0b2b814..15fc4046f9e22f 100644 --- a/lib/modules/platform/codecommit/index.ts +++ b/lib/modules/platform/codecommit/index.ts @@ -203,7 +203,7 @@ export async function getPrList(): Promise { config.prList = fetchedPrs; - logger.debug({ length: fetchedPrs.length }, 'Retrieved Pull Requests'); + logger.debug(`Retrieved Pull Requests, count: ${fetchedPrs.length}`); return fetchedPrs; } diff --git a/lib/modules/platform/gitea/index.ts b/lib/modules/platform/gitea/index.ts index 96d9c92ebd1e57..400af831aa0c5f 100644 --- a/lib/modules/platform/gitea/index.ts +++ b/lib/modules/platform/gitea/index.ts @@ -809,7 +809,7 @@ const platform: Platform = { const issueList = await platform.getIssueList(); for (const issue of issueList) { if (issue.state === 'open' && issue.title === title) { - logger.debug({ number: issue.number }, 'Closing issue'); + logger.debug(`Closing issue...issueNo: ${issue.number!}`); // TODO #7154 await helper.closeIssue(config.repository, issue.number!); } diff --git a/lib/modules/platform/gitea/utils.ts b/lib/modules/platform/gitea/utils.ts index 1f589ee5dd1c9c..c2bc7af0065c8a 100644 --- a/lib/modules/platform/gitea/utils.ts +++ b/lib/modules/platform/gitea/utils.ts @@ -24,7 +24,7 @@ export function getRepoUrl( if (!repo.ssh_url) { throw new Error(CONFIG_GIT_URL_UNAVAILABLE); } - logger.debug({ url: repo.ssh_url }, `using SSH URL`); + logger.debug(`Using SSH URL: ${repo.ssh_url}`); return repo.ssh_url; } @@ -52,7 +52,7 @@ export function getRepoUrl( throw new Error(CONFIG_GIT_URL_UNAVAILABLE); } - logger.debug({ url: repo.clone_url }, `using HTTP URL`); + logger.debug(`Using HTTP URL: ${repo.clone_url}`); const repoUrl = parseUrl(repo.clone_url); if (!repoUrl) { throw new Error(CONFIG_GIT_URL_UNAVAILABLE); diff --git a/lib/modules/platform/github/index.spec.ts b/lib/modules/platform/github/index.spec.ts index 211719a4dfc689..831eb076288f73 100644 --- a/lib/modules/platform/github/index.spec.ts +++ b/lib/modules/platform/github/index.spec.ts @@ -3,6 +3,7 @@ import * as httpMock from '../../../../test/http-mock'; import { logger, mocked, partial } from '../../../../test/util'; import { GlobalConfig } from '../../../config/global'; import { + REPOSITORY_CANNOT_FORK, REPOSITORY_NOT_FOUND, REPOSITORY_RENAMED, } from '../../../constants/error-messages'; @@ -289,20 +290,20 @@ describe('modules/platform/github/index', () => { }, }, }) - // getRepos - .get('/user/repos?per_page=100') + // getForks + .get(`/repos/${repository}/forks?per_page=100`) .reply( 200, forkExisted - ? [{ full_name: 'forked/repo', default_branch: forkDefaulBranch }] + ? [ + { + full_name: 'forked/repo', + owner: { login: 'forked' }, + default_branch: forkDefaulBranch, + }, + ] : [] - ) - // getBranchCommit - .post(`/repos/${repository}/forks`) - .reply(200, { - full_name: 'forked/repo', - default_branch: forkDefaulBranch, - }); + ); } describe('initRepo', () => { @@ -316,6 +317,13 @@ describe('modules/platform/github/index', () => { it('should fork when using forkToken', async () => { const scope = httpMock.scope(githubApiHost); forkInitRepoMock(scope, 'some/repo', false); + scope.get('/user').reply(200, { + login: 'forked', + }); + scope.post('/repos/some/repo/forks').reply(200, { + full_name: 'forked/repo', + default_branch: 'master', + }); const config = await github.initRepo({ repository: 'some/repo', forkToken: 'true', @@ -323,9 +331,43 @@ describe('modules/platform/github/index', () => { expect(config).toMatchSnapshot(); }); + it('throws when cannot fork due to username error', async () => { + const repo = 'some/repo'; + const branch = 'master'; + const scope = httpMock.scope(githubApiHost); + forkInitRepoMock(scope, repo, false, branch); + scope.get('/user').reply(404); + await expect( + github.initRepo({ + repository: 'some/repo', + forkToken: 'true', + }) + ).rejects.toThrow(REPOSITORY_CANNOT_FORK); + }); + + it('throws when error creating fork', async () => { + const repo = 'some/repo'; + const scope = httpMock.scope(githubApiHost); + forkInitRepoMock(scope, repo, false); + scope.get('/user').reply(200, { + login: 'forked', + }); + // getBranchCommit + scope.post(`/repos/${repo}/forks`).reply(500); + await expect( + github.initRepo({ + repository: 'some/repo', + forkToken: 'true', + }) + ).rejects.toThrow(REPOSITORY_CANNOT_FORK); + }); + it('should update fork when using forkToken', async () => { const scope = httpMock.scope(githubApiHost); forkInitRepoMock(scope, 'some/repo', true); + scope.get('/user').reply(200, { + login: 'forked', + }); scope.patch('/repos/forked/repo/git/refs/heads/master').reply(200); const config = await github.initRepo({ repository: 'some/repo', @@ -337,6 +379,9 @@ describe('modules/platform/github/index', () => { it('detects fork default branch mismatch', async () => { const scope = httpMock.scope(githubApiHost); forkInitRepoMock(scope, 'some/repo', true, 'not_master'); + scope.get('/user').reply(200, { + login: 'forked', + }); scope.post('/repos/forked/repo/git/refs').reply(200); scope.patch('/repos/forked/repo').reply(200); scope.patch('/repos/forked/repo/git/refs/heads/master').reply(200); @@ -512,6 +557,7 @@ describe('modules/platform/github/index', () => { required_pull_request_reviews: { dismiss_stale_reviews: false, require_code_owner_reviews: false, + required_approving_review_count: 1, }, required_status_checks: { strict: true, @@ -2284,8 +2330,7 @@ describe('modules/platform/github/index', () => { expect(logger.logger.debug).toHaveBeenNthCalledWith( 11, - { prNumber: 123 }, - 'GitHub-native automerge: success' + 'GitHub-native automerge: success...PrNo: 123' ); }); diff --git a/lib/modules/platform/github/index.ts b/lib/modules/platform/github/index.ts index 9e458272ffc3ef..d63bdbb26a7e56 100644 --- a/lib/modules/platform/github/index.ts +++ b/lib/modules/platform/github/index.ts @@ -74,6 +74,7 @@ import type { GhPr, GhRepo, GhRestPr, + GhRestRepo, LocalRepoConfig, PlatformConfig, } from './types'; @@ -241,6 +242,86 @@ export async function getJsonFile( return JSON5.parse(raw); } +export async function getForkOrgs(token: string): Promise { + // This function will be adapted later to support configured forkOrgs + if (!config.renovateForkUser) { + try { + logger.debug('Determining fork user from API'); + const userDetails = await getUserDetails(platformConfig.endpoint, token); + config.renovateForkUser = userDetails.username; + } catch (err) { + logger.debug({ err }, 'Error getting username for forkToken'); + } + } + return config.renovateForkUser ? [config.renovateForkUser] : []; +} + +export async function listForks( + token: string, + repository: string +): Promise { + // Get list of existing repos + const url = `repos/${repository}/forks?per_page=100`; + const repos = ( + await githubApi.getJson(url, { + token, + paginate: true, + pageLimit: 100, + }) + ).body; + logger.debug(`Found ${repos.length} forked repo(s)`); + return repos; +} + +export async function findFork( + token: string, + repository: string +): Promise { + const forks = await listForks(token, repository); + const orgs = await getForkOrgs(token); + if (!orgs.length) { + throw new Error(REPOSITORY_CANNOT_FORK); + } + let forkedRepo: GhRestRepo | undefined; + for (const forkOrg of orgs) { + logger.debug(`Searching for forked repo in ${forkOrg}`); + forkedRepo = forks.find((repo) => repo.owner.login === forkOrg); + if (forkedRepo) { + logger.debug(`Found existing forked repo: ${forkedRepo.full_name}`); + break; + } + } + return forkedRepo ?? null; +} + +export async function createFork( + token: string, + repository: string +): Promise { + let forkedRepo: GhRestRepo | undefined; + try { + const organization = (await getForkOrgs(token))[0]; + forkedRepo = ( + await githubApi.postJson(`repos/${repository}/forks`, { + token, + body: { + organization, + name: config.parentRepo!.replace('/', '-_-'), + default_branch_only: true, // no baseBranches support yet + }, + }) + ).body; + } catch (err) { + logger.debug({ err }, 'Error creating fork'); + } + if (!forkedRepo) { + throw new Error(REPOSITORY_CANNOT_FORK); + } + logger.debug(`Created forked repo ${forkedRepo.full_name}, now sleeping 30s`); + await delay(30000); + return forkedRepo; +} + // Initialize GitHub by getting base branch and SHA export async function initRepo({ endpoint, @@ -260,7 +341,7 @@ export async function initRepo({ // istanbul ignore if if (endpoint) { // Necessary for Renovate Pro - do not remove - logger.debug({ endpoint }, 'Overriding default GitHub endpoint'); + logger.debug(`Overriding default GitHub endpoint with ${endpoint}`); platformConfig.endpoint = endpoint; githubHttp.setBaseUrl(endpoint); } @@ -375,26 +456,10 @@ export async function initRepo({ // save parent name then delete config.parentRepo = config.repository; config.repository = null; - // Get list of existing repos - platformConfig.existingRepos ??= ( - await githubApi.getJson<{ full_name: string }[]>( - 'user/repos?per_page=100', - { - token: forkToken ?? opts.token, - paginate: true, - pageLimit: 100, - } - ) - ).body.map((r) => r.full_name); - try { - const forkedRepo = await githubApi.postJson<{ - full_name: string; - default_branch: string; - }>(`repos/${repository}/forks`, { - token: forkToken ?? opts.token, - }); - config.repository = forkedRepo.body.full_name; - const forkDefaultBranch = forkedRepo.body.default_branch; + let forkedRepo = await findFork(forkToken, repository); + if (forkedRepo) { + config.repository = forkedRepo.full_name; + const forkDefaultBranch = forkedRepo.default_branch; if (forkDefaultBranch !== config.defaultBranch) { const body = { ref: `refs/heads/${config.defaultBranch}`, @@ -442,15 +507,6 @@ export async function initRepo({ logger.warn({ err }, 'Could not set default branch'); } } - } catch (err) /* istanbul ignore next */ { - logger.debug({ err }, 'Error forking repository'); - throw new Error(REPOSITORY_CANNOT_FORK); - } - if (platformConfig.existingRepos.includes(config.repository)) { - logger.debug( - { repository_fork: config.repository }, - 'Found existing fork' - ); // This is a lovely "hack" by GitHub that lets us force update our fork's default branch // with the base commit from the parent repository const url = `repos/${config.repository}/git/refs/heads/${config.defaultBranch}`; @@ -477,10 +533,9 @@ export async function initRepo({ throw new ExternalHostError(err); } } else { - logger.debug({ repository_fork: config.repository }, 'Created fork'); - platformConfig.existingRepos.push(config.repository); - // Wait an arbitrary 30s to hopefully give GitHub enough time for forking to complete - await delay(30000); + logger.debug('Forked repo is not found - attempting to create it'); + forkedRepo = await createFork(forkToken, repository); + config.repository = forkedRepo.full_name; } } @@ -521,7 +576,10 @@ export async function getRepoForceRebase(): Promise { config.repoForceRebase = false; const branchProtection = await getBranchProtection(config.defaultBranch); logger.debug('Found branch protection'); - if (branchProtection.required_pull_request_reviews) { + if ( + branchProtection.required_pull_request_reviews + ?.required_approving_review_count > 0 + ) { logger.debug( 'Branch protection: PR Reviews are required before merging' ); @@ -705,7 +763,7 @@ export async function getBranchPr(branchName: string): Promise { await githubApi.postJson(`repos/${config.repository}/git/refs`, { body: { ref: `refs/heads/${branchName}`, sha }, }); - logger.debug({ branchName, sha }, 'Recreated autoclosed branch'); + logger.debug(`Recreated autoclosed branch ${branchName} with sha ${sha}`); } catch (err) { logger.debug('Could not recreate autoclosed branch - skipping reopen'); return null; @@ -1031,7 +1089,7 @@ export async function ensureIssue({ if (!issues.length) { issues = issueList.filter((i) => i.title === reuseTitle); if (issues.length) { - logger.debug({ reuseTitle, title }, 'Reusing issue title'); + logger.debug(`Reusing issue title: "${reuseTitle}"`); } } if (issues.length) { @@ -1124,7 +1182,7 @@ export async function ensureIssueClosing(title: string): Promise { if (issue.state === 'open' && issue.title === title) { // TODO #7154 await closeIssue(issue.number!); - logger.debug({ number: issue.number }, 'Issue closed'); + logger.debug(`Issue closed, issueNo: ${issue.number}`); } } } @@ -1336,7 +1394,7 @@ export async function ensureCommentRemoval( try { if (commentId) { - logger.debug({ issueNo }, 'Removing comment'); + logger.debug(`Removing comment from issueNo: ${issueNo}`); await deleteComment(commentId); } } catch (err) /* istanbul ignore next */ { @@ -1394,7 +1452,7 @@ async function tryPrAutomerge( return; } - logger.debug({ prNumber }, 'GitHub-native automerge: success'); + logger.debug(`GitHub-native automerge: success...PrNo: ${prNumber}`); } catch (err) /* istanbul ignore next: missing test #7154 */ { logger.warn({ prNumber, err }, 'GitHub-native automerge: REST API error'); } @@ -1481,7 +1539,7 @@ export async function updatePr({ ); const result = coerceRestPr(ghPr); cachePr(result); - logger.debug({ pr: prNo }, 'PR updated'); + logger.debug(`PR updated...prNo: ${prNo}`); } catch (err) /* istanbul ignore next */ { if (err instanceof ExternalHostError) { throw err; diff --git a/lib/modules/platform/github/types.ts b/lib/modules/platform/github/types.ts index 2e3f3839b9f83b..9c62287dcfd79a 100644 --- a/lib/modules/platform/github/types.ts +++ b/lib/modules/platform/github/types.ts @@ -20,6 +20,14 @@ export interface Comment { body: string; } +export interface GhRestRepo { + full_name: string; + default_branch: string; + owner: { + login: string; + }; +} + export interface GhRestPr { head: { ref: string; @@ -88,6 +96,7 @@ export interface LocalRepoConfig { repositoryOwner: string; repository: string | null; renovateUsername: string | undefined; + renovateForkUser: string | undefined; productLinks: any; ignorePrAuthor: boolean; autoMergeAllowed: boolean; diff --git a/lib/modules/platform/gitlab/index.ts b/lib/modules/platform/gitlab/index.ts index aa1c8af8a712d3..50000120159cf5 100644 --- a/lib/modules/platform/gitlab/index.ts +++ b/lib/modules/platform/gitlab/index.ts @@ -196,7 +196,7 @@ function getRepoUrl( if (!res.body.ssh_url_to_repo) { throw new Error(CONFIG_GIT_URL_UNAVAILABLE); } - logger.debug({ url: res.body.ssh_url_to_repo }, `using ssh URL`); + logger.debug(`Using ssh URL: ${res.body.ssh_url_to_repo}`); return res.body.ssh_url_to_repo; } @@ -229,11 +229,11 @@ function getRepoUrl( host, pathname: newPathname + '/' + repository + '.git', }); - logger.debug({ url }, 'using URL based on configured endpoint'); + logger.debug(`Using URL based on configured endpoint, url:${url}`); return url; } - logger.debug({ url: res.body.http_url_to_repo }, `using http URL`); + logger.debug(`Using http URL: ${res.body.http_url_to_repo}`); const repoUrl = URL.parse(`${res.body.http_url_to_repo}`); // TODO: types (#7154) repoUrl.auth = `oauth2:${opts.token!}`; diff --git a/lib/modules/versioning/api.ts b/lib/modules/versioning/api.ts index 7329e25b87fd77..f9899d112ac099 100644 --- a/lib/modules/versioning/api.ts +++ b/lib/modules/versioning/api.ts @@ -14,6 +14,7 @@ import * as ivy from './ivy'; import * as kubernetesApi from './kubernetes-api'; import * as loose from './loose'; import * as maven from './maven'; +import * as nixpkgs from './nixpkgs'; import * as node from './node'; import * as npm from './npm'; import * as nuget from './nuget'; @@ -50,6 +51,7 @@ api.set(ivy.id, ivy.api); api.set(kubernetesApi.id, kubernetesApi.api); api.set(loose.id, loose.api); api.set(maven.id, maven.api); +api.set(nixpkgs.id, nixpkgs.api); api.set(node.id, node.api); api.set(npm.id, npm.api); api.set(nuget.id, nuget.api); diff --git a/lib/modules/versioning/gradle/compare.ts b/lib/modules/versioning/gradle/compare.ts index f39f1d945763d1..633295cce04828 100644 --- a/lib/modules/versioning/gradle/compare.ts +++ b/lib/modules/versioning/gradle/compare.ts @@ -223,11 +223,7 @@ interface PrefixRange { tokens: Token[]; } -// eslint-disable-next-line typescript-enum/no-enum -export enum RangeBound { - Inclusive = 1, - Exclusive, -} +export type RangeBound = 'inclusive' | 'exclusive'; interface MavenBasedRange { leftBound: RangeBound; @@ -293,14 +289,9 @@ export function parseMavenBasedRange(input: string): MavenBasedRange | null { ) { return null; } - const leftBound = - leftBoundStr.trim() === '[' - ? RangeBound.Inclusive - : RangeBound.Exclusive; + const leftBound = leftBoundStr.trim() === '[' ? 'inclusive' : 'exclusive'; const rightBound = - rightBoundStr.trim() === ']' - ? RangeBound.Inclusive - : RangeBound.Exclusive; + rightBoundStr.trim() === ']' ? 'inclusive' : 'exclusive'; return { leftBound, leftBoundStr, diff --git a/lib/modules/versioning/gradle/index.ts b/lib/modules/versioning/gradle/index.ts index b0565d60ad4fd7..9b3a46a1be5f29 100644 --- a/lib/modules/versioning/gradle/index.ts +++ b/lib/modules/versioning/gradle/index.ts @@ -2,7 +2,6 @@ import type { RangeStrategy } from '../../../types/versioning'; import { regEx } from '../../../util/regex'; import type { NewValueConfig, VersioningApi } from '../types'; import { - RangeBound, TokenType, compare, isValid, @@ -139,14 +138,14 @@ const matches = (a: string, b: string): boolean => { if (leftVal) { leftResult = - leftBound === RangeBound.Exclusive + leftBound === 'exclusive' ? compare(leftVal, a) === -1 : compare(leftVal, a) !== 1; } if (rightVal) { rightResult = - rightBound === RangeBound.Exclusive + rightBound === 'exclusive' ? compare(a, rightVal) === -1 : compare(a, rightVal) !== 1; } diff --git a/lib/modules/versioning/nixpkgs/index.spec.ts b/lib/modules/versioning/nixpkgs/index.spec.ts new file mode 100644 index 00000000000000..c22e106982e390 --- /dev/null +++ b/lib/modules/versioning/nixpkgs/index.spec.ts @@ -0,0 +1,84 @@ +import { NixPkgsVersioning } from '.'; + +describe('modules/versioning/nixpkgs/index', () => { + const versioning = new NixPkgsVersioning(); + + test.each` + version | expected + ${undefined} | ${false} + ${null} | ${false} + ${''} | ${false} + ${'1.2.3'} | ${false} + ${'22.05'} | ${false} + ${'release-22.05'} | ${true} + ${'nixos-22.05'} | ${true} + ${'nixos-22.05-small'} | ${true} + ${'nixos-22.05-aarch64'} | ${true} + ${'nixos-22.05-aarch64-small'} | ${false} + ${'nixpkgs-22.05-darwin'} | ${true} + ${'nixpkgs-22.05-darwin-aarch64'} | ${false} + ${'nixos-unstable'} | ${true} + ${'nixos-unstable-small'} | ${true} + ${'nixpkgs-unstable'} | ${true} + ${'nixos-22.05.1234'} | ${false} + ${'nixos-22.05-1234'} | ${false} + ${'nixos-22.05-unknown'} | ${false} + ${'unknown-22.05'} | ${false} + ${'nixos-nixpkgs-22.05'} | ${false} + `('isValid("$version") === $expected', ({ version, expected }) => { + expect(versioning.isValid(version)).toBe(expected); + }); + + test.each` + version | expected + ${undefined} | ${false} + ${null} | ${false} + ${''} | ${false} + ${'release-22.05'} | ${true} + ${'nixos-22.05'} | ${true} + ${'nixos-22.05-small'} | ${true} + ${'nixos-22.05-aarch64'} | ${true} + ${'nixpkgs-22.05-darwin'} | ${true} + ${'nixos-unstable'} | ${false} + ${'nixos-unstable-small'} | ${false} + ${'nixpkgs-unstable'} | ${false} + `('isStable("$version") === $expected', ({ version, expected }) => { + expect(versioning.isStable(version)).toBe(expected); + }); + + test.each` + a | b | expected + ${'nixos-22.05'} | ${'nixos-22.05'} | ${true} + ${'nixos-22.05'} | ${'nixos-21.11'} | ${false} + ${'nixos-22.05'} | ${'nixos-unstable'} | ${false} + ${'nixos-unstable'} | ${'nixos-unstable'} | ${true} + ${'nixos-unstable-small'} | ${'nixos-unstable-small'} | ${true} + `('equals($a, $b) === $expected', ({ a, b, expected }) => { + expect(versioning.equals(a, b)).toBe(expected); + }); + + test.each` + versions | expected + ${['nixos-21.11', 'nixos-22.05', 'nixos-22.05-small', 'nixos-unstable', 'nixos-unstable-small']} | ${['nixos-21.11', 'nixos-22.05', 'nixos-22.05-small', 'nixos-unstable', 'nixos-unstable-small']} + `( + '$versions -> sortVersions -> $expected ', + ({ versions, expected }: { versions: string[]; expected: string[] }) => { + expect(versions.sort((a, b) => versioning.sortVersions(a, b))).toEqual( + expected + ); + } + ); + + test.each` + a | b | expected + ${'nixos-22.05'} | ${'nixos-22.05'} | ${true} + ${'nixos-22.05'} | ${'nixpkgs-22.05'} | ${false} + ${'nixos-22.05'} | ${'nixos-21.11'} | ${true} + ${'nixos-22.05'} | ${'nixos-unstable'} | ${true} + ${'nixos-22.05'} | ${'nixos-22.05-small'} | ${false} + ${'nixos-22.05'} | ${'nixos-22.05-aarch64'} | ${false} + ${'nixos-22.05'} | ${'nixos-22.05-darwin'} | ${false} + `('equals($a, $b) === $expected', ({ a, b, expected }) => { + expect(versioning.isCompatible(a, b)).toBe(expected); + }); +}); diff --git a/lib/modules/versioning/nixpkgs/index.ts b/lib/modules/versioning/nixpkgs/index.ts new file mode 100644 index 00000000000000..59928b60462503 --- /dev/null +++ b/lib/modules/versioning/nixpkgs/index.ts @@ -0,0 +1,71 @@ +import is from '@sindresorhus/is'; +import { RegExpVersion, RegExpVersioningApi } from '../regex'; +import type { VersioningApiConstructor } from '../types'; + +export const id = 'nixpkgs'; +export const displayName = 'Nixpkgs'; +export const urls = ['https://github.com/NixOS/nixpkgs']; +export const supportsRanges = false; + +export class NixPkgsVersioning extends RegExpVersioningApi { + private static readonly versionRegex = + '^(?(nixos|nixpkgs|release))-((?\\d{2})\\.(?\\d{2})|unstable)(-(?(small|aarch64|darwin)))?$'; + + constructor() { + super(NixPkgsVersioning.versionRegex); + } + + protected override _parse(version: string): RegExpVersion | null { + const groups = this._config?.exec(version)?.groups; + + if (!groups) { + return null; + } + + const { prefix, major, minor, suffix } = groups; + const release = []; + + if (major) { + release.push(Number.parseInt(major, 10)); + } + + if (minor) { + release.push(Number.parseInt(minor, 10)); + } + + const compatibility = is.nonEmptyStringAndNotWhitespace(suffix) + ? `${prefix}-${suffix}` + : prefix; + + return { + release, + compatibility, + }; + } + + override isStable(version: string): boolean { + const parsed = this._parse(version); + return is.nonEmptyArray(parsed?.release); + } + + protected override _compare(version: string, other: string): number { + const left = this._parse(version); + const right = this._parse(other); + + // empty version is equal to 'unstable' + if (is.emptyArray(left?.release) && is.emptyArray(right?.release)) { + return 0; + } + if (is.emptyArray(left?.release)) { + return 1; + } + if (is.emptyArray(right?.release)) { + return -1; + } + return super._compare(version, other); + } +} + +export const api: VersioningApiConstructor = NixPkgsVersioning; + +export default api; diff --git a/lib/modules/versioning/nixpkgs/readme.md b/lib/modules/versioning/nixpkgs/readme.md new file mode 100644 index 00000000000000..5ab8950324b868 --- /dev/null +++ b/lib/modules/versioning/nixpkgs/readme.md @@ -0,0 +1,17 @@ +Nixpkgs versioning is designed to be used with the nix manager. + +NixOS releases follow the `YY.MM` pattern. +There are also some prefixes and suffixes allowed. +Using `22.05` as an example the allowed combination of prefixes and suffixes are: + +- `release-22.05` +- `nixos-22.05` +- `nixos-22.05-small` +- `nixos-22.05-aarch64` +- `nixpkgs-22.05-darwin` + +Additionally, there are some floating versions: + +- `nixos-unstable` +- `nixos-unstable-small` +- `nixpkgs-unstable` diff --git a/lib/modules/versioning/ruby/index.spec.ts b/lib/modules/versioning/ruby/index.spec.ts index 4bb785b8f299f8..f6862b00cef79e 100644 --- a/lib/modules/versioning/ruby/index.spec.ts +++ b/lib/modules/versioning/ruby/index.spec.ts @@ -308,6 +308,13 @@ describe('modules/versioning/ruby/index', () => { ${'~> 5.2.0, >= 5.2.5'} | ${'replace'} | ${'5.2.5'} | ${'5.3.1'} | ${'~> 5.3.0, >= 5.3.1'} ${'4.2.0'} | ${'replace'} | ${'4.2.0'} | ${'4.2.5.1'} | ${'4.2.5.1'} ${'4.2.5.1'} | ${'replace'} | ${'0.1'} | ${'4.3.0'} | ${'4.3.0'} + ${'4.2.5.1'} | ${'replace'} | ${'0.1'} | ${'4.2.6'} | ${'4.2.6'} + ${'~> 4.2'} | ${'replace'} | ${'0.1'} | ${'4.2.5.1'} | ${'~> 4.2'} + ${'~> 4.2'} | ${'replace'} | ${'4.2.5.2'} | ${'4.2.5.1'} | ${'~> 4.2'} + ${'~> 4.2.5'} | ${'replace'} | ${'0.1'} | ${'4.2.5.1'} | ${'~> 4.2.5'} + ${'~> 4.2.5'} | ${'replace'} | ${'0.1'} | ${'4.3.0.1'} | ${'~> 4.3.0'} + ${'~> 4.2.5.1'} | ${'replace'} | ${'0.1'} | ${'4.2.6'} | ${'~> 4.2.6'} + ${'~> 4.2.5.1'} | ${'replace'} | ${'4.2.5.2'} | ${'4.2.6'} | ${'~> 4.2.6'} ${'~> 1'} | ${'replace'} | ${'1.2.0'} | ${'2.0.3'} | ${'~> 2'} ${'= 5.2.2'} | ${'replace'} | ${'5.2.2'} | ${'5.2.2.1'} | ${'= 5.2.2.1'} ${'1.0.3'} | ${'replace'} | ${'1.0.3'} | ${'1.2.3'} | ${'1.2.3'} diff --git a/lib/modules/versioning/ruby/strategies/replace.ts b/lib/modules/versioning/ruby/strategies/replace.ts index 3b8f06bc2ea0e7..713e1d71db20c6 100644 --- a/lib/modules/versioning/ruby/strategies/replace.ts +++ b/lib/modules/versioning/ruby/strategies/replace.ts @@ -45,6 +45,16 @@ export default ({ range, to }: { range: string; to: string }): string => { return part; } + if (part.version.split('.').length > to.split('.').length) { + const diff = part.version.split('.').length - to.split('.').length; + const versionToReplace = [to, ...Array(diff).fill('0')].join('.'); + const replacement = replacePart(part, versionToReplace); + return { + ...replacement, + version: replacement.version.split('.').slice(0, -diff).join('.'), + }; + } + return replacePart(part, to); }); diff --git a/lib/util/exec/docker/index.ts b/lib/util/exec/docker/index.ts index c6eefe15916b0b..6ac7db17e767bc 100644 --- a/lib/util/exec/docker/index.ts +++ b/lib/util/exec/docker/index.ts @@ -151,7 +151,7 @@ export async function removeDockerContainer( }); const containerId = res?.stdout?.trim() || ''; if (containerId.length) { - logger.debug({ containerId }, 'Removing container'); + logger.debug(`Removing container with ID: ${containerId}`); cmd = `docker rm -f ${containerId}`; await rawExec(cmd, { encoding: 'utf-8', @@ -270,7 +270,7 @@ export async function generateDockerCommand( 'Resolved tag constraint' ); } else { - logger.debug({ image }, 'No tag or tagConstraint specified'); + logger.debug(`No tag or tagConstraint specified for image: ${image}`); } const taggedImage = tag ? `${image}:${tag}` : `${image}`; diff --git a/lib/util/exec/index.ts b/lib/util/exec/index.ts index 8b108045b0d295..30e9bba6fa5534 100644 --- a/lib/util/exec/index.ts +++ b/lib/util/exec/index.ts @@ -116,7 +116,7 @@ async function prepareRawExec( let rawCommands = typeof cmd === 'string' ? [cmd] : cmd; if (isDocker(docker)) { - logger.debug({ image: docker.image }, 'Using docker to execute'); + logger.debug(`Using docker to execute image: ${docker.image}`); const extraEnv = { ...opts.extraEnv, ...customEnvVariables, @@ -178,7 +178,7 @@ export async function exec( if (useDocker) { await removeDockerContainer(docker.image, dockerChildPrefix); } - logger.debug({ command: rawCmd }, 'Executing command'); + logger.trace({ command: rawCmd }, 'Executing command'); logger.trace({ commandOptions: rawOptions }, 'Command options'); try { res = await rawExec(rawCmd, rawOptions); diff --git a/lib/util/git/index.ts b/lib/util/git/index.ts index 2a6b95d9b31f5f..493cb50149a87d 100644 --- a/lib/util/git/index.ts +++ b/lib/util/git/index.ts @@ -299,11 +299,11 @@ export async function writeGitAuthor(): Promise { config.writeGitDone = true; try { if (gitAuthorName) { - logger.debug({ gitAuthorName }, 'Setting git author name'); + logger.debug(`Setting git author name: ${gitAuthorName}`); await git.addConfig('user.name', gitAuthorName); } if (gitAuthorEmail) { - logger.debug({ gitAuthorEmail }, 'Setting git author email'); + logger.debug(`Setting git author email: ${gitAuthorEmail}`); await git.addConfig('user.email', gitAuthorEmail); } } catch (err) /* istanbul ignore next */ { @@ -741,25 +741,25 @@ export async function deleteBranch(branchName: string): Promise { await syncGit(); try { await gitRetry(() => git.raw(['push', '--delete', 'origin', branchName])); - logger.debug({ branchName }, 'Deleted remote branch'); + logger.debug(`Deleted remote branch: ${branchName}`); } catch (err) /* istanbul ignore next */ { const errChecked = checkForPlatformFailure(err); if (errChecked) { throw errChecked; } - logger.debug({ branchName }, 'No remote branch to delete'); + logger.debug(`No remote branch to delete with name: ${branchName}`); } try { await deleteLocalBranch(branchName); // istanbul ignore next - logger.debug({ branchName }, 'Deleted local branch'); + logger.debug(`Deleted local branch: ${branchName}`); } catch (err) { const errChecked = checkForPlatformFailure(err); // istanbul ignore if if (errChecked) { throw errChecked; } - logger.debug({ branchName }, 'No local branch to delete'); + logger.debug(`No local branch to delete with name: ${branchName}`); } delete config.branchCommits[branchName]; } @@ -960,7 +960,7 @@ export async function prepareCommit({ ) { throw err; } - logger.debug({ fileName }, 'Cannot commit ignored file'); + logger.debug(`Cannot commit ignored file: ${fileName}`); ignoredFiles.push(file.path); } } diff --git a/lib/util/http/github.ts b/lib/util/http/github.ts index b1a45bb2056d5c..b8ffe47aa15bd5 100644 --- a/lib/util/http/github.ts +++ b/lib/util/http/github.ts @@ -98,7 +98,7 @@ function handleGotError( return new Error(PLATFORM_RATE_LIMIT_EXCEEDED); } if (err.statusCode === 403 && message.includes('Upgrade to GitHub Pro')) { - logger.debug({ path }, 'Endpoint needs paid GitHub plan'); + logger.debug(`Endpoint: ${path}, needs paid GitHub plan`); return err; } if (err.statusCode === 403 && message.includes('rate limit exceeded')) { diff --git a/lib/util/http/index.ts b/lib/util/http/index.ts index dc774463df5521..3fe4f883e5326f 100644 --- a/lib/util/http/index.ts +++ b/lib/util/http/index.ts @@ -144,7 +144,7 @@ export class Http { options = applyHostRules(url, options); if (options.enabled === false) { - logger.debug({ url }, 'Host is disabled - rejecting request'); + logger.debug(`Host is disabled - rejecting request. HostUrl: ${url}`); throw new Error(HOST_DISABLED); } options = applyAuthorization(options); diff --git a/lib/util/http/queue.ts b/lib/util/http/queue.ts index fa10a2bca99bbd..1c127d2f265606 100644 --- a/lib/util/http/queue.ts +++ b/lib/util/http/queue.ts @@ -9,7 +9,7 @@ export function getQueue(url: string): PQueue | null { const host = parseUrl(url)?.host; if (!host) { // should never happen - logger.debug({ url }, 'No host'); + logger.debug(`No host on ${url}`); return null; } diff --git a/lib/util/http/throttle.ts b/lib/util/http/throttle.ts index aae8745136e8cf..c827d42d6d5938 100644 --- a/lib/util/http/throttle.ts +++ b/lib/util/http/throttle.ts @@ -26,7 +26,7 @@ export function getThrottle(url: string): Throttle | null { const host = parseUrl(url)?.host; if (!host) { // should never happen - logger.debug({ url }, 'No host'); + logger.debug(`No host on ${url}`); return null; } @@ -36,7 +36,7 @@ export function getThrottle(url: string): Throttle | null { const throttleOptions = getThrottleIntervalMs(url); if (throttleOptions) { const intervalMs = throttleOptions; - logger.debug({ intervalMs, host }, 'Using throttle'); + logger.debug(`Using throttle ${intervalMs} intervalMs for host ${host}`); throttle = new Throttle(intervalMs); } else { logger.trace({ host }, 'No throttle'); diff --git a/lib/util/json-writer/editor-config.spec.ts b/lib/util/json-writer/editor-config.spec.ts index c5e017c560bbc0..855844ff47f327 100644 --- a/lib/util/json-writer/editor-config.spec.ts +++ b/lib/util/json-writer/editor-config.spec.ts @@ -3,7 +3,6 @@ import { Fixtures } from '../../../test/fixtures'; import { configFileNames } from '../../config/app-strings'; import { GlobalConfig } from '../../config/global'; import { EditorConfig } from './editor-config'; -import { IndentationType } from './indentation-type'; // use real fs to read wasm files for `@one-ini/wasm` jest.mock('fs', () => ({ @@ -48,7 +47,7 @@ describe('util/json-writer/editor-config', () => { }); const format = await EditorConfig.getCodeFormat(defaultConfigFile); expect(format.indentationSize).toBe(6); - expect(format.indentationType).toBe(IndentationType.Space); + expect(format.indentationType).toBe('space'); }); it('should return undefined in case of exception', async () => { @@ -85,6 +84,6 @@ describe('util/json-writer/editor-config', () => { }); const format = await EditorConfig.getCodeFormat(defaultConfigFile); - expect(format.indentationType).toBe(IndentationType.Tab); + expect(format.indentationType).toBe('tab'); }); }); diff --git a/lib/util/json-writer/editor-config.ts b/lib/util/json-writer/editor-config.ts index 7b7becc73efb5f..f7e63eaed0613f 100644 --- a/lib/util/json-writer/editor-config.ts +++ b/lib/util/json-writer/editor-config.ts @@ -3,7 +3,7 @@ import upath from 'upath'; import { GlobalConfig } from '../../config/global'; import { logger } from '../../logger'; import type { CodeFormat } from './code-format'; -import { IndentationType } from './indentation-type'; +import type { IndentationType } from './indentation-type'; export class EditorConfig { public static async getCodeFormat(fileName: string): Promise { @@ -26,11 +26,11 @@ export class EditorConfig { const { indent_style: indentStyle } = knownProps; if (indentStyle === 'tab') { - return IndentationType.Tab; + return 'tab'; } if (indentStyle === 'space') { - return IndentationType.Space; + return 'space'; } return undefined; diff --git a/lib/util/json-writer/indentation-type.ts b/lib/util/json-writer/indentation-type.ts index f15d3868a01097..955e7b699a545b 100644 --- a/lib/util/json-writer/indentation-type.ts +++ b/lib/util/json-writer/indentation-type.ts @@ -1,5 +1 @@ -// eslint-disable-next-line typescript-enum/no-enum -export enum IndentationType { - Space = 'space', - Tab = 'tab', -} +export type IndentationType = 'space' | 'tab'; diff --git a/lib/util/json-writer/json-writer.spec.ts b/lib/util/json-writer/json-writer.spec.ts index 4e3f813810c9e0..497ec5535d08a4 100644 --- a/lib/util/json-writer/json-writer.spec.ts +++ b/lib/util/json-writer/json-writer.spec.ts @@ -1,4 +1,3 @@ -import { IndentationType } from './indentation-type'; import { JSONWriter } from './json-writer'; describe('util/json-writer/json-writer', () => { @@ -14,7 +13,7 @@ describe('util/json-writer/json-writer', () => { it('should apply indentation size', () => { const jsonWriter = new JSONWriter({ - indentationType: IndentationType.Space, + indentationType: 'space', indentationSize: 10, }); @@ -23,7 +22,7 @@ describe('util/json-writer/json-writer', () => { it('should apply indentation type', () => { const jsonWriter = new JSONWriter({ - indentationType: IndentationType.Tab, + indentationType: 'tab', }); expect(jsonWriter.write(DATA)).toBe('{\n\t"value": 1\n}\n'); @@ -31,7 +30,7 @@ describe('util/json-writer/json-writer', () => { it('new line at the end should be optional', () => { const jsonWriter = new JSONWriter({ - indentationType: IndentationType.Space, + indentationType: 'space', indentationSize: 10, }); diff --git a/lib/util/json-writer/json-writer.ts b/lib/util/json-writer/json-writer.ts index 5f974d2371dabc..fb1437db26abe7 100644 --- a/lib/util/json-writer/json-writer.ts +++ b/lib/util/json-writer/json-writer.ts @@ -1,5 +1,5 @@ import type { CodeFormat } from './code-format'; -import { IndentationType } from './indentation-type'; +import type { IndentationType } from './indentation-type'; export class JSONWriter { private readonly indentationType: IndentationType; @@ -8,7 +8,7 @@ export class JSONWriter { constructor(codeFormat: CodeFormat = {}) { this.indentationSize = codeFormat.indentationSize ?? 2; - this.indentationType = codeFormat.indentationType ?? IndentationType.Space; + this.indentationType = codeFormat.indentationType ?? 'space'; } public write(json: unknown, newLineAtTheEnd = true): string { @@ -22,7 +22,7 @@ export class JSONWriter { } private get indentation(): string | number { - if (this.indentationType === IndentationType.Tab) { + if (this.indentationType === 'tab') { return '\t'; } diff --git a/lib/util/package-rules/index.spec.ts b/lib/util/package-rules/index.spec.ts index 4bb0f75b61c6e0..7751d07369b553 100644 --- a/lib/util/package-rules/index.spec.ts +++ b/lib/util/package-rules/index.spec.ts @@ -1,6 +1,4 @@ import type { PackageRuleInputConfig, UpdateType } from '../../config/types'; -import { ProgrammingLanguage } from '../../constants'; - import { DockerDatasource } from '../../modules/datasource/docker'; import { OrbDatasource } from '../../modules/datasource/orb'; import { applyPackageRules } from './index'; @@ -295,7 +293,7 @@ describe('util/package-rules/index', () => { }; const dep = { depType: 'dependencies', - language: ProgrammingLanguage.JavaScript, + language: 'js', manager: 'meteor', depName: 'node', }; @@ -315,7 +313,7 @@ describe('util/package-rules/index', () => { }; const dep = { depType: 'dependencies', - language: ProgrammingLanguage.Python, + language: 'python', manager: 'pipenv', depName: 'node', }; @@ -327,10 +325,7 @@ describe('util/package-rules/index', () => { const config: TestConfig = { packageRules: [ { - matchLanguages: [ - ProgrammingLanguage.JavaScript, - ProgrammingLanguage.NodeJS, - ], + matchLanguages: ['js', 'node'], matchPackageNames: ['node'], x: 1, }, @@ -338,7 +333,7 @@ describe('util/package-rules/index', () => { }; const dep = { depType: 'dependencies', - language: ProgrammingLanguage.JavaScript, + language: 'js', manager: 'meteor', depName: 'node', }; @@ -350,7 +345,7 @@ describe('util/package-rules/index', () => { const config: TestConfig = { packageRules: [ { - matchLanguages: [ProgrammingLanguage.Docker], + matchLanguages: ['docker'], matchPackageNames: ['node'], x: 1, }, @@ -358,7 +353,7 @@ describe('util/package-rules/index', () => { }; const dep = { depType: 'dependencies', - language: ProgrammingLanguage.Python, + language: 'python', manager: 'pipenv', depName: 'node', }; diff --git a/lib/workers/repository/config-migration/pr/index.ts b/lib/workers/repository/config-migration/pr/index.ts index d66287fdd6f01d..dca8cf475f0f89 100644 --- a/lib/workers/repository/config-migration/pr/index.ts +++ b/lib/workers/repository/config-migration/pr/index.ts @@ -74,7 +74,7 @@ ${ existingPr.bodyStruct?.hash === prBodyHash && existingPr.title === prTitle ) { - logger.debug({ pr: existingPr.number }, `Does not need updating`); + logger.debug(`Pr does not need updating, PrNo: ${existingPr.number}`); return; } // PR must need updating diff --git a/lib/workers/repository/extract/manager-files.ts b/lib/workers/repository/extract/manager-files.ts index 355c7145a0956d..20f59767730970 100644 --- a/lib/workers/repository/extract/manager-files.ts +++ b/lib/workers/repository/extract/manager-files.ts @@ -65,7 +65,7 @@ export async function getManagerPackageFiles( }); } } else { - logger.debug({ packageFile }, 'packageFile has no content'); + logger.debug(`${packageFile} has no content`); } } return packageFiles; diff --git a/lib/workers/repository/finalise/prune.spec.ts b/lib/workers/repository/finalise/prune.spec.ts index 1e00542a3062d7..70889c759488a9 100644 --- a/lib/workers/repository/finalise/prune.spec.ts +++ b/lib/workers/repository/finalise/prune.spec.ts @@ -99,22 +99,38 @@ describe('workers/repository/finalise/prune', () => { expect(platform.updatePr).toHaveBeenCalledTimes(0); }); - it('posts comment if someone pushed to PR', async () => { + it('notifies via PR changes if someone pushed to PR', async () => { config.branchList = ['renovate/a', 'renovate/b']; git.getBranchList.mockReturnValueOnce( config.branchList.concat(['renovate/c']) ); platform.getBranchPr.mockResolvedValueOnce({} as never); git.isBranchModified.mockResolvedValueOnce(true); - platform.findPr.mockResolvedValueOnce({ title: 'foo' } as never); + platform.findPr.mockResolvedValueOnce({ + title: 'foo', + } as never); await cleanup.pruneStaleBranches(config, config.branchList); expect(git.getBranchList).toHaveBeenCalledTimes(1); expect(git.deleteBranch).toHaveBeenCalledTimes(0); - expect(platform.updatePr).toHaveBeenCalledTimes(0); + expect(platform.updatePr).toHaveBeenCalledTimes(1); expect(platform.ensureComment).toHaveBeenCalledTimes(1); }); - it('skips comment if dry run', async () => { + it('skips appending - abandoned to PR title if already present', async () => { + config.branchList = ['renovate/a', 'renovate/b']; + git.getBranchList.mockReturnValueOnce( + config.branchList.concat(['renovate/c']) + ); + platform.getBranchPr.mockResolvedValueOnce({} as never); + git.isBranchModified.mockResolvedValueOnce(true); + platform.findPr.mockResolvedValueOnce({ + title: 'foo - abandoned', + } as never); + await cleanup.pruneStaleBranches(config, config.branchList); + expect(platform.updatePr).toHaveBeenCalledTimes(0); + }); + + it('skips changes to PR if dry run', async () => { config.branchList = ['renovate/a', 'renovate/b']; GlobalConfig.set({ dryRun: 'full' }); git.getBranchList.mockReturnValueOnce( diff --git a/lib/workers/repository/finalise/prune.ts b/lib/workers/repository/finalise/prune.ts index 9f8208b1cde4ff..18b895d482176d 100644 --- a/lib/workers/repository/finalise/prune.ts +++ b/lib/workers/repository/finalise/prune.ts @@ -33,8 +33,17 @@ async function cleanUpBranches( 'Branch is modified - skipping PR autoclosing' ); if (GlobalConfig.get('dryRun')) { - logger.info(`DRY-RUN: Would add Autoclosing Skipped comment to PR`); + logger.info(`DRY-RUN: Would update PR title and ensure comment.`); } else { + if (!pr.title.endsWith('- abandoned')) { + const newPrTitle = pr.title + ' - abandoned'; + await platform.updatePr({ + number: pr.number, + prTitle: newPrTitle, + state: PrState.Open, + }); + } + await ensureComment({ number: pr.number, topic: 'Autoclosing Skipped', diff --git a/lib/workers/repository/onboarding/branch/check.ts b/lib/workers/repository/onboarding/branch/check.ts index 690c4afa252718..14f19ea1455166 100644 --- a/lib/workers/repository/onboarding/branch/check.ts +++ b/lib/workers/repository/onboarding/branch/check.ts @@ -21,7 +21,7 @@ async function findFile(fileName: string): Promise { async function configFileExists(): Promise { for (const fileName of configFileNames) { if (fileName !== 'package.json' && (await findFile(fileName))) { - logger.debug({ fileName }, 'Config file exists'); + logger.debug(`Config file exists, fileName: ${fileName}`); return true; } } diff --git a/lib/workers/repository/onboarding/pr/config-description.ts b/lib/workers/repository/onboarding/pr/config-description.ts index 3fd7b8b826df15..6babae29a9c5a5 100644 --- a/lib/workers/repository/onboarding/pr/config-description.ts +++ b/lib/workers/repository/onboarding/pr/config-description.ts @@ -44,7 +44,7 @@ export function getConfigDesc( logger.debug('No config description found'); return ''; } - logger.debug({ length: descriptionArr.length }, 'Found description array'); + logger.debug(`Found description array with length:${descriptionArr.length}`); let desc = `\n### Configuration Summary\n\nBased on the default config's presets, Renovate will:\n\n`; desc += ` - Start dependency updates only once this onboarding PR is merged\n`; descriptionArr.forEach((d) => { diff --git a/lib/workers/repository/process/fetch.ts b/lib/workers/repository/process/fetch.ts index aed40953552f38..d95394546545a6 100644 --- a/lib/workers/repository/process/fetch.ts +++ b/lib/workers/repository/process/fetch.ts @@ -45,10 +45,11 @@ async function fetchDepUpdates( depConfig.versioning ??= getDefaultVersioning(depConfig.datasource); depConfig = applyPackageRules(depConfig); if (depConfig.ignoreDeps!.includes(depName!)) { - logger.debug({ dependency: depName }, 'Dependency is ignored'); + // TODO: fix types (#7154) + logger.debug(`Dependency: ${depName!}, is ignored`); dep.skipReason = 'ignored'; } else if (depConfig.enabled === false) { - logger.debug({ dependency: depName }, 'Dependency is disabled'); + logger.debug(`Dependency: ${depName!}, is disabled`); dep.skipReason = 'disabled'; } else { if (depConfig.datasource) { diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index 517220a8e5ff53..373fd3265b5ef3 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -90,7 +90,7 @@ export async function lookupUpdates( return res; } if (dependency.deprecationMessage) { - logger.debug({ dependency: depName }, 'Found deprecationMessage'); + logger.debug(`Found deprecationMessage for dependency ${depName}`); res.deprecationMessage = dependency.deprecationMessage; } diff --git a/lib/workers/repository/result.ts b/lib/workers/repository/result.ts index b3a30816466dfb..9868f3edec882a 100644 --- a/lib/workers/repository/result.ts +++ b/lib/workers/repository/result.ts @@ -75,7 +75,7 @@ export function processResult( enabled = true; onboarded = false; } else { - logger.debug({ res }, 'Unknown res'); + logger.debug(`Unknown res: ${res}`); status = 'unknown'; } logger.debug( diff --git a/lib/workers/repository/update/branch/auto-replace.ts b/lib/workers/repository/update/branch/auto-replace.ts index b75b729824665f..372992dabaa363 100644 --- a/lib/workers/repository/update/branch/auto-replace.ts +++ b/lib/workers/repository/update/branch/auto-replace.ts @@ -32,7 +32,8 @@ export async function confirmIfDepUpdated( ); // istanbul ignore if if (!newExtract) { - logger.debug({ manager, packageFile }, 'Could not extract package file'); + // TODO: fix types (#7154) + logger.debug(`Could not extract ${packageFile!}`); return false; } newUpgrade = newExtract.deps[depIndex!]; @@ -40,7 +41,7 @@ export async function confirmIfDepUpdated( logger.debug({ manager, packageFile, err }, 'Failed to parse newContent'); } if (!newUpgrade!) { - logger.debug({ manager, packageFile }, 'No newUpgrade'); + logger.debug(`No newUpgrade in ${packageFile!}`); return false; } @@ -127,7 +128,8 @@ async function checkExistingBranch( ); return null; } - logger.debug({ packageFile, depName }, 'Branch dep is already updated'); + // TODO: fix types (#7154) + logger.debug(`Branch dep ${depName!} in ${packageFile!} is already updated`); return existingContent; } diff --git a/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts b/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts index 8983d0d36fab40..68d2335c8e4ff8 100644 --- a/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts +++ b/lib/workers/repository/update/branch/execute-post-upgrade-commands.ts @@ -70,7 +70,7 @@ export async function postUpgradeCommandsExecutor( ? compile(cmd, mergeChildConfig(config, upgrade)) : cmd; - logger.debug({ cmd: compiledCmd }, 'Executing post-upgrade task'); + logger.trace({ cmd: compiledCmd }, 'Executing post-upgrade task'); const execResult = await exec(compiledCmd, { cwd: GlobalConfig.get('localDir'), }); diff --git a/lib/workers/repository/update/branch/handle-existing.ts b/lib/workers/repository/update/branch/handle-existing.ts index 735ce2b242a56a..3ceac272df8e81 100644 --- a/lib/workers/repository/update/branch/handle-existing.ts +++ b/lib/workers/repository/update/branch/handle-existing.ts @@ -42,6 +42,6 @@ export async function handlepr(config: BranchConfig, pr: Pr): Promise { } } } else if (pr.state === PrState.Merged) { - logger.debug({ pr: pr.number }, 'Merged PR is blocking this branch'); + logger.debug(`Merged PR with PrNo: ${pr.number} is blocking this branch`); } } diff --git a/lib/workers/repository/update/branch/index.ts b/lib/workers/repository/update/branch/index.ts index 98724f2376495c..ba1c42f328325f 100644 --- a/lib/workers/repository/update/branch/index.ts +++ b/lib/workers/repository/update/branch/index.ts @@ -212,7 +212,7 @@ export async function processBranch( (branchPr.targetBranch && branchPr.targetBranch !== branchConfig.baseBranch) ) { - logger.debug({ prNo: branchPr.number }, 'PR has been edited'); + logger.debug(`PR has been edited, PrNo:${branchPr.number}`); if (dependencyDashboardCheck || config.rebaseRequested) { logger.debug('Manual rebase has been requested for PR'); } else { @@ -561,7 +561,7 @@ export async function processBranch( commitSha && config.prCreation !== 'immediate' ) { - logger.debug({ commitSha }, `Branch status pending`); + logger.debug(`Branch status pending, current sha: ${commitSha}`); return { branchExists: true, updatesVerified, @@ -609,7 +609,9 @@ export async function processBranch( mergeStatus === 'branch status error' || mergeStatus === 'failed' ) { - logger.debug({ mergeStatus }, 'Branch automerge not possible'); + logger.debug( + `Branch automerge not possible, mergeStatus:${mergeStatus}` + ); config.forcePr = true; config.branchAutomergeFailureMessage = mergeStatus; } diff --git a/lib/workers/repository/update/branch/schedule.ts b/lib/workers/repository/update/branch/schedule.ts index 752a7b7d719995..c4ace100418288 100644 --- a/lib/workers/repository/update/branch/schedule.ts +++ b/lib/workers/repository/update/branch/schedule.ts @@ -145,7 +145,7 @@ export function isScheduledNow( logger.trace(`now=${now.toISO()}`); // Adjust the time if repo is in a different timezone to renovate if (config.timezone) { - logger.debug({ timezone: config.timezone }, 'Found timezone'); + logger.debug(`Found timezone: ${config.timezone}`); const validTimezone = hasValidTimezone(config.timezone); if (!validTimezone[0]) { logger.warn(validTimezone[1]); diff --git a/lib/workers/repository/update/pr/automerge.ts b/lib/workers/repository/update/pr/automerge.ts index 884d9bd6063861..97ef1596eb7981 100644 --- a/lib/workers/repository/update/pr/automerge.ts +++ b/lib/workers/repository/update/pr/automerge.ts @@ -16,16 +16,14 @@ import type { BranchConfig } from '../../../types'; import { isScheduledNow } from '../branch/schedule'; import { resolveBranchStatus } from '../branch/status-checks'; -// eslint-disable-next-line typescript-enum/no-enum -export enum PrAutomergeBlockReason { - BranchModified = 'BranchModified', - BranchNotGreen = 'BranchNotGreen', - Conflicted = 'Conflicted', - DryRun = 'DryRun', - PlatformNotReady = 'PlatformNotReady', - PlatformRejection = 'PlatformRejection', - OffSchedule = 'off schedule', -} +export type PrAutomergeBlockReason = + | 'BranchModified' + | 'BranchNotGreen' + | 'Conflicted' + | 'DryRun' + | 'PlatformNotReady' + | 'PlatformRejection' + | 'off schedule'; export interface AutomergePrResult { automerged: boolean; @@ -52,7 +50,7 @@ export async function checkAutoMerge( logger.debug(`PR automerge is off schedule`); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.OffSchedule, + prAutomergeBlockReason: 'off schedule', }; } const isConflicted = @@ -62,7 +60,7 @@ export async function checkAutoMerge( logger.debug('PR is conflicted'); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.Conflicted, + prAutomergeBlockReason: 'Conflicted', }; } if (!ignoreTests && pr.cannotMergeReason) { @@ -71,7 +69,7 @@ export async function checkAutoMerge( ); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.PlatformNotReady, + prAutomergeBlockReason: 'PlatformNotReady', }; } const branchStatus = await resolveBranchStatus( @@ -84,7 +82,7 @@ export async function checkAutoMerge( ); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.BranchNotGreen, + prAutomergeBlockReason: 'BranchNotGreen', }; } // Check if it's been touched @@ -92,7 +90,7 @@ export async function checkAutoMerge( logger.debug('PR is ready for automerge but has been modified'); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.BranchModified, + prAutomergeBlockReason: 'BranchModified', }; } if (automergeType === 'pr-comment') { @@ -105,7 +103,7 @@ export async function checkAutoMerge( ); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.DryRun, + prAutomergeBlockReason: 'DryRun', }; } if (rebaseRequested) { @@ -133,7 +131,7 @@ export async function checkAutoMerge( ); return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.DryRun, + prAutomergeBlockReason: 'DryRun', }; } // TODO: types (#7154) @@ -160,6 +158,6 @@ export async function checkAutoMerge( } return { automerged: false, - prAutomergeBlockReason: PrAutomergeBlockReason.PlatformRejection, + prAutomergeBlockReason: 'PlatformRejection', }; } diff --git a/lib/workers/repository/update/pr/changelog/github.spec.ts b/lib/workers/repository/update/pr/changelog/github.spec.ts index 97834fa0ec0c9b..6ec4b8ac548c7b 100644 --- a/lib/workers/repository/update/pr/changelog/github.spec.ts +++ b/lib/workers/repository/update/pr/changelog/github.spec.ts @@ -3,7 +3,7 @@ import { GlobalConfig } from '../../../../../config/global'; import * as semverVersioning from '../../../../../modules/versioning/semver'; import * as hostRules from '../../../../../util/host-rules'; import type { BranchUpgradeConfig } from '../../../../types'; -import { ChangeLogError, getChangeLogJSON } from '.'; +import { getChangeLogJSON } from '.'; jest.mock('../../../../../modules/datasource/npm'); @@ -211,7 +211,7 @@ describe('workers/repository/update/pr/changelog/github', () => { ...upgrade, sourceUrl: 'https://github.com', }) - ).toEqual({ error: ChangeLogError.MissingGithubToken }); + ).toEqual({ error: 'MissingGithubToken' }); }); it('handles no releases', async () => { diff --git a/lib/workers/repository/update/pr/changelog/github/index.ts b/lib/workers/repository/update/pr/changelog/github/index.ts index 693794e27670cc..05697a617a85b0 100644 --- a/lib/workers/repository/update/pr/changelog/github/index.ts +++ b/lib/workers/repository/update/pr/changelog/github/index.ts @@ -36,7 +36,7 @@ export async function getTags( // istanbul ignore if if (!tags.length) { - logger.debug({ repository }, 'repository has no Github tags'); + logger.debug(`No Github tags found for repository:${repository}`); } return tags.map((tag) => tag.name).filter(Boolean); @@ -74,7 +74,7 @@ export async function getReleaseNotesMd( // istanbul ignore if if (res.body.truncated) { - logger.debug({ repository }, 'Git tree truncated'); + logger.debug(`Git tree truncated repository:${repository}`); } const allFiles = res.body.tree.filter((f) => f.type === 'blob'); diff --git a/lib/workers/repository/update/pr/changelog/gitlab/index.ts b/lib/workers/repository/update/pr/changelog/gitlab/index.ts index 2fedafb345ca90..b192286d472b72 100644 --- a/lib/workers/repository/update/pr/changelog/gitlab/index.ts +++ b/lib/workers/repository/update/pr/changelog/gitlab/index.ts @@ -32,7 +32,7 @@ export async function getTags( const tags = res.body; if (!tags.length) { - logger.debug({ sourceRepo: repository }, 'repository has no Gitlab tags'); + logger.debug(`No Gitlab tags found for ${repository}`); } return tags.map((tag) => tag.name).filter(Boolean); diff --git a/lib/workers/repository/update/pr/changelog/index.spec.ts b/lib/workers/repository/update/pr/changelog/index.spec.ts index b5f6a622702e4b..34ceaa05ddbce6 100644 --- a/lib/workers/repository/update/pr/changelog/index.spec.ts +++ b/lib/workers/repository/update/pr/changelog/index.spec.ts @@ -4,7 +4,7 @@ import { GlobalConfig } from '../../../../../config/global'; import * as semverVersioning from '../../../../../modules/versioning/semver'; import * as hostRules from '../../../../../util/host-rules'; import type { BranchConfig } from '../../../../types'; -import { ChangeLogError, getChangeLogJSON } from '.'; +import { getChangeLogJSON } from '.'; jest.mock('../../../../../modules/datasource/npm'); @@ -233,7 +233,7 @@ describe('workers/repository/update/pr/changelog/index', () => { ...upgrade, sourceUrl: 'https://github.com', }) - ).toEqual({ error: ChangeLogError.MissingGithubToken }); + ).toEqual({ error: 'MissingGithubToken' }); }); it('handles no releases', async () => { diff --git a/lib/workers/repository/update/pr/changelog/release-notes.spec.ts b/lib/workers/repository/update/pr/changelog/release-notes.spec.ts index 120c93f540ac9c..e4066da18aa507 100644 --- a/lib/workers/repository/update/pr/changelog/release-notes.spec.ts +++ b/lib/workers/repository/update/pr/changelog/release-notes.spec.ts @@ -385,7 +385,7 @@ describe('workers/repository/update/pr/changelog/release-notes', () => { .scope('https://api.github.com/') .get('/repos/some/other-repository/releases?per_page=100') .reply(200, [ - { tag_name: `${prefix}1.0.0` }, + { tag_name: `${prefix}1.0.0`, name: 'Release v1.0.0' }, { tag_name: `${prefix}1.0.1`, name: '1.0.1', @@ -424,7 +424,7 @@ describe('workers/repository/update/pr/changelog/release-notes', () => { { tag_name: `${prefix}1.0.0` }, { tag_name: `${prefix}1.0.1`, - name: '1.0.1 some release', + name: 'v1.0.1 some release', body: 'some body', }, ]); diff --git a/lib/workers/repository/update/pr/changelog/release-notes.ts b/lib/workers/repository/update/pr/changelog/release-notes.ts index 5224426a547a96..1162de48d499a1 100644 --- a/lib/workers/repository/update/pr/changelog/release-notes.ts +++ b/lib/workers/repository/update/pr/changelog/release-notes.ts @@ -107,10 +107,10 @@ export function massageName( ): string | undefined { let name = input ?? ''; - // Remove the current tag from the name if it's used as a prefix - if (version && name.startsWith(version)) { - name = name.slice(version.length); + if (version) { + name = name.replace(RegExp(`^(Release )?v?${version}`, 'i'), '').trim(); } + name = name.trim(); if (!name.length) { return undefined; diff --git a/lib/workers/repository/update/pr/changelog/releases.ts b/lib/workers/repository/update/pr/changelog/releases.ts index dfcb2c8b74d7f6..25fc822c36a97f 100644 --- a/lib/workers/repository/update/pr/changelog/releases.ts +++ b/lib/workers/repository/update/pr/changelog/releases.ts @@ -64,7 +64,7 @@ export async function getInRangeReleases( return releases; } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'getInRangeReleases err'); - logger.debug({ datasource, depName }, 'Error getting releases'); + logger.debug(`Error getting releases for ${depName} from ${datasource}`); return null; } } diff --git a/lib/workers/repository/update/pr/changelog/source-github.ts b/lib/workers/repository/update/pr/changelog/source-github.ts index de4cbf935b89d8..e3302393f5c13d 100644 --- a/lib/workers/repository/update/pr/changelog/source-github.ts +++ b/lib/workers/repository/update/pr/changelog/source-github.ts @@ -13,7 +13,7 @@ import { slugifyUrl } from './common'; import { getTags } from './github'; import { addReleaseNotes } from './release-notes'; import { getInRangeReleases } from './releases'; -import { ChangeLogError, ChangeLogRelease, ChangeLogResult } from './types'; +import type { ChangeLogRelease, ChangeLogResult } from './types'; function getCachedTags( endpoint: string, @@ -69,7 +69,7 @@ export async function getChangeLogJSON( { manager, depName, sourceUrl }, 'No github.com token has been configured. Skipping release notes retrieval' ); - return { error: ChangeLogError.MissingGithubToken }; + return { error: 'MissingGithubToken' }; } logger.debug( { manager, depName, sourceUrl }, @@ -85,7 +85,7 @@ export async function getChangeLogJSON( .replace(regEx(/\/$/), '') .replace(regEx(/\.git$/), ''); if (repository.split('/').length !== 2) { - logger.debug({ sourceUrl }, 'Invalid github URL found'); + logger.debug(`Invalid github URL found: ${sourceUrl}`); return null; } const releases = config.releases ?? (await getInRangeReleases(config)); diff --git a/lib/workers/repository/update/pr/changelog/types.ts b/lib/workers/repository/update/pr/changelog/types.ts index a3184672a65301..025c1a834e5ca3 100644 --- a/lib/workers/repository/update/pr/changelog/types.ts +++ b/lib/workers/repository/update/pr/changelog/types.ts @@ -33,11 +33,7 @@ export interface ChangeLogProject { sourceDirectory?: string; } -// eslint-disable-next-line typescript-enum/no-enum -export enum ChangeLogError { - MissingGithubToken = 1, - MissingGitlabToken = 2, -} +export type ChangeLogError = 'MissingGithubToken' | 'MissingGitlabToken'; export interface ChangeLogResult { hasReleaseNotes?: boolean; diff --git a/lib/workers/repository/update/pr/index.spec.ts b/lib/workers/repository/update/pr/index.spec.ts index 152d9ae59d5513..d018736d59dc43 100644 --- a/lib/workers/repository/update/pr/index.spec.ts +++ b/lib/workers/repository/update/pr/index.spec.ts @@ -15,11 +15,7 @@ import * as _limits from '../../../global/limits'; import type { BranchConfig, BranchUpgradeConfig } from '../../../types'; import * as _statusChecks from '../branch/status-checks'; import * as _prBody from './body'; -import { - ChangeLogChange, - ChangeLogError, - ChangeLogRelease, -} from './changelog/types'; +import type { ChangeLogChange, ChangeLogRelease } from './changelog/types'; import * as _participants from './participants'; import { ensurePr } from '.'; @@ -635,7 +631,7 @@ describe('workers/repository/update/pr/index', () => { upgrades: [ { ...dummyUpgrade, - logJSON: { error: ChangeLogError.MissingGithubToken }, + logJSON: { error: 'MissingGithubToken' }, prBodyNotes: [], }, ], diff --git a/lib/workers/repository/update/pr/index.ts b/lib/workers/repository/update/pr/index.ts index e2917a731bc72c..13ad9b5af1375a 100644 --- a/lib/workers/repository/update/pr/index.ts +++ b/lib/workers/repository/update/pr/index.ts @@ -28,10 +28,8 @@ import type { PrBlockedBy, } from '../../../types'; import { embedChangelogs } from '../../changelog'; -// import { embedChangelogs } from '../../changelog'; import { resolveBranchStatus } from '../branch/status-checks'; import { getPrBody } from './body'; -import { ChangeLogError } from './changelog/types'; import { prepareLabels } from './labels'; import { addParticipants } from './participants'; @@ -237,7 +235,7 @@ export async function ensurePr( } } } - } else if (logJSON.error === ChangeLogError.MissingGithubToken) { + } else if (logJSON.error === 'MissingGithubToken') { upgrade.prBodyNotes ??= []; upgrade.prBodyNotes = [ ...upgrade.prBodyNotes, diff --git a/lib/workers/repository/updates/flatten.spec.ts b/lib/workers/repository/updates/flatten.spec.ts index c3f987abaf61cb..7e3c2656b03ae3 100644 --- a/lib/workers/repository/updates/flatten.spec.ts +++ b/lib/workers/repository/updates/flatten.spec.ts @@ -1,6 +1,4 @@ import { RenovateConfig, getConfig } from '../../../../test/util'; - -import { ProgrammingLanguage } from '../../../constants'; import { flattenUpdates } from './flatten'; let config: RenovateConfig; @@ -100,7 +98,7 @@ describe('workers/repository/updates/flatten', () => { deps: [ { depName: 'amd64/node', - language: ProgrammingLanguage.Docker, + language: 'docker', sourceUrl: 'https://github.com/nodejs/node', updates: [{ newValue: '10.0.1' }], }, @@ -111,7 +109,7 @@ describe('workers/repository/updates/flatten', () => { deps: [ { depName: 'calico/node', - language: ProgrammingLanguage.Docker, + language: 'docker', sourceUrl: 'https://calico.com', updates: [{ newValue: '3.2.0', updateType: 'minor' }], }, diff --git a/package.json b/package.json index d7429b5177b628..c5bd3e35e26475 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "@breejs/later": "4.1.0", "@cheap-glitch/mi-cron": "1.0.1", "@iarna/toml": "3.0.0", - "@renovatebot/osv-offline": "1.0.5", + "@renovatebot/osv-offline": "1.0.6", "@opentelemetry/api": "1.2.0", "@opentelemetry/context-async-hooks": "1.7.0", "@opentelemetry/exporter-trace-otlp-http": "0.33.0", @@ -156,7 +156,7 @@ "@opentelemetry/sdk-trace-node": "1.7.0", "@opentelemetry/semantic-conventions": "1.7.0", "@renovatebot/pep440": "2.1.5", - "@renovatebot/ruby-semver": "1.1.6", + "@renovatebot/ruby-semver": "1.1.7", "@sindresorhus/is": "4.6.0", "@types/tmp": "0.2.3", "@yarnpkg/core": "3.2.5", @@ -202,7 +202,7 @@ "json-dup-key-validator": "1.0.3", "json-stringify-pretty-compact": "3.0.0", "json5": "2.2.1", - "luxon": "3.0.4", + "luxon": "3.1.0", "markdown-it": "13.0.1", "markdown-table": "2.0.0", "marshal": "0.5.4", @@ -218,7 +218,7 @@ "parse-link-header": "2.0.0", "prettier": "2.7.1", "quick-lru": "5.1.1", - "redis": "4.3.1", + "redis": "4.4.0", "remark": "13.0.0", "remark-github": "10.1.0", "safe-stable-stringify": "2.4.0", @@ -229,7 +229,7 @@ "simple-git": "3.14.1", "slugify": "1.6.5", "traverse": "0.6.7", - "tslib": "2.4.0", + "tslib": "2.4.1", "upath": "2.0.1", "url-join": "4.0.1", "validate-npm-package-name": "5.0.0", @@ -256,7 +256,7 @@ "@types/clean-git-ref": "2.0.0", "@types/conventional-commits-detector": "1.0.0", "@types/diff": "5.0.2", - "@types/eslint": "8.4.8", + "@types/eslint": "8.4.9", "@types/fs-extra": "9.0.13", "@types/git-url-parse": "9.0.1", "@types/github-url-from-git": "1.5.1", @@ -265,14 +265,14 @@ "@types/js-yaml": "4.0.5", "@types/json-dup-key-validator": "1.0.0", "@types/linkify-markdown": "1.0.1", - "@types/lodash": "4.14.186", + "@types/lodash": "4.14.187", "@types/luxon": "3.0.2", "@types/markdown-it": "12.2.3", "@types/markdown-table": "2.0.0", "@types/marshal": "0.5.1", "@types/moo": "0.5.5", "@types/nock": "10.0.3", - "@types/node": "16.18.2", + "@types/node": "16.18.3", "@types/parse-link-header": "2.0.0", "@types/semver": "7.3.13", "@types/semver-stable": "3.0.0", @@ -282,8 +282,8 @@ "@types/url-join": "4.0.1", "@types/validate-npm-package-name": "4.0.0", "@types/xmldoc": "1.1.6", - "@typescript-eslint/eslint-plugin": "5.41.0", - "@typescript-eslint/parser": "5.41.0", + "@typescript-eslint/eslint-plugin": "5.42.0", + "@typescript-eslint/parser": "5.42.0", "aws-sdk-client-mock": "2.0.0", "callsite": "1.0.0", "conventional-changelog-conventionalcommits": "5.0.0", @@ -308,8 +308,8 @@ "jest-junit": "14.0.1", "jest-mock-extended": "3.0.1", "markdownlint-cli2": "0.5.1", - "memfs": "3.4.8", - "mock-fs": "5.1.4", + "memfs": "3.4.9", + "mock-fs": "5.2.0", "mockdate": "3.0.5", "nock": "13.2.9", "npm-run-all": "4.1.5", diff --git a/yarn.lock b/yarn.lock index 091acec73b75e6..7ce39afa54e413 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2367,24 +2367,24 @@ write-file-atomic "^4.0.2" write-yaml-file "^4.2.0" -"@redis/bloom@1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@redis/bloom/-/bloom-1.0.2.tgz#42b82ec399a92db05e29fffcdfd9235a5fc15cdf" - integrity sha512-EBw7Ag1hPgFzdznK2PBblc1kdlj5B5Cw3XwI9/oG7tSn85/HKy3X9xHy/8tm/eNXJYHLXHJL/pkwBpFMVVefkw== +"@redis/bloom@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@redis/bloom/-/bloom-1.1.0.tgz#64e310ddee72010676e14296076329e594a1f6c7" + integrity sha512-9QovlxmpRtvxVbN0UBcv8WfdSMudNZZTFqCsnBszcQXqaZb/TVe30ScgGEO7u1EAIacTPAo7/oCYjYAxiHLanQ== -"@redis/client@1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@redis/client/-/client-1.3.0.tgz#c62ccd707f16370a2dc2f9e158a28b7da049fa77" - integrity sha512-XCFV60nloXAefDsPnYMjHGtvbtHR8fV5Om8cQ0JYqTNbWcQo/4AryzJ2luRj4blveWazRK/j40gES8M7Cp6cfQ== +"@redis/client@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@redis/client/-/client-1.3.1.tgz#ac30e068a9fcfea48ad310898ed15e8e4198fa7a" + integrity sha512-FKEHpOu7Q4+cuM6VWjA54988K5jkqOxvhvj2hEGSx086lvKwXyjzO7Lya7hcirZ0/Db8FLBJN7UXsJuyoNWPJg== dependencies: - cluster-key-slot "1.1.0" - generic-pool "3.8.2" + cluster-key-slot "1.1.1" + generic-pool "3.9.0" yallist "4.0.0" -"@redis/graph@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@redis/graph/-/graph-1.0.1.tgz#eabc58ba99cd70d0c907169c02b55497e4ec8a99" - integrity sha512-oDE4myMCJOCVKYMygEMWuriBgqlS5FqdWerikMoJxzmmTUErnTRRgmIDa2VcgytACZMFqpAOWDzops4DOlnkfQ== +"@redis/graph@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@redis/graph/-/graph-1.1.0.tgz#cc2b82e5141a29ada2cce7d267a6b74baa6dd519" + integrity sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg== "@redis/json@1.0.4": version "1.0.4" @@ -2412,29 +2412,29 @@ dependencies: "@seald-io/nedb" "3.1.0" -"@renovatebot/osv-offline@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@renovatebot/osv-offline/-/osv-offline-1.0.5.tgz#db9f7bbb7ca914993f3b2870624cf1998c27f5a3" - integrity sha512-OMopjg3+z47LbC2qz0oaG8d9rX3j3H9Ir2KN+YMcpiJNYTRgSw6MTf7o4rfAgSCsf+7AAWvvkGDZYvBix4eI7Q== +"@renovatebot/osv-offline@1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@renovatebot/osv-offline/-/osv-offline-1.0.6.tgz#14e13db19976d2212deb6474113b483da5e245de" + integrity sha512-64qb/5mmKRQer2j5Bv7s7oCeJ9r3LzmypsUJLm6C2sTnP8gj4pfvLPtAVjGv6OMMfCIYqd8J2bnTY5arChBLwA== dependencies: "@octokit/rest" "19.0.5" "@renovatebot/osv-offline-db" "1.0.1" adm-zip "0.5.9" fs-extra "10.1.0" got "11.8.5" - luxon "3.0.4" + luxon "3.1.0" "@renovatebot/pep440@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@renovatebot/pep440/-/pep440-2.1.5.tgz#6a9d09ade925f380f9ae4e2153f711a1db92162a" integrity sha512-5KqCemtyjR7e98uHadFQUylRpoILYTopJGVaEbs+/WHfB14pJKGPGIkCUN1Zl6fYh+D0Qh7JAXsZ+fRVeSVNZg== -"@renovatebot/ruby-semver@1.1.6": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@renovatebot/ruby-semver/-/ruby-semver-1.1.6.tgz#c3ca354b62d683de5f108fb91881333e1788b1fd" - integrity sha512-sNNI3Zu0Vo5Jngbe1aBkfSmwdODxK/YPMfczrLgYj9LU/qb5N9NsF0EUOf52igoaVZo8zdCAb0w7tsXEd8+N4Q== +"@renovatebot/ruby-semver@1.1.7": + version "1.1.7" + resolved "https://registry.yarnpkg.com/@renovatebot/ruby-semver/-/ruby-semver-1.1.7.tgz#0f684158ace11b0c18ba40425c24169d1b81fc75" + integrity sha512-M07oVOD2pr+E0lopMgFVtDwUqJ5oTZD2QlrVT7yyZ3qW5/R1RQTGb6FwME2Iy+QNjfxYtvkCz1XS2LHZcOPyOw== dependencies: - tslib "2.4.0" + tslib "2.4.1" "@seald-io/binary-search-tree@^1.0.2": version "1.0.2" @@ -2784,10 +2784,10 @@ resolved "https://registry.yarnpkg.com/@types/emscripten/-/emscripten-1.39.6.tgz#698b90fe60d44acf93c31064218fbea93fbfd85a" integrity sha512-H90aoynNhhkQP6DRweEjJp5vfUVdIj7tdPLsu7pq89vODD/lcugKfZOsfgwpvM6XUewEp2N5dCg1Uf3Qe55Dcg== -"@types/eslint@8.4.8": - version "8.4.8" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.8.tgz#720dd6a32b8219b9aba1a07b13e9d03b622695fd" - integrity sha512-zUCKQI1bUCTi+0kQs5ZQzQ/XILWRLIlh15FXWNykJ+NG3TMKMVvwwC6GP3DR1Ylga15fB7iAExSzc4PNlR5i3w== +"@types/eslint@8.4.9": + version "8.4.9" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.9.tgz#f7371980148697f4b582b086630319b55324b5aa" + integrity sha512-jFCSo4wJzlHQLCpceUhUnXdrPuCNOjGFMQ8Eg6JXxlz3QaCKOb7eGi2cephQdM4XTYsNej69P9JDJ1zqNIbncQ== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -2900,10 +2900,10 @@ resolved "https://registry.yarnpkg.com/@types/linkify-markdown/-/linkify-markdown-1.0.1.tgz#0b750a592107dd46ecf2b5be0eeb7656b1fc814d" integrity sha512-RYDOtCol7/sHGhSJvWVnl0AmOdQQWgUYys6cwn5Lt3RiYhyhTLMLv7B9wdixMgCfnNt0MQj/YSGi3qN0IQqLeQ== -"@types/lodash@4.14.186": - version "4.14.186" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.186.tgz#862e5514dd7bd66ada6c70ee5fce844b06c8ee97" - integrity sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw== +"@types/lodash@4.14.187": + version "4.14.187" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.187.tgz#122ff0a7192115b4c1a19444ab4482caa77e2c9d" + integrity sha512-MrO/xLXCaUgZy3y96C/iOsaIqZSeupyTImKClHunL5GrmaiII2VwvWmLBu2hwa0Kp0sV19CsyjtrTc/Fx8rg/A== "@types/luxon@3.0.2": version "3.0.2" @@ -2974,10 +2974,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.8.tgz#16d222a58d4363a2a359656dd20b28414de5d265" integrity sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A== -"@types/node@16.18.2": - version "16.18.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.2.tgz#77878acc68c5f6241454008beedd39513bd8e851" - integrity sha512-KIGQJyya+opDCFvDSZMNNS899ov5jlNdtN7PypgHWeb8e+5vWISdwTRo/ClsNVlmDihzOGqFyNBDamUs7TQQCA== +"@types/node@16.18.3": + version "16.18.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.3.tgz#d7f7ba828ad9e540270f01ce00d391c54e6e0abc" + integrity sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg== "@types/node@^13.7.0": version "13.13.52" @@ -3110,16 +3110,17 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@5.41.0": - version "5.41.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.41.0.tgz#f8eeb1c6bb2549f795f3ba71aec3b38d1ab6b1e1" - integrity sha512-DXUS22Y57/LAFSg3x7Vi6RNAuLpTXwxB9S2nIA7msBb/Zt8p7XqMwdpdc1IU7CkOQUPgAqR5fWvxuKCbneKGmA== +"@typescript-eslint/eslint-plugin@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.42.0.tgz#36a8c0c379870127059889a9cc7e05c260d2aaa5" + integrity sha512-5TJh2AgL6+wpL8H/GTSjNb4WrjKoR2rqvFxR/DDTqYNk6uXn8BJMEcncLSpMbf/XV1aS0jAjYwn98uvVCiAywQ== dependencies: - "@typescript-eslint/scope-manager" "5.41.0" - "@typescript-eslint/type-utils" "5.41.0" - "@typescript-eslint/utils" "5.41.0" + "@typescript-eslint/scope-manager" "5.42.0" + "@typescript-eslint/type-utils" "5.42.0" + "@typescript-eslint/utils" "5.42.0" debug "^4.3.4" ignore "^5.2.0" + natural-compare-lite "^1.4.0" regexpp "^3.2.0" semver "^7.3.7" tsutils "^3.21.0" @@ -3131,14 +3132,14 @@ dependencies: "@typescript-eslint/utils" "5.41.0" -"@typescript-eslint/parser@5.41.0": - version "5.41.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.41.0.tgz#0414a6405007e463dc527b459af1f19430382d67" - integrity sha512-HQVfix4+RL5YRWZboMD1pUfFN8MpRH4laziWkkAzyO1fvNOY/uinZcvo3QiFJVS/siNHupV8E5+xSwQZrl6PZA== +"@typescript-eslint/parser@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.42.0.tgz#be0ffbe279e1320e3d15e2ef0ad19262f59e9240" + integrity sha512-Ixh9qrOTDRctFg3yIwrLkgf33AHyEIn6lhyf5cCfwwiGtkWhNpVKlEZApi3inGQR/barWnY7qY8FbGKBO7p3JA== dependencies: - "@typescript-eslint/scope-manager" "5.41.0" - "@typescript-eslint/types" "5.41.0" - "@typescript-eslint/typescript-estree" "5.41.0" + "@typescript-eslint/scope-manager" "5.42.0" + "@typescript-eslint/types" "5.42.0" + "@typescript-eslint/typescript-estree" "5.42.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.41.0": @@ -3149,13 +3150,21 @@ "@typescript-eslint/types" "5.41.0" "@typescript-eslint/visitor-keys" "5.41.0" -"@typescript-eslint/type-utils@5.41.0": - version "5.41.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.41.0.tgz#2371601171e9f26a4e6da918a7913f7266890cdf" - integrity sha512-L30HNvIG6A1Q0R58e4hu4h+fZqaO909UcnnPbwKiN6Rc3BUEx6ez2wgN7aC0cBfcAjZfwkzE+E2PQQ9nEuoqfA== +"@typescript-eslint/scope-manager@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.42.0.tgz#e1f2bb26d3b2a508421ee2e3ceea5396b192f5ef" + integrity sha512-l5/3IBHLH0Bv04y+H+zlcLiEMEMjWGaCX6WyHE5Uk2YkSGAMlgdUPsT/ywTSKgu9D1dmmKMYgYZijObfA39Wow== dependencies: - "@typescript-eslint/typescript-estree" "5.41.0" - "@typescript-eslint/utils" "5.41.0" + "@typescript-eslint/types" "5.42.0" + "@typescript-eslint/visitor-keys" "5.42.0" + +"@typescript-eslint/type-utils@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.42.0.tgz#4206d7192d4fe903ddf99d09b41d4ac31b0b7dca" + integrity sha512-HW14TXC45dFVZxnVW8rnUGnvYyRC0E/vxXShFCthcC9VhVTmjqOmtqj6H5rm9Zxv+ORxKA/1aLGD7vmlLsdlOg== + dependencies: + "@typescript-eslint/typescript-estree" "5.42.0" + "@typescript-eslint/utils" "5.42.0" debug "^4.3.4" tsutils "^3.21.0" @@ -3164,6 +3173,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.41.0.tgz#6800abebc4e6abaf24cdf220fb4ce28f4ab09a85" integrity sha512-5BejraMXMC+2UjefDvrH0Fo/eLwZRV6859SXRg+FgbhA0R0l6lDqDGAQYhKbXhPN2ofk2kY5sgGyLNL907UXpA== +"@typescript-eslint/types@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.42.0.tgz#5aeff9b5eced48f27d5b8139339bf1ef805bad7a" + integrity sha512-t4lzO9ZOAUcHY6bXQYRuu+3SSYdD9TS8ooApZft4WARt4/f2Cj/YpvbTe8A4GuhT4bNW72goDMOy7SW71mZwGw== + "@typescript-eslint/typescript-estree@5.41.0": version "5.41.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.41.0.tgz#bf5c6b3138adbdc73ba4871d060ae12c59366c61" @@ -3177,6 +3191,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.42.0.tgz#2592d24bb5f89bf54a63384ff3494870f95b3fd8" + integrity sha512-2O3vSq794x3kZGtV7i4SCWZWCwjEtkWfVqX4m5fbUBomOsEOyd6OAD1qU2lbvV5S8tgy/luJnOYluNyYVeOTTg== + dependencies: + "@typescript-eslint/types" "5.42.0" + "@typescript-eslint/visitor-keys" "5.42.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.41.0", "@typescript-eslint/utils@^5.10.0": version "5.41.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.41.0.tgz#f41ae5883994a249d00b2ce69f4188f3a23fa0f9" @@ -3191,6 +3218,20 @@ eslint-utils "^3.0.0" semver "^7.3.7" +"@typescript-eslint/utils@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.42.0.tgz#f06bd43b9a9a06ed8f29600273240e84a53f2f15" + integrity sha512-JZ++3+h1vbeG1NUECXQZE3hg0kias9kOtcQr3+JVQ3whnjvKuMyktJAAIj6743OeNPnGBmjj7KEmiDL7qsdnCQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.42.0" + "@typescript-eslint/types" "5.42.0" + "@typescript-eslint/typescript-estree" "5.42.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + "@typescript-eslint/visitor-keys@5.41.0": version "5.41.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.41.0.tgz#d3510712bc07d5540160ed3c0f8f213b73e3bcd9" @@ -3199,6 +3240,14 @@ "@typescript-eslint/types" "5.41.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.42.0": + version "5.42.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.42.0.tgz#ee8d62d486f41cfe646632fab790fbf0c1db5bb0" + integrity sha512-QHbu5Hf/2lOEOwy+IUw0GoSCuAzByTAWWrOTKzTzsotiUnWFpuKnXcAhC9YztAf2EElQ0VvIK+pHJUPkM0q7jg== + dependencies: + "@typescript-eslint/types" "5.42.0" + eslint-visitor-keys "^3.3.0" + "@yarnpkg/core@3.2.5": version "3.2.5" resolved "https://registry.yarnpkg.com/@yarnpkg/core/-/core-3.2.5.tgz#aef54ced8024d8fd4b49745bd72e5e83995ef92d" @@ -4005,10 +4054,10 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== -cluster-key-slot@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz#30474b2a981fb12172695833052bc0d01336d10d" - integrity sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw== +cluster-key-slot@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.1.tgz#10ccb9ded0729464b6d2e7d714b100a2d1259d43" + integrity sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw== cmd-shim@^5.0.0: version "5.0.0" @@ -5217,10 +5266,10 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" -generic-pool@3.8.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.8.2.tgz#aab4f280adb522fdfbdc5e5b64d718d3683f04e9" - integrity sha512-nGToKy6p3PAbYQ7p1UlWl6vSPwfwU6TMSWK7TTu+WUY4ZjyZQGniGGt2oNVvyNSpyZYSB43zMXVLcBm08MTMkg== +generic-pool@3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-3.9.0.tgz#36f4a678e963f4fdb8707eab050823abc4e8f5e4" + integrity sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" @@ -6910,10 +6959,10 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.0.tgz#21be64954a4680e303a09e9468f880b98a0b3c7f" integrity sha512-EIRtP1GrSJny0dqb50QXRUNBxHJhcpxHC++M5tD7RYbvLLn5KVWKsbyswSSqDuU15UFi3bgTQIY8nhDMeF6aDQ== -luxon@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.0.4.tgz#d179e4e9f05e092241e7044f64aaa54796b03929" - integrity sha512-aV48rGUwP/Vydn8HT+5cdr26YYQiUZ42NM6ToMoaGKwYfWbfLeRkEu1wXWMHBZT6+KyLfcbbtVcoQFCbbPjKlw== +luxon@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/luxon/-/luxon-3.1.0.tgz#9ac33d7142b7ea18d4ec8583cdeb0b079abef60d" + integrity sha512-7w6hmKC0/aoWnEsmPCu5Br54BmbmUp5GfcqBxQngRcXJ+q5fdfjEzn7dxmJh2YdDhgW8PccYtlWKSv4tQkrTQg== make-dir@^3.0.0: version "3.1.0" @@ -7086,10 +7135,10 @@ mdurl@^1.0.1: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== -memfs@3.4.8: - version "3.4.8" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.8.tgz#4204fbd4cb72e2bbcf5941d784c6b6ce2be3dd52" - integrity sha512-E8QAFfd4csESWOqKIpN+khILPFSAZwPR9S+DO/5UtJNcuanF1jLZz0oWUAPF7xd2c1r6dGjGx+jH1st+MFWufA== +memfs@3.4.9: + version "3.4.9" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.4.9.tgz#403bb953776d72fef4e39e1197a25ffa156d143a" + integrity sha512-3rm8kbrzpUGRyPKSGuk387NZOwQ90O4rI9tsWQkzNW7BLSnKGp23RsEsKK8N8QVCrtJoAMqy3spxHC4os4G6PQ== dependencies: fs-monkey "^1.0.3" @@ -7299,10 +7348,10 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mock-fs@5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-5.1.4.tgz#d64dc37b2793613ca7148b510b1167b5b8afb6b8" - integrity sha512-sudhLjCjX37qWIcAlIv1OnAxB2wI4EmXByVuUjILh1rKGNGpGU8GNnzw+EAbrhdpBe0TL/KONbK1y3RXZk8SxQ== +mock-fs@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-5.2.0.tgz#3502a9499c84c0a1218ee4bf92ae5bf2ea9b2b5e" + integrity sha512-2dF2R6YMSZbpip1V1WHKGLNjr/k48uQClqMVb5H3MOvwc9qhYis3/IWbj02qIg/Y8MDXKFF4c5v0rxx2o6xTZw== mockdate@3.0.5: version "3.0.5" @@ -7384,6 +7433,11 @@ nanoid@3.3.4: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -8478,14 +8532,14 @@ redeyed@~2.1.0: dependencies: esprima "~4.0.0" -redis@4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/redis/-/redis-4.3.1.tgz#290532a0c22221e05e991162ac4dca1e1b2ff6da" - integrity sha512-cM7yFU5CA6zyCF7N/+SSTcSJQSRMEKN0k0Whhu6J7n9mmXRoXugfWDBo5iOzGwABmsWKSwGPTU5J4Bxbl+0mrA== +redis@4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/redis/-/redis-4.4.0.tgz#bd73fe74e910ecff6bbe89c7e50887c09b3df6e2" + integrity sha512-tQyFG6O9iewLxxHYRyirJNklhe2QI7M/0o8q0jk7D9Z/Cxh/7oZrQyHKyjWz0TkkCls8ool/xvhL9K8zRnkaYQ== dependencies: - "@redis/bloom" "1.0.2" - "@redis/client" "1.3.0" - "@redis/graph" "1.0.1" + "@redis/bloom" "1.1.0" + "@redis/client" "1.3.1" + "@redis/graph" "1.1.0" "@redis/json" "1.0.4" "@redis/search" "1.1.0" "@redis/time-series" "1.0.3" @@ -9407,16 +9461,21 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@2.4.0, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== +tslib@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== tslib@^1.11.1, tslib@^1.13.0, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"