Skip to content

Commit d8d752c

Browse files
authored
fix(dev-cli): Use configured monorepo root when calculating Clerk packages (#3856)
1 parent baae376 commit d8d752c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/wicked-pianos-argue.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/dev-cli": patch
3+
---
4+
5+
Use configured monorepo root when calculating Clerk packages

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)