Strata · API
createUpgrader
createUpgrader takes every grammar sequence the code supports and a transform function that evaluates a step’s transform, and returns { stamp, upgrade, locate, behind }. Strata does not depend on Prism: the evaluator is passed in as the transform option. stamp has one version per grammar, equal to the number of migrations in that grammar.
await createUpgrader([NOVA_SEQUENCE, PRISM_SEQUENCE, KIT], { transform: evaluate }){
id: 'theatre.kit',
migrations: [
'Button: label is now text',
'Button: tone is now variant',
'Card is now Tile',
],
}{ nisc.nova: 2, nisc.prism: 3, theatre.kit: 3 }Runs in this page on the installed package. The input and the expected output are defined by the example.