Filter out files and folders to exclude#5
Conversation
|
Hey there! I just built a new temporary npm package based on 6a5ad9d. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/bsc-plugin-auto-findnode/releases/download/v0.0.0-packages/bsc-plugin-auto-findnode-0.1.0-3-ability-to-exclude-certain-folders-or-libraries.20240821180237.tgz |
|
Hey there! I just built a new temporary npm package based on 105b625. You can download it here or install it by running the following command: npm install https://github.com/rokucommunity/bsc-plugin-auto-findnode/releases/download/v0.0.0-packages/bsc-plugin-auto-findnode-0.1.0-3-ability-to-exclude-certain-folders-or-libraries.20240821180512.tgz |
TwitchBronBron
left a comment
There was a problem hiding this comment.
We need to tweak the path filtering a bit more. It should walk through the filters one-by-one.
Something like:
let fileIsExcluded = false;
for(const filter of filters){
let isFIlterNegated = filter.startsWith('!');
if(filter.isMatch(filePath)){
fileIsExcluded = !isFilterNegated;
}
}
//we've made it through every path, `fileIsExcluded` now accurately represents what should happen to this file.| "undent": "^0.1.0" | ||
| }, | ||
| "dependencies": { | ||
| "minimatch": "^10.0.1" |
There was a problem hiding this comment.
Let's use the same version that's in brighterscript, just for consistency's sake. I'm sure they work in a similar fashion.
| return foundIDs; | ||
| } | ||
|
|
||
| function getFilteredScopes(program: Program) { |
There was a problem hiding this comment.
This exclusion logic is not correct. Each pattern operates based on the results of the previous pattern. For example:
[
//exclude all vendor scripts
"source/vendor/**/*",
//except don't exclude rodash
"!source/vendor/rodash/**/*",
//except DO exclude this specific rodash file
"source/vendor/rodash/_all.bs"
]
No description provided.