From 227de53cc8151c193d6913e57cac7d9029ccf212 Mon Sep 17 00:00:00 2001 From: traviswimer Date: Mon, 4 Jul 2022 08:55:22 -0400 Subject: [PATCH] Fixes broken unit tests. --- src/callback.ts | 2 +- src/createDirectoryObject.ts | 2 +- src/main.ts | 2 +- src/options/sortByFileOrDir.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/callback.ts b/src/callback.ts index 0d19380..abaa229 100644 --- a/src/callback.ts +++ b/src/callback.ts @@ -1,4 +1,4 @@ -import dirToJson from "./main.js"; +import dirToJson from "./main"; import { Options } from "./createDirectoryObject.js"; export const INVALID_CALLBACK_ERROR = `The "dir-to-json/callback" module requires a valid callback function`; diff --git a/src/createDirectoryObject.ts b/src/createDirectoryObject.ts index f08ec0f..45fd584 100644 --- a/src/createDirectoryObject.ts +++ b/src/createDirectoryObject.ts @@ -1,6 +1,6 @@ import fs from "fs/promises"; import path from "path"; -import sortByFileOrDir from "./options/sortByFileOrDir.js"; +import sortByFileOrDir from "./options/sortByFileOrDir"; export interface Options { sortType?: boolean; diff --git a/src/main.ts b/src/main.ts index 13235ff..009e39e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -import createDirectoryObject, { Options } from "./createDirectoryObject.js"; +import createDirectoryObject, { Options } from "./createDirectoryObject"; export const INVALID_PATH_ERROR = `"path" parameter must be a string`; export const INVALID_OPTIONS_ERROR = `"options" parameter must be an object`; diff --git a/src/options/sortByFileOrDir.ts b/src/options/sortByFileOrDir.ts index 800cab8..5f5d888 100644 --- a/src/options/sortByFileOrDir.ts +++ b/src/options/sortByFileOrDir.ts @@ -1,4 +1,4 @@ -import { FileInfo } from "../createDirectoryObject.js"; +import { FileInfo } from "../createDirectoryObject"; export default function sortByFileOrDir(childrenArray: FileInfo[]) { // Move directories to the beginning of the array