Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Upgrade react
  • Loading branch information
matteofigus committed Jun 7, 2018
commit 3c87687f98e86188d678614c02f1f9db1191b4b4
6 changes: 3 additions & 3 deletions acceptance-setup/__tests__/__snapshots__/acceptance.js.snap

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@
"!packages/**/scaffold/**/*",
"!packages/**/utils/**/*"
]
},
"dependencies": {
"normalize.css": "^7.0.0",
"oc-template-react-compiler": "^5.1.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Object {
"hashKey": "c246e2c2247889e20b39dbdf1f1bce65b2aebf24",
},
"template": Object {
"hashKey": "c4c177969e57c4a49daa3134368ff715fb189560",
"hashKey": "e97759d7e09bdc330b6cea4c708417e00d1dbb12",
"src": "template.js",
"type": "oc-template-react",
},
}
`;

exports[`valid component 2`] = `"var oc=oc||{};oc.components=oc.components||{};oc.components['c4c177969e57c4a49daa3134368ff715fb189560']=function(model){ var modelHTML = model.__html ? model.__html : ''; var staticPath = model.reactComponent.props._staticPath; var props = JSON.stringify(model.reactComponent.props); return '<div id=\\"oc-reactRoot-react-component\\" class=\\"oc-reactRoot-react-component\\">' + modelHTML + '</div>' + '' + '<script>' + 'window.oc = window.oc || {};' + 'oc.cmd = oc.cmd || [];' + 'oc.cmd.push(function(oc){' + '' + 'oc.requireSeries([{\\"global\\":\\"PropTypes\\",\\"url\\":\\"https://unpkg.com/[email protected]/prop-types.min.js\\",\\"name\\":\\"prop-types\\"},{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}], function(){' + 'oc.require(' + '[\\"oc\\", \\"reactComponents\\", \\"c246e2c2247889e20b39dbdf1f1bce65b2aebf24\\"],' + '\\"' + staticPath + 'react-component.js\\",' + 'function(ReactComponent){' + 'var targetNode = document.getElementById(\\"oc-reactRoot-react-component\\");' + 'targetNode.setAttribute(\\"id\\",\\"\\");' + 'ReactDOM.render(React.createElement(ReactComponent,' + props + '),targetNode);' + '}' + ');' + '});' + '});' + '</script>' }"`;
exports[`valid component 2`] = `"var oc=oc||{};oc.components=oc.components||{};oc.components['e97759d7e09bdc330b6cea4c708417e00d1dbb12']=function(model){ var modelHTML = model.__html ? model.__html : ''; var staticPath = model.reactComponent.props._staticPath; var props = JSON.stringify(model.reactComponent.props); return '<div id=\\"oc-reactRoot-react-component\\" class=\\"oc-reactRoot-react-component\\">' + modelHTML + '</div>' + '' + '<script>' + 'window.oc = window.oc || {};' + 'oc.cmd = oc.cmd || [];' + 'oc.cmd.push(function(oc){' + '' + 'oc.requireSeries([{\\"global\\":\\"PropTypes\\",\\"url\\":\\"https://unpkg.com/[email protected]/prop-types.min.js\\",\\"name\\":\\"prop-types\\"},{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}], function(){' + 'oc.require(' + '[\\"oc\\", \\"reactComponents\\", \\"c246e2c2247889e20b39dbdf1f1bce65b2aebf24\\"],' + '\\"' + staticPath + 'react-component.js\\",' + 'function(ReactComponent){' + 'var targetNode = document.getElementById(\\"oc-reactRoot-react-component\\");' + 'targetNode.setAttribute(\\"id\\",\\"\\");' + 'ReactDOM.render(React.createElement(ReactComponent,' + props + '),targetNode);' + '}' + ');' + '});' + '});' + '</script>' }"`;
2 changes: 1 addition & 1 deletion packages/oc-template-react-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.9",
"prop-types": "15.6.1",
"react": "16.3.2",
"react": "16.4.0",
"webpack": "^4.8.3"
},
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Object {
Object {
"global": "React",
"name": "react",
"url": "https://unpkg.com/react@16.3.2/umd/react.production.min.js",
"url": "https://unpkg.com/react@16.4.0/umd/react.production.min.js",
},
Object {
"global": "ReactDOM",
"name": "react-dom",
"url": "https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js",
"url": "https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js",
},
],
"type": "oc-template-react",
Expand Down
8 changes: 4 additions & 4 deletions packages/oc-template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"nice-cache": "0.0.5",
"oc-generic-template-renderer": "2.0.4",
"prop-types": "15.6.1",
"react": "16.3.2",
"react-dom": "16.3.2"
"react": "16.4.0",
"react-dom": "16.4.0"
},
"files": [
"lib",
Expand All @@ -43,11 +43,11 @@
},
"react": {
"global": "React",
"url": "https://unpkg.com/react@16.3.2/umd/react.production.min.js"
"url": "https://unpkg.com/react@16.4.0/umd/react.production.min.js"
},
"react-dom": {
"global": "ReactDOM",
"url": "https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js"
"url": "https://unpkg.com/react-dom@16.4.0/umd/react-dom.production.min.js"
}
}
}