Socket
Socket
Sign inDemoInstall

@salesforce/core

Package Overview
Dependencies
Maintainers
48
Versions
490
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.3.11 to 7.3.12

5

lib/lifecycleEvents.d.ts
import { AnyJson } from '@salesforce/ts-types';
type callback = (data: any) => Promise<void>;
export type callback = (data: any) => Promise<void>;
type ListenerMap = Map<string, callback>;
export type UniqueListenerMap = Map<string, ListenerMap>;
/**

@@ -95,2 +97,3 @@ * An asynchronous event listener and emitter that follows the singleton pattern. The singleton pattern allows lifecycle

}
export declare const cloneUniqueListeners: (uniqueListeners: UniqueListenerMap) => UniqueListenerMap;
export {};

9

lib/lifecycleEvents.js

@@ -32,3 +32,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Lifecycle = void 0;
exports.cloneUniqueListeners = exports.Lifecycle = void 0;
const semver_1 = require("semver");

@@ -106,4 +106,4 @@ // needed for TS to not put everything inside /lib/src

// use the newer version and transfer any listeners from the old version
// object spread keeps them from being references
global.salesforceCoreLifecycle = new Lifecycle({ ...oldInstance.listeners }, oldInstance.uniqueListeners);
// object spread and the clone fn keep them from being references
global.salesforceCoreLifecycle = new Lifecycle({ ...oldInstance.listeners }, (0, exports.cloneUniqueListeners)(oldInstance.uniqueListeners));
// clean up any listeners on the old version

@@ -237,2 +237,5 @@ Object.keys(oldInstance.listeners).map((eventName) => {

exports.Lifecycle = Lifecycle;
const cloneListeners = (listeners) => new Map(Array.from(listeners.entries()));
const cloneUniqueListeners = (uniqueListeners) => new Map(Array.from(uniqueListeners.entries()).map(([key, value]) => [key, cloneListeners(value)]));
exports.cloneUniqueListeners = cloneUniqueListeners;
//# sourceMappingURL=lifecycleEvents.js.map
{
"name": "@salesforce/core",
"version": "7.3.11",
"version": "7.3.12",
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",

@@ -5,0 +5,0 @@ "main": "lib/index",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc