Skip to content

Commit

Permalink
Merge branch 'main' into navParameterAddition
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioJGMsoft authored Nov 27, 2024
2 parents afdd93d + 5d813e5 commit 33b9df2
Show file tree
Hide file tree
Showing 581 changed files with 9,598 additions and 3,714 deletions.
2 changes: 1 addition & 1 deletion .changeset/dull-words-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"section": tree
---

Enables Revertible objects to be cloned using `RevertibleAlpha.clone()`.
Enables Revertible objects to be cloned using `RevertibleAlpha.clone()`

Replaced `DisposableRevertible` with `RevertibleAlpha`. The new `RevertibleAlpha` interface extends `Revertible` and includes a `clone(branch: TreeBranch)` method to facilitate cloning a Revertible to a specified target branch. The source branch where the `RevertibleAlpha` was created must share revision logs with the target branch where the `RevertibleAlpha` is being cloned. If this condition is not met, the operation will throw an error.
24 changes: 24 additions & 0 deletions .changeset/long-hats-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@fluidframework/devtools": minor
"@fluidframework/devtools-core": minor
---
---
"section": other
---

Mark APIs as `@sealed` and `@system` as appropriate, and make interface properties `readonly`

APIs that were never intended for direct consumer use have been marked as `@system`.
These are:

- HasContainerKey

APIs that were not intended to be extended by consumers have been marked as `@sealed`.
These are:

- ContainerDevtoolsProps
- DevtoolsProps
- HasContainerKey
- IDevtools

Additionally, interface properties have been marked as `readonly`.
11 changes: 11 additions & 0 deletions .changeset/new-hats-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@fluidframework/core-interfaces": minor
"@fluidframework/tree": minor
---
---
"section": other
---

Relocating Events Library to `@fluidframework/core-interfaces` and `@fluid-internal/client-utils`

The events library's types and interfaces are moved to `@fluidframework/core-interfaces`, while its implementation is relocated to `@fluid-internal/client-utils`. There are no changes to how the events library is used; the relocation simply organizes the library into more appropriate packages. This change has no impact on external consumers of Fluid.
45 changes: 45 additions & 0 deletions .changeset/shy-files-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
"@fluidframework/presence": minor
---
---
"section": feature
---

Presence updates are now batched and throttled

Presence updates are grouped together and throttled to prevent flooding the network with messages when presence values are rapidly updated. This means the presence infrastructure will not immediately broadcast updates but will broadcast them after a configurable delay.

The `allowableUpdateLatencyMs` property configures how long a local update may be delayed under normal circumstances, enabling batching with other updates. The default `allowableUpdateLatencyMs` is **60 milliseconds** but may be (1) specified during configuration of a [States Workspace](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#value-managers#states-workspace) or [Value Manager](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#value-managers#value-managers) and/or (2) updated later using the `controls` member of Workspace or Value Manager. [States Workspace](https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#value-managers#states-workspace) configuration applies when a Value Manager does not have its own setting.

Notifications are never queued; they effectively always have an `allowableUpdateLatencyMs` of 0. However, they may be batched with other updates that were already queued.

Note that due to throttling, clients receiving updates may not see updates for all values set by another. For example,
with `Latest*ValueManagers`, the only value sent is the value at the time the outgoing batched message is sent. Previous
values set by the client will not be broadcast or seen by other clients.

#### Example

You can configure the batching and throttling behavior using the `allowableUpdateLatencyMs` property as in the following example:

```ts
// Configure a states workspace
const stateWorkspace = presence.getStates("app:v1states",
{
// This value manager has an allowable latency of 100ms.
position: Latest({ x: 0, y: 0 }, { allowableUpdateLatencyMs: 100 }),
// This value manager uses the workspace default.
count: Latest({ num: 0 }),
},
// Specify the default for all value managers in this workspace to 200ms,
// overriding the default value of 60ms.
{ allowableUpdateLatencyMs: 200 }
);

// Temporarily set count updates to send as soon as possible
const countState = stateWorkspace.props.count;
countState.controls.allowableUpdateLatencyMs = 0;
countState.local = { num: 5000 };

// Reset the update latency to the workspace default
countState.controls.allowableUpdateLatencyMs = undefined;
```
12 changes: 12 additions & 0 deletions .changeset/slick-badgers-go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@fluidframework/presence": minor
---
---
"section": feature
---

`off` event deregistration pattern now supported

Event subscriptions within `@fluidframework/presence` may now use `off` to deregister event listeners, including initial listeners provided to `Notifications`.

Some type names have shifted within the API though no consumers are expected to be using those types directly. The most visible rename is `NotificationSubscribable` to `NotificationListenable`. Other shifts are to use types now exported thru `@fluidframework/core-interfaces` where the most notable is `ISubscribable` that is now `Listenable`.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ packages/framework/data-object-base/es5
# Generated by policy-check
packages/runtime/test-runtime-utils/src/assertionShortCodesMap.ts

# TODO: Investigate formatting options that support JSX syntax in .mdx files
# Prettier does not yet support mdx v3.
# See <https://github.com/prettier/prettier/issues/12209>
docs/**/*.mdx

# Generated
Expand Down
2 changes: 1 addition & 1 deletion azure/packages/azure-local-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@biomejs/biome": "~1.9.3",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.51.0",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@fluidframework/eslint-config-fluid": "^5.6.0",
"eslint": "~8.55.0",
"eslint-config-prettier": "~9.0.0",
"pm2": "^5.4.2",
Expand Down
2 changes: 1 addition & 1 deletion azure/packages/azure-service-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"@fluidframework/azure-service-utils-previous": "npm:@fluidframework/[email protected]",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.51.0",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@fluidframework/eslint-config-fluid": "^5.6.0",
"@microsoft/api-extractor": "7.47.8",
"@types/jsrsasign": "^10.5.12",
"@types/uuid": "^9.0.2",
Expand Down
2 changes: 1 addition & 1 deletion azure/packages/test/scenario-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@fluid-tools/build-cli": "^0.51.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.51.0",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@fluidframework/eslint-config-fluid": "^5.6.0",
"@types/js-yaml": "^4.0.5",
"@types/mocha": "^9.1.1",
"@types/nock": "^9.3.0",
Expand Down
2 changes: 1 addition & 1 deletion build-tools/packages/build-cli/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export function getFlubConfig(configPath: string, noCache = false): FlubConfig {
const config = configResult?.config as FlubConfig | undefined;

if (config === undefined) {
throw new Error("No flub configuration found.");
throw new Error(`No flub configuration found (configPath='${configPath}').`);
}

// Only version 1 of the config is supported. If any other value is provided, throw an error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,6 @@ import { SimpleGit } from 'simple-git';
// @public
export type AdditionalPackageProps = Record<string, string> | undefined;

// @public
export class BuildProject<P extends IPackage> implements IBuildProject<P> {
constructor(searchPath: string,
upstreamRemotePartialUrl?: string | undefined);
protected readonly configFilePath: string;
readonly configuration: BuildProjectLayout;
getGitRepository(): Promise<Readonly<SimpleGit>>;
getPackageReleaseGroup(pkg: Readonly<P>): Readonly<IReleaseGroup>;
get packages(): Map<PackageName, P>;
relativeToRepo(p: string): string;
get releaseGroups(): Map<ReleaseGroupName, IReleaseGroup>;
reload(): void;
readonly root: string;
readonly upstreamRemotePartialUrl?: string | undefined;
get workspaces(): Map<WorkspaceName, IWorkspace>;
}

// @public
export const BUILDPROJECT_CONFIG_VERSION = 1;

Expand All @@ -48,6 +31,9 @@ export interface BuildProjectLayout {
// @public
export function createPackageManager(name: PackageManagerName): IPackageManager;

// @public
export function findGitRootSync(cwd?: string): string;

// @public
export interface FluidPackageJsonFields {
pnpm?: {
Expand All @@ -68,6 +54,24 @@ export function getBuildProjectConfig(searchPath: string, noCache?: boolean): {
configFilePath: string;
};

// @public
export function getChangedSinceRef<P extends IPackage>(buildProject: IBuildProject<P>, ref: string, remote?: string): Promise<{
files: string[];
dirs: string[];
workspaces: IWorkspace[];
releaseGroups: IReleaseGroup[];
packages: P[];
}>;

// @public
export function getFiles(git: SimpleGit, directory: string): Promise<string[]>;

// @public
export function getMergeBaseRemote(git: SimpleGit, branch: string, remote?: string, localRef?: string): Promise<string>;

// @public
export function getRemote(git: SimpleGit, partialUrl: string | undefined): Promise<string | undefined>;

// @public
export interface IBuildProject<P extends IPackage = IPackage> extends Reloadable {
configuration: BuildProjectLayout;
Expand Down Expand Up @@ -238,6 +242,12 @@ export interface Reloadable {
// @public
export function setVersion<J extends PackageJson>(packages: IPackage<J>[], version: SemVer): Promise<void>;

// @public
export function updatePackageJsonFile<J extends PackageJson = PackageJson>(packagePath: string, packageTransformer: (json: J) => void): void;

// @public
export function updatePackageJsonFileAsync<J extends PackageJson = PackageJson>(packagePath: string, packageTransformer: (json: J) => Promise<void>): Promise<void>;

// @public
export interface WorkspaceDefinition {
directory: string;
Expand Down
Loading

0 comments on commit 33b9df2

Please sign in to comment.