import { readJson } from 'fs-extra' ; import getPathToTargetWorkspaceRootDirFromCLIArgs from './getPathToTargetWorkspaceRootDirFromCLIArgs' ; import { TGetTargetWorkspaceRootPackageJsonConfigContent } from '../../types' ; /**
 * Find and read JSON content of ROOT package.json file in the target workspace directory.
 */ const getTargetWorkspaceRootPackageJsonConfigContent = async ( ) => { const pathToTargetWorkspaceDir = getPathToTargetWorkspaceRootDirFromCLIArgs ( ) ; const pathToTargetRootPackageJsonConfig = `${ pathToTargetWorkspaceDir }/package.json` ; const targetWorkspaceRootPackageJsonConfigContent = ( await readJson ( pathToTargetRootPackageJsonConfig ) ) as Record < string , any > ; return targetWorkspaceRootPackageJsonConfigContent ; } ; export default getTargetWorkspaceRootPackageJsonConfigContent ;