What problem does it solve?
Maintaining a single codebase that supports both Remotion v4 and v5 release lines requires a mechanism to switch runtime behavior and public TypeScript APIs without forking the repository. This Skill defines the central compile-time flag pattern that gates v5 changes while keeping v4 fully compatible on the shared main branch.
Core Features & Use Cases
- Central Flag Management: Use the literal
ENABLE_V5_BREAKING_CHANGES constant in packages/core/src/v5-flag.ts as the single switch for all v5 transitions.
- Runtime Gating: Branch defaults and behavior on the flag while preserving explicit user values and v4 fallback paths.
- Public Type Gating: Select incompatible TypeScript signatures using conditional types tied to the flag's literal type.
- Migration Documentation: Update
packages/docs/docs/5-0-migration.mdx with every user-facing break, including v4 behavior, v5 change, and migration steps.
- Use Case: When introducing a new required option in the renderer package, gate the option behind the flag, expose a conditional
V5Options type, and document the migration so flipping one constant activates both the runtime and type changes.
Quick Start
Review the proposed Remotion 5 breaking change, gate its runtime behavior and public TypeScript API behind the central ENABLE_V5_BREAKING_CHANGES flag, and add a migration entry to the v5 migration guide.