-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Replace node-glob by fast-glob #69
Conversation
Fantastic 👍 |
gitignore.js
Outdated
@@ -1,12 +1,19 @@ | |||
'use strict'; | |||
const fs = require('fs'); | |||
const path = require('path'); | |||
const glob = require('glob'); | |||
const fg = require('fast-glob'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name it fastGlob
so that it's easier to understand what it is right away.
gitignore.js
Outdated
@@ -72,7 +79,7 @@ const normalizeOpts = opts => { | |||
module.exports = o => { | |||
const opts = normalizeOpts(o); | |||
|
|||
return globP('**/.gitignore', {ignore: opts.ignore, cwd: opts.cwd}) | |||
return fg('**/.gitignore', {ignore: opts.ignore.concat(DEFAULT_IGNORE), cwd: opts.cwd}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to be able to overwrite the default ones? I guess putting DEFAULT_IGNORE
at the end would take precedence over the users?
index.js
Outdated
@@ -1,11 +1,10 @@ | |||
'use strict'; | |||
const arrayUnion = require('array-union'); | |||
const glob = require('glob'); | |||
const pify = require('pify'); | |||
const fg = require('fast-glob'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
@kevva thanks for the review. I made the changes you suggested. |
Also, I think these lines could be removed since |
Yes indeed. Good catch! |
@pvdlg Yay! A new |
yep, I'm on it! |
Per comment