[history-ot] rename remaining history-v1-ot references to history-ot (#25428)

* [history-ot] rename remaining history-v1-ot references to history-ot

* [web] rename History-v1 OT -> History OT in admin panel

* [web] rename OT Migration -> History OT Migration in admin panel

GitOrigin-RevId: 103ce816d5320d6379d51009cdc08b8a71aa48e6
This commit is contained in:
Jakob Ackermann
2025-05-20 08:06:46 +00:00
committed by Copybot
parent f56645ecfe
commit 1e6b13f9d5
16 changed files with 37 additions and 39 deletions
@@ -231,11 +231,9 @@ function _concatTwoUpdates(firstUpdate, secondUpdate) {
return [firstUpdate, secondUpdate]
}
const firstUpdateIsHistoryV1OT = EditOperationBuilder.isValid(firstUpdate.op)
const secondUpdateIsHistoryV1OT = EditOperationBuilder.isValid(
secondUpdate.op
)
if (firstUpdateIsHistoryV1OT !== secondUpdateIsHistoryV1OT) {
const firstUpdateIsHistoryOT = EditOperationBuilder.isValid(firstUpdate.op)
const secondUpdateIsHistoryOT = EditOperationBuilder.isValid(secondUpdate.op)
if (firstUpdateIsHistoryOT !== secondUpdateIsHistoryOT) {
// cannot merge mix of sharejs-text-op and history-ot, should not happen.
return [firstUpdate, secondUpdate]
}
@@ -286,7 +284,7 @@ function _concatTwoUpdates(firstUpdate, secondUpdate) {
return [firstUpdate, secondUpdate]
}
if (firstUpdateIsHistoryV1OT && secondUpdateIsHistoryV1OT) {
if (firstUpdateIsHistoryOT && secondUpdateIsHistoryOT) {
const op1 = EditOperationBuilder.fromJSON(firstUpdate.op)
const op2 = EditOperationBuilder.fromJSON(secondUpdate.op)
if (!op1.canBeComposedWith(op2)) return [firstUpdate, secondUpdate]
@@ -7,7 +7,7 @@ import * as OperationsCompressor from './OperationsCompressor.js'
import { isInsert, isRetain, isDelete, isComment } from './Utils.js'
/**
* @import { AddDocUpdate, AddFileUpdate, DeleteCommentUpdate, HistoryV1OTEditOperationUpdate, Op, RawScanOp } from './types'
* @import { AddDocUpdate, AddFileUpdate, DeleteCommentUpdate, HistoryOTEditOperationUpdate, Op, RawScanOp } from './types'
* @import { RenameUpdate, TextUpdate, TrackingDirective, TrackingProps } from './types'
* @import { SetCommentStateUpdate, SetFileMetadataOperation, Update, UpdateWithBlob } from './types'
*/
@@ -206,7 +206,7 @@ export function isTextUpdate(update) {
/**
* @param {Update} update
* @returns {update is HistoryV1OTEditOperationUpdate}
* @returns {update is HistoryOTEditOperationUpdate}
*/
export function isHistoryOTEditOperationUpdate(update) {
return (
+1 -1
View File
@@ -44,7 +44,7 @@ export type TextUpdate = {
}
}
export type HistoryV1OTEditOperationUpdate = {
export type HistoryOTEditOperationUpdate = {
doc: string
op: RawEditOperation[]
v: number