Skip to content

Commit d764053

Browse files
committed
refactor: replace matchPackageNames to matchDepNames
Here's a breakdown of their preferences: * **`matchDepNames` is generally preferred for clarity and accuracy.** * `matchDepNames` was introduced specifically to match against the `depName` field, which typically represents the "short" or primary name of a dependency (e.g., `react`, `lodash`). * Using `matchDepNames` makes your Renovate configuration more explicit and easier to understand, as its name directly reflects its intended behavior. * **`matchPackageNames` has historical baggage and can be misleading.** * Historically, `matchPackageNames` in Renovate also matched against the `depName` by default, despite its name suggesting it would match the `packageName` field. This was due to an earlier implementation decision. * While `matchPackageNames` might still match `depName` in many current setups (for backward compatibility), it can be confusing and lead to unexpected behavior if you're expecting it to match the `packageName` (which is often a more complete or specific identifier, like `org.apache.maven:maven-core`).
1 parent 9d244bf commit d764053

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

renovate-presets/default.json5

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
// Group all non-major updates (minor and patch) together
3737
{
3838
'groupName': 'all non-major dependencies',
39-
'matchPackageNames': ['*', '!node', '!pnpm', '!npm', '!yarn'],
39+
'matchDepNames': ['*', '!node', '!pnpm', '!npm', '!yarn'],
4040
'matchUpdateTypes': ['digest', 'patch', 'minor'],
4141
},
4242

@@ -60,7 +60,7 @@
6060
'followTag': 'next',
6161
'separateMajorMinor': false,
6262
'schedule': ['at any time'],
63-
'matchPackageNames': [
63+
'matchDepNames': [
6464
'@angular-devkit/**',
6565
'@angular/**',
6666
'@schematics/**',
@@ -77,19 +77,19 @@
7777

7878
// Keep minor and patch updates separate for TypeScript
7979
{
80-
'matchPackageNames': ['typescript'],
80+
'matchDepNames': ['typescript'],
8181
'separateMinorPatch': true,
8282
},
8383

8484
// Group TypeScript-related packages
8585
{
8686
'groupName': 'typescript dependencies',
87-
'matchPackageNames': ['typescript', 'tslib'],
87+
'matchDepNames': ['typescript', 'tslib'],
8888
},
8989

9090
// Limit how many times these packages get updated (They deploy each merged PR)
9191
{
92-
'matchPackageNames': ['renovate', 'quicktype-core'],
92+
'matchDepNames': ['renovate', 'quicktype-core'],
9393
'schedule': ['on sunday and wednesday'],
9494
},
9595

@@ -101,7 +101,7 @@
101101
{
102102
'groupName': 'scorecard action dependencies',
103103
'matchFileNames': ['.github/workflows/scorecard.yml'],
104-
'matchPackageNames': ['*'],
104+
'matchDepNames': ['*'],
105105
},
106106

107107
// ============================================================================
@@ -118,11 +118,9 @@
118118
{
119119
'enabled': false,
120120
'matchDepNames': [
121-
'bazel', // bazelisk bazel verison
122-
],
123-
'matchPackageNames': [
124121
'@types/node',
125122
'node',
123+
'bazel', // bazelisk bazel verison
126124
'npm',
127125
'pnpm',
128126
'rxjs',
@@ -135,7 +133,7 @@
135133
// Disable TypeScript major and minor updates
136134
{
137135
'enabled': false,
138-
'matchPackageNames': ['typescript'],
136+
'matchDepNames': ['typescript'],
139137
'matchUpdateTypes': ['major', 'minor'],
140138
},
141139
],

0 commit comments

Comments
 (0)