Skip to content

Upcoming Release: FluidFramework v2.50.0 #22101

Open
@tylerbutler

Description

@tylerbutler

This issue is automatically updated with a preview of the release notes for the upcoming Fluid Framework release.

To generate release notes locally to commit to the RELEASE_NOTES folder in the repo, run the following command:

pnpm flub generate releaseNotes -g client -t minor --outFile RELEASE_NOTES/2.50.0.md

To generate the release notes to paste into the GitHub Release, run the following command:

pnpm flub generate releaseNotes -g client -t minor --headingLinks --excludeH1 --outFile temporary-file.md

This should happen automatically as part of the release process, but if you need to generate the release notes manually, you can use the above command.


Fluid Framework v2.50.0

Contents

Other Changes

StateFactory.latest now accepts a validator parameter (#24432)

The StateFactory.latest API now accepts a validator argument. The validator is a function that will be called at runtime to verify that the data is valid. This is especially useful when changing the schema of presence data.

See the presence documentation for more details.

Change details

Commit: ffe5d0b

Affected packages:

  • @fluidframework/presence

⬆️ Table of contents

Unknown section: _unknown

---

section: tree

Record node kind was added (alpha) (#24908)

Adds a new kind of node to SharedTree that models a TypeScript record. As is the case with map nodes, record nodes only support string keys.

class MyRecord extends schemaFactory.record("my-record", [
  schemaFactory.number,
  schemaFactory.string,
]) {}
const myRecord = new MyRecord({
  foo: 42,
  bar: "Hello world!",
});

const foo = myRecord.foo; // 42

delete myRecord.foo;

myRecord.baz = 37;

const keys = Object.keys(myRecord); // ["bar", "baz"]
const values = Object.values(myRecord); // ["Hello world!", 37]
const entries = Object.entries(myRecord); // [["bar", "Hello world!"], ["baz", 37]]

NodeKind enum update

This change includes the addition of a new flag to the NodeKind enum. This API notes in its documentation that users should not treat its flags as an exhaustive set.

This change may break code that treats it that way. We recommend updating your code to be more tolerant of unknown node kinds going forward.

Also see alternative options for schema-agnostic tree traversal if needed:

Additional features

In addition to the operations afforded by TypeScript records, SharedTree record nodes can be iterated (equivalent to Object.entries).

class MyRecord extends schemaFactory.record("my-record", [schemaFactory.number, schemaFactory.string]) {}
const myRecord = new MyRecord({
	foo: 42,
	bar: "Hello world!"
});

for (const [key, value] of myRecord) {
	...
}

const a = { ...myRecord }; // { foo: 42, bar: "Hello world!" }
const b = [...myRecord]; // [["foo", 42], ["bar, "Hello world!"]]

Recursive records

Recursive record schema can be defined using recordRecursive on SchemaFactoryAlpha.

class MyRecord extends schemaFactory.recordRecursive("my-record", [
  schemaFactory.string,
  () => MyRecord,
]) {}
const myRecord = new MyRecord({
  foo: "Hello world!",
  bar: new MyRecord({
    x: "foo",
    y: new MyRecord({}),
  }),
});

TableSchema update (alpha)

The TableSchema APIs have been updated to use record nodes in the schema they generate. Specifically, the Row representation now uses a record to store its column-cell pairs, rather than a map.

The node types derived from these APIs model their data in a row-major format. That is, each row in the table contains the set of cells that belong to that row, where each cell is indexed by its corresponding column.

Previously, this was modeled using a MapNode. This format proved cumbersome to interop with popular table rendering libraries like tanstack, which expect a record-like format.

The persisted format of documents containing trees derived from these APIs is the same, so this change is forward and backward compatible.

JsonDomainSchema update (alpha)

JsonObject has been updated to a record rather than a map.

The persisted format of documents containing trees derived from these APIs is the same, so this change is forward and backward compatible.

Change details

Commit: b25667b

Affected packages:

  • @fluidframework/tree
  • fluid-framework

⬆️ Table of contents

🛠️ Start Building Today!

Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions