mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix(presets): migrate renamed monorepos (#11319)
This commit is contained in:
parent
b21439fb75
commit
70b5396d34
2 changed files with 68 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
export const removedPresets = {
|
||||
export const removedPresets: Record<string, string | null> = {
|
||||
':automergeBranchMergeCommit': ':automergeBranch',
|
||||
':automergeBranchPush': ':automergeBranch',
|
||||
':base': 'config:base',
|
||||
|
@ -23,3 +23,39 @@ export const removedPresets = {
|
|||
'helpers:oddIsUnstable': null,
|
||||
'helpers:oddIsUnstablePackages': null,
|
||||
};
|
||||
|
||||
const renamedMonorepos: Record<string, string> = {
|
||||
'arcus event-grid': 'arcus.event-grid',
|
||||
'arcus security': 'arcus.security',
|
||||
'arcus messaging': 'arcus.messaging',
|
||||
'arcus observability': 'arcus.observability',
|
||||
'arcus webapi': 'arcus.webapi',
|
||||
'arcus background-jobs': 'arcus.background-jobs',
|
||||
'aspnet AspNetWebStack': 'aspnet aspnetwebstack',
|
||||
'aspnet Extensions': 'aspnet extensions',
|
||||
'System.IO.Abstractions': 'system.io.abstractions',
|
||||
angular1: 'angularjs',
|
||||
angularcli: 'angular-cli',
|
||||
Fontsource: 'fontsource',
|
||||
hamcrest: 'javahamcrest',
|
||||
HotChocolate: 'hotchocolate',
|
||||
infrastructure: 'infrastructure-ui',
|
||||
lingui: 'linguijs',
|
||||
MassTransit: 'masstransit',
|
||||
material: 'material-components-web',
|
||||
mui: 'material-ui',
|
||||
openfeign: 'feign',
|
||||
opentelemetry: 'opentelemetry-js',
|
||||
OpenTelemetryDotnet: 'opentelemetry-dotnet',
|
||||
picasso: 'picassojs',
|
||||
reactrouter: 'react-router',
|
||||
sentry: 'sentry-javascript',
|
||||
Steeltoe: 'steeltoe',
|
||||
stryker: 'stryker-js',
|
||||
Swashbuckle: 'swashbuckle-aspnetcore',
|
||||
};
|
||||
|
||||
for (const [from, to] of Object.entries(renamedMonorepos)) {
|
||||
removedPresets[`monorepo:${from}`] = `monorepo:${to}`;
|
||||
removedPresets[`group:${from}Monorepo`] = `group:${to}Monorepo`;
|
||||
}
|
||||
|
|
|
@ -575,6 +575,37 @@ describe('config/presets/index', () => {
|
|||
const res = await presets.getPreset('helpers:oddIsUnstable', {});
|
||||
expect(res).toEqual({});
|
||||
});
|
||||
it('handles renamed monorepos', async () => {
|
||||
const res = await presets.getPreset('monorepo:opentelemetry', {});
|
||||
expect(res).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"description": Array [
|
||||
"opentelemetry-js monorepo",
|
||||
],
|
||||
"matchSourceUrlPrefixes": Array [
|
||||
"https://github.com/open-telemetry/opentelemetry-js",
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
it('handles renamed monorepo groups', async () => {
|
||||
const res = await presets.getPreset('group:opentelemetryMonorepo', {});
|
||||
expect(res).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"packageRules": Array [
|
||||
Object {
|
||||
"description": Array [
|
||||
"Group packages from opentelemetry-js monorepo together",
|
||||
],
|
||||
"extends": Array [
|
||||
"monorepo:opentelemetry-js",
|
||||
],
|
||||
"groupName": "opentelemetry-js monorepo",
|
||||
},
|
||||
],
|
||||
}
|
||||
`);
|
||||
});
|
||||
it('gets linters', async () => {
|
||||
const res = await presets.getPreset('packages:linters', {});
|
||||
expect(res).toMatchSnapshot();
|
||||
|
|
Loading…
Reference in a new issue