@saflib/dev-tools
@saflib/dev-tools
Set of utilities for workspace packages.
Interfaces
Interface | Description |
---|---|
MonorepoContext | For tools which need to work across the monorepo. Use buildMonorepoContext to get an instance of this. Package names are used as keys throughout. |
MonorepoPackageDirectories | Absolute paths. |
MonorepoPackageJsons | Raw package.json files. |
PackageJson | Interface of package.json fields which are used in this package. |
WorkspaceDependencyGraph | Lists of direct "@saflib/*" dependencies. |
Functions
Function | Description |
---|---|
buildMonorepoContext | Creates 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. |
getAllPackageWorkspaceDependencies | Returns all direct and transitive "@saflib/*" dependencies for a given package. |
getCurrentPackageName | Finds the name of the package for the current working directory. |