five-on-it / packages/shared/src/schema-versions
packages/shared/src/schema-versions
Documents across releases (a game document, a level): each says the version of its format (schemaVersion; 1 when absent, every document made before 0.54), and migrate brings an older one up to the version this code reads a step at a time (the step from version n to n + 1 at index n − 1), so a game published long ago still loads; one of a newer format than this code knows is refused with a SchemaTooNewError that says so, never half read.