Sync Identity
Sync name, version, description, keywords, displayName, and license fields in workspace package.json files.
Summary
The sync-identity recipe ensures that identity-related fields in each workspace's package.json match the conventions defined in nova.config.json.
It enforces consistent naming, versions that match the project's configured SemVer or CalVer strategy, and (for distributable workspaces with the setting enabled) syncs description, keywords, and displayName from the project-level config.
Why Use This Command?
- Keeps package names, versions, licenses, and public identity aligned with workspace policy.
- Shares approved project descriptions and keywords without duplicating them across manifests.
- Removes identity fields from workspaces where publishing policy says they do not apply.
Requirements
- Node.js runtime — Use a supported Node.js LTS release with the Nova CLI available.
- Project config — Register the workspace and enable
recipes.package-json.<workspace>.sync-identityinnova.config.json. - Workspace manifest — The configured workspace must contain a readable
package.jsonfile.
Behavior
For each eligible workspace, the recipe inspects identity fields and applies the following rules. See Workspace Rules for how tags are determined.
name(Required) — Synced from the workspace manifest name. If the value is not a string or does not match the manifest, it is overwritten.version(Required) — Afreezableworkspace must use the reserved0.0.0sentinel. Atrackableordistributableworkspace must use a non-zero clean numeric SemVer whensettings.versionStrategyis"semver", orYYYY.M.MICROno later than the current UTC month when it is"calver". Before release history exists, the recipe normalizes an invalid value to0.0.1for SemVer or the current UTCYYYY.M.0period for CalVer. Once release history exists, an invalid established version stops the recipe without writing manifests.description(Conditional) — Removed if the workspace policy is notdistributable. For distributable workspaces with thedescriptionsetting enabled, the value is synced fromproject.description.shortinnova.config.json. If no description is defined, the field is removed.keywords(Conditional) — Removed if the workspace policy is notdistributable. For distributable workspaces with thekeywordssetting enabled, the value is synced fromproject.keywordsinnova.config.json. If no keywords are defined, the field is removed.displayName(Conditional) — Removed if the workspace policy is notdistributable. For distributable workspaces with thedisplayNamesetting enabled, the value is synced fromproject.name.titleinnova.config.json; if the setting is absent, false, or no title is defined, the field is removed. It is an ecosystem field read by Homebridge plugins and VS Code extensions, not part of the npmpackage.jsonspecification.license(Required) — Validated against the SPDX license list. If the value is not a string or not a recognized SPDX identifier, the recipe searches for aLICENSEorLICENSE.mdfile in the package directory and then the project root. If found, the field is set toSEE LICENSE IN ./path. If no license file is found, the field is set toUNLICENSED.
Settings
Settings are configured per workspace in nova.config.json under the recipes key:
| Setting | Type | Description |
|---|---|---|
description | boolean | Sync the description field (distributable workspaces only). |
keywords | boolean | Sync the keywords field (distributable workspaces only). |
displayName | boolean | Sync the displayName field from project.name.title (distributable workspaces only). |
displayName is an ecosystem field read by tools like Homebridge plugins and VS Code extensions — it is not part of the npm package.json spec. Leaving the setting off (or unset) actively removes an existing displayName value rather than leaving it untouched.
Usage
Options
| Flag | Description |
|---|---|
-d, --dry-run | Run without writing any files. |
-r, --replace-file | Overwrite the original file instead of creating a .nova-backup copy. |