| name | type-tests |
| description | Manage type compatibility tests in the Fluid Framework monorepo. Use when type tests fail, when acknowledging breaking changes, or when preparing type test baselines. Triggers on mentions of type tests, typetests, type validation, type compatibility, backward/forward compat, or validate*Previous.generated.ts. |
Type Test Management
Manage the automated type compatibility testing system in the Fluid Framework monorepo.
Overview
Type tests verify that the current version of a package's types are compatible with the previous released version. This catches accidental breaking changes before they ship.
The system has two phases:
- Prepare (
flub typetests) — updates package.json config and the -previous dev dependency
- Generate (
flub generate typetests) — creates the actual test files
How It Works
Each package has a dev dependency on its own previous version:
"devDependencies": {
"@fluidframework/tree-previous": "npm:@fluidframework/tree@2.83.0"
}
Generated test files import both old (previous) and current types and check assignability in both directions:
import type * as old from "@fluidframework/tree-previous";
import * current ;
current_as_old_for_FieldSchema =
requireAssignableTo<<current.>, <old.>>
old_as_current_for_FieldSchema =
requireAssignableTo<<old.>, <current.>>