From c9722241f8c615748ad312bd24e9c77fb01396c1 Mon Sep 17 00:00:00 2001 From: Ovais Tariq Date: Tue, 9 May 2023 15:59:45 -0700 Subject: [PATCH] fix: Don't use node: style imports (#358) --- .eslintrc.json | 1 + src/__tests__/utils.ts | 2 +- src/consumables/iterable-stream.ts | 2 +- src/utils/env-loader.ts | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e3da1a4..9bc3365 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -29,6 +29,7 @@ "unused-imports/no-unused-imports": "error", "quotes": "off", "unicorn/expiring-todo-comments": "off", + "unicorn/prefer-node-protocol": "off", "@typescript-eslint/quotes": ["error"], "tsdoc/syntax": "error" }, diff --git a/src/__tests__/utils.ts b/src/__tests__/utils.ts index 0223667..5b10f40 100644 --- a/src/__tests__/utils.ts +++ b/src/__tests__/utils.ts @@ -1,5 +1,5 @@ import { Utility } from "../utility"; -import fs from "node:fs"; +import * as fs from "fs"; export function readJSONFileAsObj(filePath: string): string { return Utility.objToJsonString( diff --git a/src/consumables/iterable-stream.ts b/src/consumables/iterable-stream.ts index 0db38db..fbdef9b 100644 --- a/src/consumables/iterable-stream.ts +++ b/src/consumables/iterable-stream.ts @@ -1,7 +1,7 @@ import * as proto from "google-protobuf"; import { ClientReadableStream } from "@grpc/grpc-js"; import { CursorInUseError } from "../error"; -import { Readable } from "node:stream"; +import { Readable } from "stream"; /** @internal */ export interface Initializer { diff --git a/src/utils/env-loader.ts b/src/utils/env-loader.ts index f814da2..7356054 100644 --- a/src/utils/env-loader.ts +++ b/src/utils/env-loader.ts @@ -1,7 +1,7 @@ import appRootPath from "app-root-path"; import * as dotenv from "dotenv"; -import path from "node:path"; -import fs from "node:fs"; +import path from "path"; +import * as fs from "fs"; import { Log } from "./logger"; /**