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 studioTooling
Tags can be used to enforce a consistent toolchain for subsets of packages. Examples:- Check that packages with the
buildabletag havebuildanddevscripts. - Check that packages with the
testabletag have atestscript and avitest.config.tsfile. - Check that packages with the
typedtag havetypescriptas 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
configcan only depend on packages also with the tagconfig. - Enforce that a database utility package with the tag
datacannot 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
marketingcan only depend on packages with the tagmarketingorshared.
Workflow
Tags can be used to create workflows like deprecating or creating beta warnings.- Enforce that packages with the tag
high-stabilitycannot depend on package with the tagbeta. - Enforce that no package can depend on a package with the tag
deprecated.