Skip to content

Commit

Permalink
Stop exporting new functions and make cwd required
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Aug 9, 2024
1 parent 9839cb6 commit eafdf22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/find-root/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from "path";
import fs from "fs-extra";
import fsp from "fs/promises";

import {
Tool,
Expand Down Expand Up @@ -190,7 +189,7 @@ export function findRootSync(
};
}

export async function findUp(matcher: (directory: string) => Promise<string | undefined>, cwd = process.cwd()) {
async function findUp(matcher: (directory: string) => Promise<string | undefined>, cwd: string) {
let directory = path.resolve(cwd);
const { root } = path.parse(directory);

Expand All @@ -204,7 +203,7 @@ export async function findUp(matcher: (directory: string) => Promise<string | un
}
}

export function findUpSync(matcher: (directory: string) => string | undefined, cwd = process.cwd()) {
function findUpSync(matcher: (directory: string) => string | undefined, cwd: string) {
let directory = path.resolve(cwd);
const { root } = path.parse(directory);

Expand Down

0 comments on commit eafdf22

Please sign in to comment.