@townco/core 0.0.44 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/path.d.ts CHANGED
@@ -1,4 +1 @@
1
- export declare const findRoot: ({ dir, rootMarker, }?: {
2
- dir?: string;
3
- rootMarker?: string;
4
- }) => Promise<string>;
1
+ export declare const findRoot: (dir?: string, rootMarker?: string) => Promise<string>;
package/dist/path.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  const ROOT_MARKER = ".root";
4
- export const findRoot = async ({ dir = process.cwd(), rootMarker = ROOT_MARKER, } = {}) => {
4
+ export const findRoot = async (dir = process.cwd(), rootMarker = ROOT_MARKER) => {
5
5
  const rootMarkerPath = path.join(dir, rootMarker);
6
6
  if ((await fs.exists(rootMarkerPath)) &&
7
7
  (await fs.stat(rootMarkerPath).then((stat) => stat.isFile())))
8
8
  return dir;
9
9
  if (dir === "/")
10
10
  throw new Error(`Could not find root directory with marker '${rootMarker}'`);
11
- return await findRoot({ dir: path.dirname(dir), rootMarker });
11
+ return await findRoot(path.dirname(dir), rootMarker);
12
12
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@townco/core",
3
3
  "type": "module",
4
- "version": "0.0.44",
4
+ "version": "0.0.46",
5
5
  "description": "core",
6
6
  "license": "UNLICENSED",
7
7
  "main": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "^5.9.3",
29
- "@townco/tsconfig": "0.1.63"
29
+ "@townco/tsconfig": "0.1.65"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsc",