.agents/skills/v5-breaking-changes/SKILL.md
Use the central compile-time flag in packages/core/src/v5-flag.ts:
export const ENABLE_V5_BREAKING_CHANGES = false as const;
false as const on the v4/main release line.boolean. Its literal type selects the public TypeScript API as well as runtime behavior.packages/core, import the flag from v5-flag.ts. From another package, use NoReactInternals.ENABLE_V5_BREAKING_CHANGES from remotion/no-react so all packages use the same value.When the v5 release line is cut, changing this one constant to true as const must activate the v5 runtime behavior and public TypeScript API together.
Branch defaults and behavior on the central flag while preserving the existing v4 path:
const effectiveValue =
value ??
(NoReactInternals.ENABLE_V5_BREAKING_CHANGES ? v5Default : v4Default);
An explicit user value should continue to take precedence unless the v5 API intentionally removes that value. Keep runtime validation aligned with the selected public type so JavaScript callers and callers bypassing TypeScript get the v5 behavior too.
For a breaking signature or options change, select the entire incompatible part with a conditional type based on the literal flag:
type VersionedOptions =
typeof NoReactInternals.ENABLE_V5_BREAKING_CHANGES extends true
? V5Options
: V4Options;
The v4 branch must expose the compatible API. The v5 branch must expose only the intended v5 API; do not leave removed fields optional or union both versions together.
Use these existing implementations as references:
packages/renderer/src/v5-required-input-props.ts for required options in v5.packages/renderer/src/open-browser.ts for removing an option from a public type while retaining v4 compatibility.packages/google-fonts/src/base.ts for pairing a conditional public type with runtime enforcement.Add or update the corresponding entry in packages/docs/docs/5-0-migration.mdx. State:
Before finishing, check that:
false as const, v4 runtime behavior and public types remain compatible.true as const selects both the v5 runtime path and v5 public types.Do not commit the flag flipped merely to test v5. Restore it to false as const on the shared v4/main line.
The compatibility branches may be removed after v5 no longer shares its implementation with v4.