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

optimisedGlob a full drop-in-replacement of globby #2381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tlouisse
Copy link
Member

@tlouisse tlouisse commented Oct 17, 2024

Make optimisedGlob a full drop-in-replacement of globby by also supporting ignore:string[] option

Copy link

changeset-bot bot commented Oct 17, 2024

🦋 Changeset detected

Latest commit: 87dc93f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
providence-analytics Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tlouisse tlouisse changed the title Merge pull request #2377 from ing-bank/changeset-release/master optimisedGlob a full drop-in-replacement of globby Oct 17, 2024
Copy link
Contributor

@ryubro ryubro left a comment

Choose a reason for hiding this comment

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

I left some comments about possible optimization, but they are optional, of course.

@@ -219,7 +238,12 @@ export async function optimisedGlob(globOrGlobs, providedOptions = {}) {
options.onlyDirectories = true;
}

const globs = Array.isArray(globOrGlobs) ? Array.from(new Set(globOrGlobs)) : [globOrGlobs];
const regularGlobs = Array.isArray(globOrGlobs) ? toUniqueArray(globOrGlobs) : [globOrGlobs];
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to use ensureArray here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, toUniqueArray here seems not necessary as we do it anyway on L246.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. Fixed 👍

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.

2 participants