Skip to content

Commit

Permalink
update fluid imports to use /legacy > /internal when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbliss committed Oct 18, 2024
1 parent c2e4bd5 commit 6b0babb
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 73 deletions.
6 changes: 3 additions & 3 deletions internal/test-utils/src/compatUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { IFluidLoadable } from "@fluidframework/core-interfaces";
import {
IFluidDataStoreContext,
IFluidDataStoreFactory,
} from "@fluidframework/runtime-definitions/internal";
} from "@fluidframework/runtime-definitions/legacy";
import {
IFluidDataStoreRuntime,
IChannelFactory,
} from "@fluidframework/datastore-definitions/internal";
import { ISharedDirectory } from "@fluidframework/map/internal";
} from "@fluidframework/datastore-definitions/legacy";
import { ISharedDirectory } from "@fluidframework/map/legacy";
import { unreachableCase } from "@fluidframework/core-utils/internal";
import {
ITestContainerConfig,
Expand Down
2 changes: 1 addition & 1 deletion internal/test-utils/src/describeCompat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
import { createChildLogger } from "@fluidframework/telemetry-utils/legacy";
import {
getUnexpectedLogErrorException,
ITestObjectProvider,
Expand Down
2 changes: 1 addition & 1 deletion internal/test-utils/src/localDriverApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
LocalDocumentServiceFactory,
LocalResolver,
createLocalResolverCreateNewRequest,
} from "@fluidframework/local-driver/internal";
} from "@fluidframework/local-driver/legacy";
import { LocalDeltaConnectionServer } from "@fluidframework/server-local-server";

/**
Expand Down
2 changes: 1 addition & 1 deletion internal/test-utils/src/localServerTestDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IRequest } from "@fluidframework/core-interfaces";
import {
IDocumentServiceFactory,
IUrlResolver,
} from "@fluidframework/driver-definitions/internal";
} from "@fluidframework/driver-definitions/legacy";
import {
ILocalDeltaConnectionServer,
LocalDeltaConnectionServer,
Expand Down
18 changes: 9 additions & 9 deletions internal/test-utils/src/testApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
*/

// Loader API
import { Loader } from "@fluidframework/container-loader/internal";
import { Loader } from "@fluidframework/container-loader/legacy";

// ContainerRuntime API
import { ContainerRuntime } from "@fluidframework/container-runtime/internal";
import { ContainerRuntime } from "@fluidframework/container-runtime/legacy";

// Data Runtime API
import * as agentScheduler from "@fluidframework/agent-scheduler";
import * as cell from "@fluidframework/cell";
import { SharedCell } from "@fluidframework/cell/internal";
import * as counter from "@fluidframework/counter";
import { SharedCounter } from "@fluidframework/counter/internal";
import { SharedCounter } from "@fluidframework/counter/legacy";
import * as map from "@fluidframework/map";
import { SharedDirectory, SharedMap } from "@fluidframework/map/internal";
import { SharedDirectory, SharedMap } from "@fluidframework/map/legacy";
import * as matrix from "@fluidframework/matrix";
import { SharedMatrix } from "@fluidframework/matrix/internal";
import { SharedMatrix } from "@fluidframework/matrix/legacy";
import * as orderedCollection from "@fluidframework/ordered-collection";
import { ConsensusQueue } from "@fluidframework/ordered-collection/internal";
import { ConsensusQueue } from "@fluidframework/ordered-collection/legacy";
import * as registerCollection from "@fluidframework/register-collection";
import { ConsensusRegisterCollection } from "@fluidframework/register-collection/internal";
import { ConsensusRegisterCollection } from "@fluidframework/register-collection/legacy";
import * as sequence from "@fluidframework/sequence";
import { SharedString } from "@fluidframework/sequence/internal";
import { SharedString } from "@fluidframework/sequence/legacy";
import { TestFluidObjectFactory } from "@fluidframework/test-utils/internal";

// ContainerRuntime and Data Runtime API
import {
ContainerRuntimeFactoryWithDefaultDataStore,
DataObject,
DataObjectFactory,
} from "@fluidframework/aqueduct/internal";
} from "@fluidframework/aqueduct/legacy";
import * as sequenceDeprecated from "@fluid-experimental/sequence-deprecated";

// #region Current versions of the APIs.
Expand Down
10 changes: 4 additions & 6 deletions packages/live-share-canvas/src/core/LiveCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { SharedMap } from "@fluidframework/map/internal";
import { SharedMap } from "@fluidframework/map/legacy";
import { InkingManager } from "./InkingManager.js";
import { IPoint } from "./Geometry.js";
import { IStroke, StrokeType } from "./Stroke.js";
Expand Down Expand Up @@ -61,7 +59,7 @@ import {
} from "./InkingManager-constants.js";
import { IEventUserInfo, IUserInfo } from "./LiveCanvas-interfaces.js";
import { LiveCursor } from "./LiveCursor.js";
import type { ISharedObjectKind } from "@fluidframework/shared-object-base/internal";
import type { ISharedObjectKind } from "@fluidframework/shared-object-base/legacy";
import {
LiveCanvasStrokesMap,
LiveCanvasTreeNode,
Expand Down
6 changes: 2 additions & 4 deletions packages/live-share-media/src/LiveMediaSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import {
LiveDataObjectInitializeNotNeededError,
LiveDataObjectInitializeState,
Expand Down
2 changes: 1 addition & 1 deletion packages/live-share/src/AzureLiveShareClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { ContainerSchema, IFluidContainer } from "fluid-framework";
import { AzureContainerServices } from "@fluidframework/azure-client/internal";
import { AzureContainerServices } from "@fluidframework/azure-client/legacy";
import { AzureClient, AzureClientProps } from "@fluidframework/azure-client";
import { BaseLiveShareClient } from "./internals/BaseLiveShareClient.js";
import { ILiveShareHost } from "./interfaces.js";
Expand Down
6 changes: 2 additions & 4 deletions packages/live-share/src/LiveEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import { IEvent } from "@fluidframework/core-interfaces";
import {
UserMeetingRole,
Expand Down
8 changes: 3 additions & 5 deletions packages/live-share/src/LiveFollowMode.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { LiveDataObject } from "./internals/LiveDataObject.js";
import { LiveState } from "./LiveState.js";
import { ILivePresenceEvents, LivePresence } from "./LivePresence.js";
import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/internal";
import { assert } from "@fluidframework/core-utils/legacy";
import {
LiveDataObjectInitializeState,
UserMeetingRole,
Expand Down
6 changes: 2 additions & 4 deletions packages/live-share/src/LivePresence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import { IEvent } from "@fluidframework/core-interfaces";
import {
LivePresenceUser,
Expand Down
8 changes: 3 additions & 5 deletions packages/live-share/src/LiveState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { assert } from "@fluidframework/core-utils/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import { assert } from "@fluidframework/core-utils/legacy";
import { IEvent } from "@fluidframework/core-interfaces";
import {
ILiveEvent,
Expand Down
6 changes: 2 additions & 4 deletions packages/live-share/src/LiveTimer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import { LiveObjectSynchronizer } from "./internals/LiveObjectSynchronizer.js";
import {
IClientTimestamp,
Expand Down
2 changes: 1 addition & 1 deletion packages/live-share/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/internal";
import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/legacy";
import { AzureContainerServices } from "@fluidframework/azure-client";
import { IFluidContainer } from "fluid-framework";

Expand Down
2 changes: 1 addition & 1 deletion packages/live-share/src/internals/BaseLiveShareClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
SharedObjectKind,
} from "fluid-framework";
import { SharedMap } from "fluid-framework/legacy";
import { AzureContainerServices } from "@fluidframework/azure-client/internal";
import { AzureContainerServices } from "@fluidframework/azure-client/legacy";
import { IFluidLoadable } from "@fluidframework/core-interfaces";
import { DynamicObjectRegistry } from "./DynamicObjectRegistry.js";
import { DynamicObjectManager } from "./DynamicObjectManager.js";
Expand Down
10 changes: 4 additions & 6 deletions packages/live-share/src/internals/DynamicObjectManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import {
DataObjectFactory,
createDataObjectKind,
} from "@fluidframework/aqueduct/internal";
import { createDataObjectKind } from "@fluidframework/aqueduct/internal";
import { DataObjectFactory } from "@fluidframework/aqueduct/legacy";
import {
FluidObject,
IFluidContainer,
SharedObjectKind,
} from "fluid-framework";
import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces";
import { assert } from "@fluidframework/core-utils/internal";
import { ConsensusRegisterCollection } from "@fluidframework/register-collection/internal";
import { assert } from "@fluidframework/core-utils/legacy";
import { ConsensusRegisterCollection } from "@fluidframework/register-collection/legacy";
import { DynamicObjectRegistry } from "./DynamicObjectRegistry.js";
import { LiveDataObject } from "./LiveDataObject.js";

Expand Down
6 changes: 3 additions & 3 deletions packages/live-share/src/internals/DynamicObjectRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import { ITree, SharedObjectKind, SharedTree } from "fluid-framework";
import { SharedMap } from "fluid-framework/legacy";
import { SharedDirectory } from "@fluidframework/map/internal";
import { SharedString } from "@fluidframework/sequence/internal";
import type { ISharedObjectKind } from "@fluidframework/shared-object-base/internal";
import { SharedDirectory } from "@fluidframework/map/legacy";
import { SharedString } from "@fluidframework/sequence/legacy";
import type { ISharedObjectKind } from "@fluidframework/shared-object-base/legacy";

/**
* Key for window global reference to loadable objects.
Expand Down
4 changes: 2 additions & 2 deletions packages/live-share/src/internals/LiveDataObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {
DataObject,
DataObjectTypes,
IDataObjectProps,
} from "@fluidframework/aqueduct/internal";
} from "@fluidframework/aqueduct/legacy";
import { LiveShareRuntime } from "./LiveShareRuntime.js";
import { assert } from "@fluidframework/core-utils/internal";
import { assert } from "@fluidframework/core-utils/legacy";
import {
IClientInfo,
LiveDataObjectInitializeState,
Expand Down
2 changes: 1 addition & 1 deletion packages/live-share/src/internals/LiveEventScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ITelemetryBaseLogger,
} from "@fluidframework/core-interfaces";
import { TypedEventEmitter } from "@fluid-internal/client-utils";
import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/internal";
import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/legacy";
import { ILiveEvent, UserMeetingRole } from "../interfaces.js";
import { LiveShareRuntime } from "./LiveShareRuntime.js";
import { IEvent } from "@fluidframework/core-interfaces";
Expand Down
2 changes: 1 addition & 1 deletion packages/live-share/src/internals/LiveObjectManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/internal";
import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/legacy";
import { TypedEventEmitter } from "@fluid-internal/client-utils";
import { IRuntimeSignaler } from "./LiveEventScope.js";
import { LiveShareRuntime } from "./LiveShareRuntime.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/live-share/src/internals/LiveShareRuntime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from "@fluidframework/core-utils/internal";
import { assert } from "@fluidframework/core-utils/legacy";
import { HostTimestampProvider } from "../HostTimestampProvider.js";
import {
IClientInfo,
Expand Down
4 changes: 2 additions & 2 deletions packages/live-share/src/internals/fluid-duplicated.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/internal";
import { type IChannelFactory } from "@fluidframework/datastore-definitions/internal";
import { type IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/legacy";
import { type IChannelFactory } from "@fluidframework/datastore-definitions/legacy";
import { IFluidLoadable } from "@fluidframework/core-interfaces";
import type { SharedObjectKind } from "@fluidframework/shared-object-base";
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/internal";
import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/legacy";
import { IContainerRuntimeSignaler } from "../../interfaces.js";
import { v4 } from "uuid";

Expand Down
4 changes: 2 additions & 2 deletions packages/live-share/src/internals/mock/MockRuntimeSignaler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the Microsoft Live Share SDK License.
*/

import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/internal";
import { MockLogger } from "@fluidframework/telemetry-utils/internal";
import { IInboundSignalMessage } from "@fluidframework/runtime-definitions/legacy";
import { MockLogger } from "@fluidframework/telemetry-utils/legacy";
import { IRuntimeSignaler } from "../LiveEventScope.js";
import { v4 } from "uuid";
import { ITelemetryBaseLogger } from "@fluidframework/azure-client";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
DataObjectTypes,
IDataObjectProps,
} from "@fluidframework/aqueduct/internal";
} from "@fluidframework/aqueduct/legacy";
import { IFluidLoadable } from "@fluidframework/core-interfaces";
import { LiveDataObject } from "./LiveDataObject.js";
import { LiveShareRuntime } from "./LiveShareRuntime.js";
Expand Down
6 changes: 3 additions & 3 deletions packages/live-share/src/internals/smuggle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DataObject } from "@fluidframework/aqueduct/internal";
import { type ISharedDirectory } from "@fluidframework/map/internal";
import { type IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/internal";
import { DataObject } from "@fluidframework/aqueduct/legacy";
import { type ISharedDirectory } from "@fluidframework/map/legacy";
import { type IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions/legacy";
import { IFluidContainer } from "@fluidframework/fluid-static";

/**
Expand Down

0 comments on commit 6b0babb

Please sign in to comment.