Fluid Framework v2.71.0 (minor)
Contents
✨ New Features
delete keyword support for ObjectNodes (#25738)
Added support for using the delete keyword to remove content under optional fields for ObjectNodes.
// This is now equivalent to node.foo = undefined
delete node.foo;Change details
Commit: 31dca54
Affected packages:
- @fluidframework/tree
🌳 SharedTree DDS Changes
Add IndependentTree API (#25785)
New IndependentTreeAlpha and IndependentTreeBeta APIs provide similar utility to the existing alpha IndependentView API, except providing access to the ViewableTree.
This allows for multiple views (in sequence, not concurrently) to be created to test things like schema upgrades and incompatible view schema much more easily (see example below). For IndependentTreeAlpha, this also provides access to exportVerbose and exportSimpleSchema from ITreeAlpha.
An example of how to use createIndependentTreeBeta to create multiple views to test a schema upgrade:
const tree = createIndependentTreeBeta();
const stagedConfig = new TreeViewConfiguration({
schema: SchemaFactoryAlpha.types([
SchemaFactory.number,
SchemaFactoryAlpha.staged(SchemaFactory.string),
]),
});
const afterConfig = new TreeViewConfigurationAlpha({
schema: [SchemaFactory.number, SchemaFactory.string],
});
// Initialize tree
{
const view = tree.viewWith(stagedConfig);
view.initialize(1);
view.dispose();
}
// Do schema upgrade
{
const view = tree.viewWith(afterConfig);
view.upgradeSchema();
view.root = "A";
view.dispose();
}
// Can still view tree with staged schema
{
const view = tree.viewWith(stagedConfig);
assert.equal(view.root, "A");
view.dispose();
}Change details
Commit: 21c4245
Affected packages:
- fluid-framework
- @fluidframework/tree
🛠️ Start Building Today!
Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework!