From 6fa935549fb394996a973da6f8d4501db1d90b6b Mon Sep 17 00:00:00 2001 From: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> Date: Sat, 15 Feb 2025 20:01:08 +0900 Subject: [PATCH 1/2] feat: enhance GraphQL Config files --- src/core/icons/fileIcons.ts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/core/icons/fileIcons.ts b/src/core/icons/fileIcons.ts index f5e926c587..2664405732 100644 --- a/src/core/icons/fileIcons.ts +++ b/src/core/icons/fileIcons.ts @@ -880,7 +880,30 @@ export const fileIcons: FileIcons = { { name: 'graphql', fileExtensions: ['graphql', 'gql'], - fileNames: ['.graphqlconfig'], + fileNames: [ + '.graphqlconfig', + 'graphql.config.ts', + 'graphql.config.cts', + 'graphql.config.mts', + 'graphql.config.js', + 'graphql.config.cjs', + 'graphql.config.mjs', + 'graphql.config.json', + 'graphql.config.yaml', + 'graphql.config.yml', + 'graphql.config.toml', + '.graphqlrc', + '.graphqlrc.ts', + '.graphqlrc.cts', + '.graphqlrc.mts', + '.graphqlrc.js', + '.graphqlrc.cjs', + '.graphqlrc.mjs', + '.graphqlrc.json', + '.graphqlrc.yml', + '.graphqlrc.yaml', + '.graphqlrc.toml', + ], patterns: { graphql: FileNamePattern.Ecmascript, }, From 357c628c387082cab5c715d8f570e4891ee3de94 Mon Sep 17 00:00:00 2001 From: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> Date: Mon, 17 Feb 2025 23:32:47 +0900 Subject: [PATCH 2/2] refactor: switch pattern to `Cosmiconfig` --- src/core/icons/fileIcons.ts | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/core/icons/fileIcons.ts b/src/core/icons/fileIcons.ts index 2664405732..e2d3124f58 100644 --- a/src/core/icons/fileIcons.ts +++ b/src/core/icons/fileIcons.ts @@ -880,32 +880,9 @@ export const fileIcons: FileIcons = { { name: 'graphql', fileExtensions: ['graphql', 'gql'], - fileNames: [ - '.graphqlconfig', - 'graphql.config.ts', - 'graphql.config.cts', - 'graphql.config.mts', - 'graphql.config.js', - 'graphql.config.cjs', - 'graphql.config.mjs', - 'graphql.config.json', - 'graphql.config.yaml', - 'graphql.config.yml', - 'graphql.config.toml', - '.graphqlrc', - '.graphqlrc.ts', - '.graphqlrc.cts', - '.graphqlrc.mts', - '.graphqlrc.js', - '.graphqlrc.cjs', - '.graphqlrc.mjs', - '.graphqlrc.json', - '.graphqlrc.yml', - '.graphqlrc.yaml', - '.graphqlrc.toml', - ], + fileNames: ['.graphqlconfig'], patterns: { - graphql: FileNamePattern.Ecmascript, + graphql: FileNamePattern.Cosmiconfig, }, }, { name: 'rust', fileExtensions: ['rs', 'ron'] },