commonality.json
Commonality Studio is the best way to create and edit tags for packages. Start Studio in any JavaScript project by running:
npx commonality studio
Tooling
Tags can be used to enforce a consistent toolchain for subsets of packages. Examples:- Check that packages with the
buildable
tag havebuild
anddev
scripts. - Check that packages with the
testable
tag have atest
script and avitest.config.ts
file. - Check that packages with the
typed
tag havetypescript
as a devDependency.
Concern
Tags can be used to create a hierarchy of packages based on their concern. Examples:- Enforce that no package can depend on a package with the tag
deployable
. - Enforce that packages with the tag
config
can only depend on packages also with the tagconfig
. - Enforce that a database utility package with the tag
data
cannot depend on packages with the tagui
.
Domain
Tags can be used to create separation between teams or domains working in the same monorepo.- Limit that packages with the tag
marketing
can only depend on packages with the tagmarketing
orshared
.
Workflow
Tags can be used to create workflows like deprecating or creating beta warnings.- Enforce that packages with the tag
high-stability
cannot depend on package with the tagbeta
. - Enforce that no package can depend on a package with the tag
deprecated
.