Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnp/core-commonjs

Package Overview
Dependencies
Maintainers
13
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnp/core-commonjs - npm Package Compare versions

Comparing version 3.0.0-v3nightly.20211029 to 3.0.0-v3nightly.20211030

3

moments.js

@@ -5,5 +5,2 @@ "use strict";

const util_js_1 = require("./util.js");
// TODO:: docs
// - you don't need error handling here because that is handled in emit within the timeline
// - explain why we have just these - it is what we needed.
/**

@@ -10,0 +7,0 @@ * Emits to all registered observers the supplied arguments. Any values returned by the observers are ignored

2

package.json
{
"name": "@pnp/core-commonjs",
"version": "3.0.0-v3nightly.20211029",
"version": "3.0.0-v3nightly.20211030",
"description": "pnp - provides shared functionality across all pnp libraries",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -176,3 +176,2 @@ "use strict";

get session() {
// BUG: sessionStorage is undefined
if (this._session === null) {

@@ -179,0 +178,0 @@ this._session = new PnPClientStorageWrapper(typeof sessionStorage === "undefined" ? new MemoryStorage() : sessionStorage);

@@ -84,7 +84,2 @@ /**

/**
* Shorthand method to emit a dispose event tied to this timeline
*
*/
protected dispose(): void;
/**
* Shorthand method to emit an error event tied to this timeline

@@ -96,7 +91,2 @@ *

/**
* Shorthand method to emit an init event tied to this timeline
*
*/
protected init(): void;
/**
* Property allowing access to invoke a moment from within this timeline

@@ -103,0 +93,0 @@ */

@@ -74,9 +74,2 @@ "use strict";

/**
* Shorthand method to emit a dispose event tied to this timeline
*
*/
dispose() {
this.emit.dispose();
}
/**
* Shorthand method to emit an error event tied to this timeline

@@ -92,9 +85,2 @@ *

/**
* Shorthand method to emit an init event tied to this timeline
*
*/
init() {
this.emit.init();
}
/**
* Property allowing access to invoke a moment from within this timeline

@@ -106,9 +92,7 @@ */

get: (target, p) => (...args) => {
// handle the case there are no observers registered to the target
// handle the case where no observers registered for the target moment
const observers = Reflect.has(target.observers, p) ? Reflect.get(target.observers, p) : [];
if (!(0, util_js_1.isArray)(observers) || observers.length < 1) {
if (p === "error") {
// if we are emitting an error, and no error observers are defined, we throw
throw Error(`Unhandled Exception: ${args[0]}`);
}
if ((!(0, util_js_1.isArray)(observers) || observers.length < 1) && p === "error") {
// if we are emitting an error, and no error observers are defined, we throw
throw Error(`Unhandled Exception: ${args[0]}`);
}

@@ -118,2 +102,3 @@ try {

const moment = Reflect.has(target.moments, p) ? Reflect.get(target.moments, p) : p === "init" || p === "dispose" ? (0, moments_js_1.lifecycle)() : (0, moments_js_1.broadcast)();
// pass control to the individual moment's implementation
return Reflect.apply(moment, target, [observers, ...args]);

@@ -146,12 +131,11 @@ }

// initialize our timeline
this.init();
this.emit.init();
// execute the timeline
// (this await is required to ensure dispose is called AFTER execute completes)
// we do not catch here so that any promise rejects in execute bubble up to the caller
return await this.execute(init);
}
catch (e) {
this.error(e);
}
finally {
try {
this.dispose();
this.emit.dispose();
}

@@ -158,0 +142,0 @@ catch (e) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc