fluid-framework 2.80.0 → 2.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/api-report/fluid-framework.alpha.api.md +42 -7
- package/api-report/fluid-framework.legacy.beta.api.md +2 -0
- package/dist/alpha.d.ts +5 -0
- package/eslint.config.mts +4 -4
- package/lib/alpha.d.ts +5 -0
- package/package.json +15 -15
- package/.eslintrc.cjs +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 2.81.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- directory: Path parameter added to `cleared` event ([#26112](https://github.com/microsoft/FluidFramework/pull/26112)) [1ded6bf755](https://github.com/microsoft/FluidFramework/commit/1ded6bf75526eefd4d4565f4f9f6c795b8a77acf)
|
|
8
|
+
|
|
9
|
+
The `clear` event for SharedDirectory did not include a `path` parameter indicating which directory was cleared. Therefore, the `clear` event is deprecated and will be removed in a future release. Instead use the `cleared` event.
|
|
10
|
+
|
|
11
|
+
**Before:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
sharedDirectory.on("clear", (local, target) => {
|
|
15
|
+
// No way to know which subdirectory was cleared
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**After:**
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
sharedDirectory.on("cleared", (path, local, target) => {
|
|
23
|
+
// path tells you which directory was cleared (e.g., "/", "/subdir1", "/subdir2")
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This change provides better observability by allowing listeners to distinguish between clear operations on different subdirectories within the SharedDirectory hierarchy.
|
|
28
|
+
|
|
3
29
|
## 2.80.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -142,17 +142,14 @@ export interface BranchableTree extends ViewableTree {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// @alpha @sealed
|
|
145
|
-
export type ChangeMetadata =
|
|
146
|
-
readonly isLocal: true;
|
|
147
|
-
getChange(): JsonCompatibleReadOnly;
|
|
148
|
-
} | {
|
|
149
|
-
readonly isLocal: false;
|
|
150
|
-
readonly getChange?: undefined;
|
|
151
|
-
});
|
|
145
|
+
export type ChangeMetadata = LocalChangeMetadata | RemoteChangeMetadata;
|
|
152
146
|
|
|
153
147
|
// @alpha
|
|
154
148
|
export function checkCompatibility(viewWhichCreatedStoredSchema: TreeViewConfiguration, view: TreeViewConfiguration): Omit<SchemaCompatibilityStatus, "canInitialize">;
|
|
155
149
|
|
|
150
|
+
// @alpha
|
|
151
|
+
export function checkSchemaCompatibilitySnapshots(options: SchemaCompatibilitySnapshotsOptions): void;
|
|
152
|
+
|
|
156
153
|
// @alpha
|
|
157
154
|
export function cloneWithReplacements(root: unknown, rootKey: string, replacer: (key: string, value: unknown) => {
|
|
158
155
|
clone: boolean;
|
|
@@ -1057,6 +1054,13 @@ export type Listeners<T extends object> = {
|
|
|
1057
1054
|
[P in (string | symbol) & keyof T as IsListener<T[P]> extends true ? P : never]: T[P];
|
|
1058
1055
|
};
|
|
1059
1056
|
|
|
1057
|
+
// @alpha @sealed
|
|
1058
|
+
export interface LocalChangeMetadata extends CommitMetadata {
|
|
1059
|
+
getChange(): JsonCompatibleReadOnly;
|
|
1060
|
+
getRevertible(onDisposed?: (revertible: RevertibleAlpha) => void): RevertibleAlpha | undefined;
|
|
1061
|
+
readonly isLocal: true;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1060
1064
|
// @public @sealed
|
|
1061
1065
|
export interface MakeNominal {
|
|
1062
1066
|
}
|
|
@@ -1230,6 +1234,13 @@ export const RecordNodeSchema: {
|
|
|
1230
1234
|
readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is RecordNodeSchema<string, ImplicitAllowedTypes, true, unknown>;
|
|
1231
1235
|
};
|
|
1232
1236
|
|
|
1237
|
+
// @alpha @sealed
|
|
1238
|
+
export interface RemoteChangeMetadata extends CommitMetadata {
|
|
1239
|
+
readonly getChange?: undefined;
|
|
1240
|
+
readonly getRevertible?: undefined;
|
|
1241
|
+
readonly isLocal: false;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1233
1244
|
// @alpha
|
|
1234
1245
|
export function replaceConciseTreeHandles<T>(tree: ConciseTree, replacer: HandleConverter<T>): ConciseTree<T>;
|
|
1235
1246
|
|
|
@@ -1306,6 +1317,17 @@ export interface RunTransactionParams {
|
|
|
1306
1317
|
readonly preconditions?: readonly TransactionConstraintAlpha[];
|
|
1307
1318
|
}
|
|
1308
1319
|
|
|
1320
|
+
// @alpha @input
|
|
1321
|
+
export interface SchemaCompatibilitySnapshotsOptions {
|
|
1322
|
+
readonly fileSystem: SnapshotFileSystem;
|
|
1323
|
+
readonly minVersionForCollaboration: string;
|
|
1324
|
+
readonly mode: "test" | "update";
|
|
1325
|
+
readonly schema: TreeViewConfiguration;
|
|
1326
|
+
readonly snapshotDirectory: string;
|
|
1327
|
+
readonly snapshotUnchangedVersions?: true;
|
|
1328
|
+
readonly version: string;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1309
1331
|
// @public @sealed
|
|
1310
1332
|
export interface SchemaCompatibilityStatus {
|
|
1311
1333
|
readonly canInitialize: boolean;
|
|
@@ -1537,6 +1559,19 @@ export function singletonSchema<TScope extends string, TName extends string | nu
|
|
|
1537
1559
|
readonly value: TName;
|
|
1538
1560
|
}, Record<string, never>, true, Record<string, never>, undefined>;
|
|
1539
1561
|
|
|
1562
|
+
// @alpha @input
|
|
1563
|
+
export interface SnapshotFileSystem {
|
|
1564
|
+
join(parentPath: string, childPath: string): string;
|
|
1565
|
+
mkdirSync(dir: string, options: {
|
|
1566
|
+
recursive: true;
|
|
1567
|
+
}): void;
|
|
1568
|
+
readdirSync(dir: string): readonly string[];
|
|
1569
|
+
readFileSync(file: string, encoding: "utf8"): string;
|
|
1570
|
+
writeFileSync(file: string, data: string, options: {
|
|
1571
|
+
encoding: "utf8";
|
|
1572
|
+
}): void;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1540
1575
|
// @alpha @system
|
|
1541
1576
|
export namespace System_TableSchema {
|
|
1542
1577
|
// @sealed @system
|
|
@@ -800,7 +800,9 @@ export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents &
|
|
|
800
800
|
// @beta @sealed @legacy
|
|
801
801
|
export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
802
802
|
(event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
803
|
+
// @deprecated
|
|
803
804
|
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
805
|
+
(event: "cleared", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
804
806
|
(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
805
807
|
(event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
806
808
|
}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -236,6 +236,7 @@ export {
|
|
|
236
236
|
JsonSchemaType,
|
|
237
237
|
JsonStringKeyPatternProperties,
|
|
238
238
|
JsonTreeSchema,
|
|
239
|
+
LocalChangeMetadata,
|
|
239
240
|
MapNodeCustomizableSchema,
|
|
240
241
|
MapNodeCustomizableSchemaUnsafe,
|
|
241
242
|
MapNodePojoEmulationSchema,
|
|
@@ -250,9 +251,11 @@ export {
|
|
|
250
251
|
RecordNodeCustomizableSchema,
|
|
251
252
|
RecordNodePojoEmulationSchema,
|
|
252
253
|
RecordNodeSchema,
|
|
254
|
+
RemoteChangeMetadata,
|
|
253
255
|
RevertibleAlpha,
|
|
254
256
|
RevertibleAlphaFactory,
|
|
255
257
|
RunTransactionParams,
|
|
258
|
+
SchemaCompatibilitySnapshotsOptions,
|
|
256
259
|
SchemaFactoryAlpha,
|
|
257
260
|
SchemaType,
|
|
258
261
|
SharedTreeFormatOptions,
|
|
@@ -269,6 +272,7 @@ export {
|
|
|
269
272
|
SimpleRecordNodeSchema,
|
|
270
273
|
SimpleTreeIndex,
|
|
271
274
|
SimpleTreeSchema,
|
|
275
|
+
SnapshotFileSystem,
|
|
272
276
|
System_TableSchema,
|
|
273
277
|
TableSchema,
|
|
274
278
|
TransactionCallbackStatus,
|
|
@@ -301,6 +305,7 @@ export {
|
|
|
301
305
|
asAlpha,
|
|
302
306
|
asTreeViewAlpha,
|
|
303
307
|
checkCompatibility,
|
|
308
|
+
checkSchemaCompatibilitySnapshots,
|
|
304
309
|
cloneWithReplacements,
|
|
305
310
|
comparePersistedSchema,
|
|
306
311
|
configuredSharedTree,
|
package/eslint.config.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*/
|
|
5
|
+
|
|
6
6
|
import type { Linter } from "eslint";
|
|
7
7
|
import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
|
|
8
8
|
|
package/lib/alpha.d.ts
CHANGED
|
@@ -236,6 +236,7 @@ export {
|
|
|
236
236
|
JsonSchemaType,
|
|
237
237
|
JsonStringKeyPatternProperties,
|
|
238
238
|
JsonTreeSchema,
|
|
239
|
+
LocalChangeMetadata,
|
|
239
240
|
MapNodeCustomizableSchema,
|
|
240
241
|
MapNodeCustomizableSchemaUnsafe,
|
|
241
242
|
MapNodePojoEmulationSchema,
|
|
@@ -250,9 +251,11 @@ export {
|
|
|
250
251
|
RecordNodeCustomizableSchema,
|
|
251
252
|
RecordNodePojoEmulationSchema,
|
|
252
253
|
RecordNodeSchema,
|
|
254
|
+
RemoteChangeMetadata,
|
|
253
255
|
RevertibleAlpha,
|
|
254
256
|
RevertibleAlphaFactory,
|
|
255
257
|
RunTransactionParams,
|
|
258
|
+
SchemaCompatibilitySnapshotsOptions,
|
|
256
259
|
SchemaFactoryAlpha,
|
|
257
260
|
SchemaType,
|
|
258
261
|
SharedTreeFormatOptions,
|
|
@@ -269,6 +272,7 @@ export {
|
|
|
269
272
|
SimpleRecordNodeSchema,
|
|
270
273
|
SimpleTreeIndex,
|
|
271
274
|
SimpleTreeSchema,
|
|
275
|
+
SnapshotFileSystem,
|
|
272
276
|
System_TableSchema,
|
|
273
277
|
TableSchema,
|
|
274
278
|
TransactionCallbackStatus,
|
|
@@ -301,6 +305,7 @@ export {
|
|
|
301
305
|
asAlpha,
|
|
302
306
|
asTreeViewAlpha,
|
|
303
307
|
checkCompatibility,
|
|
308
|
+
checkSchemaCompatibilitySnapshots,
|
|
304
309
|
cloneWithReplacements,
|
|
305
310
|
comparePersistedSchema,
|
|
306
311
|
configuredSharedTree,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,25 +57,25 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@fluidframework/container-definitions": "~2.
|
|
61
|
-
"@fluidframework/container-loader": "~2.
|
|
62
|
-
"@fluidframework/core-interfaces": "~2.
|
|
63
|
-
"@fluidframework/core-utils": "~2.
|
|
64
|
-
"@fluidframework/driver-definitions": "~2.
|
|
65
|
-
"@fluidframework/fluid-static": "~2.
|
|
66
|
-
"@fluidframework/map": "~2.
|
|
67
|
-
"@fluidframework/runtime-utils": "~2.
|
|
68
|
-
"@fluidframework/sequence": "~2.
|
|
69
|
-
"@fluidframework/shared-object-base": "~2.
|
|
70
|
-
"@fluidframework/tree": "~2.
|
|
60
|
+
"@fluidframework/container-definitions": "~2.81.0",
|
|
61
|
+
"@fluidframework/container-loader": "~2.81.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.81.0",
|
|
63
|
+
"@fluidframework/core-utils": "~2.81.0",
|
|
64
|
+
"@fluidframework/driver-definitions": "~2.81.0",
|
|
65
|
+
"@fluidframework/fluid-static": "~2.81.0",
|
|
66
|
+
"@fluidframework/map": "~2.81.0",
|
|
67
|
+
"@fluidframework/runtime-utils": "~2.81.0",
|
|
68
|
+
"@fluidframework/sequence": "~2.81.0",
|
|
69
|
+
"@fluidframework/shared-object-base": "~2.81.0",
|
|
70
|
+
"@fluidframework/tree": "~2.81.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
74
74
|
"@biomejs/biome": "~1.9.3",
|
|
75
|
-
"@fluid-tools/build-cli": "^0.
|
|
75
|
+
"@fluid-tools/build-cli": "^0.63.0",
|
|
76
76
|
"@fluidframework/build-common": "^2.0.3",
|
|
77
|
-
"@fluidframework/build-tools": "^0.
|
|
78
|
-
"@fluidframework/eslint-config-fluid": "~2.
|
|
77
|
+
"@fluidframework/build-tools": "^0.63.0",
|
|
78
|
+
"@fluidframework/eslint-config-fluid": "~2.81.0",
|
|
79
79
|
"@microsoft/api-extractor": "7.52.11",
|
|
80
80
|
"@types/node": "^18.19.0",
|
|
81
81
|
"concurrently": "^9.2.1",
|
package/.eslintrc.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
extends: ["@fluidframework/eslint-config-fluid/strict", "prettier"],
|
|
8
|
-
parserOptions: {
|
|
9
|
-
project: ["./tsconfig.json"],
|
|
10
|
-
},
|
|
11
|
-
rules: {},
|
|
12
|
-
};
|