fluid-framework 2.1.0-276326 → 2.1.0-281041

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/README.md CHANGED
@@ -9,6 +9,40 @@ There are some packages there are not included as part of this `fluid-framework`
9
9
  - Fluid Framework [developer tools](https://github.com/microsoft/FluidFramework/tree/main/packages/tools/devtools/devtools).
10
10
  - `@fluidframework/app-insights-logger`: to route Fluid telemetry to Azure App Insights.
11
11
 
12
+ <!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_HEADER) -->
13
+
14
+ <!-- prettier-ignore-start -->
15
+ <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
16
+
17
+ ## Using Fluid Framework libraries
18
+
19
+ When taking a dependency on a Fluid Framework library's public APIs, we recommend using a `^` (caret) version range, such as `^1.3.4`.
20
+ While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
21
+ library consumers should always prefer `^`.
22
+
23
+ If using any of Fluid Framework's unstable APIs (for example, its `beta` APIs), we recommend using a more constrained version range, such as `~`.
24
+
25
+ ## Installation
26
+
27
+ To get started, install the package by running the following command:
28
+
29
+ ```bash
30
+ npm i fluid-framework
31
+ ```
32
+
33
+ ## Importing from this package
34
+
35
+ This package leverages [package.json exports](https://nodejs.org/api/packages.html#exports) to separate its APIs by support level.
36
+ For more information on the related support guarantees, see [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
37
+
38
+ To access the `public` ([SemVer](https://semver.org/)) APIs, import via `fluid-framework` like normal.
39
+
40
+ To access the `legacy` APIs, import via `fluid-framework/legacy`.
41
+
42
+ <!-- prettier-ignore-end -->
43
+
44
+ <!-- AUTO-GENERATED-CONTENT:END -->
45
+
12
46
  ## Contents
13
47
 
14
48
  The `fluid-framework` package consists primarily of two portions: the `IFluidContainer` and a selection of distributed data structures (DDSes).
@@ -31,37 +65,58 @@ The `fluid-framework` package offers the following data structures:
31
65
 
32
66
  Check out the [Hello World tutorial](https://fluidframework.com/docs/start/tutorial/) using `fluid-framework`.
33
67
 
34
- <!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README:scripts=FALSE) -->
68
+ <!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README_FOOTER) -->
35
69
 
36
70
  <!-- prettier-ignore-start -->
37
71
  <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
38
72
 
39
- ## Using Fluid Framework libraries
73
+ ## API Documentation
40
74
 
41
- When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
42
- While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
43
- library consumers should always prefer `^`.
75
+ API documentation for **fluid-framework** is available at <https://fluidframework.com/docs/apis/fluid-framework>.
44
76
 
45
- ## Installation
77
+ ## Minimum Client Requirements
46
78
 
47
- To get started, install the package by running the following command:
79
+ These are the platform requirements for the current version of Fluid Framework Client Packages.
80
+ These requirements err on the side of being too strict since within a major version they can be relaxed over time, but not made stricter.
81
+ For Long Term Support (LTS) versions this can require supporting these platforms for several years.
48
82
 
49
- ```bash
50
- npm i fluid-framework
51
- ```
83
+ It is likely that other configurations will work, but they are not supported: if they stop working, we do not consider that a bug.
84
+ If you would benefit from support for something not listed here, file an issue and the product team will evaluate your request.
85
+ When making such a request please include if the configuration already works (and thus the request is just that it becomes officially supported), or if changes are required to get it working.
52
86
 
53
- ## Importing from this package
87
+ ### Supported Runtimes
54
88
 
55
- This package leverages [package.json exports](https://nodejs.org/api/packages.html#exports) to separate its APIs by support level.
56
- For more information on the related support guarantees, see [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
89
+ - NodeJs ^20.10.0 except that we will drop support for it [when NodeJs 20 loses its upstream support on 2026-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS (22) at least 1 year before 20 is end-of-life. This same policy applies to NodeJS 22 when it is end of life (2027-04-30).
90
+ - Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards).
57
91
 
58
- To access the `public` ([SemVer](https://semver.org/)) APIs, import via `fluid-framework` like normal.
92
+ ### Supported Tools
59
93
 
60
- To access the `legacy` APIs, import via `fluid-framework/legacy`.
94
+ - TypeScript 5.4:
95
+ - All [`strict`](https://www.typescriptlang.org/tsconfig) options are supported.
96
+ - [`strictNullChecks`](https://www.typescriptlang.org/tsconfig) is required.
97
+ - [Configuration options deprecated in 5.0](https://github.com/microsoft/TypeScript/issues/51909) are not supported.
98
+ - `exactOptionalPropertyTypes` is currently not fully supported.
99
+ If used, narrowing members of Fluid Framework types types using `in`, `Reflect.has`, `Object.hasOwn` or `Object.prototype.hasOwnProperty` should be avoided as they may incorrectly exclude `undefined` from the possible values in some cases.
100
+ - [webpack](https://webpack.js.org/) 5
101
+ - We are not intending to be prescriptive about what bundler to use.
102
+ Other bundlers which can handle ES Modules should work, but webpack is the only one we actively test.
61
103
 
62
- ## API Documentation
104
+ ### Module Resolution
63
105
 
64
- API documentation for **fluid-framework** is available at <https://fluidframework.com/docs/apis/fluid-framework>.
106
+ [`Node16`, `NodeNext`, or `Bundler`](https://www.typescriptlang.org/tsconfig#moduleResolution) resolution should be used with TypeScript compilerOptions to follow the [Node.js v12+ ESM Resolution and Loading algorithm](https://nodejs.github.io/nodejs.dev/en/api/v20/esm/#resolution-and-loading-algorithm).
107
+ Node10 resolution is not supported as it does not support Fluid Framework's API structuring pattern that is used to distinguish stable APIs from those that are in development.
108
+
109
+ ### Module Formats
110
+
111
+ - ES Modules:
112
+ ES Modules are the preferred way to consume our client packages (including in NodeJs) and consuming our client packages from ES Modules is fully supported.
113
+ - CommonJs:
114
+ Consuming our client packages as CommonJs is supported only in NodeJS and only for the cases listed below.
115
+ This is done to accommodate some workflows without good ES Module support.
116
+ If you have a workflow you would like included in this list, file an issue.
117
+ Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here.
118
+
119
+ - Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648))
65
120
 
66
121
  ## Contribution Guidelines
67
122
 
@@ -83,11 +138,9 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
83
138
 
84
139
  ## Help
85
140
 
86
- Not finding what you're looking for in this README? Check out our [GitHub
87
- Wiki](https://github.com/microsoft/FluidFramework/wiki) or [fluidframework.com](https://fluidframework.com/docs/).
141
+ Not finding what you're looking for in this README? Check out [fluidframework.com](https://fluidframework.com/docs/).
88
142
 
89
- Still not finding what you're looking for? Please [file an
90
- issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
143
+ Still not finding what you're looking for? Please [file an issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
91
144
 
92
145
  Thank you!
93
146
 
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
3
  "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
- "mainEntryPointFilePath": "<projectFolder>/dist/legacy.d.ts"
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/legacy.d.ts",
5
+ "bundledPackages": ["@fluidframework/*"]
5
6
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
3
  "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
- "mainEntryPointFilePath": "<projectFolder>/lib/legacy.d.ts"
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/legacy.d.ts",
5
+ "bundledPackages": ["@fluidframework/*"]
5
6
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
3
  "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
- "mainEntryPointFilePath": "<projectFolder>/dist/public.d.ts"
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/public.d.ts",
5
+ "bundledPackages": ["@fluidframework/*"]
5
6
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
3
  "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
4
- "mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts"
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts",
5
+ "bundledPackages": ["@fluidframework/*"]
5
6
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.current.json",
4
+ "mainEntryPointFilePath": "<projectFolder>/lib/public.d.ts",
5
+ "bundledPackages": ["@fluidframework/*"]
6
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-base.esm.legacy.json",
3
+ "extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json",
4
4
  "bundledPackages": ["@fluidframework/*"]
5
5
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.esm.current.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-model.esm.json",
4
4
  "bundledPackages": ["@fluidframework/*"],
5
5
  "messages": {
6
6
  "extractorMessageReporting": {
@@ -682,6 +682,7 @@ type ScopedSchemaName<TScope extends string | undefined, TName extends number |
682
682
 
683
683
  // @public @sealed
684
684
  export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedType<readonly ["SharedObjectKind", TSharedObject]> {
685
+ is(value: IFluidLoadable): value is IFluidLoadable & TSharedObject;
685
686
  }
686
687
 
687
688
  // @public
@@ -741,6 +742,7 @@ interface TreeArrayNodeBase<out T, in TNew, in TMoveFrom> extends ReadonlyArray<
741
742
  moveToStart(sourceIndex: number, source: TMoveFrom): void;
742
743
  removeAt(index: number): void;
743
744
  removeRange(start?: number, end?: number): void;
745
+ values(): IterableIterator<T>;
744
746
  }
745
747
 
746
748
  // @public @sealed
@@ -148,7 +148,7 @@ export interface IConnection {
148
148
  // @public
149
149
  export type ICriticalContainerError = IErrorBase;
150
150
 
151
- // @alpha
151
+ // @public @sealed
152
152
  export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
153
153
  readonly absolutePath: string;
154
154
  countSubDirectory?(): number;
@@ -162,7 +162,7 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
162
162
  subdirectories(): IterableIterator<[string, IDirectory]>;
163
163
  }
164
164
 
165
- // @alpha
165
+ // @public @sealed
166
166
  export interface IDirectoryEvents extends IEvent {
167
167
  (event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
168
168
  (event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -171,7 +171,7 @@ export interface IDirectoryEvents extends IEvent {
171
171
  (event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;
172
172
  }
173
173
 
174
- // @alpha
174
+ // @public @sealed
175
175
  export interface IDirectoryValueChanged extends IValueChanged {
176
176
  path: string;
177
177
  }
@@ -682,7 +682,7 @@ export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
682
682
  (event: "memberRemoved", listener: MemberChangedListener<M>): void;
683
683
  }
684
684
 
685
- // @alpha
685
+ // @alpha @sealed
686
686
  export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
687
687
  // (undocumented)
688
688
  [Symbol.iterator](): IterableIterator<[string, any]>;
@@ -690,7 +690,7 @@ export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents &
690
690
  readonly [Symbol.toStringTag]: string;
691
691
  }
692
692
 
693
- // @alpha
693
+ // @alpha @sealed
694
694
  export interface ISharedDirectoryEvents extends ISharedObjectEvents {
695
695
  (event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
696
696
  (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -830,7 +830,7 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
830
830
  readonly schema: TSchema;
831
831
  }
832
832
 
833
- // @alpha @sealed
833
+ // @public @sealed
834
834
  export interface IValueChanged {
835
835
  readonly key: string;
836
836
  readonly previousValue: any;
@@ -1075,6 +1075,7 @@ export type SharedMap = ISharedMap;
1075
1075
 
1076
1076
  // @public @sealed
1077
1077
  export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedType<readonly ["SharedObjectKind", TSharedObject]> {
1078
+ is(value: IFluidLoadable): value is IFluidLoadable & TSharedObject;
1078
1079
  }
1079
1080
 
1080
1081
  // @alpha
@@ -1151,6 +1152,7 @@ interface TreeArrayNodeBase<out T, in TNew, in TMoveFrom> extends ReadonlyArray<
1151
1152
  moveToStart(sourceIndex: number, source: TMoveFrom): void;
1152
1153
  removeAt(index: number): void;
1153
1154
  removeRange(start?: number, end?: number): void;
1155
+ values(): IterableIterator<T>;
1154
1156
  }
1155
1157
 
1156
1158
  // @public @sealed
@@ -1301,6 +1303,4 @@ export interface WithType<TName extends string = string> {
1301
1303
  get [typeNameSymbol](): TName;
1302
1304
  }
1303
1305
 
1304
- // (No @packageDocumentation comment for this package)
1305
-
1306
1306
  ```