ottypes / json0

Version 0 of the JSON OT type
447 stars 64 forks source link

Strict mode flag #41

Open alecgibson opened 3 years ago

alecgibson commented 3 years ago

We recently merged some stricter type checking in https://github.com/ottypes/json0/pull/40

This works well for "greenfield" docs, but anyone already using json0 may experience breakages when rebuilding snapshots from old ops that were submitted before this stricter checking was added (this happens particularly in ShareDB's fetchSnapshot() flow for rebuilding historic snapshots).

We should probably hide these newer features behind an opt-in strict mode flag before deploying a new release. We could then also merge https://github.com/ottypes/json0/pull/23 and hide that feature behind the same flag.