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

19 hours ago

Contents

  • 🐛 Bug Fixes
    • Fix 'Error: PR-008: Trying to remove a non-existing entry' error in IndexedCollection class (#23243)
  • ⚠️ Deprecations
    • Events-related interfaces have been moved to core-interfaces (#23313)
  • Legacy API Changes
    • The MockLogger class has been removed (#23010)
    • Previously deprecated Merge-Tree and SharedString ISegment members have been removed (#23448)
    • The IContainerRuntimeOptions.flushMode property has been removed (#23337)
    • The ContainerRuntime class has been removed (#23341)
    • The createDataStoreWithProps APIs on ContainerRuntime and IContainerRuntimeBase have been removed (#22996)
    • Replace 'any' in return type for several APIs (#23238)
    • Summarizer-related types have been moved to container-runtime-definitions (#23483)
    • Enabling Op Compression without Op Grouping is no longer supported (#23608)

🐛 Bug Fixes

Fix 'Error: PR-008: Trying to remove a non-existing entry' error in IndexedCollection class (#23243)

The IndexedCollection class would throw the following error when applying a changeset:

Error: PR-008: Trying to remove a non-existing entry:

The underlying problem has been fixed and this error should no longer occur.

Thanks to @neerajcharokar for submitting this fix!

Change details

Commit: 5996be1

Affected packages:

  • @fluid-experimental/property-changeset

⬆️ Table of contents

⚠️ Deprecations

Events-related interfaces have been moved to core-interfaces (#23313)

The following interfaces and types have been moved from the @fluidframework/tree package into the @fluidframework/core-interfaces package. As such, they are now deprecated in the @fluidframework/tree package.

  • Listeners
  • IsListener
  • Listenable
  • Off

Users should now import them from either @fluidframework/core-interfaces or fluid-framework.

These deprecated interfaces will be removed from the @fluidframework/tree package in Fluid Framework v3.0.

Change details

Commit: 69a755e

Affected packages:

  • @fluidframework/tree

⬆️ Table of contents

Legacy API Changes

The MockLogger class has been removed (#23010)

The MockLogger class, which was previously part of the alpha+legacy API in @fluidframework/telemetry-utils, has been removed. No replacement is provided. This class was only intended for use in testing scenarios and should be trivial to re-implement in any codebase that still needs it.

Change details

Commit: 32ff6b9

Affected packages:

  • @fluidframework/telemetry-utils

⬆️ Table of contents

Previously deprecated Merge-Tree and SharedString ISegment members have been removed (#23448)

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. In Fluid Framework release 2.12.0 these properties and associated types were deprecated.

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:

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

The following properties are removed from ISegment and its implementations:

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

Additionally, the following types are also removed:

  • IMergeNodeCommon
  • IMoveInfo
  • IRemovalInfo
  • LocalReferenceCollection

Change details

Commit: e98574f

Affected packages:

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

⬆️ Table of contents

The IContainerRuntimeOptions.flushMode property has been removed (#23337)

The IContainerRuntimeOptions.flushMode property was deprecated in version 2.12.0 and has been removed.

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: fe8279c

Affected packages:

  • @fluidframework/container-runtime

⬆️ Table of contents

The ContainerRuntime class has been removed (#23341)

The ContainerRuntime class was deprecated in version 2.12.0 and has been removed. Use IContainerRuntime to replace type usages and use the free function loadContainerRuntime to replace usages of the static method ContainerRuntime.loadRuntime.

See the deprecation announcement for more details about how to update existing code.

Change details

Commit: 61ba06a

Affected packages:

  • @fluidframework/aqueduct
  • @fluid-experimental/attributor
  • @fluidframework/container-runtime
  • @fluidframework/test-utils

⬆️ Table of contents

The createDataStoreWithProps APIs on ContainerRuntime and IContainerRuntimeBase have been removed (#22996)

ContainerRuntime.createDataStoreWithProps and IContainerRuntimeBase.createDataStoreWithProps were deprecated in version 0.25.0 and have been removed.

Replace uses of these APIs with PureDataObjectFactory.createInstanceWithDataStore and pass in props via the initialState parameter.

These changes were originally announced in version 0.25.0. See the following issues for more details:

Change details

Commit: bd243fb

Affected packages:

  • @fluidframework/aqueduct
  • @fluidframework/container-runtime
  • @fluidframework/container-runtime-definitions
  • @fluidframework/datastore
  • @fluidframework/runtime-definitions
  • @fluidframework/test-runtime-utils

⬆️ Table of contents

Replace 'any' in return type for several APIs (#23238)

To improve type safety of the Fluid Framework legacy+alpha API surface, we're moving away from using the any type in favor of unknown.

We expect that any changes required in consumers of these APIs will be limited to having to provide explicit types when calling any of the APIs whose return value changed to unknown, like IFluidSerializer.parse().

In summary, code that looked like this:

// 'myVariable' ended up typed as 'any' here and TypeScript would not do any type-safety checks on it.
const myVariable = this.serializer.parse(stringHeader);

Will now have to look like this:

// Do this if you know the type of the object you expect to get back.
const myVariable = this.serializer.parse(stringHeader) as MyType;

// Alternatively, this will maintain current behavior but also means no type-safety checks will be done by TS.
// const myVariable = this.serializer.parse(stringHeader) as any;

The appropriate type will depend on what the calling code is doing and the objects it expects to be dealing with.

We further encourage consumers of any of these APIs to add runtime checks to validate that the returned object actually matches the expected type.

The list of affected APIs is as follows:

  • IFluidSerializer.encode(...) now takes value: unknown instead of value: any and returns unknown instead of any.
  • IFluidSerializer.decode(...) now takes input: unknown instead of input: any and returns unknown instead of any.
  • IFluidSerializer.stringify(...) now takes value: unknown instead of value: any.
  • IFluidSerializer.parse(...) now returns unknown instead of any.
  • SharedObjectCore.applyStashedOps(...) now takes content: unknown instead of content: any.
  • SharedObjectCore.rollback(...) now takes content: unknown instead of content: any.
  • SharedObjectCore.submitLocalMessage(...) now takes content: unknown instead of content: any.
  • SharedObjectCore.reSubmitCore(...) now takes content: unknown instead of content: any.
  • In SharedObjectCore.newAckBasedPromise<T>(...) the executor parameter now takes reject: (reason?: unknown) instead of reject: (reason?: any).
  • makeHandlesSerializable(...) now returns unknown instead of any.
  • parseHandles(...) now returns unknown instead of any.

Additionally, the following APIs were never designed to return a value and have thus been updated to return void instead of any:

  • SharedObjectCore.processCore(...).
  • SharedObjectCore.onDisconnect(...)

Change details

Commit: 0783a31

Affected packages:

  • @fluidframework/shared-object-base

⬆️ Table of contents

Summarizer-related types have been moved to container-runtime-definitions (#23483)

SummarizerStopReason, ISummarizeEventProps, and ISummarizerEvents have all been moved from the "@fluidframework/container-runtime" package to @fluidframework/container-runtime-definitions.

Users should now import them from @fluidframework/container-runtime-definitions.

Change details

Commit: 6666d49

Affected packages:

  • @fluidframework/container-runtime

⬆️ Table of contents

Enabling Op Compression without Op Grouping is no longer supported (#23608)

IContainerRuntimeOptions.enableGroupedBatching was deprecated in 2.12 (see release notes). While this option is not yet removed (and still defaults to true), disabling it (by setting to false) is not supported if compression is enabled (by passing a finite value for IContainerRuntimeOptions.compressionOptions.minimumBatchSizeInBytes).

Change details

Commit: 92b695a

Affected packages:

  • @fluidframework/container-runtime

⬆️ 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.