4.2 KiB
v2.1.0 (Tue Apr 23 2024)
Release Notes
New migrations again (#3220)
BREAKING CHANGES
-
The
Migrations
type is now calledLegacyMigrations
. -
The serialized schema format (e.g. returned by
StoreSchema.serialize()
andStore.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 theRecordVersion
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 callschema.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 thepersistedSchema
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 usingschema.migrateStoreSnapshot
and, if you are building a nuanced sync engine that supports some amount of backwards compatibility, also feel free to useschema.migratePersistedRecord
. -
the
Migration
type has changed. If you need the old one for some reason it has been renamed toLegacyMigration
. It will be removed in a future release. -
the
Migrations
type has been renamed toLegacyMigrations
and will be removed in a future release. -
the
SerializedSchema
type has been augmented. If you need the old version specifically you can useSerializedSchemaV1
Show a broken image for files without assets (#2990)
- Better handling of broken images / videos.
📚 SDK Changes
- New migrations again #3220 (@ds300 @steveruizok)
- use native structuredClone on node, cloudflare workers, and in tests #3166 (@si14)
🏠 Internal
🐛 Bug Fixes
- Show a broken image for files without assets #2990 (@steveruizok)
Authors: 4
- alex (@SomeHats)
- Dan Groshev (@si14)
- David Sheldrick (@ds300)
- Steve Ruiz (@steveruizok)
v2.0.0 (Thu Feb 29 2024)
⚠️ Pushed to main
- updatereadmes (@steveruizok)
📝 Documentation
- Update readmes / docs for 2.0 #3011 (@steveruizok)
Authors: 1
- Steve Ruiz (@steveruizok)
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 totldraw
. You can keep using the old version if you want though!
🏠 Internal
Authors: 1
- alex (@SomeHats)