UNPKG

@nxworker/workspace

Version:

Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports

19 lines (18 loc) 1.17 kB
import { Tree, ProjectConfiguration, ProjectGraph } from '@nx/devkit'; /** * Updates import paths in all projects that depend on the source project * * @param tree - The virtual file system tree. * @param projectGraph - The project graph. * @param projects - Map of all projects. * @param sourceProjectName - Name of the source project. * @param sourceImportPath - Import path to the source. * @param targetImportPath - Import path to the target. * @param target - Optional target project information. * @param getCachedDependentProjectsFn - Function to get dependent projects. * @param getProjectSourceFilesFn - Function to get project source files. */ export declare function updateImportPathsInDependentProjects(tree: Tree, projectGraph: ProjectGraph, projects: Map<string, ProjectConfiguration>, sourceProjectName: string, sourceImportPath: string, targetImportPath: string, target: { targetProjectName?: string; targetRelativePath?: string; } | undefined, getCachedDependentProjectsFn: (projectGraph: ProjectGraph, projectName: string) => Set<string>, getProjectSourceFilesFn: (tree: Tree, projectRoot: string) => string[]): Promise<void>;