@shopify/react-html
Advanced tools
Comparing version 13.0.1 to 13.0.2
@@ -6,3 +6,3 @@ 'use strict'; | ||
var React = require('react'); | ||
var jsesc = require('jsesc'); | ||
var serialize = require('serialize-javascript'); | ||
var utilities = require('../../utilities.js'); | ||
@@ -13,3 +13,3 @@ | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var jsesc__default = /*#__PURE__*/_interopDefaultLegacy(jsesc); | ||
var serialize__default = /*#__PURE__*/_interopDefaultLegacy(serialize); | ||
@@ -20,10 +20,8 @@ function Serialize({ | ||
}) { | ||
const serialized = jsesc__default["default"](data, { | ||
isScriptContext: true, | ||
json: true | ||
}); | ||
return /*#__PURE__*/React__default["default"].createElement("script", { | ||
type: "text/json", | ||
dangerouslySetInnerHTML: { | ||
__html: serialized | ||
__html: serialize__default["default"](data, { | ||
isJSON: true | ||
}) | ||
}, | ||
@@ -30,0 +28,0 @@ [utilities.SERIALIZE_ATTRIBUTE]: id |
{ | ||
"name": "@shopify/react-html", | ||
"version": "13.0.1", | ||
"version": "13.0.2", | ||
"license": "MIT", | ||
@@ -36,4 +36,4 @@ "description": "A component to render your React app with no static HTML", | ||
"@types/multistream": "^2.1.1", | ||
"jsesc": "^3.0.2", | ||
"multistream": "^2.1.1" | ||
"multistream": "^2.1.1", | ||
"serialize-javascript": "^3.0.0" | ||
}, | ||
@@ -40,0 +40,0 @@ "peerDependencies": { |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
112742
1736
+ Addedserialize-javascript@^3.0.0
+ Addedrandombytes@2.1.0(transitive)
+ Addedserialize-javascript@3.1.0(transitive)
- Removedjsesc@^3.0.2
- Removedjsesc@3.0.2(transitive)