Repository navigation
feat: upgrade Univer SDK to 1.0.0 and .univer to v3 - #55
Merged
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
…SDK 1.0.0 Persist Unit creatorID/createdAt, store changeset createTime in Unix seconds, and replace the per-revision History index with SDK segment boundaries. History Service now indexes from collaboration events, so Gateway startup only drops boundaries beyond the trunk head. Co-authored-by: Cursor <cursoragent@cursor.com>
v3 is core@2, worktree@3, history@2. The v2 reader adds Unit creators, normalizes millisecond or missing createTime values to seconds, and converts rc History to segment starts, dropping only inconsistent Units for lazy rebuild. Covers the frozen rc.0 fixture in package and built-bin tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Upgrades drop History boundaries beyond the Core head and the optimizer clears History when it squashes revisions, so v3 files never need the startup reset. Co-authored-by: Cursor <cursoragent@cursor.com>
Add created_at_ms to both changeset tables, follow the SDK migrations for default creators (History rev1 or anonymous) and missing change times, treat History origin 0 as unfiltered, and require complete history@2 in v3 detection. Co-authored-by: Cursor <cursoragent@cursor.com>
Write created_at_ms from Date.now() and store payload createTime as its whole seconds, so the column no longer drops the sub-second part. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the Univer / Univer Pro / Collaboration SDK cohort from
1.0.0-rc.0to1.0.0and moves.univerto format v3 (core 2, worktree 3, assets 1, history 2), matching the SDK 1.0.0 SQLite persistence contract.1.0.0; add a React19.3.0override inpnpm-workspace.yaml.creatorID/createdAt.createTimein Unix seconds on commit and store the same time in the new changesetcreated_at_mscolumn.collaboration_history_records, with the SDK index names andorigin: 0meaning "any origin".anonymous. A missing trunkcreateTimetakes the rc History commit time, and any other missing time takes the upgrade start time.readerand clears History records when it squashes revisions.docs/data-compatibility.mdgains the format table and the v2 → v3 rules.The frozen rc.0 fixtures come from #54.
Test plan
pnpm check(format, lint, typecheck, locales, all package tests, pack check)created_at_ms, History boundaries, inconsistent History, and failure leaving the source byte-identical