Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/usage/bot-comparison.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you see anything wrong on this page, please let us know by creating a [Discus
| Dependency Dashboard | Yes | No |
| Grouped updates | Yes, use community-provided groups, or create your own | Yes, create [`groups`](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) manually or [handled automatically by dependabot](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates#about-grouped-security-updates) |
| Upgrades common monorepo packages at once | Yes | Yes |
| Officially supported platforms | Azure, Bitbucket, Forgejo, Gitea, GitHub, GitLab, see [full list](./index.md#supported-platforms) | GitHub and Azure DevOps |
| Officially supported platforms | Azure, Bitbucket, Forgejo, Gitea, GitHub, GitLab, SCM-Manager, see [full list](./index.md#supported-platforms) | GitHub and Azure DevOps |
| Supported languages | [List for Renovate](./modules/manager/index.md) | [List for Dependabot](https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories#supported-ecosystems-and-repositories) |
| Show changelogs | Yes | Yes |
| Compatibility score badges | Four badges showing: Age, Adoption, Passing, Confidence | One badge with overall compatibility score |
Expand Down
6 changes: 3 additions & 3 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -4712,7 +4712,7 @@ Please see the above link for valid timezone names.

## toolSettings

When Renovate updates a dependency and needs to invoke processes leveraging Java, for example Gradle for [the `gradle-wrapper` manager](./modules/manager/gradle-wrapper/index.md), the repository's Gradle Wrapper will be invoked, if present.
When Renovate updates a dependency and needs to invoke processes leveraging Java, for example Gradle for [the `gradle`](./modules/manager/gradle/index.md) or [the `gradle-wrapper`](./modules/manager/gradle-wrapper/index.md) managers, the repository's Gradle Wrapper will be invoked, if present.

The JVM heap size for the Java invocations is 512m by default.
This can be overridden using the following options.
Expand All @@ -4726,14 +4726,14 @@ This option can be used on the repository level and in the [Renovate configurati

<!-- prettier-ignore -->
!!! note
The JVM memory settings are considered for the `gradle-wrapper` manager.
The JVM memory settings are considered for the `gradle` and `gradle-wrapper` manager.

### jvmMaxMemory

Maximum heap size in MB for Java VMs.
Defaults to `512` for both the repository level and self-hosted configuration.

To allow repositories to use _more_ than 512m of heap during the Gradle Wrapper update, configure the `jvmMaxMemory` option in the [`toolSettings.jvmMaxMemory`](./self-hosted-configuration.md).
To allow repositories to use _more_ than 512m of heap during any invocations of the Gradle Wrapper, configure the `jvmMaxMemory` option in the [`toolSettings.jvmMaxMemory`](./self-hosted-configuration.md).

### jvmMemory

Expand Down
8 changes: 4 additions & 4 deletions docs/usage/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ If you're self hosting Renovate, use the latest release if possible.

## Renovate core features not supported on all platforms

| Feature | Platforms which lack feature | See Renovate issue(s) |
| --------------------- | ----------------------------------------------- | ------------------------------------------------------------ |
| Dependency Dashboard | Azure, Bitbucket, Bitbucket Server, Gerrit | [#9592](https://github.com/renovatebot/renovate/issues/9592) |
| The Mend Renovate App | Azure, Bitbucket Server, Forgejo, Gitea, GitLab | |
| Feature | Platforms which lack feature | See Renovate issue(s) |
| --------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Dependency Dashboard | Azure, Bitbucket, Bitbucket Server, Gerrit, SCM-Manager | [#9592](https://github.com/renovatebot/renovate/issues/9592) |
| The Mend Renovate App | Azure, Bitbucket Server, Forgejo, Gitea, GitLab, SCM-Manager | |

## Major platform features not supported by Renovate

Expand Down
1 change: 1 addition & 0 deletions docs/usage/getting-started/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ Read the platform-specific docs to learn how to setup authentication on your pla
- [Gitea](../modules/platform/gitea/index.md)
- [github.com and GitHub Enterprise Server](../modules/platform/github/index.md)
- [GitLab](../modules/platform/gitlab/index.md)
- [SCM-Manager](../modules/platform/scm-manager/index.md)

### GitHub.com token for changelogs (and tools)

Expand Down
4 changes: 4 additions & 0 deletions docs/usage/self-hosted-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,10 @@ It also may mean that ignored directories like `node_modules` can be preserved a

## platform

## prCacheSyncMaxPages

Maximum number of pages to fetch when syncing the pull request cache.

## prCommitsPerRunLimit

Parameter to reduce CI load.
Expand Down
1 change: 1 addition & 0 deletions lib/config/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class GlobalConfig {
'onboardingNoDeps',
'onboardingPrTitle',
'platform',
'prCacheSyncMaxPages',
'presetCachePersistence',
'repositoryCacheForceLocal',
's3Endpoint',
Expand Down
35 changes: 32 additions & 3 deletions lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,14 @@ const options: Readonly<RenovateOptions>[] = [
'If set to `true` then Renovate creates draft PRs, instead of normal status PRs.',
type: 'boolean',
default: false,
supportedPlatforms: ['azure', 'forgejo', 'gitea', 'github', 'gitlab'],
supportedPlatforms: [
'azure',
'forgejo',
'gitea',
'github',
'gitlab',
'scm-manager',
],
},
{
name: 'dryRun',
Expand Down Expand Up @@ -1050,7 +1057,12 @@ const options: Readonly<RenovateOptions>[] = [
description: 'Username for authentication.',
stage: 'repository',
type: 'string',
supportedPlatforms: ['azure', 'bitbucket', 'bitbucket-server'],
supportedPlatforms: [
'azure',
'bitbucket',
'bitbucket-server',
'scm-manager',
],
globalOnly: true,
},
{
Expand Down Expand Up @@ -3190,7 +3202,13 @@ const options: Readonly<RenovateOptions>[] = [
description:
'Overrides the default resolution for Git remote, e.g. to switch GitLab from HTTPS to SSH-based.',
type: 'string',
supportedPlatforms: ['bitbucket-server', 'forgejo', 'gitea', 'gitlab'],
supportedPlatforms: [
'bitbucket-server',
'forgejo',
'gitea',
'gitlab',
'scm-manager',
],
allowedValues: ['default', 'ssh', 'endpoint'],
default: 'default',
stage: 'repository',
Expand Down Expand Up @@ -3311,6 +3329,17 @@ const options: Readonly<RenovateOptions>[] = [
default: 90,
globalOnly: true,
},
{
name: 'prCacheSyncMaxPages',
description:
'Maximum number of pages to fetch when syncing the pull request cache.',
type: 'integer',
default: 100,
globalOnly: true,
supportedPlatforms: ['github'],
experimental: true,
experimentalIssues: [41485],
},
{
name: 'dockerMaxPages',
description:
Expand Down
7 changes: 7 additions & 0 deletions lib/config/presets/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,13 @@ describe('config/presets/index', () => {
});

describe('getPreset', () => {
it('does not use cache for internal presets', async () => {
const memCacheGetSpy = vi.spyOn(memCache, 'get');
expect(await presets.getPreset(':dependencyDashboard', {})).toBeDefined();
expect(memCacheGetSpy).not.toHaveBeenCalled();
expect(packageCache.get).not.toHaveBeenCalled();
});

it('handles removed presets with a migration', async () => {
const res = await presets.getPreset(':base', {});
expect(res).toEqual({
Expand Down
47 changes: 31 additions & 16 deletions lib/config/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const presetSources: Record<string, PresetApi> = {
github,
gitlab,
http,
internal,
local,
npm,
};
Expand Down Expand Up @@ -120,33 +119,49 @@ export async function getPreset(
}
const { presetSource, repo, presetPath, presetName, tag, params, rawParams } =
parsePreset(preset);
const cacheKey = `preset:${preset}`;
const presetCachePersistence = GlobalConfig.get(
'presetCachePersistence',
false,
);

let presetConfig: Preset | null | undefined;

if (presetCachePersistence) {
presetConfig = await packageCache.get(presetCacheNamespace, cacheKey);
} else {
presetConfig = memCache.get(cacheKey);
}

if (isNullOrUndefined(presetConfig)) {
presetConfig = await presetSources[presetSource].getPreset({
if (presetSource === 'internal') {
presetConfig = internal.getPreset({
repo,
presetPath,
presetName,
tag,
});
} else {
const cacheKey = `preset:${preset}`;
const presetCachePersistence = GlobalConfig.get(
'presetCachePersistence',
false,
);

if (presetCachePersistence) {
await packageCache.set(presetCacheNamespace, cacheKey, presetConfig, 15);
presetConfig = await packageCache.get(presetCacheNamespace, cacheKey);
} else {
memCache.set(cacheKey, presetConfig);
presetConfig = memCache.get(cacheKey);
}

if (isNullOrUndefined(presetConfig)) {
presetConfig = await presetSources[presetSource].getPreset({
repo,
presetPath,
presetName,
tag,
});
if (presetCachePersistence) {
await packageCache.set(
presetCacheNamespace,
cacheKey,
presetConfig,
15,
);
} else {
memCache.set(cacheKey, presetConfig);
}
}
}

if (!presetConfig) {
throw new Error(PRESET_DEP_NOT_FOUND);
}
Expand Down
1 change: 1 addition & 0 deletions lib/config/presets/local/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const resolvers = {
github,
gitlab,
local: null,
'scm-manager': null,
} satisfies Record<PlatformId, Resolver | null>;

export function getPreset({
Expand Down
1 change: 1 addition & 0 deletions lib/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ export interface RepoGlobalConfig extends GlobalInheritableConfig {
localDir?: string;
migratePresets?: Record<string, string>;
platform?: PlatformId;
prCacheSyncMaxPages?: number;
presetCachePersistence?: boolean;
httpCacheTtlDays?: number;
autodiscoverRepoSort?: RepoSortMethod;
Expand Down
1 change: 1 addition & 0 deletions lib/constants/platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const PLATFORM_HOST_TYPES = [
'github',
'gitlab',
'local',
'scm-manager',
] as const;

export type PlatformId = (typeof PLATFORM_HOST_TYPES)[number];
Expand Down
7 changes: 6 additions & 1 deletion lib/logger/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,12 @@ describe('logger/index', () => {
expect(logged.msg).toBe('foo');
expect(logged.foo.foo).toBe('[Circular]');
expect(logged.foo.bar).toEqual(['[Circular]']);
expect(logged.bar).toBe('[Circular]');
expect(logged.bar).toEqual([
{
bar: '[Circular]',
foo: '[Circular]',
},
]);
});

it('sanitizes secrets', () => {
Expand Down
6 changes: 2 additions & 4 deletions lib/logger/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { ZodError } from 'zod/v3';
import { ExecError } from '../util/exec/exec-error.ts';
import { regEx } from '../util/regex.ts';
import { redactedFields, sanitize } from '../util/sanitize.ts';
import { quickStringify } from '../util/stringify.ts';
import type { BunyanRecord, BunyanStream } from './types.ts';

const excludeProps = ['pid', 'time', 'v', 'hostname'];
Expand Down Expand Up @@ -284,10 +285,7 @@ export function withSanitizer(streamConfig: bunyan.Stream): bunyan.Stream {
const result =
streamConfig.type === 'raw'
? raw
: JSON.stringify(raw, bunyan.safeCycles()).replace(
regEx(/\n?$/),
'\n',
);
: quickStringify(raw)?.replace(regEx(/\n?$/), '\n');
stream.write(result, enc, cb);
};

Expand Down
76 changes: 76 additions & 0 deletions lib/modules/manager/cake/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { codeBlock } from 'common-tags';
import { Fixtures } from '~test/fixtures.ts';
import { extractPackageFile } from './index.ts';

Expand All @@ -19,4 +20,79 @@ describe('modules/manager/cake/index', () => {
],
});
});

it('extracts dotnet tools from single sdk style build file', () => {
const content = codeBlock`
#:sdk Cake.Sdk

// Install single tool
InstallTool("dotnet:https://api.nuget.org/v3/index.json?package=SingleTool.Install.First&version=1.0.0");
InstallTool("dotnet:?package=SingleTool.Install.Second&version=1.2.0");

// Install multiple tools at once
InstallTools(
"dotnet:https://api.nuget.org/v3/index.json?package=MultipleTools.Install.First&version=2.0.0",
"dotnet:?package=MultipleTools.Install.Second&version=2.1.1"
);

var target = Argument("target", "Default");

Task("Default")
.Does(() =>
{
Information("Hello from Cake.Sdk!");
});

var installTools = "dotnet:?Should.Not.Match&version=1.0.0";

RunTarget(target);
`;
expect(extractPackageFile(content)).toMatchObject({
deps: [
{
depName: 'SingleTool.Install.First',
currentValue: '1.0.0',
datasource: 'nuget',
registryUrls: ['https://api.nuget.org/v3/index.json'],
},
{
depName: 'SingleTool.Install.Second',
currentValue: '1.2.0',
datasource: 'nuget',
},
{
depName: 'MultipleTools.Install.First',
currentValue: '2.0.0',
datasource: 'nuget',
registryUrls: ['https://api.nuget.org/v3/index.json'],
},
{
depName: 'MultipleTools.Install.Second',
currentValue: '2.1.1',
datasource: 'nuget',
},
],
});
});

it('skips invalid entries in InstallTools', () => {
const content = codeBlock`
#:sdk Cake.Sdk

// One invalid and one valid tool entry
InstallTools(
"dotnet:bad uri",
"dotnet:?package=Good.Tool&version=1.2.3"
);
`;
expect(extractPackageFile(content)).toMatchObject({
deps: [
{
depName: 'Good.Tool',
currentValue: '1.2.3',
datasource: 'nuget',
},
],
});
});
});
13 changes: 13 additions & 0 deletions lib/modules/manager/cake/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const lexer = moo.states({
match: /^#(?:addin|tool|module|load|l)\s+"(?:nuget|dotnet):[^"]+"\s*$/, // TODO #12870
value: (s: string) => s.trim().slice(1, -1),
},
dependencyFromInstallTools: {
match: /(?:InstallTools?\s*\()[^)]+(?:\s*\)\s*;)/,
lineBreaks: true,
},
unknown: moo.fallback,
},
});
Expand Down Expand Up @@ -74,6 +78,15 @@ export function extractPackageFile(content: string): PackageFileContent {
if (dep) {
deps.push(dep);
}
} else if (type === 'dependencyFromInstallTools') {
const matches = value.matchAll(regEx(/"dotnet:[^"]+"/g));
for (const match of matches) {
const withoutQuote = match.toString().slice(1, -1);
const dep = parseDependencyLine(withoutQuote);
if (dep) {
deps.push(dep);
}
}
}
token = lexer.next();
}
Expand Down
Loading
Loading