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

react-esc-resolver

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-esc-resolver - npm Package Compare versions

Comparing version 4.0.0-beta.30 to 4.0.0-beta.31

yarn-error.log

46

cjs/react-esc-resolver.development.js

@@ -71,14 +71,22 @@ 'use strict';

props = _props.props,
cache = _props.cache;
cache = _props.cache,
cacheValidator = _props.cacheValidator;
var cached = null;
if (cache || !canUseDom()) {
if (hasOwnProperty(props, resolve)) {
return props[resolve];
cached = props[resolve];
} else if (this.context.resolver) {
return this.context.resolver.cached(resolve);
cached = this.context.resolver.cached(resolve);
}
}
return null;
console.log('has validator', cacheValidator && typeof cacheValidator === 'function');
if (cached && cacheValidator && typeof cacheValidator === 'function') {
return cacheValidator(props);
}
return cached;
}

@@ -103,2 +111,4 @@ }, {

value: function componentWillReceiveProps(nextProps) {
console.log('componentWillReceiveProps');
var _computeState = this.computeState(nextProps, this.state),

@@ -130,2 +140,4 @@ pending = _computeState.pending,

console.log('cached', cached);
if (!hasOwnProperty(state.resolved, name) && !hasOwnProperty(state.pending, name) && !_this2.isValidCache(cached)) {

@@ -234,8 +246,6 @@ nextState.pending[name] = resolve[name];

var nextState = {
_this3.setAtomicState({
pending: {},
resolved: _extends({}, state.resolved, resolved)
};
_this3.setAtomicState(nextState);
});
});

@@ -281,3 +291,4 @@ }

props: {},
resolve: {}
resolve: {},
cacheValidator: null
};

@@ -288,3 +299,5 @@ Resolver.displayName = 'Resolver';

props: PropTypes.object,
resolve: PropTypes.object
resolve: PropTypes.object,
cache: PropTypes.bool.isRequired,
cacheValidator: PropTypes.func
};

@@ -361,8 +374,13 @@

var cache = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
var cacheValid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
var asyncProps = (typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object' ? prop : _defineProperty({}, prop, promise);
var asyncNames = _Object$keys(asyncProps).map(capitalize).join('');
var cacheEnabled = (typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object' && typeof promise === 'boolean' ? promise : cache;
var cacheEnabled = (typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object' && typeof promise === 'boolean' ? promise : typeof cache === 'function' ? true : cache;
var cacheValidator = typeof cache === 'function' ? cache : cacheValid;
return function (Component) {

@@ -385,3 +403,7 @@ var _class, _temp;

Resolver,
{ props: this.props, resolve: asyncProps, cache: cacheEnabled },
{
props: this.props,
resolve: asyncProps,
cache: cacheEnabled,
cacheValidator: cacheValidator },
function (resolved) {

@@ -388,0 +410,0 @@ return React.createElement(Component, resolved);

@@ -74,4 +74,5 @@ 'use strict';

if (cache || !canUseDom()) {
if (cache || !this[IS_CLIENT]) {
if (hasOwnProperty(props, resolve)) {
console.log(props[resolve]);
return props[resolve];

@@ -129,6 +130,7 @@ } else if (this.context.resolver) {

console.log('cached', cached);
if (!hasOwnProperty(state.resolved, name) && !hasOwnProperty(state.pending, name) && !_this2.isValidCache(cached)) {
nextState.pending[name] = resolve[name];
} else if (cached) {
nextState.resolved[name] = true;
nextState.resolved[name] = cached;
}

@@ -233,8 +235,6 @@ });

var nextState = {
_this3.setAtomicState({
pending: {},
resolved: _extends({}, state.resolved, resolved)
};
_this3.setAtomicState(nextState);
});
});

@@ -241,0 +241,0 @@ }

{
"name": "react-esc-resolver",
"version": "4.0.0-beta.30",
"version": "4.0.0-beta.31",
"description": "Easy to use Client and Server Resolver",

@@ -5,0 +5,0 @@ "keywords": [

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