Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
216600c
feat(tree): Promote TableSchema APIs to beta
Josmithr Jan 31, 2026
45c8aee
docs: Add warning about extranious modification
Josmithr Feb 2, 2026
4ff1a5d
docs: Fix typo
Josmithr Feb 2, 2026
e6b281f
docs: Add missing `@system` tag
Josmithr Feb 2, 2026
0530cff
docs: Update comment
Josmithr Feb 2, 2026
793627c
docs: Update API reports
Josmithr Feb 2, 2026
0ced6ee
docs: Update compat docs
Josmithr Feb 2, 2026
11fdf89
docs: Add remarks about index keys
Josmithr Feb 2, 2026
f675595
docs: Add more index notes
Josmithr Feb 2, 2026
f75721d
feat(runtime-definitions): Promote `MinimumVersionForCollab` to beta
Josmithr Feb 2, 2026
7479cd8
feat(tree): Promote `minVersionForCollab` option to beta
Josmithr Feb 2, 2026
9756690
docs: Add changeset
Josmithr Feb 2, 2026
15b5017
docs: Fix comment
Josmithr Feb 2, 2026
057a16a
revert: Table changes on this branch
Josmithr Feb 2, 2026
a52aca5
docs: Update changesets and promote another API
Josmithr Feb 2, 2026
f55889f
revert: Tag change
Josmithr Feb 2, 2026
f147356
docs: Revert table schema docs changes
Josmithr Feb 2, 2026
9846b93
docs: Revert table schema docs changes
Josmithr Feb 2, 2026
cc62a2c
docs: Fix typo
Josmithr Feb 2, 2026
07fd411
docs: Update README
Josmithr Feb 2, 2026
58295b9
Merge branch 'tree/promote-minVersionOption' of https://github.com/Jo…
Josmithr Feb 2, 2026
28c27a9
docs: Update comment
Josmithr Feb 3, 2026
c2d4afe
Merge branch 'main' into tree/promote-minVersionOption
Josmithr Feb 3, 2026
b638f6a
Merge branch 'tree/promote-minVersionOption' of https://github.com/Jo…
Josmithr Feb 3, 2026
bbfa89c
docs: Update changeset
Josmithr Feb 3, 2026
e4e702e
revert: Promotion of `FluidClientVersion`
Josmithr Feb 3, 2026
05b314a
Merge branch 'main' into tree/promote-minVersionOption
Josmithr Feb 3, 2026
d76ef15
Merge branch 'main' into tree/promote-minVersionOption
Josmithr Feb 3, 2026
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
21 changes: 21 additions & 0 deletions .changeset/gross-apples-defend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"fluid-framework": minor
"@fluidframework/tree": minor
"__section": feature
---
Promote MinimumVersionForCollab to beta

Promotes the [MinimumVersionForCollab](https://fluidframework.com/docs/api/runtime-definitions/minimumversionforcollab-typealias) type to beta, and adds option to [configuredSharedTreeBeta](https://fluidframework.com/docs/api/fluid-framework#configuredsharedtreebeta-function) for specifying it when creating a new `SharedTree`.

This allows users to opt into new features and optimizations that are only available when certain minimum version thresholds are guaranteed.
For more details, see [FluidClientVersion](https://fluidframework.com/docs/api/fluid-framework#fluidclientversion-variable)

#### Example usage

```typescript
// Configure SharedTree DDS to limit the features it requires of collaborators and future document users to only those available in version `2.80.0` and later, overriding the `MinimumVersionForCollab` provided by the runtime (default: "2.0.0").
// Edits made to this DDS by this client might cause clients older than the specified version to be unable to open the document and/or error out of collaboration sessions.
const SharedTree = configuredSharedTreeBeta({
minVersionForCollab: FluidClientVersion.v2_80,
});
```
10 changes: 7 additions & 3 deletions packages/dds/tree/api-report/tree.alpha.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,16 @@ export function cloneWithReplacements(root: unknown, rootKey: string, replacer:
export type CodecName = string;

// @alpha @input
export interface CodecWriteOptions extends ICodecOptions {
export interface CodecWriteOptions extends ICodecOptions, CodecWriteOptionsBeta {
readonly allowPossiblyIncompatibleWriteVersionOverrides?: boolean;
readonly minVersionForCollab: MinimumVersionForCollab;
readonly writeVersionOverrides?: ReadonlyMap<CodecName, FormatVersion>;
}

// @beta @input
export interface CodecWriteOptionsBeta {
readonly minVersionForCollab: MinimumVersionForCollab;
}

// @public
export enum CommitKind {
Default = 0,
Expand Down Expand Up @@ -1124,7 +1128,7 @@ export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecW
}

// @beta @input
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

// @alpha @sealed
export interface SimpleAllowedTypeAttributes<out Type extends SchemaType = SchemaType> {
Expand Down
7 changes: 6 additions & 1 deletion packages/dds/tree/api-report/tree.beta.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ Kind
// @beta
export function asBeta<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewBeta<TSchema>;

// @beta @input
export interface CodecWriteOptionsBeta {
readonly minVersionForCollab: MinimumVersionForCollab;
}

// @public
export enum CommitKind {
Default = 0,
Expand Down Expand Up @@ -562,7 +567,7 @@ export class SchemaUpgrade {
type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;

// @beta @input
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

// @public @sealed @system
export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
Expand Down
7 changes: 6 additions & 1 deletion packages/dds/tree/api-report/tree.legacy.beta.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ Kind
// @beta
export function asBeta<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewBeta<TSchema>;

// @beta @input
export interface CodecWriteOptionsBeta {
readonly minVersionForCollab: MinimumVersionForCollab;
}

// @public
export enum CommitKind {
Default = 0,
Expand Down Expand Up @@ -574,7 +579,7 @@ export const SharedTreeAttributes: IChannelAttributes;
export const SharedTreeFactoryType = "https://graph.microsoft.com/types/tree";

// @beta @input
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

// @public @sealed @system
export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
Expand Down
18 changes: 12 additions & 6 deletions packages/dds/tree/src/codec/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ export interface ICodecOptions {

/**
* Options relating to encoding of persisted data.
* @remarks
* Extends {@link ICodecOptions} with options that are specific to encoding data.
* @alpha @input
* @input @beta
*/
export interface CodecWriteOptions extends ICodecOptions {
export interface CodecWriteOptionsBeta {
/**
* The minimum version of the Fluid Framework client output must be encoded to be compatible with.
* @remarks
Expand All @@ -153,16 +151,24 @@ export interface CodecWriteOptions extends ICodecOptions {
* the data's format should be versioned and if they can't handle the format they should error.
*/
readonly minVersionForCollab: MinimumVersionForCollab;
}

/**
* Options relating to encoding of persisted data.
* @remarks
* Extends {@link ICodecOptions} with options that are specific to encoding data.
* @alpha @input
*/
export interface CodecWriteOptions extends ICodecOptions, CodecWriteOptionsBeta {
/**
* Overrides the version of the codec to use for encoding.
* @remarks
* Without an override, the selected version will be based on {@link CodecWriteOptions.minVersionForCollab}.
* Without an override, the selected version will be based on {@link CodecWriteOptionsBeta.minVersionForCollab}.
*/
readonly writeVersionOverrides?: ReadonlyMap<CodecName, FormatVersion>;

/**
* If true, suppress errors when `writeVersionOverrides` selects a version which may not be compatible with the {@link CodecWriteOptions.minVersionForCollab}.
* If true, suppress errors when `writeVersionOverrides` selects a version which may not be compatible with the {@link CodecWriteOptionsBeta.minVersionForCollab}.
*/
readonly allowPossiblyIncompatibleWriteVersionOverrides?: boolean;
}
Expand Down
1 change: 1 addition & 0 deletions packages/dds/tree/src/codec/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export {
type ICodecFamily,
type ICodecOptions,
type CodecWriteOptions,
type CodecWriteOptionsBeta,
type IDecoder,
type IEncoder,
type IJsonCodec,
Expand Down
1 change: 1 addition & 0 deletions packages/dds/tree/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ export { persistedToSimpleSchema } from "./shared-tree/index.js";
export {
type ICodecOptions,
type CodecWriteOptions,
type CodecWriteOptionsBeta,
FluidClientVersion,
type FormatValidator,
FormatValidatorNoOp,
Expand Down
3 changes: 2 additions & 1 deletion packages/dds/tree/src/shared-tree/sharedTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import {
type CodecTree,
type CodecWriteOptions,
type CodecWriteOptionsBeta,
DependentFormatVersion,
FluidClientVersion,
FormatValidatorNoOp,
Expand Down Expand Up @@ -612,7 +613,7 @@ export function getCodecTreeForSharedTreeFormat(
* Configuration options for SharedTree.
* @beta @input
*/
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

/**
* Configuration options for SharedTree with alpha features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,16 @@ export function cloneWithReplacements(root: unknown, rootKey: string, replacer:
export type CodecName = string;

// @alpha @input
export interface CodecWriteOptions extends ICodecOptions {
export interface CodecWriteOptions extends ICodecOptions, CodecWriteOptionsBeta {
readonly allowPossiblyIncompatibleWriteVersionOverrides?: boolean;
readonly minVersionForCollab: MinimumVersionForCollab;
readonly writeVersionOverrides?: ReadonlyMap<CodecName, FormatVersion>;
}

// @beta @input
export interface CodecWriteOptionsBeta {
readonly minVersionForCollab: MinimumVersionForCollab;
}

// @public
export enum CommitKind {
Default = 0,
Expand Down Expand Up @@ -1502,7 +1506,7 @@ export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecW
}

// @beta @input
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

// @alpha @sealed
export interface SimpleAllowedTypeAttributes<out Type extends SchemaType = SchemaType> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ export enum AttachState {
Detached = "Detached"
}

// @beta @input
export interface CodecWriteOptionsBeta {
readonly minVersionForCollab: MinimumVersionForCollab;
}

// @public
export enum CommitKind {
Default = 0,
Expand Down Expand Up @@ -934,7 +939,7 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
export const SharedTree: SharedObjectKind<ITree>;

// @beta @input
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

// @public @sealed @system
export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ export enum AttachState {
Detached = "Detached"
}

// @beta @input
export interface CodecWriteOptionsBeta {
readonly minVersionForCollab: MinimumVersionForCollab;
}

// @public
export enum CommitKind {
Default = 0,
Expand Down Expand Up @@ -1292,7 +1297,7 @@ export type SharedStringSegment = TextSegment | Marker;
export const SharedTree: SharedObjectKind<ITree>;

// @beta @input
export type SharedTreeOptionsBeta = ForestOptions;
export type SharedTreeOptionsBeta = ForestOptions & Partial<CodecWriteOptionsBeta>;

export { Side }

Expand Down
2 changes: 2 additions & 0 deletions packages/runtime/runtime-definitions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ For more information on the related support guarantees, see [API Support Levels]

To access the `public` ([SemVer](https://semver.org/)) APIs, import via `@fluidframework/runtime-definitions` like normal.

To access the `beta` APIs, import via `@fluidframework/runtime-definitions/beta`.

To access the `legacy` APIs, import via `@fluidframework/runtime-definitions/legacy`.

## API Documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
"mainEntryPointFilePath": "<projectFolder>/dist/beta.d.ts"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
"mainEntryPointFilePath": "<projectFolder>/lib/beta.d.ts"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.current.json",
"mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts"
"mainEntryPointFilePath": "<projectFolder>/lib/beta.d.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

```ts

// @beta @input
export type MinimumVersionForCollab = `${1 | 2}.${bigint}.${bigint}` | `${1 | 2}.${bigint}.${bigint}-${string}`;

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export interface LocalAttributionKey {
type: "local";
}

// @beta @legacy @input
// @beta @input
export type MinimumVersionForCollab = `${1 | 2}.${bigint}.${bigint}` | `${1 | 2}.${bigint}.${bigint}-${string}`;

// @beta @legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export interface LocalAttributionKey {
type: "local";
}

// @beta @legacy @input
// @beta @input
export type MinimumVersionForCollab = `${1 | 2}.${bigint}.${bigint}` | `${1 | 2}.${bigint}.${bigint}-${string}`;

// @beta @legacy
Expand Down
12 changes: 12 additions & 0 deletions packages/runtime/runtime-definitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
"default": "./dist/index.js"
}
},
"./beta": {
"import": {
"types": "./lib/beta.d.ts",
"default": "./lib/index.js"
},
"require": {
"types": "./dist/beta.d.ts",
"default": "./dist/index.js"
}
},
"./legacy": {
"import": {
"types": "./lib/legacy.d.ts",
Expand Down Expand Up @@ -74,9 +84,11 @@
"check:biome": "biome check .",
"check:exports": "concurrently \"npm:check:exports:*\"",
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
"check:exports:cjs:beta": "api-extractor run --config api-extractor/api-extractor-lint-beta.cjs.json",
"check:exports:cjs:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.cjs.json",
"check:exports:cjs:legacyAlpha": "api-extractor run --config api-extractor/api-extractor-lint-legacyAlpha.cjs.json",
"check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
"check:exports:esm:beta": "api-extractor run --config api-extractor/api-extractor-lint-beta.esm.json",
"check:exports:esm:legacy": "api-extractor run --config api-extractor/api-extractor-lint-legacy.esm.json",
"check:exports:esm:legacyAlpha": "api-extractor run --config api-extractor/api-extractor-lint-legacyAlpha.esm.json",
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* For example it might make sense to constrain this to something like `"1.4.0" | typeof defaultMinVersionForCollab | 2.${bigint}.0"`.
*
* @input
* @legacy @beta
* @beta
*/
export type MinimumVersionForCollab =
| `${1 | 2}.${bigint}.${bigint}`
Expand Down
Loading