@fluidframework/map 2.0.0-internal.7.3.0 → 2.0.0-internal.8.0.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-extractor-lint.json +13 -0
- package/api-extractor.json +8 -3
- package/api-report/map.api.md +42 -44
- package/dist/directory.cjs +221 -35
- package/dist/directory.cjs.map +1 -1
- package/dist/directory.d.ts +499 -38
- package/dist/directory.d.ts.map +1 -1
- package/dist/interfaces.cjs.map +1 -1
- package/dist/interfaces.d.ts +10 -20
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/localValues.cjs +1 -2
- package/dist/localValues.cjs.map +1 -1
- package/dist/localValues.d.ts +2 -4
- package/dist/localValues.d.ts.map +1 -1
- package/dist/map-alpha.d.ts +97 -68
- package/dist/map-beta.d.ts +59 -890
- package/dist/map-public.d.ts +59 -890
- package/dist/map-untrimmed.d.ts +28 -70
- package/dist/map.cjs +2 -10
- package/dist/map.cjs.map +1 -1
- package/dist/map.d.ts +2 -10
- package/dist/map.d.ts.map +1 -1
- package/dist/packageVersion.cjs +1 -1
- package/dist/packageVersion.cjs.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/lib/directory.d.ts +499 -38
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.mjs +221 -35
- package/lib/directory.mjs.map +1 -1
- package/lib/index.d.ts +4 -15
- package/lib/index.d.ts.map +1 -1
- package/lib/interfaces.d.ts +10 -20
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.mjs.map +1 -1
- package/lib/internalInterfaces.d.ts +2 -2
- package/lib/internalInterfaces.d.ts.map +1 -1
- package/lib/localValues.d.ts +3 -5
- package/lib/localValues.d.ts.map +1 -1
- package/lib/localValues.mjs +1 -2
- package/lib/localValues.mjs.map +1 -1
- package/lib/map-alpha.d.ts +97 -68
- package/lib/map-beta.d.ts +59 -890
- package/lib/map-public.d.ts +59 -890
- package/lib/map-untrimmed.d.ts +28 -70
- package/lib/map.d.ts +3 -11
- package/lib/map.d.ts.map +1 -1
- package/lib/map.mjs +2 -10
- package/lib/map.mjs.map +1 -1
- package/lib/mapKernel.d.ts +2 -2
- package/lib/mapKernel.d.ts.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.mjs +1 -1
- package/lib/packageVersion.mjs.map +1 -1
- package/map.test-files.tar +0 -0
- package/package.json +22 -18
- package/src/directory.ts +275 -58
- package/src/interfaces.ts +10 -20
- package/src/localValues.ts +2 -4
- package/src/map.ts +2 -10
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @fluidframework/map
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.8.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- datastore-definitions: Jsonable and Serializable now require a generic parameter [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
|
|
8
|
+
|
|
9
|
+
The `Jsonable` and `Serializable` types from @fluidframework/datastore-definitions now require a generic parameter and
|
|
10
|
+
if that type is `any` or `unknown`will return a new result `JsonableTypeWith<>` that more accurately represents the
|
|
11
|
+
limitation of serialization.
|
|
12
|
+
|
|
13
|
+
Additional modifications:
|
|
14
|
+
|
|
15
|
+
- `Jsonable`'s `TReplacement` parameter default has also been changed from `void` to `never`, which now disallows
|
|
16
|
+
`void`.
|
|
17
|
+
- Unrecognized primitive types like `symbol` are now filtered to `never` instead of `{}`.
|
|
18
|
+
- Recursive types with arrays (`[]`) are now supported.
|
|
19
|
+
|
|
20
|
+
`Serializable` is commonly used for DDS values and now requires more precision when using them. For example SharedMatrix
|
|
21
|
+
(unqualified) has an `any` default that meant values were `Serializable<any>` (i.e. `any`), but now `Serializable<any>`
|
|
22
|
+
is `JsonableTypeWith<IFluidHandle>` which may be problematic for reading or writing. Preferred correction is to specify
|
|
23
|
+
the value type but casting through `any` may provide a quick fix.
|
|
24
|
+
|
|
25
|
+
## 2.0.0-internal.7.4.0
|
|
26
|
+
|
|
27
|
+
Dependency updates only.
|
|
28
|
+
|
|
3
29
|
## 2.0.0-internal.7.3.0
|
|
4
30
|
|
|
5
31
|
Dependency updates only.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-lint.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
// TODO: remove once base config has this enabled as an error
|
|
7
|
+
"ae-incompatible-release-tags": {
|
|
8
|
+
"logLevel": "error",
|
|
9
|
+
"addToApiReportFile": false
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/api-extractor.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
// TODO: Add missing documentation and remove this rule override
|
|
7
|
+
"ae-undocumented": {
|
|
8
|
+
"logLevel": "none"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
6
11
|
}
|
|
7
12
|
}
|
package/api-report/map.api.md
CHANGED
|
@@ -22,7 +22,7 @@ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
|
22
22
|
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
23
23
|
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
24
24
|
|
|
25
|
-
// @
|
|
25
|
+
// @alpha @sealed
|
|
26
26
|
export class DirectoryFactory implements IChannelFactory {
|
|
27
27
|
// (undocumented)
|
|
28
28
|
static readonly Attributes: IChannelAttributes;
|
|
@@ -38,13 +38,13 @@ export class DirectoryFactory implements IChannelFactory {
|
|
|
38
38
|
get type(): string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
// @
|
|
41
|
+
// @alpha
|
|
42
42
|
export interface ICreateInfo {
|
|
43
43
|
ccIds: string[];
|
|
44
44
|
csn: number;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
// @
|
|
47
|
+
// @alpha
|
|
48
48
|
export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
|
|
49
49
|
readonly absolutePath: string;
|
|
50
50
|
countSubDirectory?(): number;
|
|
@@ -58,20 +58,20 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
|
|
|
58
58
|
subdirectories(): IterableIterator<[string, IDirectory]>;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// @
|
|
61
|
+
// @alpha
|
|
62
62
|
export interface IDirectoryClearOperation {
|
|
63
63
|
path: string;
|
|
64
64
|
type: "clear";
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// @
|
|
67
|
+
// @alpha
|
|
68
68
|
export interface IDirectoryCreateSubDirectoryOperation {
|
|
69
69
|
path: string;
|
|
70
70
|
subdirName: string;
|
|
71
71
|
type: "createSubDirectory";
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
// @
|
|
74
|
+
// @alpha
|
|
75
75
|
export interface IDirectoryDataObject {
|
|
76
76
|
ci?: ICreateInfo;
|
|
77
77
|
storage?: {
|
|
@@ -82,21 +82,21 @@ export interface IDirectoryDataObject {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
// @
|
|
85
|
+
// @alpha
|
|
86
86
|
export interface IDirectoryDeleteOperation {
|
|
87
87
|
key: string;
|
|
88
88
|
path: string;
|
|
89
89
|
type: "delete";
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
// @
|
|
92
|
+
// @alpha
|
|
93
93
|
export interface IDirectoryDeleteSubDirectoryOperation {
|
|
94
94
|
path: string;
|
|
95
95
|
subdirName: string;
|
|
96
96
|
type: "deleteSubDirectory";
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
// @
|
|
99
|
+
// @alpha
|
|
100
100
|
export interface IDirectoryEvents extends IEvent {
|
|
101
101
|
(event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
102
102
|
(event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
@@ -105,7 +105,7 @@ export interface IDirectoryEvents extends IEvent {
|
|
|
105
105
|
(event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// @
|
|
108
|
+
// @alpha
|
|
109
109
|
export type IDirectoryKeyOperation = IDirectorySetOperation | IDirectoryDeleteOperation;
|
|
110
110
|
|
|
111
111
|
// @internal
|
|
@@ -114,10 +114,10 @@ export interface IDirectoryNewStorageFormat {
|
|
|
114
114
|
content: IDirectoryDataObject;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
// @
|
|
117
|
+
// @alpha
|
|
118
118
|
export type IDirectoryOperation = IDirectoryStorageOperation | IDirectorySubDirectoryOperation;
|
|
119
119
|
|
|
120
|
-
// @
|
|
120
|
+
// @alpha
|
|
121
121
|
export interface IDirectorySetOperation {
|
|
122
122
|
key: string;
|
|
123
123
|
path: string;
|
|
@@ -125,37 +125,37 @@ export interface IDirectorySetOperation {
|
|
|
125
125
|
value: ISerializableValue;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
// @
|
|
128
|
+
// @alpha
|
|
129
129
|
export type IDirectoryStorageOperation = IDirectoryKeyOperation | IDirectoryClearOperation;
|
|
130
130
|
|
|
131
|
-
// @
|
|
131
|
+
// @alpha
|
|
132
132
|
export type IDirectorySubDirectoryOperation = IDirectoryCreateSubDirectoryOperation | IDirectoryDeleteSubDirectoryOperation;
|
|
133
133
|
|
|
134
|
-
// @
|
|
134
|
+
// @alpha
|
|
135
135
|
export interface IDirectoryValueChanged extends IValueChanged {
|
|
136
136
|
path: string;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
// @
|
|
139
|
+
// @alpha
|
|
140
140
|
export interface ILocalValue {
|
|
141
141
|
makeSerialized(serializer: IFluidSerializer, bind: IFluidHandle): ISerializedValue;
|
|
142
142
|
readonly type: string;
|
|
143
143
|
readonly value: any;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
// @
|
|
146
|
+
// @alpha @deprecated
|
|
147
147
|
export interface ISerializableValue {
|
|
148
148
|
type: string;
|
|
149
149
|
value: any;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
// @
|
|
152
|
+
// @alpha
|
|
153
153
|
export interface ISerializedValue {
|
|
154
154
|
type: string;
|
|
155
155
|
value: string | undefined;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
// @
|
|
158
|
+
// @alpha
|
|
159
159
|
export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
|
|
160
160
|
// (undocumented)
|
|
161
161
|
[Symbol.iterator](): IterableIterator<[string, any]>;
|
|
@@ -163,7 +163,7 @@ export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents &
|
|
|
163
163
|
readonly [Symbol.toStringTag]: string;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
// @
|
|
166
|
+
// @alpha
|
|
167
167
|
export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
168
168
|
(event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
169
169
|
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
@@ -171,32 +171,32 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
|
|
|
171
171
|
(event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
// @
|
|
174
|
+
// @alpha
|
|
175
175
|
export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
|
|
176
176
|
get<T = any>(key: string): T | undefined;
|
|
177
177
|
set<T = unknown>(key: string, value: T): this;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
// @
|
|
180
|
+
// @alpha
|
|
181
181
|
export interface ISharedMapEvents extends ISharedObjectEvents {
|
|
182
182
|
(event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
183
183
|
(event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
// @
|
|
186
|
+
// @alpha
|
|
187
187
|
export interface IValueChanged {
|
|
188
188
|
key: string;
|
|
189
189
|
previousValue: any;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
// @
|
|
192
|
+
// @alpha
|
|
193
193
|
export class LocalValueMaker {
|
|
194
194
|
constructor(serializer: IFluidSerializer);
|
|
195
195
|
fromInMemory(value: unknown): ILocalValue;
|
|
196
196
|
fromSerializable(serializable: ISerializableValue): ILocalValue;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
// @
|
|
199
|
+
// @alpha @sealed
|
|
200
200
|
export class MapFactory implements IChannelFactory {
|
|
201
201
|
// (undocumented)
|
|
202
202
|
static readonly Attributes: IChannelAttributes;
|
|
@@ -212,13 +212,13 @@ export class MapFactory implements IChannelFactory {
|
|
|
212
212
|
get type(): string;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
// @
|
|
215
|
+
// @alpha @sealed
|
|
216
216
|
export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implements ISharedDirectory {
|
|
217
217
|
[Symbol.iterator](): IterableIterator<[string, any]>;
|
|
218
218
|
[Symbol.toStringTag]: string;
|
|
219
219
|
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
220
220
|
get absolutePath(): string;
|
|
221
|
-
//
|
|
221
|
+
// (undocumented)
|
|
222
222
|
protected applyStashedOp(op: unknown): unknown;
|
|
223
223
|
clear(): void;
|
|
224
224
|
countSubDirectory(): number;
|
|
@@ -239,36 +239,34 @@ export class SharedDirectory extends SharedObject<ISharedDirectoryEvents> implem
|
|
|
239
239
|
has(key: string): boolean;
|
|
240
240
|
hasSubDirectory(subdirName: string): boolean;
|
|
241
241
|
keys(): IterableIterator<string>;
|
|
242
|
-
//
|
|
242
|
+
// (undocumented)
|
|
243
243
|
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
244
|
-
//
|
|
244
|
+
// (undocumented)
|
|
245
245
|
readonly localValueMaker: LocalValueMaker;
|
|
246
|
-
//
|
|
246
|
+
// (undocumented)
|
|
247
247
|
protected onDisconnect(): void;
|
|
248
|
-
// @internal
|
|
249
248
|
protected populate(data: IDirectoryDataObject): void;
|
|
250
|
-
//
|
|
249
|
+
// (undocumented)
|
|
251
250
|
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
252
|
-
//
|
|
251
|
+
// (undocumented)
|
|
253
252
|
protected reSubmitCore(content: unknown, localOpMetadata: unknown): void;
|
|
254
|
-
//
|
|
253
|
+
// (undocumented)
|
|
255
254
|
protected rollback(content: unknown, localOpMetadata: unknown): void;
|
|
256
255
|
set<T = unknown>(key: string, value: T): this;
|
|
257
256
|
get size(): number;
|
|
258
257
|
subdirectories(): IterableIterator<[string, IDirectory]>;
|
|
259
|
-
// @internal
|
|
260
258
|
submitDirectoryMessage(op: IDirectoryOperation, localOpMetadata: unknown): void;
|
|
261
|
-
//
|
|
259
|
+
// (undocumented)
|
|
262
260
|
protected summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
263
261
|
values(): IterableIterator<any>;
|
|
264
262
|
}
|
|
265
263
|
|
|
266
|
-
// @
|
|
264
|
+
// @alpha
|
|
267
265
|
export class SharedMap extends SharedObject<ISharedMapEvents> implements ISharedMap {
|
|
268
266
|
[Symbol.iterator](): IterableIterator<[string, any]>;
|
|
269
267
|
readonly [Symbol.toStringTag]: string;
|
|
270
268
|
constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
|
|
271
|
-
//
|
|
269
|
+
// (undocumented)
|
|
272
270
|
protected applyStashedOp(content: unknown): unknown;
|
|
273
271
|
clear(): void;
|
|
274
272
|
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedMap;
|
|
@@ -279,19 +277,19 @@ export class SharedMap extends SharedObject<ISharedMapEvents> implements IShared
|
|
|
279
277
|
static getFactory(): IChannelFactory;
|
|
280
278
|
has(key: string): boolean;
|
|
281
279
|
keys(): IterableIterator<string>;
|
|
282
|
-
//
|
|
280
|
+
// (undocumented)
|
|
283
281
|
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
284
|
-
//
|
|
282
|
+
// (undocumented)
|
|
285
283
|
protected onDisconnect(): void;
|
|
286
|
-
//
|
|
284
|
+
// (undocumented)
|
|
287
285
|
protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
288
|
-
//
|
|
286
|
+
// (undocumented)
|
|
289
287
|
protected reSubmitCore(content: unknown, localOpMetadata: unknown): void;
|
|
290
|
-
//
|
|
288
|
+
// (undocumented)
|
|
291
289
|
protected rollback(content: unknown, localOpMetadata: unknown): void;
|
|
292
290
|
set(key: string, value: unknown): this;
|
|
293
291
|
get size(): number;
|
|
294
|
-
//
|
|
292
|
+
// (undocumented)
|
|
295
293
|
protected summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
296
294
|
values(): IterableIterator<any>;
|
|
297
295
|
}
|