Skip to content

Commit fdf5843

Browse files
alan-agius4devversion
authored andcommitted
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 9608d21 commit fdf5843

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

renovate-presets/default.json5

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
// Group all non-major updates (minor and patch) together
4141
{
4242
"groupName": "all non-major dependencies",
43-
"matchPackageNames": [
43+
"matchDepNames": [
4444
"*",
4545
"!node",
4646
"!pnpm",
@@ -70,7 +70,7 @@
7070
"followTag": "next",
7171
"separateMajorMinor": false,
7272
"schedule": ["at any time"],
73-
"matchPackageNames": [
73+
"matchDepNames": [
7474
"@angular-devkit/**",
7575
"@angular/**",
7676
"@schematics/**",
@@ -87,19 +87,19 @@
8787

8888
// Keep minor and patch updates separate for TypeScript
8989
{
90-
"matchPackageNames": ["typescript"],
90+
"matchDepNames": ["typescript"],
9191
"separateMinorPatch": true
9292
},
9393

9494
// Group TypeScript-related packages
9595
{
9696
"groupName": "typescript dependencies",
97-
"matchPackageNames": ["typescript", "tslib"]
97+
"matchDepNames": ["typescript", "tslib"]
9898
},
9999

100100
// Limit how many times these packages get updated (They deploy each merged PR)
101101
{
102-
"matchPackageNames": ["renovate", "quicktype-core"],
102+
"matchDepNames": ["renovate", "quicktype-core"],
103103
"schedule": ["on sunday and wednesday"]
104104
},
105105

@@ -111,7 +111,7 @@
111111
{
112112
"groupName": "scorecard action dependencies",
113113
"matchFileNames": [".github/workflows/scorecard.yml"],
114-
"matchPackageNames": ["*"]
114+
"matchDepNames": ["*"]
115115
},
116116

117117
// ============================================================================
@@ -127,7 +127,7 @@
127127
// Disable major updates for specified dependencies
128128
{
129129
"enabled": false,
130-
"matchPackageNames": [
130+
"matchDepNames": [
131131
"@types/node",
132132
"bazel",
133133
"node",
@@ -143,7 +143,7 @@
143143
// Disable TypeScript major and minor updates
144144
{
145145
"enabled": false,
146-
"matchPackageNames": ["typescript"],
146+
"matchDepNames": ["typescript"],
147147
"matchUpdateTypes": ["major", "minor"]
148148
}
149149
]

0 commit comments

Comments
 (0)