ftp-deploy icon indicating copy to clipboard operation
ftp-deploy copied to clipboard

Implicitly excluding dot files if they match minimatch patterns & RegExp pattern support.

Open iwoplaza opened this issue 2 years ago • 3 comments
trafficstars

Problem

I ran into a problem with having nested dot directories inside /node_modules/ (e.g. /node_modules/.bin, /node_modules/get-intrinsic/.github/FUNDING.yml). I wanted to exclude all directories and folders contained in node_modules, but could not formulate a concrete config to do that.

Proposal

Minimatch's dot setting makes it so all dot files are treated the same way as normal files when tested, meaning they don't have to be targeted explicitly. Turning this on for all exclude patterns made the most sense to me, as I cannot imagine a situation where I want to exclude all files in a given directory except the hidden ones. This could prove a security risk if one believes they are excluding all dot files from a directory as stated in the README, while they're not.

Implementation

  • 'Exclude' patterns treat dot files like the rest of the files.
  • Added RegExp support for patterns.

iwoplaza avatar Dec 04 '22 21:12 iwoplaza

Thansk - I will take a look but not sure it'll be this side of xmas - feel free to remind me...!

simonh1000 avatar Dec 07 '22 07:12 simonh1000

@simonh1000 Hey! Reminding you to check out the PR 😄

iwoplaza avatar Mar 18 '23 17:03 iwoplaza

Could you add a test with a regex in please

simonh1000 avatar Mar 19 '23 15:03 simonh1000