-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description Done by checking cherrypicking #22541
- Loading branch information
1 parent
f130b4f
commit c5359ba
Showing
1 changed file
with
236 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. --> | ||
|
||
# Fluid Framework v2.3.0 | ||
|
||
## Contents | ||
|
||
- [✨ New Features](#-new-features) | ||
- [Experimental Presence package added (#22499)](#experimental-presence-package-added-22499) | ||
- [🌳 SharedTree DDS changes](#-sharedtree-dds-changes) | ||
- [Refactor code for emitting events to make it easier to copy into other projects (#22275)](#refactor-code-for-emitting-events-to-make-it-easier-to-copy-into-other-projects-22275) | ||
- [A `@beta` version of `nodeChanged` which includes the list of properties has been added (#22229)](#a-beta-version-of-nodechanged-which-includes-the-list-of-properties-has-been-added-22229) | ||
- [Make SharedTree usable with legacy APIs (#22320)](#make-sharedtree-usable-with-legacy-apis-22320) | ||
- [Implicitly constructed object nodes now only consider own properties during validation (#22453)](#implicitly-constructed-object-nodes-now-only-consider-own-properties-during-validation-22453) | ||
- [Export SharedTree beta APIs from fluid-framework/beta (#22469)](#export-sharedtree-beta-apis-from-fluid-frameworkbeta-22469) | ||
- [Add /alpha import path to @fluidframework/tree and fluid-framework packages (#22483)](#add-alpha-import-path-to-fluidframeworktree-and-fluid-framework-packages-22483) | ||
- [🐛 Bug Fixes](#-bug-fixes) | ||
- [Restored old op processing behavior around batched ops to avoid potential regression (#22508)](#restored-old-op-processing-behavior-around-batched-ops-to-avoid-potential-regression-22508) | ||
- [Other Changes](#other-changes) | ||
- [Remove some experimental PropertyDDS-related packages (#22326)](#remove-some-experimental-propertydds-related-packages-22326) | ||
|
||
## ✨ New Features | ||
|
||
### Experimental Presence package added ([#22499](https://github.com/microsoft/FluidFramework/issues/22499)) | ||
|
||
**[@fluid-experimental/presence](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#readme)** is now available for investigation. The new package is meant to support presence of collaborators connected to the same container. Use this library to quickly share simple, non-persisted data among all clients or send/receive fire and forget notifications. | ||
|
||
API documentation for **@fluid-experimental/presence** is available at <https://fluidframework.com/docs/apis/presence>. | ||
|
||
There are some limitations; see the README.md of installed package for most relevant notes. | ||
|
||
We're just getting started. Please give it a go and share feedback. | ||
|
||
#### Change details | ||
|
||
Commit: [`42b323c`](https://github.com/microsoft/FluidFramework/commit/42b323cdbf129c897cf9bb51c1f1b9de5642ef8a) | ||
|
||
Affected packages: | ||
|
||
- @fluid-experimental/presence | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
## 🌳 SharedTree DDS changes | ||
|
||
### Refactor code for emitting events to make it easier to copy into other projects ([#22275](https://github.com/microsoft/FluidFramework/issues/22275)) | ||
|
||
Factored event emitting utilities into their own file, `events/emitter.ts`. Applications wishing to use SharedTree's eventing library for custom events can copy this file (and its referenced utility function) as a starting point for defining and emitting their own custom events. See `createEmitter`'s documentation for example usage. | ||
|
||
Currently there are no published or officially supported versions of these utilities, but they are relatively simple, and can be copied and customized as needed. | ||
|
||
#### Change details | ||
|
||
Commit: [`49849bb`](https://github.com/microsoft/FluidFramework/commit/49849bb5f6bf92765bc63e19cdaf4f7d0498bebc) | ||
|
||
Affected packages: | ||
|
||
- @fluidframework/tree | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
### A `@beta` version of `nodeChanged` which includes the list of properties has been added ([#22229](https://github.com/microsoft/FluidFramework/issues/22229)) | ||
|
||
```typescript | ||
const factory = new SchemaFactory("example"); | ||
class Point2d extends factory.object("Point2d", { | ||
x: factory.number, | ||
y: factory.number, | ||
}) {} | ||
|
||
const point = new Point2d({ x: 0, y: 0 }); | ||
|
||
TreeBeta.on(point, "nodeChanged", (data) => { | ||
const changed: ReadonlySet<"x" | "y"> = data.changedProperties; | ||
if (changed.has("x")) { | ||
// ... | ||
} | ||
}); | ||
``` | ||
|
||
The payload of the `nodeChanged` event emitted by SharedTree's `TreeBeta` includes a `changedProperties` property that indicates which properties of the node changed. | ||
|
||
For object nodes, the list of properties uses the property identifiers defined in the schema, and not the persisted identifiers (or "stored keys") that can be provided through `FieldProps` when defining a schema. See the documentation for `FieldProps` for more details about the distinction between "property keys" and "stored keys". | ||
|
||
For map nodes, every key that was added, removed, or updated by a change to the tree is included in the list of properties. | ||
|
||
For array nodes, the set of properties will always be undefined: there is currently no API to get details about changes to an array. | ||
|
||
Object nodes revieve strongly types sets of changed keys, allowing compile time detection of incorrect keys: | ||
|
||
```typescript | ||
TreeBeta.on(point, "nodeChanged", (data) => { | ||
// @ts-expect-error Strong typing for changed properties of object nodes detects incorrect keys: | ||
if (data.changedProperties.has("z")) { | ||
// ... | ||
} | ||
}); | ||
``` | ||
|
||
The existing stable "nodeChanged" event's callback now is given a parameter called `unstable` of type `unknown` which is used to indicate that additional data can be provided there. This could break existing code using "nodeChanged" in a particularly fragile way. | ||
|
||
```typescript | ||
function f(optional?: number) { | ||
// ... | ||
} | ||
Tree.on(point, "nodeChanged", f); // Bad | ||
``` | ||
|
||
Code like this which is implicitly discarding an optional argument from the function used as the listener will be broken. It can be fixed by using an inline lambda expression: | ||
|
||
```typescript | ||
function f(optional?: number) { | ||
// ... | ||
} | ||
Tree.on(point, "nodeChanged", () => f()); // Safe | ||
``` | ||
|
||
#### Change details | ||
|
||
Commit: [`aae34dd`](https://github.com/microsoft/FluidFramework/commit/aae34dd9fe1aa6c153c26035f1486f4d8944c810) | ||
|
||
Affected packages: | ||
|
||
- fluid-framework | ||
- @fluidframework/tree | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
### Make SharedTree usable with legacy APIs ([#22320](https://github.com/microsoft/FluidFramework/issues/22320)) | ||
|
||
SharedTree was not previously exported in a way that made it usable with @fluidframework/aqueduct or other lower-level legacy APIs. This fixes that issue by making it consistent with other DDSes: such usages can `import { SharedTree } from "@fluidframework/tree/legacy";`. | ||
|
||
#### Change details | ||
|
||
Commit: [`bbdf869`](https://github.com/microsoft/FluidFramework/commit/bbdf869b8a1aae266bc8cb6f6016dcd8c22f0f88) | ||
|
||
Affected packages: | ||
|
||
- @fluidframework/tree | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
### Implicitly constructed object nodes now only consider own properties during validation ([#22453](https://github.com/microsoft/FluidFramework/issues/22453)) | ||
|
||
When determining if some given data is compatible with a particular ObjectNode schema, both inherited and own properties were considered. However, when constructing the node from this data, only own properties were used. This allowed input which provided required values in inherited fields to pass validation. When the node was constructed, it would lack these fields, and end up out of schema. This has been fixed: both validation and node construction now only consider own properties. | ||
|
||
This may cause some cases which previously exhibited data corruption to now throw a usage error reporting the data is incompatible. Such cases may need to copy data from the objects with inherited properties into new objects with own properties before constructing nodes from them. | ||
|
||
#### Change details | ||
|
||
Commit: [`27faa56`](https://github.com/microsoft/FluidFramework/commit/27faa56f5ae334e0b65fdd84c75764645e64f063) | ||
|
||
Affected packages: | ||
|
||
- @fluidframework/tree | ||
- fluid-framework | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
### Export SharedTree beta APIs from fluid-framework/beta ([#22469](https://github.com/microsoft/FluidFramework/issues/22469)) | ||
|
||
`fluid-framework/beta` now contains the `@beta` APIs from `@fluidframework/tree/beta`. | ||
|
||
#### Change details | ||
|
||
Commit: [`c51f55c`](https://github.com/microsoft/FluidFramework/commit/c51f55c01a641eb030f872b684e2862e57ad5197) | ||
|
||
Affected packages: | ||
|
||
- fluid-framework | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
### Add /alpha import path to @fluidframework/tree and fluid-framework packages ([#22483](https://github.com/microsoft/FluidFramework/issues/22483)) | ||
|
||
`@fluidframework/tree` and `fluid-framework` now have a `/alpha` import path where their `@alpha` APIs are exported. | ||
|
||
#### Change details | ||
|
||
Commit: [`12242cf`](https://github.com/microsoft/FluidFramework/commit/12242cfdb5aa4c342cc62f11cbf1c072840bec44) | ||
|
||
Affected packages: | ||
|
||
- fluid-framework | ||
- @fluidframework/tree | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
## 🐛 Bug Fixes | ||
|
||
### Restored old op processing behavior around batched ops to avoid potential regression ([#22508](https://github.com/microsoft/FluidFramework/issues/22508)) | ||
|
||
There's a theoretical risk of indeterminate behavior due to a recent change to how batches of ops are processed. This fix reverses that change. | ||
|
||
Pull Request [#21785](https://github.com/microsoft/FluidFramework/issues/21785) updated the ContainerRuntime to hold onto the messages in an incoming batch until they've all arrived, and only then process the set of messages. | ||
|
||
While the batch is being processed, the DeltaManager and ContainerRuntime's view of the latest sequence numbers will be out of sync. This may have unintended side effects, so out of an abundance of caution we're reversing this behavior until we can add the proper protections to ensure the system stays properly in sync. | ||
|
||
#### Change details | ||
|
||
Commit: [`709f085`](https://github.com/microsoft/FluidFramework/commit/709f085c5802bb4ad80145911ca3b05e457e9d6e) | ||
|
||
Affected packages: | ||
|
||
- @fluidframework/container-runtime | ||
|
||
[⬆️ Table of contents](#contents) | ||
|
||
## Other Changes | ||
|
||
### Remove some experimental PropertyDDS-related packages ([#22326](https://github.com/microsoft/FluidFramework/issues/22326)) | ||
|
||
The following packages will no longer be published: | ||
|
||
- @fluid-experimental/property-shared-tree-interop | ||
- @fluid-experimental/property-binder | ||
- @fluid-experimental/property-proxy | ||
- @fluid-experimental/property-inspector-table | ||
|
||
PropertyDDS itself and its dependencies will continue to be published. | ||
|
||
#### Change details | ||
|
||
Commit: [`8db660e`](https://github.com/microsoft/FluidFramework/commit/8db660e2d470e3fd590327d646b420893f7041e9) | ||
|
||
Affected packages: | ||
|
||
- @fluid-experimental/property-shared-tree-interop | ||
- @fluid-experimental/property-binder | ||
- @fluid-experimental/property-proxy | ||
- @fluid-experimental/property-inspector-table | ||
|
||
[⬆️ 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! |