github microsoft/FluidFramework client_v2.102.0
Fluid Framework v2.102.0 (minor)

3 hours ago

Contents

  • ✨ New Features
    • Promote onAssertionFailure to @beta (#27282)
  • ⚠️ Deprecations
    • Service client createContainer/getContainer overloads taking CompatibilityMode are deprecated (#27212)
  • Legacy API Changes
    • Add optional getPendingLocalState to IContainer (#27269)
    • createTreeContainerRuntimeFactory accepts a MinimumVersionForCollab SemVer and deprecates compatibilityMode with minVersionForCollabOverride (#27212)

✨ New Features

Promote onAssertionFailure to @beta (#27282)

The onAssertionFailure hook, previously @alpha, has been promoted to @beta. It allows registering a handler that is invoked when an assertion failure occurs, which is useful for capturing the first error in a sequence before subsequent failures obscure the root cause.

import { onAssertionFailure } from "@fluidframework/core-utils/beta";

let firstAssertion: Error | undefined;
const unregister = onAssertionFailure((error) => {
  firstAssertion ??= error;
});

Change details

Commit: 4191b82

Affected packages:

  • @fluidframework/core-utils
  • fluid-framework

⬆️ Table of contents

⚠️ Deprecations

Service client createContainer/getContainer overloads taking CompatibilityMode are deprecated (#27212)

The createContainer and getContainer overloads on AzureClient, OdspClient, and TinyliciousClient (plus AzureClient.viewContainerVersion) that accept a CompatibilityMode ("1" / "2") argument are now deprecated. Pass a MinimumVersionForCollab SemVer string instead — it specifies the minimum collaborating client version directly.

See issue #23289 for migration details and removal tracking.

Change details

Commit: 3e951b4

Affected packages:

  • @fluidframework/azure-client
  • @fluidframework/odsp-client
  • @fluidframework/tinylicious-client

⬆️ Table of contents

Legacy API Changes

Add optional getPendingLocalState to IContainer (#27269)

IContainer now exposes getPendingLocalState?(): Promise<string>. The serialized blob can be passed back as pendingLocalState to loadExistingContainer (or ILoader.resolve) to rehydrate an attached container at the same position without data loss.

The member is optional during this minor release so external implementers of IContainer (test mocks, wrapper containers, partner runtimes) remain forward-compatible. A future breaking release will make it required.

The ContainerAlpha interface and asLegacyAlpha helper in @fluidframework/container-loader continue to expose this functionality at @legacy @alpha for callers that prefer the typed-required shape.

Lifecycle: misuse of this API can result in duplicate op submission and potential document corruption. The blob returned MUST be discarded if and when the container emits a "connected" event — any subsequent rehydrate from that blob would submit the same ops a second time. The container must also be neither closed nor disposed when calling; otherwise the call throws UsageError.

Runtime behavior is unchanged.

Change details

Commit: 1f12b8e

Affected packages:

  • @fluidframework/container-definitions

⬆️ Table of contents

createTreeContainerRuntimeFactory accepts a MinimumVersionForCollab SemVer and deprecates compatibilityMode with minVersionForCollabOverride (#27212)

A minVersionForCollaboration property on createTreeContainerRuntimeFactory accepts a MinimumVersionForCollab SemVer string and replaces compatibilityMode (CompatibilityMode values "1" and "2") with optional minVersionForCollabOverride.

See issue #27356 for migration details and removal tracking.

Change details

Commit: 3e951b4

Affected packages:

  • @fluidframework/fluid-static

⬆️ Table of contents

🛠️ Start Building Today!

Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework!

Don't miss a new FluidFramework release

NewReleases is sending notifications on new releases.