Skip to main content

Cleanup

Remove unsupported keys and reorder remaining keys in workspace package.json files.

Summary

The cleanup recipe finalizes each workspace's package.json by removing keys that are not in the known set of npm, Node.js, Corepack, or bundler fields and reordering remaining keys to a canonical order. Behavior is controlled per-workspace via recipe settings in nova.config.json.

Recipe Settings

SettingDefaultDescription
removeUnknownKeystrueRemove keys not recognized by npm, Node.js, Corepack, or bundlers.
reorderKeystrueReorder keys to a canonical sort order.

Usage

nova recipe package-json cleanup [options]

Options

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

Unsupported Keys

During cleanup, this recipe removes any package.json keys that are not in the known set of npm, Node.js, Corepack, or bundler fields. Disable this behavior per-workspace by setting removeUnknownKeys to false in the recipe settings.