Skip to content

Commit

Permalink
fix(post-upgrade-tasks)!: enable dot option for file filters (#21282)
Browse files Browse the repository at this point in the history
Set `{ dot: true }` for minimatch.

Closes #21276

BREAKING CHANGE: dot files will now be included by default for all minimatch results
  • Loading branch information
bgutschke authored and rarkins committed Jul 4, 2023
1 parent 08bbf81 commit bc693f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit bc693f2

Please sign in to comment.