Skip to content

Commit ec08bb7

Browse files
committed
fix: fs import for mock-fs
`mock-fs` uses `process.binding('fs')`, so it cannot support mocking the `node:fs` import alias it seems. this should fix test failures in CI (for node 22 at least)
1 parent 574b0fd commit ec08bb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* LICENSE file in the root directory of this source tree.
77
*
88
*/
9-
10-
import { existsSync, mkdirSync } from 'node:fs';
9+
// do not change to node:fs import, or it will break mock-fs
10+
import { existsSync, mkdirSync } from 'fs';
1111
import { mkdir, readFile, writeFile } from 'node:fs/promises';
1212
import * as path from 'node:path';
1313
import { URI } from 'vscode-uri';

0 commit comments

Comments
 (0)