Skip to content

Commit

Permalink
Merge branch 'main' into test/tianzhu/add-pe-alfred
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Zhu committed Jan 9, 2025
2 parents a14a863 + 29dd73a commit c1956c1
Show file tree
Hide file tree
Showing 148 changed files with 1,278 additions and 1,881 deletions.
15 changes: 15 additions & 0 deletions .changeset/better-mails-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@fluidframework/aqueduct": minor
"@fluid-experimental/attributor": minor
"@fluidframework/container-runtime": minor
"@fluidframework/test-utils": minor
---
---
"section": legacy
---

ContainerRuntime class is no longer exported

Use `IContainerRuntime` to replace type usages and use the free function `loadContainerRuntime` to replace usages of the static method `ContainerRuntime.loadRuntime`.

See the [deprecation release note](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.12.0#user-content-the-containerruntime-class-is-now-deprecated-23331) for more details.
10 changes: 10 additions & 0 deletions .changeset/cruel-horses-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@fluidframework/container-runtime": minor
---
---
"section": legacy
---

IContainerRuntimeOptions.flushMode has been removed

See [2.12.0 release note](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.12.0#user-content-icontainerruntimeoptionsflushmode-is-now-deprecated-23288)
21 changes: 21 additions & 0 deletions .changeset/gold-maps-cut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@fluidframework/aqueduct": minor
"@fluidframework/container-runtime": minor
"@fluidframework/container-runtime-definitions": minor
"@fluidframework/datastore": minor
"@fluidframework/runtime-definitions": minor
"@fluidframework/test-runtime-utils": minor
---

# The createDataStoreWithProps APIs on ContainerRuntime and IContainerRuntimeBase have been removed

`ContainerRuntime.createDataStoreWithProps` and `IContainerRuntimeBase.createDataStoreWithProps`
have been removed.

Replace uses of these APIs with `PureDataObjectFactory.createInstanceWithDataStore` and pass in props via the `initialState`
parameter.

# Initial deprecation/removal announcement

The initial deprecations of the now changed or removed types were announced [#1537](https://github.com/microsoft/FluidFramework/issues/1537)
in Fluid Framework v0.25 [#2931](https://github.com/microsoft/FluidFramework/pull/2931)
56 changes: 56 additions & 0 deletions .changeset/smooth-roses-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
"@fluidframework/shared-object-base": minor
---
---
"section": legacy
---

Replace 'any' in return type for several APIs

To improve type safety of the Fluid Framework legacy+alpha API surface,
we're moving away from using the `any` type in favor of `unknown`.

We mostly expect that any changes required in consumers of these APIs will be limited to having to provide explicit types
when calling any of the APIs whose return value changed to `unknown`, like `IFluidSerializer.parse()`.

So code that looked like this:

```typescript
// 'myVariable' ended up typed as 'any' here and TypeScript would not do any type-safety checks on it.
const myVariable = this.serializer.parse(stringHeader);
```

Will now have to look like this:

```typescript
// Do this if you know the type of the object you expect to get back.
const myVariable = this.serializer.parse(stringHeader) as MyType;

// Alternatively, this will maintain current behavior but also means no type-safety checks will be done by TS.
// const myVariable = this.serializer.parse(stringHeader) as any;
```

The appropriate type will depend on what the calling code is doing and the objects it expects to be dealing with.

We further encourage consumers of any of these APIs to add runtime checks
to validate that the returned object actually matches the expected type.

The list of affected APIs is as follows:

- `IFluidSerializer.encode(...)` now takes `value: unknown` instead of `value: any` and returns `unknown` instead of `any`.
- `IFluidSerializer.decode(...)` now takes `input: unknown` instead of `input: any` and returns `unknown` instead of `any`.
- `IFluidSerializer.stringify(...)` now takes `value: unknown` instead of `value: any`.
- `IFluidSerializer.parse(...)` now returns `unknown` instead of `any`.
- `SharedObjectCore.applyStashedOps(...)` now takes `content: unknown` instead of `content: any`.
- `SharedObjectCore.rollback(...)` now takes `content: unknown` instead of `content: any`.
- `SharedObjectCore.submitLocalMessage(...)` now takes `content: unknown` instead of `content: any`.
- `SharedObjectCore.reSubmitCore(...)` now takes `content: unknown` instead of `content: any`.
- In `SharedObjectCore.newAckBasedPromise<T>(...)` the `executor` parameter now takes `reject: (reason?: unknown)`
instead of `reject: (reason?: any)`.
- `makeHandlesSerializable(...)` now returns `unknown` instead of `any`.
- `parseHandles(...)` now returns `unknown` instead of `any`.

Additionally, the following APIs were never designed to return a value and have thus been updated to return `void` instead of `any`:

- `SharedObjectCore.processCore(...)`.
- `SharedObjectCore.onDisconnect(...)`
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export const promptToGenerateReleaseNotes: StateHandlerFunction = async (
{
title: "FIRST: generate:releaseNotes",
message: `To generate the release notes, run the following command from the root of your release repo:`,
cmd: `flub generate releaseNotes -g ${releaseGroup} -t ${bumpType} --out RELEASE_NOTES/${releaseVersion}.md`,
cmd: `flub generate releaseNotes -g ${releaseGroup} -t ${bumpType} --outFile RELEASE_NOTES/${releaseVersion}.md`,
},
{
title: "FINALLY: merge the resulting changes",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Licensed under the MIT License.
*/

import { handler as assertShortCodeHandler } from "./assertShortCode.js";
import { type Handler } from "./common.js";
import { handlers as copyrightFileHeaderHandlers } from "./copyrightFileHeader.js";
import { handler as dockerfilePackageHandler } from "./dockerfilePackages.js";
Expand All @@ -24,7 +23,6 @@ export const policyHandlers: Handler[] = [
dockerfilePackageHandler,
fluidCaseHandler,
...lockfileHandlers,
assertShortCodeHandler,
...pnpmHandlers,
...fluidBuildTasks,
noJsFileHandler,
Expand Down
3 changes: 2 additions & 1 deletion common/build/build-common/src/cjs/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"type": "commonjs"
"type": "commonjs",
"sideEffects": false
}
Loading

0 comments on commit c1956c1

Please sign in to comment.