Skip to content

Commit 479203c

Browse files
committed
fix: env, timeout
1 parent 2d1cbbb commit 479203c

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

packages/graphql-language-service-server/src/MessageProcessor.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,18 @@ export class MessageProcessor {
203203
const vscodeSettings = await this._connection.workspace.getConfiguration({
204204
section: 'vscode-graphql',
205205
});
206-
if (settings?.dotEnvPath) {
207-
require('dotenv').config({ path: settings.dotEnvPath });
208-
}
206+
209207
// TODO: eventually we will instantiate an instance of this per workspace,
210208
// so rootDir should become that workspace's rootDir
211209
this._settings = { ...settings, ...vscodeSettings };
212210
const rootDir = this._settings?.load?.rootDir.length
213211
? this._settings?.load?.rootDir
214212
: this._rootPath;
213+
if (settings?.dotEnvPath) {
214+
require('dotenv').config({
215+
path: path.resolve(rootDir, settings.dotEnvPath),
216+
});
217+
}
215218
this._rootPath = rootDir;
216219
this._loadConfigOptions = {
217220
...Object.keys(this._settings?.load ?? {}).reduce((agg, key) => {

packages/graphql-language-service-server/src/__tests__/MessageProcessor.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { parseDocument } from '../parseDocument';
1818

1919
jest.mock('../Logger');
2020

21+
jest.setTimeout(20000);
22+
2123
import { GraphQLCache } from '../GraphQLCache';
2224

2325
import {

packages/vscode-graphql/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vscode-graphql",
3-
"version": "0.9.3",
3+
"version": "0.10.1",
44
"private": true,
55
"license": "MIT",
66
"displayName": "GraphQL: Language Feature Support",
@@ -161,7 +161,7 @@
161161
"vsce:package": "vsce package --yarn",
162162
"env:source": "export $(cat .envrc | xargs)",
163163
"vsce:publish": "vsce publish --yarn",
164-
"open-vsx:publish": "ovsx publish --extensionFile $(ls -1 *.vsix | tail -n 1) --pat $OVSX_PAT",
164+
"open-vsx:publish": "ovsx publish $(ls -1 *.vsix | tail -n 1) --pat $OVSX_PAT",
165165
"release": "npm run vsce:publish && npm run open-vsx:publish"
166166
},
167167
"devDependencies": {

0 commit comments

Comments
 (0)