Releases: microsoft/FluidFramework
Fluid Framework v2.4.0 (minor)
Contents
- 🌳 SharedTree DDS changes
- ✨ New! Alpha SharedTree branching APIs (#22550)
- ✨ New! Alpha API for providing SharedTree configuration options (#22701)
- ✨ New! Alpha APIs for producing SharedTree schema from enums (#20035)
- ✨ New! Alpha API for snapshotting Schema (#22733)
- Expose the view schema from the TreeView interface (#22547)
- Metadata can now be associated with Field Schema (#22564)
- Unhydrated SharedTree nodes now emit change events when edited (#22661)
- Non-leaf field access has been optimized (#22717)
- 🐛 Bug Fixes
⚠️ Deprecations
🌳 SharedTree DDS changes
✨ New! Alpha SharedTree branching APIs (#22550)
Several APIs have been added to allow for creating and coordinating "version-control"-style branches of the SharedTree. Use the getBranch
entry point function to acquire a branch. For example:
function makeEditOnBranch(mainView: TreeView<typeof MySchema>) {
mainView.root.myData = 3;
const mainBranch = getBranch(mainView); // This function accepts either a view of a SharedTree (acquired e.g. via `sharedTree.viewWith(...)`) or a `SharedTree` directly.
const forkBranch = mainBranch.branch(); // This creates a new branch based on the existing branch.
const forkView = forkBranch.viewWith(
new TreeViewConfiguration({ schema: MySchema }),
); // Acquire a view of the forked branch in order to read or edit its tree.
forkView.root.myData = 4; // Set the value on the fork branch to be 4. The main branch still has a value of 3.
mainBranch.merge(forkBranch); // Merging the fork changes into the main branch causes the main branch to have a value of 4.
// Note: The main branch (and therefore, also the `forkView`) is automatically disposed by the merge.
// To prevent this, use `mainBranch.merge(forkBranch, false)`.
}
Merging any number of commits into a target branch (via the TreeBranch.merge
method) generates a revertible for each commit on the target branch. See #22644 for more information about revertible support in the branching APIs.
Change details
Commit: 8f4587c
Affected packages:
- fluid-framework
- @fluidframework/tree
✨ New! Alpha API for providing SharedTree configuration options (#22701)
A new alpha configuredSharedTree
had been added. This allows providing configuration options, primarily for debugging, testing and evaluation of upcoming features. The resulting configured SharedTree
object can then be used in-place of the regular SharedTree
imported from fluid-framework
.
import {
ForestType,
TreeCompressionStrategy,
configuredSharedTree,
typeboxValidator,
} from "@fluid-framework/alpha";
// Maximum debuggability and validation enabled:
const SharedTree = configuredSharedTree({
forest: ForestType.Expensive,
jsonValidator: typeboxValidator,
treeEncodeType: TreeCompressionStrategy.Uncompressed,
});
// Opts into the under development optimized tree storage planned to be the eventual default implementation:
const SharedTree = configuredSharedTree({
forest: ForestType.Optimized,
});
Change details
Commit: 40d3648
Affected packages:
- fluid-framework
- @fluidframework/tree
✨ New! Alpha APIs for producing SharedTree schema from enums (#20035)
adaptEnum
and enumFromStrings
have been added to @fluidframework/tree/alpha
and fluid-framework/alpha
. These unstable alpha APIs are relatively simple helpers on-top of public APIs (source: schemaCreationUtilities.ts): thus if these change or stable alternatives are needed, an application can replicate this functionality using these implementations as an example.
Change details
Commit: 5f9bbe0
Affected packages:
- fluid-framework
- @fluidframework/tree
✨ New! Alpha API for snapshotting Schema (#22733)
extractPersistedSchema
can now be used to extra a JSON-compatible representation of the subset of a schema that gets stored in documents. This can be used write tests which snapshot an applications schema. Such tests can be used to detect schema changes which could would impact document compatibility, and can be combined with the new comparePersistedSchema
to measure what kind of compatibility impact the schema change has.
Change details
Commit: 920a65f
Affected packages:
- fluid-framework
- @fluidframework/tree
Expose the view schema from the TreeView interface (#22547)
Users of TreeView can now access the type-safe view schema directly on the view object via TreeView.schema
. This allows users to avoid passing the schema around in addition to the view in scenarios where both are needed. It also avoids scenarios in which code wants to accept both a view and its schema and thus must constrain both to be of the same schema type.
Change details
Commit: 2aa29d9
Affected packages:
- @fluidframework/tree
Metadata can now be associated with Field Schema (#22564)
Users of TreeView can now specify metadata when creating Field Schema. This includes system-understood metadata, i.e., description
.
Example:
class Point extends schemaFactory.object("Point", {
x: schemaFactory.required(schemaFactory.number, {
metadata: { description: "The horizontal component of the point." },
}),
y: schemaFactory.required(schemaFactory.number, {
metadata: { description: "The vertical component of the point." },
}),
}) {}
Functionality like the experimental conversion of Tree Schema to JSON Schema (getJsonSchema
) can leverage such system-understood metadata to generate useful information. In the case of the description
property, this is mapped directly to the description
property supported by JSON Schema.
Custom, user-defined properties can also be specified. These properties will not be leveraged by the system by default, but can be used as a handy means of associating common application-specific properties with Field Schema.
Example:
An application is implementing search functionality. By default, the app author wishes for all app content to be indexable by search, unless otherwise specified. They can leverage schema metadata to decorate fields that should be ignored by search, and leverage that information when walking the tree during a search.
interface AppMetadata {
/**
* Whether or not the field should be ignored by search.
* @defaultValue `false`
*/
searchIgnore?: boolean;
}
class Note extends schemaFactory.object("Note", {
position: schemaFactory.required(Point, {
metadata: {
description: "The position of the upper-left cor...
build-tools v0.49.0 (minor)
This is a minor release.
build-tools v0.48.0 (minor)
This is a minor release.
build-tools v0.47.0 (minor)
This is a minor release.
Fluid Framework v2.3.1 (patch)
What's Changed
- [bump] client: 2.3.0 => 2.3.1 (patch)
#22690
- [main > release/client/2.3]: Handle Location redirection for getSharingInformation call (#22551)
#22619
- [port 2.3]: Avoid two leading slashes in the request to create a new file (#22563)
#22591
- fix(release/client/2.3): Update version argument in package promotion command to correct parameter
#22584
Full Changelog: client_v2.3.0...client_v2.3.1
Fluid Framework v2.2.2 (patch)
What's Changed
- [v2.2] Port #22508 and prereqs (ContainerRuntime: Process incoming batches op-by-op instead of waiting for the whole batch)
#22654
- [main > release/client/2.2]: Handle Location redirection for getSharingInformation call (#22551)
#22620
- [port 2.2]: Avoid two leading slashes in the request to create a new file (#22563)
#22590
- Manually bump client release branch from 2.2.1 to 2.2.2
#22573
Full Changelog: client_v2.2.1...client_v2.2.2
Fluid Framework v2.1.2 (patch)
What's Changed
- [main > release/client/2.1]: Handle Location redirection for getSharingInformation call (#22551)
#22621
- [port 2.1]: Avoid two leading slashes in the request to create a new file (#22563)
#22589
- Manually bump client release branch from 2.1.1 to 2.1.2
#22571
Full Changelog: client_v2.1.1...client_v2.1.2
Fluid Framework v2.0.9 (patch)
What's Changed
- [main > release/client/2.0]: Handle Location redirection for getSharingInformation call (#22551)
#22622
- [bump] client: 2.0.8 => 2.0.9 (patch)
#22606
Full Changelog: client_v2.0.8...client_v2.0.9
Fluid Framework v2.0.0-rc.5.0.8 (patch)
What's Changed
- [main > release/client/rc.5.0]: Handle Location redirection for getSharingInformation call (#22551)
#22577
- [Port 2.0.0-rc.5.0] Hide part of code behind feature flag (#22529)
#22534
- [bump] client: 2.0.0-rc.5.0.7 => 2.0.0-rc.5.0.8 (patch)
#22034
Full Changelog: client_v2.0.0-rc.5.0.7...client_v2.0.0-rc.5.0.8
Fluid Framework v2.0.8 (patch)
What's Changed
- [port 2.0]: Avoid two leading slashes in the request to create a new file
#22588
- Manually bump client release branch from 2.0.7 to 2.0.8
#22568
Full Changelog: client_v2.0.7...client_v2.0.8