Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/sessions / migrations
migrations
Migration registry for the JSONL session-export schema. v0.1 ships MAJOR 1 only; the registry exists so future MAJOR bumps can plug a migrator in without forking this package.
Each migrator is a pure function that takes the parsed records of a MAJOR N file and returns the parsed records as MAJOR N+1. The runtime CLI (graphorin migrate-export <input> --to-schema 2.0) walks the chain.
Interfaces
| Interface | Description |
|---|---|
| ExportMigrator | Migrator entry. Both sides of the version pair are 'MAJOR.MINOR' strings. |
Functions
| Function | Description |
|---|---|
| _resetExportMigratorsForTesting | Reset the registry. Test-only. |
| listExportMigrators | Snapshot of the registry. Sorted by fromVersion. |
| migrateExport | Walk the registered migrators to advance records from fromVersion to toVersion. Throws when no chain exists. |
| registerExportMigrator | Register a migrator. Idempotent on the (fromVersion, toVersion) pair — re-registering replaces the prior entry. |