Skip to content

build(client): Update changesets for clarity and concision #24712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .changeset/afraid-rice-feel.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
TreeAlpha.create now accepts unhydrated nodes

[TreeAlpha.create](https://fluidframework.com/docs/api/fluid-framework/treealpha-interface#create-methodsignature) now accepts [unhydrated](https://fluidframework.com/docs/api/fluid-framework/unhydrated-typealias) nodes.
`TreeAlpha.create`'s documentation has been fixed to indicate support instead of being self contradictory about it.
`TreeAlpha.create`'s documentation has been updated to clarify that this is supported.

Additionally `TreeAlpha.create` no longer throws a "Tree does not conform to schema" error when given a tree omitting an identifier.
Instead the identifier behaves like it would for other ways to build unhydrated nodes: remaining unreadable until hydrated.
Instead, the identifier behaves like it would for other ways to build unhydrated nodes: remaining unreadable until hydrated.

Check failure on line 12 in .changeset/afraid-rice-feel.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'unhydrated'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'unhydrated'?", "location": {"path": ".changeset/afraid-rice-feel.md", "range": {"start": {"line": 12, "column": 71}}}, "severity": "ERROR"}
4 changes: 2 additions & 2 deletions .changeset/gentle-eggs-heal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@fluid-experimental/tree-react-api": minor
"__section": feature
---
New experimental objectIdNumber API has been added
New experimental objectIdNumber API

A new `objectIdNumber` has been added, which is handy when an identifier is needed which corresponds to an object identity.
A new `objectIdNumber` has been added, which is useful when you need an identifier which corresponds to an object identity.
For example: when specifying a React "key" that corresponds to a `TreeNode`.
2 changes: 1 addition & 1 deletion .changeset/old-bees-itch.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@fluidframework/tree": minor
"__section": tree
---
comparePersistedSchema (alpha) has had its canInitialize parameter removed
The comparePersistedSchema function (alpha) has had its canInitialize parameter removed

Check failure on line 6 in .changeset/old-bees-itch.md

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'canInitialize'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'canInitialize'?", "location": {"path": ".changeset/old-bees-itch.md", "range": {"start": {"line": 6, "column": 57}}}, "severity": "ERROR"}

[comparePersistedSchema](https://fluidframework.com/docs/api/tree/#comparepersistedschema-function) has had its `canInitialize` parameter removed.
This parameter was only used to add to the output [SchemaCompatibilityStatus](https://fluidframework.com/docs/api/fluid-framework/schemacompatibilitystatus-interface).
Expand Down
4 changes: 3 additions & 1 deletion .changeset/public-houses-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
---
"getPresence(container: IFluidContainer): Presence" now supported

`getPresence` is now supported and may be used to directly acquire `Presence` instead of using `ExperimentalPresenceManager` in container schema and calling `getPresenceViaDataObject`. (Both of those are now deprecated.)
You can now use the `getPresence` function to directly acquire `Presence`. In previous releases, you were required to
use `ExperimentalPresenceManager` in container schema and calling `getPresenceViaDataObject`, but that is no longer
required. Both `ExperimentalPresenceManager` and `getPresenceViaDataObject` are now deprecated.
2 changes: 1 addition & 1 deletion .changeset/public-snakes-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
TreeNodes now implicitly generate identifiers on access instead of throwing

Accessing a defaulted [identifier](https://fluidframework.com/docs/api/fluid-framework/schemafactory-class#identifier-property) on an [Unhydrated](https://fluidframework.com/docs/api/fluid-framework/unhydrated-typealias) `TreeNode` no longer throws a usage error.
Instead a new UUID is allocated for the identifier and returned.
Instead, a new UUID is allocated for the identifier and returned.
These UUIDs will be more compressible than random ones, since they all come from a single sequence (starting with a random UUID).
They will not be fully compressed like the identifiers generated after hydration that leverage the document's [IIdCompressor](https://fluidframework.com/docs/api/id-compressor/iidcompressor-interface).

Expand Down
2 changes: 1 addition & 1 deletion .changeset/tabaxi-fellas-inspire.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@fluidframework/tree": minor
"__section": tree
---
TableSchema (alpha) APIs have been added
New TableSchema (alpha) APIs

A `TableSchema` utility has been added to Shared Tree for managing dynamic, tabular data.
This new `TableSchema` namespace contains APIs for creating column, row, and table [node schema](https://fluidframework.com/docs/api/fluid-framework/treenodeschema-typealias).
Expand Down
5 changes: 3 additions & 2 deletions .changeset/tough-parts-kick.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@fluidframework/tree": minor
"__section": feature
---
TreeAlpha.key2 API added
New TreeAlpha.key2 API

The `TreeAlpha.key2` method is meant to eventually replace the public `Tree.key` method. This new method now returns undefined in the case where there is a root node.
The `TreeAlpha.key2` method is meant to eventually replace the public `Tree.key` method.
This new method returns `undefined` in the case where there is a root node.
14 changes: 13 additions & 1 deletion .changeset/tricky-shrimps-hunt.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,55 +3,67 @@
"@fluidframework/tree": minor
"__section": feature
---
TreeAlpha identifier APIs for converting, retrieving, and generating identifiers have been added
New TreeAlpha identifier APIs for converting, retrieving, and generating identifiers

#### TreeAlpha.identifier

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we enable markdown-lint for our changesets? Would catch these sorts of formatting issues. Alternatively, we could just run prettier on them

You can retrieve the long identifier with `TreeAlpha.identifier(node)`, where `node` is a `TreeNode`. The long identifier is a stable, compressible UUID generated by the tree.
In cases where the node does not yet have an identifier assigned, this will return `undefined`.
These cases include:
- The node does not contain an identifier field.
- The node is a non-hydrated node with a user provided identifier. Note that if it is a non-hydrated node without an identifier provided, it will throw an error.

#### TreeAlpha.identifier.shorten

You can shorten a long identifier with `TreeAlpha.identifier.shorten(branch, identifier)`, where `branch` is a `TreeBranch`, and `identifier` is a `string`.
If the method returns a valid short identifier, this identifier can be passed into `TreeAlpha.identifier.lengthen`
to get the original valid long `identifier` back.
In the cases where it's not possible to shorten the `identifier`, it will return `undefined`.
These cases include:

- A compressible long identifier, but it is unrecognized by the tree that the node belongs to. This can occur if the identifier is not generated from the tree.
- An identifier which is not compressible by the tree. This can occur if the node's identifier was a user provided string.

#### TreeAlpha.identifier.lengthen

You can lengthen a short identifier with `TreeAlpha.identifier.lengthen(branch, identifier)`, where `branch` is a `TreeBranch`, and `identifier` is a `number`.
If the method returns a valid long identifier, this identifier can be passed into `TreeAlpha.identifier.shorten` to get the original `identifier` back.
In the cases where it's not possible to lengthen the `identifier`, this method will throw an error.
These cases include:

- An unrecognized short identifier. This can occur if the identifier is not generated from the tree.

#### TreeAlpha.identifier.getShort

You can retrieve the short identifier from a node with `TreeAlpha.identifier.getShort(node)` where `node` is a `TreeNode`.
If it is not possible to retrieve the short identifier, it will return `undefined`

##### Example for a node with valid identifier

```typescript
// This will retrieve the short identifier from the node.
const shortIdentifier = TreeAlpha.identifier.getShort(nodeWithValidIdentifier)
```

##### Examples for when you get undefined

In cases where the node provided does not contain an identifier that is recognized or compressible by the tree that the node belongs to, this method will return undefined.
This will occur in the following cases:

- The node is an non-hydrated node with a user provided identifier. Note that if it is an non-hydrated node without an identifier provided, it will throw an error.
- The node does not contain an identifier field.
- The node contains a compressible long identifier, but it is unrecognized by the tree that the node belongs to. This can occur if the identifier is not generated from the tree.
- The node contains an identifier which is not compressible by its id compressor. This can occur if the node's identifier was a user provided string.

```typescript
// This will return undefined
const shortIdentifier = TreeAlpha.identifier.getShort(node)
```

#### TreeAlpha.identifier.create

You can create a long identifier from a branch with `TreeAlpha.identifier.create(branch)` where `branch` is a `TreeBranch`.

```typescript
const createdIdentifier = TreeAlpha.identifier.create(branch)
```