tldraw/packages/namespaced-tldraw/CHANGELOG.md
2024-04-23 11:47:53 +00:00

4.2 KiB

v2.1.0 (Tue Apr 23 2024)

Release Notes

New migrations again (#3220)

BREAKING CHANGES

  • The Migrations type is now called LegacyMigrations.

  • The serialized schema format (e.g. returned by StoreSchema.serialize() and Store.getSnapshot()) has changed. You don't need to do anything about it unless you were reading data directly from the schema for some reason. In which case it'd be best to avoid that in the future! We have no plans to change the schema format again (this time was traumatic enough) but you never know.

  • compareRecordVersions and the RecordVersion type have both disappeared. There is no replacement. These were public by mistake anyway, so hopefully nobody had been using it.

  • compareSchemas is gone. Comparing the schemas directly is no longer really possible since we introduced some fuzziness. The best thing to do now to check compatibility is to call schema.getMigraitonsSince(prevSchema) and it will return an error if the schemas are not compatible, an empty array if there are no migrations to apply since the prev schema, and a nonempty array otherwise.

    Generally speaking, the best way to check schema compatibility now is to call store.schema.getMigrationsSince(persistedSchema). This will throw an error if there is no upgrade path from the persistedSchema to the current version.

  • defineMigrations has been deprecated and will be removed in a future release. For upgrade instructions see https://tldraw.dev/docs/persistence#Updating-legacy-shape-migrations-defineMigrations

  • migrate has been removed. Nobody should have been using this but if you were you'll need to find an alternative. For migrating tldraw data, you should stick to using schema.migrateStoreSnapshot and, if you are building a nuanced sync engine that supports some amount of backwards compatibility, also feel free to use schema.migratePersistedRecord.

  • the Migration type has changed. If you need the old one for some reason it has been renamed to LegacyMigration. It will be removed in a future release.

  • the Migrations type has been renamed to LegacyMigrations and will be removed in a future release.

  • the SerializedSchema type has been augmented. If you need the old version specifically you can use SerializedSchemaV1

Show a broken image for files without assets (#2990)

  • Better handling of broken images / videos.

📚 SDK Changes

🏠 Internal

🐛 Bug Fixes

Authors: 4


v2.0.0 (Thu Feb 29 2024)

⚠️ Pushed to main

📝 Documentation

Authors: 1


v2.0.0-beta.5 (Thu Feb 29 2024)

Release Notes

tldraw_final_v6_final(old version).docx.pdf (#2998)

  • The @tldraw/tldraw package has been renamed to tldraw. You can keep using the old version if you want though!

🏠 Internal

Authors: 1