fix(post-upgrade-tasks)!: enable dot option for file filters (#21282)

Set `{ dot: true }` for minimatch.

Closes #21276

BREAKING CHANGE: dot files will now be included by default for all minimatch results
This commit is contained in:
Bastian Gutschke 2023-04-26 19:05:27 +02:00 committed by Rhys Arkins
parent 08bbf812b0
commit bc693f2003
2 changed files with 3 additions and 2 deletions

View file

@ -2615,6 +2615,7 @@ You can use variable templating in your commands if [`allowPostUpgradeCommandTem
### fileFilters
A list of glob-style matchers that determine which files will be included in the final commit made by Renovate.
Dotfiles are included.
### executionMode

View file

@ -110,7 +110,7 @@ export async function postUpgradeCommandsExecutor(
for (const relativePath of status.modified.concat(status.not_added)) {
for (const pattern of fileFilters) {
if (minimatch(relativePath, pattern)) {
if (minimatch(relativePath, pattern, { dot: true })) {
logger.debug(
{ file: relativePath, pattern },
'Post-upgrade file saved'
@ -138,7 +138,7 @@ export async function postUpgradeCommandsExecutor(
for (const relativePath of status.deleted || []) {
for (const pattern of fileFilters) {
if (minimatch(relativePath, pattern)) {
if (minimatch(relativePath, pattern, { dot: true })) {
logger.debug(
{ file: relativePath, pattern },
'Post-upgrade file removed'