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

Add BREAKING.md updates from recent changes #7314

Merged
merged 5 commits into from
Aug 31, 2021
Merged
Changes from 3 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
73 changes: 73 additions & 0 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
- [Property removed from IFluidDataStoreContext](#Property-removed-from-IFluidDataStoreContext)
- [Changes to IFluidDataStoreFactory](#Changes-to-IFluidDataStoreFactory)
- [FlushMode enum values renamed](#FlushMode-enum-values-renamed)
- [name removed from ContainerSchema](#name-removed-from-ContainerSchema)
- [Anonymous return types for container calls in client packages](#Anonymous-return-types-for-container-calls-in-client-packages)
- [createContainer and getContainer response objects properties renamed](#createContainer-and-getContainer-response-objects-properties-renamed)
- [tinylicious and azure clients createContainer now detached](#tinylicious-and-azure-clients-createContainer-now-detached)
- [container id is returned from new attach() and not exposed on the container](#container-id-is-returned-from-new-attach()-and-not-exposed-on-the-container)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this link doesn't seem to work, probably the () needs to be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm interesting. I actually checked this and it works in vscode. Removing them worked too so I did that but yea. Nice catch :)


### Property removed from IFluidDataStoreContext
- the `existing` property from `IFluidDataStoreContext` (and `FluidDataStoreContext`) has been removed.
Expand All @@ -14,6 +19,73 @@
- `FlushMode.Manual` to `FlushMode.TurnBased`
- `FlushMode.Automatic` to `FlushMode.Immediate`

### `name` removed from ContainerSchema
The `name` property on the ContainerSchema was used for multi-container scenarios but has not materialized to be a useful schema property. The feedback has been negative to neutral and the goal is to remove it before it becomes formalized. Support for multi-container scenarios, if any is required, will be addressed as a future change.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The `name` property on the ContainerSchema was used for multi-container scenarios but has not materialized to be a useful schema property. The feedback has been negative to neutral and the goal is to remove it before it becomes formalized. Support for multi-container scenarios, if any is required, will be addressed as a future change.
The `name` property on the ContainerSchema was used for multi-container scenarios but has not materialized to be a useful schema property. The feedback has been negative to neutral so it is being removed before it becomes formalized. Support for multi-container scenarios, if any is required, will be addressed as a future change.


### Anonymous return types for container calls in client packages
`createContainer` and `getContainer` in `@fluidframework/azure-client` and `@fluidframework/tinylicious-client` will no longer return typed objects but instead will return an anonymous type. This provide the flexibility that comes with tuple deconstruction with the strong typing of property names.

```javascript
// `@fluidframework/azure-client`
createContainer(containerSchema: ContainerSchema): Promise<{
container: FluidContainer;
services: AzureContainerServices;
}>;
getContainer(id: string, containerSchema: ContainerSchema): Promise<{
container: FluidContainer;
services: AzureContainerServices;
}>;

// `@fluidframework/tinylicious-client`
createContainer(containerSchema: ContainerSchema): Promise<{
container: FluidContainer;
services: TinyliciousContainerServices;
}>;
getContainer(id: string, containerSchema: ContainerSchema): Promise<{
container: FluidContainer;
services: TinyliciousContainerServices;
}>;
```

### createContainer and getContainer response objects properties renamed
For all `*-client` packages `createContainer` and `getContainer` would return an object with `fluidContainer` and `containerServices`. These have been renamed to the following for brevity.

- fluidContainer => container
- containerServices => services

```javascript
// old
const { fluidContainer, containerServices } = client.getContainer;

// new
const { container, services } = client.getContainer;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// old
const { fluidContainer, containerServices } = client.getContainer;
// new
const { container, services } = client.getContainer;
// old
const { fluidContainer, containerServices } = client.getContainer(...);
// new
const { container, services } = client.getContainer(...);

nitty nitty

```

### tinylicious and azure clients createContainer now detached
Creating a new container now requires and explicit attach step. All changes made in between container creation, and attaching, will be persisted as part of creation and guaranteed to always be available to users. This allows developers to initialize `initialObjects` with state before the container is connected to the service. It also enables draft creation modes.

```javascript
// old
const { fluidContainer } = client.createContainer(...);

// new
const { container } = client.createContainer(...);
const id = container.attach();
```

### container id is returned from new attach() and not exposed on the container
Because we now have an explicit attach flow the container id is apart of that flow. The id is returned from the `attach()` call.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Because we now have an explicit attach flow the container id is apart of that flow. The id is returned from the `attach()` call.
Because we now have an explicit attach flow, the container id is part of that flow as well. The id is returned from the `attach()` call.


```javascript
// old
const { fluidContainer } = client.createContainer(...);
const containerId = fluidContainer.id;

// new
const { container } = client.createContainer(...);
const containerId = container.attach();
```

## 0.46 Breaking changes
- [@fluid-experimental/fluid-framework package name changed](#fluid-experimentalfluid-framework-package-name-changed)
- [FrsClient has been renamed to AzureClient and moved out of experimental state](#FrsClient-has-been-renamed-to-AzureClient-and-moved-out-of-experimental-state)
Expand All @@ -25,6 +97,7 @@
### `@fluid-experimental/fluid-framework` package name changed
The `@fluid-experimental/fluid-framework` package has been renamed to now be `fluid-framework`. The scope has been removed.


### FrsClient has been renamed to AzureClient and moved out of experimental state
The `@fluid-experimental/frs-client` package for connecting with the Azure Fluid Relay service has been renamed to now be `@fluidframework/azure-client`. This also comes with the following name changes for the exported classes and interfaces from the package:
- `FrsClient` -> `AzureClient`
Expand Down