From fcc89578ac0557c1f1444875dac56e506475d616 Mon Sep 17 00:00:00 2001 From: Cristiano Belloni Date: Wed, 10 Aug 2022 10:03:37 +0100 Subject: [PATCH] Get workspaces passed in --- packages/modular-scripts/src/utils/getChangedWorkspaces.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/modular-scripts/src/utils/getChangedWorkspaces.ts b/packages/modular-scripts/src/utils/getChangedWorkspaces.ts index 760be05a5..c7fcf7c70 100644 --- a/packages/modular-scripts/src/utils/getChangedWorkspaces.ts +++ b/packages/modular-scripts/src/utils/getChangedWorkspaces.ts @@ -1,16 +1,15 @@ import path from 'path'; import pkgUp from 'pkg-up'; import { getDiffedFiles } from './gitActions'; -import { getAllWorkspaces } from './getAllWorkspaces'; import getModularRoot from './getModularRoot'; import type { WorkspaceContent } from './getAllWorkspaces'; // Gets a list of changed files, then maps them to their workspace and returns a subset of WorkspaceContent export async function getChangedWorkspaces( + workspaceContent: WorkspaceContent, targetBranch: string, ): Promise { const diffedFiles = getDiffedFiles(targetBranch); - const workspaceContent = await getAllWorkspaces(); const modularRoot = getModularRoot(); // Resolve each of the changed files to their nearest package.json. The resulting list can contain duplicates and null holes