Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pack): handle excluding from included parent directory #4317

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Apr 2, 2022

What's the problem this PR addresses?

Using the files field in package.json to include a directory but exclude files in said directory doesn't work.

How did you fix it?

Differentiate between "no match" and "negated match" in the isIgnored check.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

}
}
}

return false;
}

function isMatch(path: string, patterns: Array<string>) {
function matchPatternType(path: string, patterns: Array<string>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nite: rename to getMatchPatternType (similar to other functions which have verb prior to action, like isMatch or isMatchBasename or isIgnore)?

Suggested change
function matchPatternType(path: string, patterns: Array<string>) {
function getMatchPatternType(path: string, patterns: Array<string>) {

@arcanis arcanis merged commit 2efb4d4 into master Apr 6, 2022
@arcanis arcanis deleted the merceyz/fix/files-field-nested branch April 6, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants