Skip to content

Commit

Permalink
Get workspaces passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristiano Belloni committed Aug 10, 2022
1 parent 17663a8 commit fcc8957
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/modular-scripts/src/utils/getChangedWorkspaces.ts
Original file line number Diff line number Diff line change
@@ -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<WorkspaceContent> {
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
Expand Down

0 comments on commit fcc8957

Please sign in to comment.