ftp-deploy
ftp-deploy copied to clipboard
Implicitly excluding dot files if they match minimatch patterns & RegExp pattern support.
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.
Thansk - I will take a look but not sure it'll be this side of xmas - feel free to remind me...!
@simonh1000 Hey! Reminding you to check out the PR 😄
Could you add a test with a regex in please