Skip to content

Commit f50d4db

Browse files
fix #7: fs renamed to fsPromises
1 parent 9d6eb53 commit f50d4db

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/juno-node.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isIP } from 'net';
2-
import { promises as fs } from 'fs';
2+
import { promises as fsPromises } from 'fs';
33
import { BaseProtocol } from './protocol/base-protocol';
44
import BaseConnection from './connection/base-connection';
55
import { JsonProtocol } from './protocol/json-protocol';
@@ -36,7 +36,7 @@ export default class JunoModule {
3636
if (isIP(host) && !isNaN(Number(port))) {
3737
return this.fromInetSocket(host, Number(port));
3838
}
39-
if ( (await fs.lstat(socketPath)).isSocket() ) {
39+
if ( (await fsPromises.lstat(socketPath)).isSocket() ) {
4040
return this.fromUnixSocket(socketPath);
4141
}
4242

@@ -49,7 +49,7 @@ export default class JunoModule {
4949
if (process.platform == 'win32') {
5050
throw new Error('Unix sockets are not supported on windows');
5151
}
52-
if ( (await fs.lstat(path)).isSocket() ) {
52+
if ( (await fsPromises.lstat(path)).isSocket() ) {
5353
return new JunoModule(new UnixSocketConnection(path), new JsonProtocol());
5454
}
5555

0 commit comments

Comments
 (0)