@salesforce/core 8.1.0 → 8.1.1

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.
@@ -94,5 +94,5 @@ export declare class Lifecycle {
94
94
  */
95
95
  emit<T = AnyJson>(eventName: string, data: T): Promise<void>;
96
96
  }
97
- export declare const cloneUniqueListeners: (uniqueListeners: UniqueListenerMap) => UniqueListenerMap;
97
+ export declare const cloneUniqueListeners: (uniqueListeners: UniqueListenerMap | undefined) => UniqueListenerMap;
98
98
  export {};
@@ -233,6 +233,8 @@ class Lifecycle {
233
233
  }
234
234
  exports.Lifecycle = Lifecycle;
235
235
  const cloneListeners = (listeners) => new Map(Array.from(listeners.entries()));
236
- const cloneUniqueListeners = (uniqueListeners) => new Map(Array.from(uniqueListeners.entries()).map(([key, value]) => [key, cloneListeners(value)]));
236
+ const cloneUniqueListeners = (uniqueListeners) =>
237
+ // in case we're crossing major sfdx-core versions where uniqueListeners might be undefined
238
+ new Map(Array.from(uniqueListeners?.entries() ?? []).map(([key, value]) => [key, cloneListeners(value)]));
237
239
  exports.cloneUniqueListeners = cloneUniqueListeners;
238
240
  //# sourceMappingURL=lifecycleEvents.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "8.1.0",
3
+ "version": "8.1.1",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",