diff --git a/.changeset/grumpy-moles-grin.md b/.changeset/grumpy-moles-grin.md new file mode 100644 index 00000000000..7b698b4ef25 --- /dev/null +++ b/.changeset/grumpy-moles-grin.md @@ -0,0 +1,7 @@ +--- +'graphql-language-service-server': minor +'vscode-graphql': minor +'vscode-graphql-syntax': minor +--- + +Add Astro file support diff --git a/custom-words.txt b/custom-words.txt index 247e049b8d0..bd07e98533b 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -65,6 +65,7 @@ yoshiakis // packages and tools argparse +astro changesets clsx codemirror diff --git a/packages/vscode-graphql/esbuild.js b/packages/vscode-graphql/esbuild.js index eb9f2bb39d8..37664022815 100644 --- a/packages/vscode-graphql/esbuild.js +++ b/packages/vscode-graphql/esbuild.js @@ -13,8 +13,10 @@ build({ outdir: 'out/', format: 'cjs', sourcemap: true, - // Avoid bundling @vue/compiler-sfc's dynamic dependencies external: [ + // Avoid bundling @astrojs/compiler since esbuild can't handle WASM correctly + '@astrojs/compiler', + // Avoid bundling @vue/compiler-sfc's dynamic dependencies 'squirrelly', 'teacup', 'coffee-script', diff --git a/packages/vscode-graphql/src/apis/statusBar.ts b/packages/vscode-graphql/src/apis/statusBar.ts index 4153d3cd309..1a49c97e1b1 100644 --- a/packages/vscode-graphql/src/apis/statusBar.ts +++ b/packages/vscode-graphql/src/apis/statusBar.ts @@ -62,6 +62,7 @@ const statusBarActivationLanguageIds = [ 'typescriptreact', 'vue', 'svelte', + 'astro', ]; export const createStatusBar = () => { diff --git a/packages/vscode-graphql/src/extension.ts b/packages/vscode-graphql/src/extension.ts index 3e3c2e1369a..9abcff42b71 100644 --- a/packages/vscode-graphql/src/extension.ts +++ b/packages/vscode-graphql/src/extension.ts @@ -59,6 +59,7 @@ export async function activate(context: ExtensionContext) { { scheme: 'file', language: 'typescriptreact' }, { scheme: 'file', language: 'vue' }, { scheme: 'file', language: 'svelte' }, + { scheme: 'file', language: 'astro' }, ], synchronize: { // TODO: This should include any referenced graphql files inside the graphql-config @@ -76,7 +77,7 @@ export async function activate(context: ExtensionContext) { // TODO: load ignore // These ignore node_modules and .git by default workspace.createFileSystemWatcher( - '**/{*.graphql,*.graphqls,*.gql,*.js,*.mjs,*.cjs,*.esm,*.es,*.es6,*.jsx,*.ts,*.tsx,*.vue,*.svelte,*.cts,*.mts,*.json}', + '**/{*.graphql,*.graphqls,*.gql,*.js,*.mjs,*.cjs,*.esm,*.es,*.es6,*.jsx,*.ts,*.tsx,*.vue,*.svelte,*.cts,*.mts,*.json,*.astro}', ), ], },