Skip to content

Commit 88860f3

Browse files
authored
improvement(client-datastore): BREAKING CHANGE: remove FluidDataStoreRuntime.submitMessage (#25755)
remove FluidDataStoreRuntime.submitMessage and MockFluidDataStoreRuntime.submitMessage
1 parent b4511b7 commit 88860f3

File tree

11 files changed

+30
-28
lines changed

11 files changed

+30
-28
lines changed

.changeset/odd-loops-flash.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@fluidframework/datastore": minor
3+
"@fluidframework/test-runtime-utils": minor
4+
"__section": breaking
5+
---
6+
Remove submitMessage from FluidDataStoreRuntime and MockFluidDataStoreRuntime
7+
8+
As needed, access `submitMessage` via `IFluidDataStoreContext`/`IFluidParentContext`. See https://github.com/microsoft/FluidFramework/issues/24406 for details.

packages/framework/aqueduct/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@
155155
},
156156
"typeValidation": {
157157
"broken": {
158+
"Interface_DataObjectFactoryProps": {
159+
"backCompat": false
160+
},
158161
"Interface_IDataObjectProps": {
159162
"backCompat": false
160163
}

packages/framework/aqueduct/src/test/types/validateAqueductPrevious.generated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ declare type old_as_current_for_Interface_DataObjectFactoryProps = requireAssign
283283
* typeValidation.broken:
284284
* "Interface_DataObjectFactoryProps": {"backCompat": false}
285285
*/
286+
// @ts-expect-error compatibility expected to be broken
286287
declare type current_as_old_for_Interface_DataObjectFactoryProps = requireAssignableTo<TypeOnly<current.DataObjectFactoryProps<never>>, TypeOnly<old.DataObjectFactoryProps<never>>>
287288

288289
/*

packages/runtime/datastore/api-report/datastore.legacy.beta.api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ export class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataStoreRunt
9393
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
9494
// (undocumented)
9595
setConnectionState(connected: boolean, clientId?: string): void;
96-
// @deprecated
97-
submitMessage(type: DataStoreMessageType, content: any, localOpMetadata: unknown): void;
9896
submitSignal(type: string, content: unknown, targetClientId?: string): void;
9997
summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
10098
updateUsedRoutes(usedRoutes: string[]): void;

packages/runtime/datastore/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,14 @@
157157
"typescript": "~5.4.5"
158158
},
159159
"typeValidation": {
160-
"broken": {},
160+
"broken": {
161+
"Class_FluidDataStoreRuntime": {
162+
"backCompat": false
163+
},
164+
"ClassStatics_FluidDataStoreRuntime": {
165+
"backCompat": false
166+
}
167+
},
161168
"entrypoint": "legacy"
162169
}
163170
}

packages/runtime/datastore/src/dataStoreRuntime.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,21 +1170,6 @@ export class FluidDataStoreRuntime
11701170
}
11711171
}
11721172

1173-
/**
1174-
* Do not use.
1175-
* @deprecated Use `IFluidDataStoreContext.submitMessage` instead.
1176-
* @see https://github.com/microsoft/FluidFramework/issues/24406
1177-
*/
1178-
public submitMessage(
1179-
type: DataStoreMessageType,
1180-
// TODO: use something other than `any` here (breaking change)
1181-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
1182-
content: any,
1183-
localOpMetadata: unknown,
1184-
): void {
1185-
this.submit(type, content, localOpMetadata);
1186-
}
1187-
11881173
/**
11891174
* Submits the signal to be sent to other clients.
11901175
* @param type - Type of the signal.

packages/runtime/datastore/src/test/types/validateDatastorePrevious.generated.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ declare type old_as_current_for_Class_FluidDataStoreRuntime = requireAssignableT
3131
* typeValidation.broken:
3232
* "Class_FluidDataStoreRuntime": {"backCompat": false}
3333
*/
34+
// @ts-expect-error compatibility expected to be broken
3435
declare type current_as_old_for_Class_FluidDataStoreRuntime = requireAssignableTo<TypeOnly<current.FluidDataStoreRuntime>, TypeOnly<old.FluidDataStoreRuntime>>
3536

3637
/*
@@ -58,6 +59,7 @@ declare type current_as_old_for_Class_FluidObjectHandle = requireAssignableTo<Ty
5859
* typeValidation.broken:
5960
* "ClassStatics_FluidDataStoreRuntime": {"backCompat": false}
6061
*/
62+
// @ts-expect-error compatibility expected to be broken
6163
declare type current_as_old_for_ClassStatics_FluidDataStoreRuntime = requireAssignableTo<TypeOnly<typeof current.FluidDataStoreRuntime>, TypeOnly<typeof old.FluidDataStoreRuntime>>
6264

6365
/*

packages/runtime/test-runtime-utils/api-report/test-runtime-utils.legacy.beta.api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,6 @@ export class MockFluidDataStoreRuntime extends EventEmitter implements IFluidDat
501501
setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
502502
// (undocumented)
503503
setConnectionState(connected: boolean, clientId?: string): void;
504-
// @deprecated (undocumented)
505-
submitMessage(type: MessageType, content: any): null;
506504
// (undocumented)
507505
submitSignal(type: string, content: any): null;
508506
// (undocumented)

packages/runtime/test-runtime-utils/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,15 @@
157157
"Class_MockFluidDataStoreContext": {
158158
"backCompat": false
159159
},
160+
"Class_MockFluidDataStoreRuntime": {
161+
"backCompat": false
162+
},
160163
"ClassStatics_MockFluidDataStoreContext": {
161164
"backCompat": false
162165
},
166+
"ClassStatics_MockFluidDataStoreRuntime": {
167+
"backCompat": false
168+
},
163169
"Class_MockObjectStorageService": {
164170
"forwardCompat": false
165171
},

packages/runtime/test-runtime-utils/src/mocks.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,14 +1044,6 @@ export class MockFluidDataStoreRuntime
10441044
return null;
10451045
}
10461046

1047-
/**
1048-
* @deprecated Use `IFluidDataStoreContext.submitMessage` instead.
1049-
* @see https://github.com/microsoft/FluidFramework/issues/24406
1050-
*/
1051-
public submitMessage(type: MessageType, content: any) {
1052-
return null;
1053-
}
1054-
10551047
private submitMessageInternal(messageContent: any, localOpMetadata: unknown): number {
10561048
assert(
10571049
this.containerRuntime !== undefined,

0 commit comments

Comments
 (0)