Comparing version 6.0.66 to 6.0.67-patch1
@@ -43,3 +43,3 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
if (!options) { | ||
throw new Error('Expecred options to be passed'); | ||
throw new Error('Expected options to be passed'); | ||
} | ||
@@ -46,0 +46,0 @@ |
@@ -90,4 +90,12 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
_this.context = context; | ||
_this.setProps(props); | ||
try { | ||
_this.setProps(props); | ||
} catch (err) { | ||
if (props.onError) { | ||
props.onError(err); | ||
} | ||
throw err; | ||
} | ||
if (_this.props.logLevel) { | ||
@@ -94,0 +102,0 @@ setLogLevel(_this.props.logLevel); |
@@ -26,17 +26,5 @@ | ||
component.log('instantiate_script_component'); | ||
component.log('instantiate_script_component_error'); | ||
var props = element.innerText ? eval('(' + element.innerText + ')') // eslint-disable-line no-eval, security/detect-eval-with-expression | ||
: {}; | ||
var container = document.createElement('div'); | ||
if (!element.parentNode) { | ||
throw new Error('Element has no parent'); | ||
} | ||
element.parentNode.replaceChild(container, element); | ||
// $FlowFixMe | ||
component.render(props, container); | ||
throw new Error('\n \'x-component\' script type is no longer supported. \n Please migrate to another integration pattern.\n '); | ||
} | ||
@@ -43,0 +31,0 @@ |
{ | ||
"name": "zoid", | ||
"version": "6.0.66", | ||
"version": "6.0.67-patch1", | ||
"description": "Cross domain components.", | ||
@@ -57,9 +57,9 @@ "main": "index.js", | ||
"dependencies": { | ||
"beaver-logger": "^3.0.11", | ||
"cross-domain-safe-weakmap": "^1.0.19", | ||
"cross-domain-utils": "^2.0.3", | ||
"beaver-logger": "^3.0.17", | ||
"cross-domain-safe-weakmap": "1.0.23", | ||
"cross-domain-utils": "2.0.23", | ||
"hi-base32": "^0.5.0", | ||
"post-robot": "^8.0.14", | ||
"zalgo-promise": "^1.0.22" | ||
"post-robot": "8.0.29", | ||
"zalgo-promise": "1.0.36" | ||
} | ||
} |
@@ -64,3 +64,3 @@ /* @flow */ | ||
validate? : (Component<P>, PropsType) => void, | ||
validate? : (Component<P>, UserPropsDefinitionType<P>) => void, | ||
@@ -67,0 +67,0 @@ unsafeRenderTo? : boolean |
@@ -43,3 +43,3 @@ /* @flow */ | ||
if (!options) { | ||
throw new Error(`Expecred options to be passed`); | ||
throw new Error(`Expected options to be passed`); | ||
} | ||
@@ -46,0 +46,0 @@ |
@@ -90,4 +90,12 @@ /* @flow */ | ||
this.context = context; | ||
this.setProps(props); | ||
try { | ||
this.setProps(props); | ||
} catch (err) { | ||
if (props.onError) { | ||
props.onError(err); | ||
} | ||
throw err; | ||
} | ||
if (this.props.logLevel) { | ||
@@ -94,0 +102,0 @@ setLogLevel(this.props.logLevel); |
@@ -30,18 +30,9 @@ /* @flow */ | ||
component.log(`instantiate_script_component`); | ||
component.log(`instantiate_script_component_error`); | ||
let props : { [string] : mixed } = element.innerText | ||
? eval(`(${ element.innerText })`) // eslint-disable-line no-eval, security/detect-eval-with-expression | ||
: {}; | ||
let container = document.createElement('div'); | ||
if (!element.parentNode) { | ||
throw new Error(`Element has no parent`); | ||
} | ||
element.parentNode.replaceChild(container, element); | ||
// $FlowFixMe | ||
component.render(props, container); | ||
throw new Error(` | ||
'x-component' script type is no longer supported. | ||
Please migrate to another integration pattern. | ||
`); | ||
} | ||
@@ -48,0 +39,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
3779039
25857
0
2
+ Addedcross-domain-safe-weakmap@1.0.23(transitive)
+ Addedcross-domain-utils@2.0.23(transitive)
+ Addedpost-robot@8.0.29(transitive)
+ Addedzalgo-promise@1.0.36(transitive)
- Removedcross-domain-safe-weakmap@1.0.29(transitive)
- Removedcross-domain-utils@2.0.38(transitive)
- Removedpost-robot@8.0.32(transitive)
- Removedzalgo-promise@1.0.48(transitive)
Updatedbeaver-logger@^3.0.17
Updatedcross-domain-utils@2.0.23
Updatedpost-robot@8.0.29
Updatedzalgo-promise@1.0.36