fluid-framework 2.80.0 → 2.81.0-374083

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.
@@ -142,17 +142,14 @@ export interface BranchableTree extends ViewableTree {
142
142
  }
143
143
 
144
144
  // @alpha @sealed
145
- export type ChangeMetadata = CommitMetadata & ({
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;
@@ -1450,6 +1472,7 @@ export interface SharedTreeFormatOptions {
1450
1472
 
1451
1473
  // @alpha @input
1452
1474
  export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions> {
1475
+ readonly enableDetachedRootEditing?: boolean;
1453
1476
  readonly enableSharedBranches?: boolean;
1454
1477
  shouldEncodeIncrementally?: IncrementalEncodingPolicy;
1455
1478
  }
@@ -1537,6 +1560,19 @@ export function singletonSchema<TScope extends string, TName extends string | nu
1537
1560
  readonly value: TName;
1538
1561
  }, Record<string, never>, true, Record<string, never>, undefined>;
1539
1562
 
1563
+ // @alpha @input
1564
+ export interface SnapshotFileSystem {
1565
+ join(parentPath: string, childPath: string): string;
1566
+ mkdirSync(dir: string, options: {
1567
+ recursive: true;
1568
+ }): void;
1569
+ readdirSync(dir: string): readonly string[];
1570
+ readFileSync(file: string, encoding: "utf8"): string;
1571
+ writeFileSync(file: string, data: string, options: {
1572
+ encoding: "utf8";
1573
+ }): void;
1574
+ }
1575
+
1540
1576
  // @alpha @system
1541
1577
  export namespace System_TableSchema {
1542
1578
  // @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
- /* eslint-disable */
2
- /**
3
- * GENERATED FILE - DO NOT EDIT DIRECTLY.
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.80.0",
3
+ "version": "2.81.0-374083",
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.80.0",
61
- "@fluidframework/container-loader": "~2.80.0",
62
- "@fluidframework/core-interfaces": "~2.80.0",
63
- "@fluidframework/core-utils": "~2.80.0",
64
- "@fluidframework/driver-definitions": "~2.80.0",
65
- "@fluidframework/fluid-static": "~2.80.0",
66
- "@fluidframework/map": "~2.80.0",
67
- "@fluidframework/runtime-utils": "~2.80.0",
68
- "@fluidframework/sequence": "~2.80.0",
69
- "@fluidframework/shared-object-base": "~2.80.0",
70
- "@fluidframework/tree": "~2.80.0"
60
+ "@fluidframework/container-definitions": "2.81.0-374083",
61
+ "@fluidframework/container-loader": "2.81.0-374083",
62
+ "@fluidframework/core-interfaces": "2.81.0-374083",
63
+ "@fluidframework/core-utils": "2.81.0-374083",
64
+ "@fluidframework/driver-definitions": "2.81.0-374083",
65
+ "@fluidframework/fluid-static": "2.81.0-374083",
66
+ "@fluidframework/map": "2.81.0-374083",
67
+ "@fluidframework/runtime-utils": "2.81.0-374083",
68
+ "@fluidframework/sequence": "2.81.0-374083",
69
+ "@fluidframework/shared-object-base": "2.81.0-374083",
70
+ "@fluidframework/tree": "2.81.0-374083"
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.62.0",
75
+ "@fluid-tools/build-cli": "^0.63.0",
76
76
  "@fluidframework/build-common": "^2.0.3",
77
- "@fluidframework/build-tools": "^0.62.0",
78
- "@fluidframework/eslint-config-fluid": "~2.80.0",
77
+ "@fluidframework/build-tools": "^0.63.0",
78
+ "@fluidframework/eslint-config-fluid": "2.81.0-374083",
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
- };