Skip to content
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

Remove several types from @public scope #21142

Merged
merged 5 commits into from
May 17, 2024
Merged
Changes from 1 commit
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
18 changes: 18 additions & 0 deletions .changeset/hip-results-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@fluidframework/datastore-definitions": minor
"fluid-framework": minor
"@fluidframework/shared-object-base": minor
---

Remove several types from `@public` scope

The following types have been moved from `@public` to `@alpha`:

- `IFluidSerializer`
- `ISharedObjectEvents`
- `IChannelServices`
- `IChannelStorageService`
- `IDeltaConnection`
- `IDeltaHandler`

These should not be needed by users of the declarative API, which is what `@public` is targeting.
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import { IChannelFactory } from '@fluidframework/datastore-definitions/internal'
import { IChannelServices } from '@fluidframework/datastore-definitions';
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions/internal';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISharedObjectKind } from '@fluidframework/shared-object-base/internal';
import { IsoBuffer } from '@fluid-internal/client-utils';
Original file line number Diff line number Diff line change
@@ -29,8 +29,7 @@ import {
import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { SharedObject } from "@fluidframework/shared-object-base/internal";
import { SharedObject, IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import axios from "axios";
import { copy as cloneDeep } from "fastest-json-copy";
import { Packr } from "msgpackr";
Original file line number Diff line number Diff line change
@@ -7,11 +7,11 @@
import { AttributionKey } from '@fluidframework/runtime-definitions/internal';
import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';
import { ISharedObject } from '@fluidframework/shared-object-base/internal';
import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
import { ISharedObjectKind } from '@fluidframework/shared-object-base/internal';
import { SharedObjectKind } from '@fluidframework/shared-object-base';
import { SharedObjectKind } from '@fluidframework/shared-object-base/internal';

// @internal
export const AttributableMap: ISharedObjectKind<ISharedMap> & SharedObjectKind<ISharedMap>;
2 changes: 1 addition & 1 deletion experimental/dds/attributable-map/src/localValues.ts
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { AttributionKey } from "@fluidframework/runtime-definitions/internal";
import { ISerializedHandle } from "@fluidframework/runtime-utils/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import {
IFluidSerializer,
ValueType,
parseHandles,
serializeHandles,
7 changes: 5 additions & 2 deletions experimental/dds/attributable-map/src/map.ts
Original file line number Diff line number Diff line change
@@ -17,8 +17,11 @@ import {
AttributionKey,
} from "@fluidframework/runtime-definitions/internal";
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { SharedObject, createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
import {
IFluidSerializer,
SharedObject,
createSharedObjectKind,
} from "@fluidframework/shared-object-base/internal";

import { ISharedMap, ISharedMapEvents } from "./interfaces.js";
import { AttributableMapKernel, IMapDataObjectSerializable, IMapOperation } from "./mapKernel.js";
7 changes: 5 additions & 2 deletions experimental/dds/attributable-map/src/mapKernel.ts
Original file line number Diff line number Diff line change
@@ -8,8 +8,11 @@ import { IFluidHandle } from "@fluidframework/core-interfaces";
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
import { AttributionKey } from "@fluidframework/runtime-definitions/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { ValueType, bindHandles } from "@fluidframework/shared-object-base/internal";
import {
IFluidSerializer,
ValueType,
bindHandles,
} from "@fluidframework/shared-object-base/internal";

// eslint-disable-next-line import/no-deprecated
import { ISerializableValue, ISerializedValue, ISharedMapEvents } from "./interfaces.js";
2 changes: 1 addition & 1 deletion experimental/dds/ot/ot/api-report/ot.api.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
import { IChannelAttributes } from '@fluidframework/datastore-definitions/internal';
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions/internal';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions/internal';
import { SharedObject } from '@fluidframework/shared-object-base/internal';
7 changes: 5 additions & 2 deletions experimental/dds/ot/ot/src/ot.ts
Original file line number Diff line number Diff line change
@@ -12,8 +12,11 @@ import {
} from "@fluidframework/datastore-definitions/internal";
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
import {
IFluidSerializer,
SharedObject,
createSingleBlobSummary,
} from "@fluidframework/shared-object-base/internal";

interface ISequencedOpInfo<TOp> {
client: string;
2 changes: 1 addition & 1 deletion experimental/dds/ot/ot/src/test/ot.stress.spec.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

import { strict as assert } from "assert";

import { IChannelServices } from "@fluidframework/datastore-definitions";
import { IChannelServices } from "@fluidframework/datastore-definitions/internal";
import {
MockContainerRuntimeFactoryForReconnection,
MockContainerRuntimeForReconnection,
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

import { strict as assert } from "assert";

import { IChannelServices } from "@fluidframework/datastore-definitions";
import { IChannelServices } from "@fluidframework/datastore-definitions/internal";
import {
MockContainerRuntimeFactory,
MockContainerRuntimeFactoryForReconnection,
4 changes: 2 additions & 2 deletions experimental/dds/tree/api-report/experimental-tree.api.md
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@ import { IExperimentalIncrementalSummaryContext } from '@fluidframework/runtime-
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions/internal';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidLoadable } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions/internal';
import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
import { ISharedObjectEvents } from '@fluidframework/shared-object-base/internal';
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions/internal';
import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
8 changes: 6 additions & 2 deletions experimental/dds/tree/src/SharedTree.ts
Original file line number Diff line number Diff line change
@@ -15,8 +15,12 @@ import {
} from '@fluidframework/datastore-definitions/internal';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISummaryTreeWithStats, ITelemetryContext } from '@fluidframework/runtime-definitions/internal';
import { IFluidSerializer, ISharedObjectEvents } from '@fluidframework/shared-object-base';
import { SharedObject, createSingleBlobSummary } from '@fluidframework/shared-object-base/internal';
import {
IFluidSerializer,
ISharedObjectEvents,
SharedObject,
createSingleBlobSummary,
} from '@fluidframework/shared-object-base/internal';
import {
IEventSampler,
ITelemetryLoggerPropertyBags,
3 changes: 1 addition & 2 deletions experimental/dds/tree/src/Summary.ts
Original file line number Diff line number Diff line change
@@ -4,8 +4,7 @@
*/

import type { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { serializeHandles } from '@fluidframework/shared-object-base/internal';
import { IFluidSerializer, serializeHandles } from '@fluidframework/shared-object-base/internal';

import { fail } from './Common.js';
import type { EditHandle } from './EditLog.js';
2 changes: 1 addition & 1 deletion experimental/dds/tree/src/SummaryBackCompatibility.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*/

import type { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
import type { IFluidSerializer } from '@fluidframework/shared-object-base';
import type { IFluidSerializer } from '@fluidframework/shared-object-base/internal';

import { fail } from './Common.js';
import { getNumberOfHandlesFromEditLogSummary } from './EditLog.js';
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import {
type IChannelServices,
type IChannelStorageService,
type IDeltaConnection,
} from '@fluidframework/datastore-definitions';
} from '@fluidframework/datastore-definitions/internal';

/**
* ShimChannelServices wraps an existing IChannelServices object and provides a new ShimDeltaConnection
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

import { IFluidHandle, IRequest, IResponse } from '@fluidframework/core-interfaces';
import { FluidHandleBase } from '@fluidframework/runtime-utils/internal';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';

export class TestFluidSerializer implements IFluidSerializer {
public constructor() {}
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ export interface ContainerWarning extends IErrorBase_2 {
export interface IAudience extends IEventProvider<IAudienceEvents> {
getMember(clientId: string): IClient | undefined;
getMembers(): Map<string, IClient>;
getSelf: () => ISelf | undefined;
getSelf(): ISelf | undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when reviewing public APIs, I spotted this. I don't think the intention in this API was to have a mutable callback users could reassign OR call without the Audience object as its this. At least one implementation implemented this with a method, so I made the API match.

}

// @public
@@ -462,8 +462,8 @@ export interface IRuntimeFactory extends IProvideRuntimeFactory {

// @public
export interface ISelf {
client?: IClient;
clientId: string;
readonly client?: IClient;
readonly clientId: string;
Comment on lines +465 to +466
Copy link
Contributor Author

Choose a reason for hiding this comment

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

being able to reassign who self is seems like not something we support, do I cleaned this up too.

}

// @alpha
6 changes: 3 additions & 3 deletions packages/common/container-definitions/src/audience.ts
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ export interface ISelf {
* clientId of current or previous connection (if client is in disconnected or reconnecting / catching up state)
* It changes only when client has reconnected, caught up with latest ops.
*/
clientId: string;
readonly clientId: string;

/**
* Information about current client (including user identity, connection properties), supplied by ordering service when
@@ -72,7 +72,7 @@ export interface ISelf {
* 2) Container is in the process of establishing new connection. Information about old connection is already reset
* (old clientId is no longer in list of members), but clientId has not yet changed to a new value.
*/
client?: IClient;
readonly client?: IClient;
}

/**
@@ -141,5 +141,5 @@ export interface IAudience extends IEventProvider<IAudienceEvents> {
* 1. Such clientId is not present in Audience
* 2. Client is not fully caught up
*/
getSelf: () => ISelf | undefined;
getSelf(): ISelf | undefined;
}
2 changes: 1 addition & 1 deletion packages/dds/cell/src/cell.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ import {
type ISummaryTreeWithStats,
type AttributionKey,
} from "@fluidframework/runtime-definitions/internal";
import { type IFluidSerializer } from "@fluidframework/shared-object-base";
import { type IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";

import {
2 changes: 1 addition & 1 deletion packages/dds/counter/src/counter.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ import {
import { readAndParse } from "@fluidframework/driver-utils/internal";
import { type ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
import { type ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
import { type IFluidSerializer } from "@fluidframework/shared-object-base";
import { type IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";

import { type ISharedCounter, type ISharedCounterEvents } from "./interfaces.js";
2 changes: 1 addition & 1 deletion packages/dds/ink/api-report/ink.api.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import { IChannelFactory } from '@fluidframework/datastore-definitions/internal'
import { IChannelServices } from '@fluidframework/datastore-definitions';
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions/internal';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISharedObject } from '@fluidframework/shared-object-base/internal';
import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
7 changes: 5 additions & 2 deletions packages/dds/ink/src/ink.ts
Original file line number Diff line number Diff line change
@@ -11,8 +11,11 @@ import {
import { readAndParse } from "@fluidframework/driver-utils/internal";
import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
import {
IFluidSerializer,
SharedObject,
createSingleBlobSummary,
} from "@fluidframework/shared-object-base/internal";
import { v4 as uuid } from "uuid";

import { InkFactory } from "./inkFactory.js";
2 changes: 1 addition & 1 deletion packages/dds/map/src/directory.ts
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ import type {
ITelemetryContext,
} from "@fluidframework/runtime-definitions/internal";
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
import type { IFluidSerializer } from "@fluidframework/shared-object-base";
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import { SharedObject, ValueType, parseHandles } from "@fluidframework/shared-object-base/internal";
import { type ITelemetryLoggerExt, UsageError } from "@fluidframework/telemetry-utils/internal";
import path from "path-browserify";
2 changes: 1 addition & 1 deletion packages/dds/map/src/localValues.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

import type { IFluidHandle } from "@fluidframework/core-interfaces";
import type { ISerializedHandle } from "@fluidframework/runtime-utils/internal";
import type { IFluidSerializer } from "@fluidframework/shared-object-base";
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import {
ValueType,
parseHandles,
2 changes: 1 addition & 1 deletion packages/dds/map/src/map.ts
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ import type {
ITelemetryContext,
} from "@fluidframework/runtime-definitions/internal";
import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
import type { IFluidSerializer } from "@fluidframework/shared-object-base";
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import { SharedObject } from "@fluidframework/shared-object-base/internal";

import type { ISharedMap, ISharedMapEvents } from "./interfaces.js";
2 changes: 1 addition & 1 deletion packages/dds/map/src/mapKernel.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
import type { TypedEventEmitter } from "@fluid-internal/client-utils";
import type { IFluidHandle } from "@fluidframework/core-interfaces";
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
import type { IFluidSerializer } from "@fluidframework/shared-object-base";
import type { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import { ValueType, bindHandles } from "@fluidframework/shared-object-base/internal";

import type { ISharedMapEvents } from "./interfaces.js";
7 changes: 5 additions & 2 deletions packages/dds/matrix/src/matrix.ts
Original file line number Diff line number Diff line change
@@ -29,8 +29,11 @@ import {
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
import { ObjectStoragePartition, SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
import { IFluidSerializer, ISharedObjectEvents } from "@fluidframework/shared-object-base";
import { SharedObject } from "@fluidframework/shared-object-base/internal";
import {
IFluidSerializer,
ISharedObjectEvents,
SharedObject,
} from "@fluidframework/shared-object-base/internal";
import { UsageError } from "@fluidframework/telemetry-utils/internal";
import { IMatrixConsumer, IMatrixProducer, IMatrixReader, IMatrixWriter } from "@tiny-calc/nano";
import Deque from "double-ended-queue";
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/permutationvector.ts
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import {
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
import { ObjectStoragePartition, SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { IFluidSerializer } from "@fluidframework/shared-object-base/internal";
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";

import { HandleCache } from "./handlecache.js";
8 changes: 5 additions & 3 deletions packages/dds/matrix/src/serialization.ts
Original file line number Diff line number Diff line change
@@ -5,10 +5,12 @@

import { bufferToString } from "@fluid-internal/client-utils";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { IChannelStorageService } from "@fluidframework/datastore-definitions";
import { Serializable } from "@fluidframework/datastore-definitions/internal";
import {
IChannelStorageService,
Serializable,
} from "@fluidframework/datastore-definitions/internal";
import { BlobTreeEntry } from "@fluidframework/driver-utils/internal";
import { IFluidSerializer } from "@fluidframework/shared-object-base";
import { IFluidSerializer } from "@fluidframework/shared-object-base/internal";

export const serializeBlob = <T>(
handle: IFluidHandle,
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/test/matrix.big.spec.ts
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*/

import { AttachState } from "@fluidframework/container-definitions";
import { IChannelServices } from "@fluidframework/datastore-definitions";
import { IChannelServices } from "@fluidframework/datastore-definitions/internal";
import {
MockContainerRuntimeFactory,
MockEmptyDeltaConnection,
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/test/matrix.spec.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import { strict as assert } from "assert";
import { IGCTestProvider, runGCTests } from "@fluid-private/test-dds-utils";
import { AttachState } from "@fluidframework/container-definitions";
import type { IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
import { IChannelServices } from "@fluidframework/datastore-definitions";
import { IChannelServices } from "@fluidframework/datastore-definitions/internal";
import {
MockContainerRuntimeFactory,
MockContainerRuntimeFactoryForReconnection,
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/test/matrix.stress.spec.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

import { strict as assert } from "assert";

import { IChannelServices } from "@fluidframework/datastore-definitions";
import { IChannelServices } from "@fluidframework/datastore-definitions/internal";
import {
MockContainerRuntimeFactoryForReconnection,
MockContainerRuntimeForReconnection,
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/api-report/merge-tree.api.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions/internal';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { IFluidSerializer } from '@fluidframework/shared-object-base/internal';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions/internal';
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
Loading