Skip to content

Commit aa64eb6

Browse files
committed
Fix monorepo root detection for installed package case
1 parent cf8bf65 commit aa64eb6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/dev-cli/src/utils/getClerkPackages.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { readFile } from 'node:fs/promises';
2-
import { dirname, join, posix, resolve } from 'node:path';
2+
import { dirname, posix } from 'node:path';
33

44
import { globby } from 'globby';
55

6+
import { getMonorepoRoot } from './getMonorepoRoot.js';
7+
68
/**
79
* Generates an object with keys of package names and values of absolute paths to the package folder.
810
* @returns {Promise<Record<string, string>>}
911
*/
1012
export async function getClerkPackages() {
11-
const monorepoRoot = resolve(join(import.meta.dirname, '..', '..', '..', '..'));
13+
const monorepoRoot = await getMonorepoRoot();
1214
/** @type {Record<string, string>} */
1315
const packages = {};
1416
const clerkPackages = await globby([posix.join(monorepoRoot, 'packages', '*', 'package.json'), '!*node_modules*']);

0 commit comments

Comments
 (0)