Skip to content

Commit

Permalink
explicit order instead of object.keys
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 3, 2025
1 parent 0d7d281 commit 5f15c31
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/packagejson/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ export async function findWorkspaceDir(
} = {},
): Promise<string> {
const startingFrom = _resolvePath(id, options);
const tests =
options.order || (Object.keys(workspaceTests) as WorkspaceTestName[]);
const tests: WorkspaceTestName[] = options.order || [
"workspaceFile",
"gitConfig",
"lockFile",
"packageJson",
];
for (const testName of tests) {
const test = workspaceTests[testName];
if (options[testName] === false || !test) {
Expand Down

0 comments on commit 5f15c31

Please sign in to comment.