Skip to content

Commit

Permalink
refactor: Copy APIs out of common-definitions and remove dependencies (
Browse files Browse the repository at this point in the history
…#16638)

This PR deprecates the following types and interfaces from the
common-definitions package:

-   interface IErrorEvent
-   interface IErrorEvent
-   interface IEvent
-   interface IEventProvider
-   type ExtendEventProvider
-   type IEventThisPlaceHolder
-   type IEventTransformer
-   type ReplaceIEventThisPlaceHolder

The code has been copied into the core-interfaces package for client
use.

- All client package uses have been updated to use the core-interfaces
implementation instead of common-definitions.
- There are no longer any client dependencies on common-definitions.
- **However,** there are still _server_ dependencies on
common-definitions. It's not clear where the event-related APIs should
live for server, so server continues to use the now-deprecated versions
from common-definitions.
- Also, protocol-definitions still imports and uses IErrorEvent and
IEventProvider from common-definitions. I left those uses in place
rather than copying the APIs into protocol-definitions.
  • Loading branch information
tylerbutler authored Aug 17, 2023
1 parent 649d19d commit a8c8150
Show file tree
Hide file tree
Showing 179 changed files with 902 additions and 371 deletions.
68 changes: 68 additions & 0 deletions .changeset/ready-games-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
"@fluidframework/agent-scheduler": minor
"@fluidframework/aqueduct": minor
"@fluid-experimental/attributable-map": minor
"@fluid-experimental/azure-scenario-runner": minor
"@fluidframework/container-definitions": minor
"@fluidframework/container-loader": minor
"@fluidframework/container-runtime": minor
"@fluidframework/container-runtime-definitions": minor
"@fluidframework/container-utils": minor
"@fluidframework/core-interfaces": minor
"@fluidframework/data-object-base": minor
"@fluid-experimental/data-objects": minor
"@fluidframework/datastore": minor
"@fluidframework/datastore-definitions": minor
"@fluid-experimental/devtools": minor
"@fluid-experimental/devtools-core": minor
"@fluidframework/driver-definitions": minor
"@fluidframework/fluid-runner": minor
"@fluidframework/fluid-static": minor
"@fluid-experimental/last-edited": minor
"@fluidframework/map": minor
"@fluidframework/matrix": minor
"@fluidframework/merge-tree": minor
"@fluidframework/mocha-test-setup": minor
"@fluidframework/odsp-doclib-utils": minor
"@fluidframework/odsp-driver": minor
"@fluid-experimental/oldest-client-observer": minor
"@fluid-experimental/pact-map": minor
"@fluid-experimental/react-inputs": minor
"@fluidframework/replay-driver": minor
"@fluidframework/routerlicious-driver": minor
"@fluidframework/runtime-definitions": minor
"@fluidframework/sequence": minor
"@fluidframework/shared-object-base": minor
"@fluidframework/task-manager": minor
"@fluidframework/telemetry-utils": minor
"@fluidframework/test-runtime-utils": minor
"@fluid-experimental/tree": minor
"@fluid-experimental/tree2": minor
---

Remove use of @fluidframework/common-definitions

The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
imported from the **@fluidframework/core-interfaces** package:

- interface IDisposable
- interface IErrorEvent
- interface IErrorEvent
- interface IEvent
- interface IEventProvider
- interface ILoggingError
- interface ITaggedTelemetryPropertyType
- interface ITelemetryBaseEvent
- interface ITelemetryBaseLogger
- interface ITelemetryErrorEvent
- interface ITelemetryGenericEvent
- interface ITelemetryLogger
- interface ITelemetryPerformanceEvent
- interface ITelemetryProperties
- type ExtendEventProvider
- type IEventThisPlaceHolder
- type IEventTransformer
- type ReplaceIEventThisPlaceHolder
- type ReplaceIEventThisPlaceHolder
- type TelemetryEventCategory
- type TelemetryEventPropertyType
4 changes: 2 additions & 2 deletions api-report/aqueduct.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { IContainerContext } from '@fluidframework/container-definitions';
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
import { IEvent } from '@fluidframework/common-definitions';
import { IEventProvider } from '@fluidframework/common-definitions';
import { IEvent } from '@fluidframework/core-interfaces';
import { IEventProvider } from '@fluidframework/core-interfaces';
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
Expand Down
2 changes: 1 addition & 1 deletion api-report/attributable-map.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
import { IChannelFactory } from '@fluidframework/datastore-definitions';
import { IChannelServices } from '@fluidframework/datastore-definitions';
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
import { IEventThisPlaceHolder } from '@fluidframework/common-definitions';
import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
Expand Down
6 changes: 3 additions & 3 deletions api-report/container-definitions.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { IClientDetails } from '@fluidframework/protocol-definitions';
import { IDisposable } from '@fluidframework/core-interfaces';
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
import { IErrorEvent } from '@fluidframework/common-definitions';
import { IEvent } from '@fluidframework/common-definitions';
import { IEventProvider } from '@fluidframework/common-definitions';
import { IErrorEvent } from '@fluidframework/core-interfaces';
import { IEvent } from '@fluidframework/core-interfaces';
import { IEventProvider } from '@fluidframework/core-interfaces';
import { IFluidRouter } from '@fluidframework/core-interfaces';
import { IQuorumClients } from '@fluidframework/protocol-definitions';
import { IRequest } from '@fluidframework/core-interfaces';
Expand Down
2 changes: 1 addition & 1 deletion api-report/container-runtime-definitions.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { IDataStore } from '@fluidframework/runtime-definitions';
import { IDeltaManager } from '@fluidframework/container-definitions';
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
import { IEventProvider } from '@fluidframework/common-definitions';
import { IEventProvider } from '@fluidframework/core-interfaces';
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidRouter } from '@fluidframework/core-interfaces';
Expand Down
4 changes: 2 additions & 2 deletions api-report/container-runtime.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { IDeltaManager } from '@fluidframework/container-definitions';
import { IDisposable } from '@fluidframework/core-interfaces';
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
import { IEvent } from '@fluidframework/common-definitions';
import { IEventProvider } from '@fluidframework/common-definitions';
import { IEvent } from '@fluidframework/core-interfaces';
import { IEventProvider } from '@fluidframework/core-interfaces';
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
import { IFluidHandle } from '@fluidframework/core-interfaces';
Expand Down
2 changes: 1 addition & 1 deletion api-report/container-utils.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { IGenericError } from '@fluidframework/container-definitions';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISignalMessage } from '@fluidframework/protocol-definitions';
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
import { ITelemetryProperties } from '@fluidframework/common-definitions';
import { ITelemetryProperties } from '@fluidframework/core-interfaces';
import { IThrottlingWarning } from '@fluidframework/container-definitions';
import { IUsageError } from '@fluidframework/container-definitions';
import { LoggingError } from '@fluidframework/telemetry-utils';
Expand Down
Loading

0 comments on commit a8c8150

Please sign in to comment.