Normalize Bundler
Normalize types, module, sideEffects, and esnext bundler convention fields in workspace package.json files.
Summary
The normalize-bundler recipe handles unofficial bundler convention fields in each workspace's package.json.
It merges the deprecated typings field into types, and normalizes module, sideEffects, and esnext fields according to common bundler expectations.
Why Use This Command?
- Keeps bundler convention fields aligned with workspace roles that can actually use them.
- Merges the legacy
typingsfield safely intotypesso declarations have one source. - Removes empty or inapplicable fields before they confuse package consumers and tooling.
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>.normalize-bundlerinnova.config.json. - Workspace manifest — The configured workspace must contain a readable
package.jsonfile.
Behavior
For each eligible workspace, the recipe inspects bundler convention fields and applies the following rules. See Workspace Rules for how tags are determined.
typings→typesmerge (Conditional) — If both fields exist, the existingtypesvalue is kept andtypingsis deleted. If onlytypingsexists, it is renamed totypes.types(Conditional) — Removed if the workspace role does not allow it (onlyconfig,package, andtoolroles retain this field).module(Conditional) — Removed if the workspace role does not allow it (onlyconfig,package, andtoolroles retain this field).sideEffects(Conditional) — Removed if the workspace role does not allow it (onlypackageroles retain this field).esnext(Conditional) — Removed if the workspace role does not allow it (onlypackageroles retain this field).
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. |