Skip to content
Draft
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
20 changes: 20 additions & 0 deletions .changeset/custom-dds-removal-datastore-definitions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@fluidframework/datastore-definitions": major
"__section": breaking
---

IChannelFactory is now internal

The `IChannelFactory` interface is intended for internal Fluid Framework use only. It is
required to implement custom DDS factories, which is not supported for external use.
This export has been moved to internal and is no longer available in the public API.

Note: Other channel-related interfaces (`IChannel`, `IChannelAttributes`, `IChannelServices`,
`IChannelStorageService`, `IDeltaConnection`, `IDeltaHandler`) remain in the legacy API as
they are transitively referenced by `IChannel` and `IFluidDataStoreRuntime`. However, without
access to `IChannelFactory` and the `SharedObject`/`SharedObjectCore` base classes (which are
also now internal in `@fluidframework/shared-object-base`), implementing custom DDSes is not
possible.

Applications should use SharedTree or another existing DDS type (SharedMap, SharedCell, etc.)
rather than implementing custom DDSes.
14 changes: 14 additions & 0 deletions .changeset/custom-dds-removal-shared-object-base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@fluidframework/shared-object-base": major
"__section": breaking
---

SharedObject, SharedObjectCore, ISharedObject, ISharedObjectEvents, createSharedObjectKind, and ISharedObjectKind are now internal

These APIs are intended for internal Fluid Framework use only. External implementations
of custom DDSes are not supported. These exports have been moved to internal and are
no longer available in the public API.

Applications should use SharedTree or another existing DDS type (SharedMap, SharedCell, etc.)
rather than implementing custom DDSes. The `SharedObjectKind` type remains public as the
safe, sealed type for referencing DDS kinds.
1 change: 1 addition & 0 deletions .vale/config/vocabularies/fluid/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum
Enum
openable
Datastore
DDS
DDSes
accessor
accessors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

import { TypedEventEmitter } from "@fluid-internal/client-utils";
import type { IEventProvider, IFluidHandle } from "@fluidframework/core-interfaces";
import { FluidDataStoreRuntime } from "@fluidframework/datastore/legacy";
import type {
IChannelFactory,
IFluidDataStoreRuntime,
} from "@fluidframework/datastore-definitions/legacy";
import { MapFactory, type ISharedMap, type IValueChanged } from "@fluidframework/map/legacy";
// eslint-disable-next-line import-x/no-internal-modules -- @internal type used in example
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
// eslint-disable-next-line import-x/no-internal-modules -- @internal type used in example
import type { IChannelFactory } from "@fluidframework/datastore-definitions/internal";
import type { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/legacy";
// eslint-disable-next-line import-x/no-internal-modules -- @internal type used in example
import { MapFactory } from "@fluidframework/map/internal";
import type { ISharedMap, IValueChanged } from "@fluidframework/map/legacy";
import type {
IFluidDataStoreChannel,
IFluidDataStoreContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import { SharedString, type ISharedString } from "@fluidframework/sequence/legacy";

Expand Down
4 changes: 3 additions & 1 deletion examples/apps/contact-collection/src/dataObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import type { EventEmitter } from "@fluid-example/example-utils";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { v4 as uuid } from "uuid";

/**
Expand Down
4 changes: 3 additions & 1 deletion examples/apps/data-object-grid/src/dataObjectGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import type { EventEmitter } from "@fluid-example/example-utils";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { Serializable } from "@fluidframework/datastore-definitions/legacy";
import type React from "react";
import type { Layout } from "react-grid-layout";
Expand Down
4 changes: 3 additions & 1 deletion examples/apps/diceroller/src/container/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import type { EventEmitter } from "@fluid-example/example-utils";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IValueChanged } from "@fluidframework/map/legacy";
import React from "react";

Expand Down
3 changes: 2 additions & 1 deletion examples/apps/presence-tracker/src/datastoreSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import type {
} from "@fluidframework/core-interfaces";
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/legacy";
import { assert } from "@fluidframework/core-utils/legacy";
import { FluidDataStoreRuntime } from "@fluidframework/datastore/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
import type {
IFluidDataStoreContext,
IFluidDataStoreFactory,
Expand Down
10 changes: 7 additions & 3 deletions examples/apps/staging/src/container/groceryList/groceryList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ import type {
IFluidHandle,
} from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/legacy";
import { FluidDataStoreRuntime } from "@fluidframework/datastore/legacy";
import type { IChannelFactory } from "@fluidframework/datastore-definitions/legacy";
import { type ISharedMap, type IValueChanged, MapFactory } from "@fluidframework/map/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
// eslint-disable-next-line import-x/no-internal-modules
import type { IChannelFactory } from "@fluidframework/datastore-definitions/internal";
// eslint-disable-next-line import-x/no-internal-modules
import { MapFactory } from "@fluidframework/map/internal";
import type { ISharedMap, IValueChanged } from "@fluidframework/map/legacy";
import type {
IFluidDataStoreChannel,
IFluidDataStoreContext,
Expand Down
4 changes: 3 additions & 1 deletion examples/apps/task-selection/src/oldestClientDiceRoller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

// Lint rule can be disabled once eslint config is upgraded to 5.3.0+
import { OldestClientObserver } from "@fluid-experimental/oldest-client-observer/legacy";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { assert } from "@fluidframework/core-utils/legacy";

import type { IDiceRoller } from "./interface.js";
Expand Down
4 changes: 3 additions & 1 deletion examples/apps/task-selection/src/taskManagerDiceRoller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/legacy";
import { TaskManager } from "@fluidframework/task-manager/legacy";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import {
StablePlace,
StableRange,
} from "@fluid-experimental/tree";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import { TypedEmitter } from "tiny-typed-emitter";
import { v4 as uuid } from "uuid";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import {
type ITree,
Expand Down
4 changes: 3 additions & 1 deletion examples/benchmarks/bubblebench/baseline/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";

import { AppState } from "./state.js";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

import type { IClient } from "@fluid-example/bubblebench-common";
import { SharedTree, WriteFormat } from "@fluid-experimental/tree";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";

import { TreeObjectProxy } from "./proxy/index.js";
Expand Down
4 changes: 3 additions & 1 deletion examples/benchmarks/bubblebench/ot/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import { SharedJson1 } from "@fluid-experimental/sharejs-json1";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";

import { AppState } from "./state.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import type { ITree, TreeView } from "@fluidframework/tree";
import { SharedTree } from "@fluidframework/tree/legacy";
Expand Down
7 changes: 5 additions & 2 deletions examples/benchmarks/tablebench/src/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
* Licensed under the MIT License.
*/

/* eslint-disable import-x/no-internal-modules */

import { IsoBuffer } from "@fluid-internal/client-utils";
import { makeRandom } from "@fluid-private/stochastic-test-utils";
import { IChannel, IChannelFactory } from "@fluidframework/datastore-definitions/legacy";
import { IChannelFactory } from "@fluidframework/datastore-definitions/internal";
import { IChannel } from "@fluidframework/datastore-definitions/legacy";
import { SessionId } from "@fluidframework/id-compressor";
import { createIdCompressor } from "@fluidframework/id-compressor/legacy";
import {
MockContainerRuntimeFactory,
MockFluidDataStoreRuntime,
MockStorage,
} from "@fluidframework/test-runtime-utils/legacy";
} from "@fluidframework/test-runtime-utils/internal";

export function create<T>(factory: IChannelFactory<T>): {
channel: T & IChannel;
Expand Down
3 changes: 2 additions & 1 deletion examples/data-objects/canvas/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import { ContainerViewRuntimeFactory } from "@fluid-example/example-utils";
import { Ink } from "@fluid-experimental/ink";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import React from "react";

import { Canvas } from "./canvas.js";
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/clicker/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import { ContainerViewRuntimeFactory } from "@fluid-example/example-utils";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { IEvent, IFluidHandle } from "@fluidframework/core-interfaces";
import { SharedCounter } from "@fluidframework/counter/legacy";
import { TaskManager } from "@fluidframework/task-manager/legacy";
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/codemirror/src/codeMirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

import { EventEmitter } from "@fluid-example/example-utils";
import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces";
import { FluidDataStoreRuntime, FluidObjectHandle } from "@fluidframework/datastore/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
import { FluidObjectHandle } from "@fluidframework/datastore/legacy";
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/legacy";
import { ISharedMap, SharedMap } from "@fluidframework/map/legacy";
import {
Expand Down
3 changes: 2 additions & 1 deletion examples/data-objects/monaco/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
*/

import { ContainerViewRuntimeFactory } from "@fluid-example/example-utils";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import * as sequence from "@fluidframework/sequence/legacy";
import React from "react";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import type {
ICoordinate,
} from "@fluid-example/multiview-coordinate-interface";
import { Coordinate } from "@fluid-example/multiview-coordinate-model";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import type { IValueChanged } from "@fluidframework/map/legacy";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import type { ICoordinate } from "@fluid-example/multiview-coordinate-interface";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import type { IValueChanged } from "@fluidframework/map/legacy";

const xKey = "x";
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/prosemirror/src/prosemirror.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import { EventEmitter } from "@fluid-example/example-utils";
import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces";
import { FluidDataStoreRuntime, FluidObjectHandle } from "@fluidframework/datastore/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
import { FluidObjectHandle } from "@fluidframework/datastore/legacy";
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/legacy";
import { ISharedMap, SharedMap } from "@fluidframework/map/legacy";
import {
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/smde/src/smde.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import { EventEmitter } from "@fluid-example/example-utils";
import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/legacy";
import { FluidDataStoreRuntime, FluidObjectHandle } from "@fluidframework/datastore/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { FluidDataStoreRuntime } from "@fluidframework/datastore/internal";
import { FluidObjectHandle } from "@fluidframework/datastore/legacy";
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/legacy";
import { ISharedMap, SharedMap } from "@fluidframework/map/legacy";
import {
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/table-document/src/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import {
positionToRowCol,
rowColToPosition,
} from "@fluid-experimental/sequence-deprecated";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules -- @internal type used in example
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { IEvent, IFluidHandle } from "@fluidframework/core-interfaces";
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/legacy";
// eslint-disable-next-line import-x/no-internal-modules -- #26904: `sequence` internals used in examples
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/table-document/src/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules -- @internal type used in example
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { PropertySet } from "@fluidframework/sequence/legacy";

Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/webflow/src/document/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { IEvent, IFluidHandle } from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/legacy";
import {
Expand Down
4 changes: 3 additions & 1 deletion examples/data-objects/webflow/src/host/webFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* Licensed under the MIT License.
*/

import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/legacy";

Expand Down
4 changes: 3 additions & 1 deletion examples/external-data/src/model/taskList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

import { TypedEventEmitter } from "@fluid-internal/client-utils";
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
// eslint-disable-next-line import-x/no-internal-modules -- #26903: `cell` internals used in examples
import { type ISharedCell, SharedCell } from "@fluidframework/cell/internal";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
Expand Down
Loading
Loading