6
6
* LICENSE file in the root directory of this source tree.
7
7
*
8
8
*/
9
- import { tmpdir } from 'os' ;
9
+ import { tmpdir } from 'node: os' ;
10
10
import { SymbolKind } from 'vscode-languageserver' ;
11
11
import { FileChangeType } from 'vscode-languageserver-protocol' ;
12
12
import { Position , Range } from 'graphql-language-service' ;
@@ -23,9 +23,9 @@ import { loadConfig } from 'graphql-config';
23
23
import type { DefinitionQueryResult , Outline } from 'graphql-language-service' ;
24
24
25
25
import { Logger } from '../Logger' ;
26
- import { pathToFileURL } from 'url' ;
26
+ import { pathToFileURL } from 'node: url' ;
27
27
28
- jest . mock ( 'fs' , ( ) => ( {
28
+ jest . mock ( 'node: fs' , ( ) => ( {
29
29
...jest . requireActual < typeof import ( 'fs' ) > ( 'fs' ) ,
30
30
readFileSync : jest . fn ( jest . requireActual ( 'fs' ) . readFileSync ) ,
31
31
} ) ) ;
@@ -316,7 +316,8 @@ describe('MessageProcessor', () => {
316
316
} ) ;
317
317
318
318
describe ( 'handleDidOpenOrSaveNotification' , ( ) => {
319
- const mockReadFileSync : jest . Mock = jest . requireMock ( 'fs' ) . readFileSync ;
319
+ const mockReadFileSync : jest . Mock =
320
+ jest . requireMock ( 'node:fs' ) . readFileSync ;
320
321
321
322
beforeEach ( ( ) => {
322
323
mockReadFileSync . mockReturnValue ( '' ) ;
@@ -718,7 +719,8 @@ query Test {
718
719
} ) ;
719
720
720
721
describe ( 'handleWatchedFilesChangedNotification' , ( ) => {
721
- const mockReadFileSync : jest . Mock = jest . requireMock ( 'fs' ) . readFileSync ;
722
+ const mockReadFileSync : jest . Mock =
723
+ jest . requireMock ( 'node:fs' ) . readFileSync ;
722
724
723
725
beforeEach ( ( ) => {
724
726
mockReadFileSync . mockReturnValue ( '' ) ;
@@ -740,7 +742,8 @@ query Test {
740
742
} ) ;
741
743
742
744
describe ( 'handleWatchedFilesChangedNotification without graphql config' , ( ) => {
743
- const mockReadFileSync : jest . Mock = jest . requireMock ( 'fs' ) . readFileSync ;
745
+ const mockReadFileSync : jest . Mock =
746
+ jest . requireMock ( 'node:fs' ) . readFileSync ;
744
747
745
748
beforeEach ( ( ) => {
746
749
mockReadFileSync . mockReturnValue ( '' ) ;
@@ -763,7 +766,8 @@ query Test {
763
766
} ) ;
764
767
765
768
describe ( 'handleDidChangedNotification without graphql config' , ( ) => {
766
- const mockReadFileSync : jest . Mock = jest . requireMock ( 'fs' ) . readFileSync ;
769
+ const mockReadFileSync : jest . Mock =
770
+ jest . requireMock ( 'node:fs' ) . readFileSync ;
767
771
768
772
beforeEach ( ( ) => {
769
773
mockReadFileSync . mockReturnValue ( '' ) ;
0 commit comments