Skip to content
This repository was archived by the owner on Sep 2, 2020. It is now read-only.

Fixes #221 and #222 - fixes GraphQLCache file globbing #224

Merged
merged 4 commits into from
Apr 12, 2018

Conversation

mgadda
Copy link
Collaborator

@mgadda mgadda commented Apr 11, 2018

See detailed descriptions of issues in #221 and #222.

@mgadda mgadda requested review from lostplan and asiandrummer April 11, 2018 03:21
@@ -246,9 +242,15 @@ export class GraphQLCache implements GraphQLCacheInterface {
rootDir: string,
includes: string[],
): Promise<Array<GraphQLFileMetadata>> => {
let pattern: string;
if (includes.length === 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: add link to issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think it's a bug. It sort of depends on which implementation of globs you look at. Some of them (fish shell) expanded a{p}e into ape and others (bash, sh, minimatch) leave a{p}e as is. My guess is that minimatch is modeled after bash and filing a ticket will be fruitless.

Copy link
Collaborator

@lostplan lostplan Apr 11, 2018

Choose a reason for hiding this comment

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

I just mean we should add a note-to-self about why length === 1 is special cased (i.e. a link to #221). To prevent future engineers from cleaning up this code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, no problem. I'll update the PR with a comment.

Copy link
Collaborator

@lostplan lostplan left a comment

Choose a reason for hiding this comment

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

Would it be possible to add a regression test for this?

@mgadda
Copy link
Collaborator Author

mgadda commented Apr 11, 2018 via email

@mgadda mgadda merged commit 55b4380 into graphql:master Apr 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants