sindresorhus / globby

User-friendly glob matching
MIT License
2.53k stars 129 forks source link

Change `isGitIgnoredSync` and `isGitIgnored` #240

Closed fisker closed 1 year ago

fisker commented 1 year ago

Currently isGitIgnoredSync work like this

isGitIgnoredSync({cwd})(file)

and isGitIgnored work like this

(await isGitIgnored({}))(file);

// Note the following doesn't work
await isGitIgnored({})(file);

Let's change them to

isGitIgnoredSync(file, {cwd})

and

await isGitIgnored(file, {cwd});
fisker commented 1 year ago

I'll rethink about this https://github.com/sindresorhus/globby/pull/239#issuecomment-1318099169