TOOLING · COMPLETE
Upgrade and codemods
Turn compiler deprecations into versioned source changes with exact locations, dry-run plans, safe write mode, and no evaluation of application code.
Every migration names the compiler deprecation it resolves. The upgrade registry and compiler guidance therefore share one auditable contract.
Create a plan before writing
npm install -D @coordiation/upgrade
coordiation-upgrade src/App.tsx --from 0.1.0 --to 1.0.0 --jsonThe JSON plan lists changed files, edit counts, migration IDs, line/column positions, and exact before/after text.
Migrate legacy negative syntax
hover:co--mt-4
→ hover:-co-mt-4
ui--translate-x-2
→ -ui-translate-x-2The migration understands stacked variants, important modifiers, and custom prefixes. Canonical source is idempotent: a second run reports no edits.
Gate or apply the upgrade
coordiation-upgrade src/App.tsx --check
coordiation-upgrade src/App.tsx --writeCheck mode fails when migration is required without changing source. Write mode applies only registered safe transforms.
Integrate the migration engine
import { migrateSource, planUpgrade, upgradeManifest } from "@coordiation/upgrade";
const result = migrateSource(source, { prefix: "co-" });
const plan = planUpgrade({ "App.tsx": source });upgradeManifest declares the latest target, registered transforms, supported modes, and owned deprecations.
SAFE BOUNDARIES
Mechanical changes only
Codemods stop where application intent would be required.
- Dynamic templates and concatenated class strings are preserved.
- Class-like prose and unrelated strings are not rewritten.
- Only registered safe transforms run in write mode.
- A migration plan is evidence of edits, not proof that application behavior is correct.
