Commit Graph

39 Commits

Author SHA1 Message Date
LongYinan 3499dbbb7f feat: upgrade dependencies and lockfile (#5016)
- Close https://github.com/toeverything/AFFiNE/security/dependabot/47
2023-11-23 05:18:05 +00:00
Joooye_34 4c8d54b3a7 refactor(core): use manual upgrade to replace auto migration when web setup (#5022)
1. Split logic in `packages/common/infra/src/blocksuite/index.ts` to multiple single files
2. Move migration logic from setup to upgrade module, to prevent auto migration problems and loading problem
2023-11-23 02:26:06 +00:00
Flrande d7d47853fe chore: bump blocksuite (#5030) 2023-11-22 20:51:35 +08:00
Flrande a3d880daa3 chore: bump blocksuite (#5026) 2023-11-22 20:12:52 +08:00
李华桥 00c11d40cf v0.10.3-canary.0 2023-11-21 10:02:46 +08:00
李华桥 0f6b28fd06 c0.11.0-canary.0 2023-11-20 23:53:50 +08:00
Flrande 8b2c3d4c41 chore: bump blocksuite (#4958) 2023-11-16 22:01:03 +08:00
Peng Xiao 16488d594c fix(infra): compatibility fix for space prefix (#4912)
It seems there are some cases that [this upstream PR](https://github.com/toeverything/blocksuite/pull/4747) will cause data loss.

Because of some historical reasons, the page id could be different with its doc id.
It might be caused by subdoc migration in the following (not 100% sure if all white screen issue is caused by it) https://github.com/toeverything/AFFiNE/blob/0714c12703ff8840acc180633e5489c755ddfba3/packages/common/infra/src/blocksuite/index.ts#L538-L540

In version 0.10, page id in spaces no longer has prefix "space:"
The data flow for fetching a doc's updates is:
- page id in `meta.pages` -> find `${page-id}` in `doc.spaces` -> `doc` -> `doc.guid`
if `doc` is not found in `doc.spaces`, a new doc will be created and its `doc.guid` is the same with its pageId
- because of guid logic change, the doc that previously prefixed with `space:` will not be found in `doc.spaces`
- when fetching the rows of this doc using the doc id === page id,
  it will return EMPTY since there is no updates associated with the page id

The provided fix in the PR will patch the `spaces` field of the root doc so that after 0.10 the page doc can still be found in the `spaces` map. It shall apply to both of the idb & sqlite datasources.

Special thanks to @lawvs 's db file for investigation!
2023-11-14 14:39:50 +08:00
Whitewater eded501123 fix: get page preview based on block order (#4888)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-11-12 15:09:57 +00:00
Joooye_34 30bac7dce2 ci(core): eslint errors for core (#4662) 2023-11-10 10:25:59 +00:00
Yifeng Wang 2117d6b232 chore: bump blocksuite (#4901) 2023-11-10 13:23:29 +08:00
李华桥 5c48c83301 v0.10.0 2023-11-10 11:42:04 +08:00
李华桥 063f5a683e v0.10.0-canary.16 2023-11-10 10:10:54 +08:00
Peng Xiao fd74776abe fix(core): disable sync doc/blob on start (#4897) 2023-11-09 18:00:53 +00:00
李华桥 075eead9fa v0.10.0-canary.15 2023-11-09 23:27:12 +08:00
liuyi f9654bb1f8 feat(core): unify all new created page IDs to nanoid (#4884) 2023-11-09 09:22:02 +00:00
EYHN e3e0553c56 fix(hooks): missing page preview and references (#4863) 2023-11-09 08:59:36 +00:00
Peng Xiao 442115632b chore(component): bump bs (#4880) 2023-11-09 04:47:10 +00:00
Joooye_34 744cd47481 v0.10.0-canary.14 2023-11-08 15:36:54 +08:00
Hongtao Lye 12c72e63b1 chore: bump blocksuite version (#4862) 2023-11-08 07:12:48 +00:00
Joooye_34 f50b8002b3 v0.10.0-canary.13 2023-11-07 09:55:30 +08:00
Joooye_34 8554d5d791 v0.10.0-canary.12 2023-11-07 00:13:51 +08:00
Joooye_34 3b74ff2b92 v0.10.0-canary.11 2023-11-06 18:10:28 +08:00
JimmFly 9664d142ad feat(core): temporary expansion files are limited to 100M (#4833) 2023-11-06 06:38:46 +00:00
Peng Xiao 7e381e830a perf(core): load all pages after 10s (#4834) 2023-11-03 09:42:29 +00:00
Joooye_34 fb0aaabe53 v0.10.0-canary.10 2023-11-02 23:40:34 +08:00
Hongtao Lye 15024c6c8a chore: bump blocksuite (#4801) 2023-11-02 09:12:23 +00:00
Joooye_34 75c8dd75e3 v0.10.0-canary.9 2023-11-01 22:03:47 +08:00
Joooye_34 0273ea8b00 v0.10.0-canary.8 2023-11-01 00:03:04 +08:00
Peng Xiao f08408ebe5 fix(core): possible crash issues (#4783) 2023-10-31 08:56:14 +00:00
Joooye_34 563863005f v0.10.0-canary.6 2023-10-31 14:40:47 +08:00
Joooye_34 37ec552f74 v0.10.0-canary.5 2023-10-31 11:54:25 +08:00
Joooye_34 17afe218fe v0.10.0-canary.4 2023-10-31 01:49:15 +08:00
3720 ef8024c657 feat: new collections (#4530)
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
2023-10-27 09:06:59 +00:00
joooye34 559ec3956f v0.10.0-canary.3 2023-10-24 20:18:21 +08:00
Flrande 627e5dfbb5 feat: bump blocksuite (#4706) 2023-10-24 09:00:27 +00:00
LongYinan 37c6560dd6 v0.10.0-canary.2 2023-10-19 17:18:18 +08:00
Alex Yang 9958baa843 fix(hooks): use uuid as pageId (#4658) 2023-10-18 22:14:41 -05:00
Joooye_34 bed9310519 refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00