Skip to main content

Sync Identity

Sync name, version, description, keywords, 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, valid semver versions, and (for distributable workspaces with the setting enabled) syncs description and keywords from the project-level config.

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) — Must be valid semver. Workspaces with a freezable policy must stay at 0.0.0. Workspaces with a trackable or distributable policy cannot be 0.0.0. Invalid or mismatched versions are reset to 0.0.0 (freezable) or 0.0.1 (all others).
  • description (Conditional) — Removed if the workspace policy is not distributable. For distributable workspaces with the description setting enabled, the value is synced from project.description.short in nova.config.json. If no description is defined, the field is removed.
  • keywords (Conditional) — Removed if the workspace policy is not distributable. For distributable workspaces with the keywords setting enabled, the value is synced from project.keywords in nova.config.json. If no keywords are defined, the field is removed.
  • 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 a LICENSE or LICENSE.md file in the package directory and then the project root. If found, the field is set to SEE LICENSE IN ./path. If no license file is found, the field is set to UNLICENSED.

Settings

Settings are configured per workspace in nova.config.json under the recipes key:

SettingTypeDescription
descriptionbooleanSync the description field (distributable workspaces only).
keywordsbooleanSync the keywords field (distributable workspaces only).

Usage

Options

FlagDescription
-d, --dry-runPreview changes without modifying files.
-r, --replace-fileOverwrite the original file instead of creating a .nova-backup copy.