Skip to content

Solved issue of traversing into child directories #7

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

Merged
merged 1 commit into from
Oct 8, 2015

Conversation

blakeembrey
Copy link
Member

Read through the node-glob code for a bit and found that the suffix of /** does what we need and excludes the whole directory properly from processing (also works for files!). Might be relevant to everyone implementing tsconfig.json implementations, and not using this module.

Tested by logging before https://github.com/isaacs/node-glob/blob/master/glob.js#L333-L334.

Before:

. false
. false
. false
cwd.ts false
cwd.ts false
excluded false
excluded false
included false
included false
tsconfig.json false
tsconfig.json false
. false
cwd.ts false
cwd.ts false
excluded false
excluded false
included false
included false
tsconfig.json false
tsconfig.json false
excluded false
excluded/foo.ts false
excluded/foo.ts false
excluded false
excluded/foo.ts false
excluded/foo.ts false
included false
included/foo.ts false
included/foo.ts false
included false
included/foo.ts false
included/foo.ts false

After:

. false
. false
. false
cwd.ts true
cwd.ts true
excluded true
excluded true
included false
included false
tsconfig.json false
tsconfig.json false
. false
cwd.ts true
cwd.ts true
excluded true
excluded true
included false
included false
tsconfig.json false
tsconfig.json false
included false
included/foo.ts false
included/foo.ts false
included false
included/foo.ts false
included/foo.ts false

/cc @basarat

Read through the `node-glob` code for a bit and found that the suffix of `/**` does what we need and excludes the whole directory properly from processing. Might be relevant to everyone implementing `tsconfig.json` implementations, and not using this module.
@nycdotnet
Copy link

I haven't looked at this beyond your description, but I'm pleased you've found this result.

@blakeembrey
Copy link
Member Author

@nycdotnet Haha, yeah - I was just about to comment on your other mention about exclude. This might be relevant to you if you're using node-glob.

Reference: TypeStrong/atom-typescript#634

basarat added a commit to TypeStrong/ntypescript that referenced this pull request Oct 7, 2015
@basarat
Copy link
Member

basarat commented Oct 7, 2015

that the suffix of /** does what we need and excludes the whole directory properly from processing (also works for files!)

Phew. Awesome thanks! I'll start sorting out the other places :) 🌹

blakeembrey added a commit that referenced this pull request Oct 8, 2015
Solved issue of traversing into child directories
@blakeembrey blakeembrey merged commit 8e7a2e3 into master Oct 8, 2015
@blakeembrey blakeembrey deleted the exclude-glob-improvement branch October 8, 2015 00:19
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