Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 619dd13

Browse files
authored
Merge pull request #54 from opencomponents/react-16.1.1-26.2.0
Update React from 16.0.0 to 16.1.1
2 parents 6c75bb1 + 3a2aa20 commit 619dd13

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

example/__tests__/__snapshots__/acceptance.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Registry should correctly serve rendered and unrendered components 1`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"unrendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"data\\":{\\"reactComponent\\":{\\"key\\":\\"b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c\\",\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/react-component.js\\",\\"props\\":{\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}}},\\"template\\":{\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/template.js\\",\\"type\\":\\"oc-template-react\\",\\"key\\":\\"0633c8cf7bd05045e541620d85064180f21d7321\\"}}"`;
3+
exports[`Registry should correctly serve rendered and unrendered components 1`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"unrendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"data\\":{\\"reactComponent\\":{\\"key\\":\\"b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c\\",\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/react-component.js\\",\\"props\\":{\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}}},\\"template\\":{\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/template.js\\",\\"type\\":\\"oc-template-react\\",\\"key\\":\\"1b0e2d10dfd2021949e8072206ea7ec52a7ec5ea\\"}}"`;
44

5-
exports[`Registry should correctly serve rendered and unrendered components 2`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"rendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"html\\":\\"<oc-component href=\\\\\\"http://localhost:3000/react-app?name=SuperMario\\\\\\" data-hash=\\\\\\"0633c8cf7bd05045e541620d85064180f21d7321\\\\\\" data-name=\\\\\\"react-app\\\\\\" data-rendered=\\\\\\"true\\\\\\" data-version=\\\\\\"1.0.0\\\\\\"><div id=\\\\\\"oc-reactRoot-react-app\\\\\\" class=\\\\\\"oc-reactRoot-react-app\\\\\\" ><div class=\\\\\\"special__3K6pmcHx\\\\\\" data-reactroot=\\\\\\"\\\\\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\\\\\"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', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\\\\\"oc-reactRoot-react-app\\\\\\"); targetNode.setAttribute(\\\\\\"id\\\\\\",\\\\\\"\\\\\\"); ReactDOM.render(React.createElement(ReactComponent, {\\\\\\"name\\\\\\":\\\\\\"SuperMario\\\\\\",\\\\\\"staticPath\\\\\\":\\\\\\"http://localhost:3000/react-app/1.0.0/static/\\\\\\",\\\\\\"baseUrl\\\\\\":\\\\\\"http://localhost:3000/\\\\\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\\\\\"react-app\\\\\\"]=\\\\\\"1.0.0\\\\\\";</script></oc-component>\\"}"`;
5+
exports[`Registry should correctly serve rendered and unrendered components 2`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"rendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"html\\":\\"<oc-component href=\\\\\\"http://localhost:3000/react-app?name=SuperMario\\\\\\" data-hash=\\\\\\"1b0e2d10dfd2021949e8072206ea7ec52a7ec5ea\\\\\\" data-name=\\\\\\"react-app\\\\\\" data-rendered=\\\\\\"true\\\\\\" data-version=\\\\\\"1.0.0\\\\\\"><div id=\\\\\\"oc-reactRoot-react-app\\\\\\" class=\\\\\\"oc-reactRoot-react-app\\\\\\" ><div class=\\\\\\"special__3K6pmcHx\\\\\\" data-reactroot=\\\\\\"\\\\\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\\\\\"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', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\\\\\"oc-reactRoot-react-app\\\\\\"); targetNode.setAttribute(\\\\\\"id\\\\\\",\\\\\\"\\\\\\"); ReactDOM.render(React.createElement(ReactComponent, {\\\\\\"name\\\\\\":\\\\\\"SuperMario\\\\\\",\\\\\\"staticPath\\\\\\":\\\\\\"http://localhost:3000/react-app/1.0.0/static/\\\\\\",\\\\\\"baseUrl\\\\\\":\\\\\\"http://localhost:3000/\\\\\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\\\\\"react-app\\\\\\"]=\\\\\\"1.0.0\\\\\\";</script></oc-component>\\"}"`;
66

77
exports[`server-side-side rendering 1`] = `
88
"<!DOCTYPE html><html><head>
99
<title>A page</title>
1010
</head>
1111
<body>
12-
<oc-component href=\\"http://localhost:3000/react-app?name=SuperMario\\" data-hash=\\"0633c8cf7bd05045e541620d85064180f21d7321\\" data-name=\\"react-app\\" data-rendered=\\"true\\" data-version=\\"1.0.0\\"><div id=\\"oc-reactRoot-react-app\\" class=\\"oc-reactRoot-react-app\\"><div class=\\"special__3K6pmcHx\\" data-reactroot=\\"\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\"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', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\"oc-reactRoot-react-app\\"); targetNode.setAttribute(\\"id\\",\\"\\"); ReactDOM.render(React.createElement(ReactComponent, {\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"react-app\\"]=\\"1.0.0\\";</script></oc-component>
12+
<oc-component href=\\"http://localhost:3000/react-app?name=SuperMario\\" data-hash=\\"1b0e2d10dfd2021949e8072206ea7ec52a7ec5ea\\" data-name=\\"react-app\\" data-rendered=\\"true\\" data-version=\\"1.0.0\\"><div id=\\"oc-reactRoot-react-app\\" class=\\"oc-reactRoot-react-app\\"><div class=\\"special__3K6pmcHx\\" data-reactroot=\\"\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\"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', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\"oc-reactRoot-react-app\\"); targetNode.setAttribute(\\"id\\",\\"\\"); ReactDOM.render(React.createElement(ReactComponent, {\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"react-app\\"]=\\"1.0.0\\";</script></oc-component>
1313
<script>window.oc = window.oc || {};
1414
oc.conf = oc.conf || {};
1515
oc.conf.templates = oc.conf.templates || [];
16-
oc.conf.templates = oc.conf.templates.concat([{\\"type\\":\\"oc-template-jade\\",\\"version\\":\\"6.0.9\\",\\"externals\\":[{\\"global\\":\\"jade\\",\\"url\\":\\"https://unpkg.com/[email protected]/runtime.js\\",\\"name\\":\\"jade\\"}]},{\\"type\\":\\"oc-template-handlebars\\",\\"version\\":\\"6.0.8\\",\\"externals\\":[{\\"global\\":\\"Handlebars\\",\\"url\\":\\"https://unpkg.com/[email protected]/dist/handlebars.runtime.min.js\\",\\"name\\":\\"handlebars\\"}]},{\\"type\\":\\"oc-template-react\\",\\"version\\":\\"1.0.1\\",\\"externals\\":[{\\"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\\"}]}]);</script><script src=\\"http://localhost:3000/oc-client/0.41.14/static/src/oc-client.min.js\\" type=\\"text/javascript\\"></script><script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"oc-client\\"]=\\"0.41.14\\";</script>
16+
oc.conf.templates = oc.conf.templates.concat([{\\"type\\":\\"oc-template-jade\\",\\"version\\":\\"6.0.9\\",\\"externals\\":[{\\"global\\":\\"jade\\",\\"url\\":\\"https://unpkg.com/[email protected]/runtime.js\\",\\"name\\":\\"jade\\"}]},{\\"type\\":\\"oc-template-handlebars\\",\\"version\\":\\"6.0.8\\",\\"externals\\":[{\\"global\\":\\"Handlebars\\",\\"url\\":\\"https://unpkg.com/[email protected]/dist/handlebars.runtime.min.js\\",\\"name\\":\\"handlebars\\"}]},{\\"type\\":\\"oc-template-react\\",\\"version\\":\\"1.0.1\\",\\"externals\\":[{\\"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\\"}]}]);</script><script src=\\"http://localhost:3000/oc-client/0.41.14/static/src/oc-client.min.js\\" type=\\"text/javascript\\"></script><script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"oc-client\\"]=\\"0.41.14\\";</script>
1717
1818
1919
</body></html>"

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"request-promise-native": "^1.0.5"
1010
},
1111
"dependencies": {
12-
"oc-template-react-compiler": "../packages/oc-template-react-compiler"
12+
"oc-template-react-compiler": "1.0.6"
1313
}
1414
}

packages/oc-template-react-compiler/__tests__/__snapshots__/compileView.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Object {
66
"hashKey": "9226c0643c9b97f8cbe8fcfd3cf8d343b8d88eba",
77
},
88
"template": Object {
9-
"hashKey": "e8e90668846b099b79959952801569f553324780",
9+
"hashKey": "f3981e9352bc88d85a6e66c26f7db0f7de6f2cd9",
1010
"src": "template.js",
1111
"type": "oc-template-react",
1212
},
1313
}
1414
`;
1515

16-
exports[`Should correctly compile the view 2`] = `"var oc=oc||{};oc.components=oc.components||{};oc.components['e8e90668846b099b79959952801569f553324780']=function(model){ return \`<div id=\\"oc-reactRoot-react-component\\" class=\\"oc-reactRoot-react-component\\" >\${ model.__html ? model.__html : '' }</div> <style>null</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\"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', '9226c0643c9b97f8cbe8fcfd3cf8d343b8d88eba'], '\${model.reactComponent.props.staticPath}react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\"oc-reactRoot-react-component\\"); targetNode.setAttribute(\\"id\\",\\"\\"); ReactDOM.render(React.createElement(ReactComponent, \${JSON.stringify(model.reactComponent.props)}),targetNode); } ); }); }); </script> \`; }"`;
16+
exports[`Should correctly compile the view 2`] = `"var oc=oc||{};oc.components=oc.components||{};oc.components['f3981e9352bc88d85a6e66c26f7db0f7de6f2cd9']=function(model){ return \`<div id=\\"oc-reactRoot-react-component\\" class=\\"oc-reactRoot-react-component\\" >\${ model.__html ? model.__html : '' }</div> <style>null</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\"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', '9226c0643c9b97f8cbe8fcfd3cf8d343b8d88eba'], '\${model.reactComponent.props.staticPath}react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\"oc-reactRoot-react-component\\"); targetNode.setAttribute(\\"id\\",\\"\\"); ReactDOM.render(React.createElement(ReactComponent, \${JSON.stringify(model.reactComponent.props)}),targetNode); } ); }); }); </script> \`; }"`;

packages/oc-template-react-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"oc-templates-messages": "1.0.1",
4848
"oc-view-wrapper": "1.0.2",
4949
"oc-webpack": "2.1.1",
50-
"react": "16.0.0",
50+
"react": "16.1.1",
5151
"webpack": "^3.5.5"
5252
},
5353
"files": [

packages/oc-template-react/__tests__/__snapshots__/getInfo.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Object {
66
Object {
77
"global": "React",
88
"name": "react",
9-
"url": "https://unpkg.com/react@16.0.0/umd/react.production.min.js",
9+
"url": "https://unpkg.com/react@16.1.1/umd/react.production.min.js",
1010
},
1111
Object {
1212
"global": "ReactDOM",
1313
"name": "react-dom",
14-
"url": "https://unpkg.com/react-dom@16.0.0/umd/react-dom.production.min.js",
14+
"url": "https://unpkg.com/react-dom@16.1.1/umd/react-dom.production.min.js",
1515
},
1616
],
1717
"type": "oc-template-react",

packages/oc-template-react/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"minimal-request": "^2.2.0",
2727
"nice-cache": "0.0.5",
2828
"oc-generic-template-renderer": "2.0.1",
29-
"react": "16.0.0",
30-
"react-dom": "16.0.0"
29+
"react": "16.1.1",
30+
"react-dom": "16.1.1"
3131
},
3232
"files": [
3333
"lib",
@@ -38,11 +38,11 @@
3838
"externals": {
3939
"react": {
4040
"global": "React",
41-
"url": "https://unpkg.com/react@16.0.0/umd/react.production.min.js"
41+
"url": "https://unpkg.com/react@16.1.1/umd/react.production.min.js"
4242
},
4343
"react-dom": {
4444
"global": "ReactDOM",
45-
"url": "https://unpkg.com/react-dom@16.0.0/umd/react-dom.production.min.js"
45+
"url": "https://unpkg.com/react-dom@16.1.1/umd/react-dom.production.min.js"
4646
}
4747
}
4848
}

0 commit comments

Comments
 (0)