Contents
- 🚨 Breaking Changes
- @fluid-experimental/attributable-map package removed (#25019)
- 🌳 SharedTree DDS Changes
- Fix adaptEnum's handling of numeric enums (#24957)
- "rootChanged" event is no longer skipped if first change is setting the root to undefined (#24994)
- Make POJO mode TreeArrayNodes report the array constructor as their constructor (#24988)
- Legacy API Changes
- New "getSnapshotTree" API on "IChannelStorageService" (#24970)
- New "PureDataObject" implementation "TreeDataObject" added (#25025)
- Add API for tree-based root data object (#25030)
🚨 Breaking Changes
@fluid-experimental/attributable-map package removed (#25019)
The @fluid-experimental/attributable-map package has been removed without replacement.
Change details
Commit: c8bbd6d
Affected packages:
- @fluid-experimental/attributable-map
⬆️ Table of contents
🌳 SharedTree DDS Changes
Fix adaptEnum's handling of numeric enums (#24957)
Enum entries whose values are numeric get additional properties on TypeScript's generated Enum object. These values were getting treated like enum entries at runtime by adaptEnum
(@beta
). This has been fixed and the runtime behavior now matches the types in this case.
If any documents were created with this API which were impacted by this bug and keeping them openable is required, they will need a workaround. Impacted schema using the union from adaptEnum
can need to be updated to explicitly include the previously erroneously generated schema.
Before:
enum Mode {
a = 1,
}
const ModeNodes = adaptEnum(schemaFactory, Mode);
const union = ModeNodes.schema;
After:
enum Mode {
a = 1,
}
const ModeNodes = adaptEnum(schemaFactory, Mode);
// Bugged version of adaptEnum used to include this: it should not be used but must be included in the schema for legacy document compatibility.
class Workaround extends schemaFactory.object("a", {}) {}
const union = [...ModeNodes.schema, Workaround] as const;
To help detect when schema contain unexpected content, and to ensure workarounds like this are implemented properly, applications should include tests which check the schema for compatibility. See tree-cli-app's schema tests for an example of how to do this.
The schema returned by adaptEnum
have also been updated to toString
to include the value of the particular enum entry: this has no effect on the nodes, just the schema.
Change details
Commit: 7535d31
Affected packages:
- @fluidframework/tree
- fluid-framework
⬆️ Table of contents
"rootChanged" event is no longer skipped if first change is setting the root to undefined (#24994)
A bug has been fixed where rootChanged would not be fired if the change is the first change since the TreeView became in-schema, and the change was setting the document root to undefined
.
Change details
Commit: e6f2587
Affected packages:
- @fluidframework/tree
- fluid-framework
⬆️ Table of contents
Make POJO mode TreeArrayNodes report the array constructor as their constructor (#24988)
Make POJO mode TreeArrayNode's inherited constructor
property report Array
instead of the TreeNodeSchema
class. This is necessary to make TreeArrayNode
s appear equal to arrays according to NodeJS's assert.strict.deepEqual
in NodeJS 22.
Change details
Commit: 7b4d0ab
Affected packages:
- @fluidframework/tree
- fluid-framework
⬆️ Table of contents
Legacy API Changes
New "getSnapshotTree" API on "IChannelStorageService" (#24970)
A new API, getSnapshotTree
has been added to IChannelStorageService
. It should return the snapshot tree for a channel. This will help channels examine their snapshot when it consists of dynamic trees and blobs, i.e., when the number of tree and blobs and / or their keys are not known in advance. This is optional for backwards compatibility, and will become required in the future.
Change details
Commit: d1241a4
Affected packages:
- @fluidframework/datastore-definitions
⬆️ Table of contents
New "PureDataObject" implementation "TreeDataObject" added (#25025)
A new implementation of PureDataObject
has been added: TreeDataObject
. Where DataObject
stores its contents in a SharedDirectory
, TreeDataObject
stores its contents in a SharedTree
.
Change details
Commit: f4fbd2f
Affected packages:
- @fluidframework/aqueduct
⬆️ Table of contents
Add API for tree-based root data object (#25030)
Adds createTreeContainerRuntimeFactory
which can be used to create runtime factories which construct containers with an entry point containing a single tree-based root data object.
Change details
Commit: 30a0d7e
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!