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

Replace node-glob by fast-glob #69

Merged
merged 4 commits into from
Feb 13, 2018
Merged

Conversation

pvdlg
Copy link
Contributor

@pvdlg pvdlg commented Feb 11, 2018

Per comment

@pvdlg pvdlg requested a review from sindresorhus February 11, 2018 20:38
@kevva
Copy link
Contributor

kevva commented Feb 12, 2018

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');
Copy link
Contributor

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})
Copy link
Contributor

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');
Copy link
Contributor

Choose a reason for hiding this comment

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

See comment above.

@pvdlg
Copy link
Contributor Author

pvdlg commented Feb 12, 2018

@kevva thanks for the review. I made the changes you suggested.

@kevva
Copy link
Contributor

kevva commented Feb 12, 2018

Also, I think these lines could be removed since fast-glob doesn't seem to support them.

@pvdlg
Copy link
Contributor Author

pvdlg commented Feb 12, 2018

Yes indeed. Good catch!

@sindresorhus sindresorhus merged commit ba08350 into sindresorhus:master Feb 13, 2018
@pvdlg pvdlg deleted the fast-glob branch February 13, 2018 04:12
@sindresorhus
Copy link
Owner

@pvdlg Yay! A new globby version is out. Would you be able to update globby in XO?

@pvdlg
Copy link
Contributor Author

pvdlg commented Feb 13, 2018

yep, I'm on it!

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