Skip to content

@saflib/monorepo


src/workspace ​

Interfaces ​

InterfaceDescription
MonorepoContextFor tools which need to work across the monorepo. Use buildMonorepoContext to get an instance of this. Package names are used as keys throughout.
MonorepoPackageDirectoriesAbsolute paths.
MonorepoPackageJsonsRaw package.json files.
PackageJsonInterface of package.json fields which are used in workspace discovery.
WorkspaceDependencyGraphLists of direct "@saflib/*" dependencies.

Type Aliases ​

Type AliasDescription
directoryPath-
packageName-

Functions ​

FunctionDescription
buildMonorepoContextCreates a MonorepoContext. If no rootdir is provided, it will find the first parent directory with a package-lock.json and use that as the root, effectively returning "this" package's monorepo context.
buildWorkspaceDependencyGraphNot for public use.
findPackagesWithDockerfileTemplatesNot for public use.
getAllPackageWorkspaceDependenciesReturns all direct and transitive "@saflib/*" dependencies for a given package.
getCurrentPackageNameFinds the name of the package for the current working directory.
getMonorepoPackagesNot for public use. Helper function for buildMonorepoContext.