Skip to content

Conversation

@iObject
Copy link
Collaborator

@iObject iObject commented Aug 21, 2024

No description provided.

@iObject iObject added the create-package create a temporary npm package on every commit label Aug 21, 2024
@iObject iObject requested a review from TwitchBronBron August 21, 2024 16:16
@iObject iObject linked an issue Aug 21, 2024 that may be closed by this pull request
@rokucommunity-bot
Copy link
Contributor

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

@rokucommunity-bot
Copy link
Contributor

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

@iObject iObject requested a review from chrisdp August 21, 2024 21:59
Copy link
Member

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the same version that's in brighterscript, just for consistency's sake. I'm sure they work in a similar fashion.

https://github.com/rokucommunity/brighterscript/blob/2d0f46b26e003701f0b69fcc7e1f3db07fc615c0/package.json#L149

return foundIDs;
}

function getFilteredScopes(program: Program) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-package create a temporary npm package on every commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to exclude certain folders or libraries

3 participants