# Fluid Framework v2.93.0 ## Contents - [🚨 Breaking Changes](#-breaking-changes) - [minVersionForCollab is now non-optional (#25331)](#minversionforcollab-is-now-non-optional-25331) - [✨ New Features](#-new-features) - [Add Fluid-controlled map and iterator interfaces (#26788)](#add-fluid-controlled-map-and-iterator-interfaces-26788) - [presence API set now at public support level (#27001)](#presence-api-set-now-at-public-support-level-27001) - [Add SchemaFactoryAlpha.stagedOptional for incremental required-to-optional field migrations (#26918)](#add-schemafactoryalphastagedoptional-for-incremental-required-to-optional-field-migrations-26918) - [🌳 SharedTree DDS Changes](#-sharedtree-dds-changes) - [Promote tree index APIs from alpha to beta (#26993)](#promote-tree-index-apis-from-alpha-to-beta-26993) - [⚠️ Deprecations](#️-deprecations) - [`getPresence` from `@fluidframework/presence` is deprecated and will be removed in a future release. (#26399)](#getpresence-from-fluidframeworkpresence-is-deprecated-and-will-be-removed-in-a-future-release-26399) ## 🚨 Breaking Changes ### minVersionForCollab is now non-optional ([#25331](https://github.com/microsoft/FluidFramework/issues/25331)) This change is a follow-up for [pull request 25130](https://github.com/microsoft/FluidFramework/pull/25130) which was released as part of [2.61.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.61.0). The `minVersionForCollab` property has been made non-optional in the following `@beta` `@legacy` interfaces in the Runtime layer: - `IFluidParentContext.minVersionForCollab` in `@fluidframework/runtime-definitions`. - `IFluidDataStoreContext.minVersionForCollab` in `@fluidframework/runtime-definitions`. - `IFluidDataStoreContextDetached.minVersionForCollab` in `@fluidframework/runtime-definitions`. Consumers of Fluid aren't expected to implement these interfaces directly, so no impact is expected. Additionally the following properties now always return a value, rather than possibly returning `undefined`: - `FluidDataStoreRuntime.minVersionForCollab` in `@fluidframework/datastore`. Note that API Extractor shows this as a breaking change since FluidDataStoreRuntime is beta + legacy and non-sealed. However, FluidDataStoreRuntime is not intended to be extended directly outside of a known legacy use-case. - `IDataObjectProps.context.minVersionForCollab` in `@fluidframework/aqueduct`. - `ITestFluidObject.context.minVersionForCollab` in `@fluidframework/test-utils` - `IProvideTestFluidObject.ITestFluidObject.context.minVersionForCollab` in `@fluidframework/test-utils` #### Change details Commit: [`9a0d027`](https://github.com/microsoft/FluidFramework/commit/9a0d0272df6ae1a521cff00292dd159ea3b5e270) Affected packages: - @fluidframework/aqueduct - @fluidframework/datastore - @fluidframework/runtime-definitions - @fluidframework/shared-object-base - @fluidframework/test-utils [⬆️ Table of contents](#contents) ## ✨ New Features ### Add Fluid-controlled map and iterator interfaces ([#26788](https://github.com/microsoft/FluidFramework/issues/26788)) `TreeIndex` now extends `FluidReadonlyMap` instead of the built-in `ReadonlyMap`, and `TreeMapNodeAlpha` which extends `FluidReadonlyMap` instead of the built-in `ReadonlyMap` has been added. This works to uncouple Fluid's public API surface to the TypeScript standard library's map types, preventing future breakage when those types change. #### Change details Commit: [`78e06f7`](https://github.com/microsoft/FluidFramework/commit/78e06f763993e002ccf2b878e90b44aab984865d) Affected packages: - @fluidframework/core-interfaces - fluid-framework - @fluidframework/tree [⬆️ Table of contents](#contents) ### presence API set now at public support level ([#27001](https://github.com/microsoft/FluidFramework/issues/27001)) All `@fluidframework/presence` APIs that had been `@beta` have been promoted to `@public` support with the exception of `getPresence` which has been relocated to `fluid-framework`. (See [issue #26397](https://github.com/microsoft/FluidFramework/issues/26397) for more `getPresence` details.) See [Presence API overview](https://fluidframework.com/docs/build/presence) and [Presence package API details](https://fluidframework.com/docs/api/presence/) with [getPresence API](https://fluidframework.com/docs/api/fluid-framework/#getPresence) to get started. #### Change details Commit: [`97d14a7`](https://github.com/microsoft/FluidFramework/commit/97d14a7e8411ff2dd17dc497a09823a276fd78e0) Affected packages: - @fluidframework/presence [⬆️ Table of contents](#contents) ### Add SchemaFactoryAlpha.stagedOptional for incremental required-to-optional field migrations ([#26918](https://github.com/microsoft/FluidFramework/issues/26918)) `SchemaFactoryAlpha.stagedOptional(T)` enables incremental migration of a field from required to optional. It creates a field that is optional in the view schema but stored as required in the stored schema until all clients have been upgraded, avoiding the need for a coordinated simultaneous deployment. Migration path: 1. Start with `sf.required(T)` - all clients require the field. 2. Deploy `sf.stagedOptional(T)` - new clients see the field as optional and can read documents whether the field is present or absent, but the stored schema stays required so old clients are not broken. Writing `undefined` is blocked at runtime during this phase. 3. Deploy `sf.optional(T)` once all clients have been updated - the stored schema becomes optional and the field can be cleared. #### Change details Commit: [`fb808eb`](https://github.com/microsoft/FluidFramework/commit/fb808eb085d17612cfb96f2731457f9851986429) Affected packages: - @fluidframework/tree [⬆️ Table of contents](#contents) ## 🌳 SharedTree DDS Changes ### Promote tree index APIs from alpha to beta ([#26993](https://github.com/microsoft/FluidFramework/issues/26993)) The following APIs have been promoted from `@alpha` to `@beta`: - `TreeIndex` - `TreeIndexKey` - `TreeIndexNodes` - `createTreeIndex` - `IdentifierIndex` - `createIdentifierIndex` Additionally, the following `@fluidframework/core-interfaces` types have been promoted from `@alpha` to `@beta`: - `FluidReadonlyMap` - `FluidIterable` - `FluidIterableIterator` - `FluidMap` #### Change details Commit: [`37f2f17`](https://github.com/microsoft/FluidFramework/commit/37f2f17c118baea142b0e842f5b262255d8bb12c) Affected packages: - @fluidframework/core-interfaces - @fluidframework/tree - fluid-framework [⬆️ Table of contents](#contents) ## ⚠️ Deprecations ### `getPresence` from `@fluidframework/presence` is deprecated and will be removed in a future release. ([#26399](https://github.com/microsoft/FluidFramework/issues/26399)) Now `getPresence` is available for import from the `fluid-framework` package. To prepare, make changes following this pattern: ```diff -import { getPresence } from "@fluidframework/presence/beta"; +import { getPresence } from "fluid-framework"; ``` See [issue #26397](https://github.com/microsoft/FluidFramework/issues/26397) for more details. #### Change details Commit: [`d533c19`](https://github.com/microsoft/FluidFramework/commit/d533c19c7cb25d48ecab1b742e44dfe560d20534) Affected packages: - fluid-framework - @fluidframework/presence [⬆️ Table of contents](#contents) ### 🛠️ Start Building Today! Please continue to engage with us on GitHub [Discussion](https://github.com/microsoft/FluidFramework/discussions) and [Issue](https://github.com/microsoft/FluidFramework/issues) pages as you adopt Fluid Framework!