Skip to content

chore: don't create separate renovate PRs for angular and angular-cli #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
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
34 changes: 28 additions & 6 deletions renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
// The config we're extending ignores test dirs, but we want to bump some fixture deps
ignorePaths: ['**/node_modules/**'],
packageRules: [
// Since we've enabled Renovate (see above) for fixture sites, adjust the config for these.
// Since we've enabled Renovate (see above) for demo and fixture sites, adjust the config for these.
{
matchFileNames: ['tests/**/fixtures/**/package.json'],
matchFileNames: ['tests/**/fixtures/**/package.json', 'demo/package.json'],
// If a fixture requires a specific framework version, never bump it.
updatePinnedDependencies: false,
// Always use `chore:` (since these are test fixtures), to avoid no-op releases.
extends: [':semanticCommitTypeAll(chore)'],
},
{
description: 'Stable & unstable Angular bumps in test fixtures',
matchFileNames: ['tests/**/fixtures/**/package.json'],
// See https://docs.renovatebot.com/presets-monorepo/#monorepoangular.
matchSourceUrls: ['https://github.com/angular/angular'],
description: 'Stable & unstable Angular bumps in demo and test fixtures',
groupName: 'Angular packages',
matchFileNames: ['tests/**/fixtures/**/package.json', 'demo/package.json'],
matchPackageNames: ['@angular/**', 'zone.js', '@angular-devkit/**'],
// Override the schedule to get immediate PRs.
schedule: null,
// Apply a unique label so we can trigger additional workflows for these PRs.
Expand All @@ -31,5 +31,27 @@
// difficult (or impossible) to implement so we just disable it entirely.
automerge: false,
},
// Angular major version updates attempt to upgrade fixtures for Angular 17, 18 etc
// we never want to upgrade those, so we disable them in fixtures.
// Angular major versions are being released on 6 months schedule and we will need to handle them
// manually anyway (even if it's just creating test fixtures for them, without adjusting the runtime
// itself)
// Additionally peerDeps bumps (like typescript) make it seemingly impossible to automate this process
// for demo app, so major bumps are just fully disabled.
{
description: 'Disable angular major version upgrades',
matchFileNames: ['tests/**/fixtures/**/package.json', 'demo/package.json'],
matchPackageNames: ['@angular/**', '@angular-devkit/**'],
matchUpdateTypes: ['major'],
enabled: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could just not set the bump-framework-in-fixtures label for these instead of disabling entirely? We wouldn't get the noisy failure notifications but we'd still have a little bit of visibility into available major bumps.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we could make that work, then it would be great!

Some troubles I did have with angular setup specifically is that "breaking changes" is mix of major and minor (0.X range for zone.js) which afaik is really painful to handle with renovate. Maybe there is some nicer setting than updateType (major/minor/patch) to play with. I'm not actually sure how to configure not allowing minor bumps for zone.js for non-breaking changes PRs while allowing this for breaking changes PRs. And then conditionally applying that label

In any case - I'll merge this as-is to get currently supported majors to receive correct non-breaking version bumps and we can look into making major version bumps as follow up

},
// zone.js is in 0.x.y version range, so we also disable minor updates for those
{
description: 'Disable zone.js minor version upgrades in fixtures',
matchFileNames: ['tests/**/fixtures/**/package.json', 'demo/package.json'],
matchPackageNames: ['zone.js'],
matchUpdateTypes: ['minor', 'major'],
enabled: false,
},
],
}