-
Notifications
You must be signed in to change notification settings - Fork 70
Fixes #221 and #222 - fixes GraphQLCache file globbing #224
Conversation
packages/server/src/GraphQLCache.js
Outdated
@@ -246,9 +242,15 @@ export class GraphQLCache implements GraphQLCacheInterface { | |||
rootDir: string, | |||
includes: string[], | |||
): Promise<Array<GraphQLFileMetadata>> => { | |||
let pattern: string; | |||
if (includes.length === 1) { |
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.
Nit: add link to issue
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.
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.
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.
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.
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.
Ah, no problem. I'll update the PR with a comment.
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.
Would it be possible to add a regression test for this?
I've added tests.
|
See detailed descriptions of issues in #221 and #222.