<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->

# Fluid Framework v2.12.0

## Contents

- [Fluid Framework v2.12.0](#fluid-framework-v2120)
  - [Contents](#contents)
  - [✨ New Features](#-new-features)
    - [New APIs to create and load containers without using the Loader object (#22902)](#new-apis-to-create-and-load-containers-without-using-the-loader-object-22902)
      - [Overview](#overview)
        - [Use `createDetachedContainer` to create a detached container](#use-createdetachedcontainer-to-create-a-detached-container)
        - [Use `loadExistingContainer` to load an existing container](#use-loadexistingcontainer-to-load-an-existing-container)
        - [Use `rehydrateDetachedContainer` to create a detached container from a serializedState of another container](#use-rehydratedetachedcontainer-to-create-a-detached-container-from-a-serializedstate-of-another-container)
        - [Note on `ICreateAndLoadContainerProps`.](#note-on-icreateandloadcontainerprops)
      - [Change details](#change-details)
  - [⚠️ Deprecations](#️-deprecations)
    - [SummarizerStopReason, ISummarizeEventProps, and ISummarizerEvents are now deprecated (#23217)](#summarizerstopreason-isummarizeeventprops-and-isummarizerevents-are-now-deprecated-23217)
      - [Change details](#change-details-1)
    - [IContainerRuntimeOptions.enableGroupedBatching is now deprecated (#23260)](#icontainerruntimeoptionsenablegroupedbatching-is-now-deprecated-23260)
      - [Change details](#change-details-2)
    - [IContainerRuntimeOptions.flushMode is now deprecated (#23288)](#icontainerruntimeoptionsflushmode-is-now-deprecated-23288)
      - [Change details](#change-details-3)
    - [Merge-Tree and SharedString ISegment Deprecations (#23323)](#merge-tree-and-sharedstring-isegment-deprecations-23323)
      - [Change details](#change-details-4)
    - [The ContainerRuntime class is now deprecated (#23331)](#the-containerruntime-class-is-now-deprecated-23331)
      - [Change details](#change-details-5)
    - [🛠️ Start Building Today!](#️-start-building-today)

## ✨ New Features

### New APIs to create and load containers without using the Loader object ([#22902](https://github.com/microsoft/FluidFramework/issues/22902))

#### Overview

Provide standalone APIs to create and load containers instead of using the Loader object to do so. Before, hosts were supposed to create the Loader object first and then call methods on it to create and load containers. Now they can just utilize these APIs directly and get rid of the Loader object.

##### Use `createDetachedContainer` to create a detached container

```typescript
export async function createDetachedContainer(
  createDetachedContainerProps: ICreateDetachedContainerProps,
): Promise<IContainer> {}
```

`ICreateDetachedContainerProps` are the properties that need to be supplied to the above API and include props like URL Resolver, IDocumentServiceFactory, etc., which were previously used to create the `Loader` object.

##### Use `loadExistingContainer` to load an existing container

```typescript
export async function loadExistingContainer(
  loadExistingContainerProps: ILoadExistingContainerProps,
): Promise<IContainer> {}
```

`ILoadExistingContainerProps` are the properties that need to be supplied to the above API and include props like URL Resolver, IDocumentServiceFactory, etc., which were earlier used to create the `Loader` object.

##### Use `rehydrateDetachedContainer` to create a detached container from a serializedState of another container

```typescript
export async function rehydrateDetachedContainer(
  rehydrateDetachedContainerProps: IRehydrateDetachedContainerProps,
): Promise<IContainer> {}
```

`IRehydrateDetachedContainerProps` are the properties that need to be supplied to the above API and include props like URL Resolver, IDocumentServiceFactory, etc., which were earlier used to create the `Loader` object.

##### Note on `ICreateAndLoadContainerProps`.

The props which were used to create the `Loader` object are now moved to the `ICreateAndLoadContainerProps` interface. `ICreateDetachedContainerProps`, `ILoadExistingContainerProps` and `IRehydrateDetachedContainerProps` which extends `ICreateAndLoadContainerProps` also contain some additional props which will be used to create and load containers like `IFluidCodeDetails`, `IRequest`, etc. Previously these were directly passed when calling APIs like `Loader.createDetachedContainer`, `Loader.resolve` and `Loader.rehydrateDetachedContainerFromSnapshot` on the `Loader` object. Also, `ILoaderProps.ILoaderOptions` are now replaced with `ICreateAndLoadContainerProps.IContainerPolicies` since there will be no concept of `Loader`.

#### Change details

Commit: [`51a1728`](https://github.com/microsoft/FluidFramework/commit/51a17289c683ff6666e496878cb6660d21759b16)

Affected packages:

- @fluidframework/azure-client
- @fluidframework/container-definitions
- @fluidframework/container-loader
- @fluidframework/fluid-runner
- @fluidframework/odsp-client
- @fluid-experimental/property-dds
- @fluid-private/test-end-to-end-tests
- @fluidframework/test-utils
- @fluidframework/tinylicious-client
- @fluidframework/tree

[⬆️ Table of contents](#contents)

## ⚠️ Deprecations

### SummarizerStopReason, ISummarizeEventProps, and ISummarizerEvents are now deprecated ([#23217](https://github.com/microsoft/FluidFramework/issues/23217))

`SummarizerStopReason`, `ISummarizeEventProps`, and `ISummarizerEvents` have all been deprecated from the `"@fluidframework/container-runtime"` package. Please migrate all uses of these APIs to their counterparts in the `"@fluidframework/container-runtime-definitions"` package.

#### Change details

Commit: [`cd88ee2`](https://github.com/microsoft/FluidFramework/commit/cd88ee2320c40ed9e0d43ec8ed73cb878f1c18a9)

Affected packages:

- @fluidframework/container-runtime

[⬆️ Table of contents](#contents)

### IContainerRuntimeOptions.enableGroupedBatching is now deprecated ([#23260](https://github.com/microsoft/FluidFramework/issues/23260))

The `IContainerRuntimeOptions.enableGroupedBatching` property is deprecated and will be removed in version 2.20.0. This will mean that the grouped batching feature can no longer be disabled. In versions 2.20.0 and beyond, grouped batching is required for the proper functioning of the Fluid Framework.

The sole case where grouped batching will be disabled is for compatibility with older v1 clients, and this will be implemented without any need for the configurable `IContainerRuntimeOptions.enableGroupedBatching` option.

#### Change details

Commit: [`49d8e75`](https://github.com/microsoft/FluidFramework/commit/49d8e75e5cad12205aed15850db72c1ad21513c3)

Affected packages:

- @fluidframework/container-runtime
- @fluidframework/fluid-static

[⬆️ Table of contents](#contents)

### IContainerRuntimeOptions.flushMode is now deprecated ([#23288](https://github.com/microsoft/FluidFramework/issues/23288))

The `IContainerRuntimeOptions.flushMode` property is deprecated and will be removed in version 2.20.0.

Only the default value `FlushMode.TurnBased` is supported when calling `ContainerRuntime.loadRuntime` directly, so there's no need for consumers to pass this option in.

#### Change details

Commit: [`af1cd7b`](https://github.com/microsoft/FluidFramework/commit/af1cd7b3707cce1306ae071aba1482734b039635)

Affected packages:

- @fluidframework/container-runtime

[⬆️ Table of contents](#contents)

### Merge-Tree and SharedString ISegment Deprecations ([#23323](https://github.com/microsoft/FluidFramework/issues/23323))

The current ISegment interface over-exposes a number of properties which do not have an external use case, and any external usage could result in damage to the underlying merge-tree including data corruption.

The only use case that will continue to be supported is determining if a segment is removed. For this purpose we've added the free function `segmentIsRemoved(segment: ISegment): boolean`.

For example, checking if a segment is not removed would change as follows:

```diff
- if(segment.removedSeq === undefined){
+ if(!segmentIsRemoved(segment)){
```

The following properties are deprecated on ISegment and its implementations:

- clientId
- index
- localMovedSeq
- localRefs
- localRemovedSeq
- localSeq
- movedClientsIds
- movedSeq
- movedSeqs
- ordinal
- removedClientIds
- removedSeq
- seq
- wasMovedOnInsert

Additionally, the following types are also deprecated, and will become internal (i.e. users of the Fluid Framework will not have access to them):

- IMergeNodeCommon
- IMoveInfo
- IRemovalInfo
- LocalReferenceCollection

#### Change details

Commit: [`e8762e3`](https://github.com/microsoft/FluidFramework/commit/e8762e37cd5edbad36b78b5a40d62a730522e18f)

Affected packages:

- @fluidframework/merge-tree
- @fluidframework/sequence

[⬆️ Table of contents](#contents)

### The ContainerRuntime class is now deprecated ([#23331](https://github.com/microsoft/FluidFramework/issues/23331))

The class `ContainerRuntime` is deprecated and will no longer be exported starting in version 2.20.0.

There are two possible migration paths to stop using `ContainerRuntime`:

- When using it as a type, replace it with an interface like `IContainerRuntime`
- When using the static function `ContainerRuntime.loadRuntime` replace it with the free function `loadContainerRuntime`.

`BaseContainerRuntimeFactory` has some changes as well, since it exposed `ContainerRuntime` in several function signatures:

- `instantiateFirstTime` - Takes the wider type `IContainerRuntime` instead of `ContainerRuntime`
- `instantiateFromExisting` - Takes the wider type `IContainerRuntime` instead of `ContainerRuntime`
- `preInitialize` - deprecated as well, since it returns `ContainerRuntime`

These functions should never be called directly anyway - use `BaseContainerRuntimeFactory.instantiateRuntime` instead.

#### Change details

Commit: [`dc48446`](https://github.com/microsoft/FluidFramework/commit/dc48446d7c4914aca2a76095205975824aac1ba5)

Affected packages:

- @fluidframework/aqueduct
- @fluidframework/container-runtime

[⬆️ 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!