Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/dry-jokes-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@fluidframework/fluid-static": minor
"__section": breaking
---
minVersionForCollabOverride removed from createTreeContainerRuntimeFactory props argument

Instead specify `minVersionForCollaboration` property directly.
(Deprecated `compatibilityMode` property should also be removed.)
See [#27356](https://github.com/microsoft/FluidFramework/issues/27356) and [#23289](https://github.com/microsoft/FluidFramework/issues/23289).
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async function createContainerAndRenderInElement(
containerId,
createTreeContainerRuntimeFactory({
schema: todoListContainerSchema,
compatibilityMode: "2.0.0",
minVersionForCollaboration: "2.0.0",
}),
createNewFlag,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function createTreeContainerRuntimeFactory(props: {
readonly compatibilityMode: CompatibilityMode;
readonly rootDataStoreRegistry?: IFluidDataStoreRegistry;
readonly runtimeOptionOverrides?: Partial<IContainerRuntimeOptions>;
readonly minVersionForCollabOverride?: MinimumVersionForCollab;
}): IRuntimeFactory;

// @public
Expand Down
17 changes: 3 additions & 14 deletions packages/framework/fluid-static/src/treeRootDataObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export function createTreeContainerRuntimeFactory(props: {
/**
* Legacy compatibility mode for the container.
*/
// eslint-disable-next-line import-x/no-deprecated
// eslint-disable-next-line import-x/no-deprecated -- specify minVersionForCollaboration instead; see #23289
readonly compatibilityMode: CompatibilityMode;
/**
* Optional registry of data stores to pass to the DataObject factory.
Expand All @@ -259,29 +259,20 @@ export function createTreeContainerRuntimeFactory(props: {
* If not provided, only the default options for the given compatibilityMode will be used.
*/
readonly runtimeOptionOverrides?: Partial<IContainerRuntimeOptions>;
/**
* Optional override for minimum version for collaboration.
* @remarks
* If not provided, the default for the given compatibilityMode will be used.
* Rather than defining this, omit `compatibilityMode` and pass `minVersionForCollaboration` directly.
*/
readonly minVersionForCollabOverride?: MinimumVersionForCollab;
}): IRuntimeFactory;

// Implementation
export function createTreeContainerRuntimeFactory(props: {
readonly schema: TreeContainerSchema;
// eslint-disable-next-line import-x/no-deprecated
// eslint-disable-next-line import-x/no-deprecated -- specify minVersionForCollaboration instead; see #23289
readonly compatibilityMode?: CompatibilityMode;
readonly minVersionForCollaboration?: MinimumVersionForCollab;
readonly rootDataStoreRegistry?: IFluidDataStoreRegistry;
readonly runtimeOptionOverrides?: Partial<IContainerRuntimeOptions>;
readonly minVersionForCollabOverride?: MinimumVersionForCollab;
}): IRuntimeFactory {
const {
compatibilityMode,
minVersionForCollaboration,
minVersionForCollabOverride,
rootDataStoreRegistry,
runtimeOptionOverrides,
schema,
Expand All @@ -295,9 +286,7 @@ export function createTreeContainerRuntimeFactory(props: {
"Either minVersionForCollaboration or compatibilityMode (deprecated) must be provided.",
);
} else {
minVersionForCollab =
minVersionForCollabOverride ??
resolveCompatibilityModeToMinVersionForCollab(compatibilityMode);
minVersionForCollab = resolveCompatibilityModeToMinVersionForCollab(compatibilityMode);
}

const [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);
Expand Down
Loading