|
36 | 36 | 'yarn', // Yarn is copied locally in all repositories where needed. |
37 | 37 | ], |
38 | 38 |
|
| 39 | + // Renovate does not update Bazel lockfile for the time being. |
| 40 | + // Workaround for https://github.com/renovatebot/renovate/issues/25557 |
| 41 | + postUpgradeTasks: { |
| 42 | + commands: [ |
| 43 | + 'git restore .npmrc || true', // In case `.npmrc` avoid a hard error. |
| 44 | + 'pnpm install --frozen-lockfile', |
| 45 | + 'pnpm bazel mod deps --lockfile_mode=update', |
| 46 | + ], |
| 47 | + executionMode: 'branch', |
| 48 | + }, |
| 49 | + |
39 | 50 | packageRules: [ |
40 | 51 | // ============================================================================ |
41 | 52 | // GENERAL GROUPING & UPDATE BEHAVIOR |
42 | 53 | // ============================================================================ |
43 | 54 |
|
44 | | - // Group all non-major updates (minor and patch) together |
| 55 | + // Disable 'postUpdateTasks' for changes that do not effect the BAZEL lockfile or generated files. |
| 56 | + { |
| 57 | + postUpgradeTasks: {commands: []}, |
| 58 | + matchManagers: ['!npm', '!bazel', '!bazel-module', '!bazelisk'], |
| 59 | + }, |
| 60 | + |
| 61 | + // Rule to disable NPM updates on branches other than 'main'. |
| 62 | + // But allow updating engines and packageManagers. |
| 63 | + { |
| 64 | + enabled: false, |
| 65 | + matchBaseBranches: ['!main'], |
| 66 | + matchDepNames: ['!node', '!pnpm', '!npm', '!yarn'], |
| 67 | + matchManagers: ['npm'], |
| 68 | + }, |
| 69 | + |
| 70 | + // Group all non-major dependencies together for updates. |
45 | 71 | { |
46 | 72 | groupName: 'all non-major dependencies', |
47 | 73 | matchDepNames: ['*', '!node', '!pnpm', '!npm', '!yarn'], |
48 | 74 | matchUpdateTypes: ['digest', 'patch', 'minor'], |
| 75 | + matchManagers: ['npm'], |
49 | 76 | }, |
50 | 77 |
|
51 | 78 | // ============================================================================ |
|
55 | 82 | // Group Bazel updates |
56 | 83 | { |
57 | 84 | groupName: 'bazel dependencies', |
58 | | - matchManagers: ['bazel'], |
| 85 | + matchManagers: ['bazel', 'bazel-module'], |
| 86 | + }, |
| 87 | + |
| 88 | + // Group GitHub Actions workflow |
| 89 | + { |
| 90 | + groupName: 'all github actions', |
| 91 | + matchManagers: ['github-actions'], |
59 | 92 | }, |
60 | 93 |
|
61 | 94 | // ============================================================================ |
|
64 | 97 |
|
65 | 98 | // Group updates related to Angular ecosystem across repositories |
66 | 99 | { |
| 100 | + enabled: true, // Enable NPM updates of cross-repo dependencies on all branches. |
67 | 101 | groupName: 'cross-repo angular dependencies', |
68 | 102 | followTag: 'next', |
69 | 103 | separateMajorMinor: false, |
|
107 | 141 | schedule: ['on sunday and wednesday'], |
108 | 142 | }, |
109 | 143 |
|
110 | | - // ============================================================================ |
111 | | - // WORKFLOW-SPECIFIC UPDATE RULES |
112 | | - // ============================================================================ |
113 | | - |
114 | | - // Group dependencies in the scorecard GitHub Actions workflow |
115 | | - { |
116 | | - groupName: 'scorecard action dependencies', |
117 | | - matchFileNames: ['.github/workflows/scorecard.yml'], |
118 | | - matchDepNames: ['*'], |
119 | | - }, |
120 | | - |
121 | 144 | // ============================================================================ |
122 | 145 | // EXCLUSION RULES |
123 | 146 | // ============================================================================ |
|
134 | 157 | matchDepNames: [ |
135 | 158 | '@types/node', |
136 | 159 | 'node', |
137 | | - 'bazel', // bazelisk bazel verison |
| 160 | + 'bazel', // bazelisk bazel version |
138 | 161 | 'npm', |
139 | 162 | 'rxjs', |
140 | 163 | 'tslib', |
|
149 | 172 | matchDepNames: ['typescript'], |
150 | 173 | matchUpdateTypes: ['major', 'minor'], |
151 | 174 | }, |
| 175 | + |
| 176 | + // Rule to disable major updates on branches other than 'main'. |
| 177 | + { |
| 178 | + enabled: false, |
| 179 | + matchBaseBranches: ['!main'], |
| 180 | + matchUpdateTypes: ['major'], |
| 181 | + }, |
152 | 182 | ], |
153 | 183 | } |
0 commit comments