@fluidframework/map 0.59.3003 → 0.59.4000

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/src/interfaces.ts CHANGED
@@ -112,7 +112,6 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
112
112
  * (
113
113
  * changed: IDirectoryValueChanged,
114
114
  * local: boolean,
115
- * op: ISequencedDocumentMessage | null,
116
115
  * target: IEventThisPlaceHolder,
117
116
  * ) => void
118
117
  * ```
@@ -121,8 +120,6 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
121
120
  *
122
121
  * - `local` - Whether the change originated from the this client.
123
122
  *
124
- * - `op` - The op that caused the change in value.
125
- *
126
123
  * - `target` - The ISharedDirectory itself.
127
124
  *
128
125
  * ### "clear"
@@ -132,11 +129,39 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
132
129
  * #### Listener signature
133
130
  *
134
131
  * ```typescript
135
- * (local: boolean, op: ISequencedDocumentMessage | null, target: IEventThisPlaceHolder) => void
132
+ * (local: boolean, target: IEventThisPlaceHolder) => void
136
133
  * ```
137
134
  * - `local` - Whether the clear originated from the this client.
138
135
  *
139
- * - `op` - The op that caused the clear.
136
+ * - `target` - The ISharedDirectory itself.
137
+ *
138
+ * ### "subDirectoryCreated"
139
+ *
140
+ * The subDirectoryCreated event is emitted when a subdirectory is created.
141
+ *
142
+ * #### Listener signature
143
+ *
144
+ * ```typescript
145
+ * (path: string, local: boolean, target: IEventThisPlaceHolder) => void
146
+ * ```
147
+ * - `path` - The relative path to the key that is created.It is relative from the object which raises the event.
148
+ *
149
+ * - `local` - Whether the clear originated from the this client.
150
+ *
151
+ * - `target` - The ISharedDirectory itself.
152
+ *
153
+ * * ### "subDirectoryDeleted"
154
+ *
155
+ * The subDirectoryDeleted event is emitted when a subdirectory is deleted.
156
+ *
157
+ * #### Listener signature
158
+ *
159
+ * ```typescript
160
+ * (path: string, local: boolean, target: IEventThisPlaceHolder) => void
161
+ * ```
162
+ * - `path` - The relative path to the key that is deleted.It is relative from the object which raises the event.
163
+ *
164
+ * - `local` - Whether the clear originated from the this client.
140
165
  *
141
166
  * - `target` - The ISharedDirectory itself.
142
167
  */
@@ -150,6 +175,17 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
150
175
  local: boolean,
151
176
  target: IEventThisPlaceHolder,
152
177
  ) => void);
178
+ (event: "subDirectoryCreated", listener: (
179
+ path: string,
180
+ local: boolean,
181
+ target: IEventThisPlaceHolder,
182
+ ) => void);
183
+ // eslint-disable-next-line @typescript-eslint/unified-signatures
184
+ (event: "subDirectoryDeleted", listener: (
185
+ path: string,
186
+ local: boolean,
187
+ target: IEventThisPlaceHolder,
188
+ ) => void);
153
189
  }
154
190
 
155
191
  /**
@@ -169,7 +205,37 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
169
205
  *
170
206
  * - `local` - Whether the change originated from the this client.
171
207
  *
208
+ *
172
209
  * - `target` - The IDirectory itself.
210
+ * ### "subDirectoryCreated"
211
+ *
212
+ * The subDirectoryCreated event is emitted when a subdirectory is created.
213
+ *
214
+ * #### Listener signature
215
+ *
216
+ * ```typescript
217
+ * (path: string, local: boolean, target: IEventThisPlaceHolder) => void
218
+ * ```
219
+ * - `path` - The relative path to the key that is created. It is relative from the object which raises the event.
220
+ *
221
+ * - `local` - Whether the clear originated from the this client.
222
+ *
223
+ * - `target` - The ISharedDirectory itself.
224
+ *
225
+ * * ### "subDirectoryDeleted"
226
+ *
227
+ * The subDirectoryDeleted event is emitted when a subdirectory is deleted.
228
+ *
229
+ * #### Listener signature
230
+ *
231
+ * ```typescript
232
+ * (path: string, local: boolean, target: IEventThisPlaceHolder) => void
233
+ * ```
234
+ * - `path` - The relative path to the key that is deleted. It is relative from the object which raises the event.
235
+ *
236
+ * - `local` - Whether the clear originated from the this client.
237
+ *
238
+ * - `target` - The ISharedDirectory itself.
173
239
  *
174
240
  * ### "disposed"
175
241
  *
@@ -189,6 +255,17 @@ export interface IDirectoryEvents extends IEvent {
189
255
  local: boolean,
190
256
  target: IEventThisPlaceHolder,
191
257
  ) => void);
258
+ (event: "subDirectoryCreated", listener: (
259
+ path: string,
260
+ local: boolean,
261
+ target: IEventThisPlaceHolder,
262
+ ) => void);
263
+ // eslint-disable-next-line @typescript-eslint/unified-signatures
264
+ (event: "subDirectoryDeleted", listener: (
265
+ path: string,
266
+ local: boolean,
267
+ target: IEventThisPlaceHolder,
268
+ ) => void);
192
269
  (event: "disposed", listener: (
193
270
  target: IEventThisPlaceHolder,
194
271
  ) => void);
package/src/map.ts CHANGED
@@ -320,7 +320,6 @@ export class SharedMap extends SharedObject<ISharedMapEvents> implements IShared
320
320
  * @internal
321
321
  */
322
322
  protected async loadCore(storage: IChannelStorageService) {
323
- // eslint-disable-next-line @typescript-eslint/ban-types
324
323
  const json = await readAndParse<object>(storage, snapshotFileName);
325
324
  const newFormat = json as IMapSerializationFormat;
326
325
  if (Array.isArray(newFormat.blobs)) {
package/src/mapKernel.ts CHANGED
@@ -545,7 +545,7 @@ export class MapKernel {
545
545
  // and don't process the op.
546
546
  if (local) {
547
547
  assert(localOpMetadata !== undefined,
548
- 0x014 /* `pendingMessageId is missing from the local client's ${op.type} operation` */);
548
+ 0x014 /* pendingMessageId is missing from the local client's operation */);
549
549
  const pendingMessageId = localOpMetadata as number;
550
550
  const pendingKeyMessageId = this.pendingKeys.get(op.key);
551
551
  if (pendingKeyMessageId === pendingMessageId) {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/map";
9
- export const pkgVersion = "0.59.3003";
9
+ export const pkgVersion = "0.59.4000";