informa 5.0.10 → 5.0.11

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.
@@ -174,8 +174,6 @@ export function makeStatified<
174
174
  unhook(stateMetadata, prop, oldValMetadata);
175
175
  }
176
176
 
177
- emitCollectionTransition(oldVal, newVal);
178
-
179
177
  if (
180
178
  typeof prop !== "symbol" &&
181
179
  Number.isInteger(Number(prop)) &&
@@ -197,6 +195,8 @@ export function makeStatified<
197
195
  stateMetadata.emit('addProp', newVal, prop);
198
196
  }
199
197
 
198
+ emitCollectionTransition(oldVal, newVal, stateMetadata.eventEmitterAtPathMaybe([prop]), prop);
199
+
200
200
  stateMetadata.emit('setProp', newVal, prop);
201
201
 
202
202
  const maybeEventEmitterAtVal = stateMetadata.eventEmitterAtPathMaybe([prop]);
package/src/quirks/map.ts CHANGED
@@ -13,9 +13,15 @@ export class StatifiedMap<K, V> extends Map<K, V> implements Statify<Map<K, V>>
13
13
  #metadata: StateMetadata;
14
14
 
15
15
  constructor(args?: Iterable<[K, V]> | null) {
16
- super(args);
16
+ super();
17
17
 
18
18
  this.#metadata = setMetadataOf(this, new StateMetadata());
19
+
20
+ if (args) {
21
+ for (const [key, value] of args) {
22
+ super.set(key, value);
23
+ }
24
+ }
19
25
  }
20
26
 
21
27
  clear(): void {
package/src/quirks/set.ts CHANGED
@@ -13,9 +13,15 @@ export class StatifiedSet<T extends StatifiableProp> extends Set<T> implements S
13
13
  #metadata: StateMetadata;
14
14
 
15
15
  constructor(args?: Iterable<T> | null) {
16
- super(args);
16
+ super();
17
17
 
18
18
  this.#metadata = setMetadataOf(this, new StateMetadata());
19
+
20
+ if (args) {
21
+ for (const item of args) {
22
+ super.add(item);
23
+ }
24
+ }
19
25
  }
20
26
 
21
27
  add(value: T): this {