wip: migrate() should accept newer versions of a document
See https://linear.app/serlo/issue/PE-151/bug-migration-algorithm-does-not-accept-newer-versions
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| frontend | ✅ Ready (Inspect) | Visit Preview | Sep 13, 2024 10:56am |
📦 Next.js Bundle Analysis for @serlo/frontend
This analysis was generated by the Next.js Bundle Analysis action. 🤖
🎉 Global Bundle Size Decreased
| Page | Size (compressed) |
|---|---|
global |
105.21 KB (-1 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Hm, right now function migrate ensures it will return type StorageFormat. Changing it like suggested would mean it can also return other (unknown) types.
The two use cases where I could see this happen:
- Editor version is downgraded but some content in the newer version was already created
- Copy & paste content across platforms where the editor versions do not match
I am not sure it we want to be more strict or loose with the type. But I am leaning more towards being strict and failing early.
keeping branch as reference for the issue but closing PR