From 03437b54daf7877868c57231c51e08e217c9abde Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Mon, 28 Mar 2016 00:12:31 -1000 Subject: [PATCH] Update to 5.0.0.rc.1 of ReactOnRails --- Gemfile | 2 +- Gemfile.lock | 4 +- .../comments/startup/ServerRouterApp.jsx | 3 +- client/npm-shrinkwrap.json | 136 ++++-------------- client/package.json | 4 +- package.json | 5 +- 6 files changed, 39 insertions(+), 115 deletions(-) diff --git a/Gemfile b/Gemfile index 9bcb0161..49d523e7 100644 --- a/Gemfile +++ b/Gemfile @@ -40,7 +40,7 @@ gem "sdoc", group: :doc # Use Rails Html Sanitizer for HTML sanitization gem "rails-html-sanitizer" -gem "react_on_rails", "~> 4.0.0" +gem "react_on_rails", "~> 5.0.0.rc.1" # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem "therubyracer" diff --git a/Gemfile.lock b/Gemfile.lock index 41a52b64..7dc9f638 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -203,7 +203,7 @@ GEM rake (10.5.0) rdoc (4.2.2) json (~> 1.4) - react_on_rails (4.0.0) + react_on_rails (5.0.0.rc.1) connection_pool execjs (~> 2.5) foreman @@ -347,7 +347,7 @@ DEPENDENCIES rails-html-sanitizer rails_12factor rainbow - react_on_rails (~> 4.0.0) + react_on_rails (~> 5.0.0.rc.1) rspec-rails rspec-retry rubocop diff --git a/client/app/bundles/comments/startup/ServerRouterApp.jsx b/client/app/bundles/comments/startup/ServerRouterApp.jsx index 29ebcbea..faef88f6 100644 --- a/client/app/bundles/comments/startup/ServerRouterApp.jsx +++ b/client/app/bundles/comments/startup/ServerRouterApp.jsx @@ -5,12 +5,13 @@ import { match, RouterContext } from 'react-router'; import createStore from '../store/commentsStore'; import routes from '../routes/routes'; -export default (props, location) => { +export default (props, railsContext) => { const store = createStore(props); let error; let redirectLocation; let routeProps; + const location = { railsContext }; // See https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md match({ routes, location }, (_error, _redirectLocation, _routeProps) => { diff --git a/client/npm-shrinkwrap.json b/client/npm-shrinkwrap.json index 458b6fb4..1c3f9d48 100644 --- a/client/npm-shrinkwrap.json +++ b/client/npm-shrinkwrap.json @@ -29,8 +29,7 @@ "dependencies": { "acorn": { "version": "2.7.0", - "from": "acorn@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz" + "from": "acorn@>=2.1.0 <3.0.0" } } }, @@ -193,7 +192,7 @@ }, "async": { "version": "1.5.2", - "from": "async@>=1.4.0 <2.0.0", + "from": "async@>=1.5.2 <2.0.0", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" }, "async-each": { @@ -384,19 +383,21 @@ "resolved": "https://registry.npmjs.org/babel-jscs/-/babel-jscs-2.0.5.tgz", "dependencies": { "babel-core": { - "version": "5.8.35", + "version": "5.8.38", "from": "babel-core@>=5.8.3 <5.9.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.35.tgz" + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.38.tgz", + "dependencies": { + "bluebird": { + "version": "2.10.2", + "from": "bluebird@>=2.9.33 <3.0.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz" + } + } }, "babylon": { - "version": "5.8.35", - "from": "babylon@>=5.8.35 <6.0.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.35.tgz" - }, - "bluebird": { - "version": "2.10.2", - "from": "bluebird@>=2.9.33 <3.0.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz" + "version": "5.8.38", + "from": "babylon@>=5.8.38 <6.0.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.38.tgz" }, "globals": { "version": "6.4.1", @@ -802,9 +803,9 @@ "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.7.2.tgz", "dependencies": { "core-js": { - "version": "2.1.5", + "version": "2.2.1", "from": "core-js@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.1.5.tgz" + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.2.1.tgz" }, "lodash": { "version": "3.10.1", @@ -1500,23 +1501,6 @@ "from": "diff@1.4.0", "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz" }, - "doctrine": { - "version": "1.2.0", - "from": "doctrine@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.0.tgz", - "dependencies": { - "esutils": { - "version": "1.1.6", - "from": "esutils@>=1.1.6 <2.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" - }, - "isarray": { - "version": "1.0.0", - "from": "isarray@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - } - } - }, "dom-helpers": { "version": "2.4.0", "from": "dom-helpers@>=2.4.0 <3.0.0", @@ -1675,7 +1659,7 @@ }, "escope": { "version": "3.6.0", - "from": "escope@>=3.6.0 <4.0.0", + "from": "escope@>=3.2.0 <4.0.0", "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz" }, "eslint-config-airbnb": { @@ -1683,11 +1667,6 @@ "from": "eslint-config-airbnb@>=6.0.2 <7.0.0", "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-6.1.0.tgz" }, - "espree": { - "version": "3.1.2", - "from": "espree@>=3.1.1 <4.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.2.tgz" - }, "esprima": { "version": "2.7.2", "from": "esprima@>=2.6.0 <3.0.0", @@ -1707,7 +1686,7 @@ }, "estraverse": { "version": "4.2.0", - "from": "estraverse@>=4.2.0 <5.0.0", + "from": "estraverse@>=4.1.0 <5.0.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" }, "esutils": { @@ -1827,11 +1806,6 @@ "from": "figures@>=1.3.5 <2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.4.0.tgz" }, - "file-entry-cache": { - "version": "1.2.4", - "from": "file-entry-cache@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.2.4.tgz" - }, "file-loader": { "version": "0.8.5", "from": "file-loader@>=0.8.5 <0.9.0", @@ -1961,7 +1935,7 @@ }, "async": { "version": "1.5.2", - "from": "async@^1.4.0", + "from": "async@^1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" }, "aws-sign2": { @@ -2333,7 +2307,7 @@ }, "once": { "version": "1.3.3", - "from": "once@~1.3.3", + "from": "once@^1.3.0", "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" }, "pinkie": { @@ -2785,11 +2759,6 @@ "from": "ieee754@>=1.1.4 <2.0.0", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz" }, - "ignore": { - "version": "2.2.19", - "from": "ignore@>=2.2.19 <3.0.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-2.2.19.tgz" - }, "immutable": { "version": "3.7.6", "from": "immutable@>=3.7.6 <4.0.0", @@ -2849,11 +2818,6 @@ "from": "ini@>=1.2.0 <2.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz" }, - "inquirer": { - "version": "0.12.0", - "from": "inquirer@>=0.12.0 <0.13.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz" - }, "interpret": { "version": "0.6.6", "from": "interpret@>=0.6.4 <0.7.0", @@ -2994,11 +2958,6 @@ "from": "is-relative@>=0.1.0 <0.2.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz" }, - "is-resolvable": { - "version": "1.0.0", - "from": "is-resolvable@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" - }, "is-svg": { "version": "1.1.1", "from": "is-svg@>=1.1.1 <2.0.0", @@ -3101,11 +3060,6 @@ "from": "json-schema@0.2.2", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz" }, - "json-stable-stringify": { - "version": "1.0.1", - "from": "json-stable-stringify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" - }, "json-stringify-safe": { "version": "5.0.1", "from": "json-stringify-safe@>=5.0.1 <5.1.0", @@ -3838,14 +3792,9 @@ "from": "pkginfo@>=0.0.0 <1.0.0", "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.0.tgz" }, - "pluralize": { - "version": "1.2.1", - "from": "pluralize@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz" - }, "postcss": { "version": "5.0.19", - "from": "postcss@>=5.0.15 <6.0.0", + "from": "postcss@>=5.0.19 <6.0.0", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.0.19.tgz" }, "postcss-calc": { @@ -3890,7 +3839,7 @@ }, "postcss-loader": { "version": "0.8.2", - "from": "postcss-loader@>=0.8.1 <0.9.0", + "from": "postcss-loader@>=0.8.2 <0.9.0", "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-0.8.2.tgz" }, "postcss-merge-idents": { @@ -4033,11 +3982,6 @@ "from": "process-nextick-args@>=1.0.6 <1.1.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz" }, - "progress": { - "version": "1.1.8", - "from": "progress@>=1.1.8 <2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz" - }, "promise": { "version": "7.1.1", "from": "promise@>=7.0.3 <8.0.0", @@ -4151,9 +4095,8 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-0.14.7.tgz" }, "react-on-rails": { - "version": "4.0.2", - "from": "react-on-rails@4.0.2", - "resolved": "https://registry.npmjs.org/react-on-rails/-/react-on-rails-4.0.2.tgz" + "version": "5.0.0-rc.1", + "from": "react-on-rails@5.0.0-rc.1" }, "react-overlays": { "version": "0.6.0", @@ -4179,12 +4122,12 @@ }, "react-redux": { "version": "4.4.1", - "from": "react-redux@>=4.4.0 <5.0.0", + "from": "react-redux@>=4.4.1 <5.0.0", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-4.4.1.tgz" }, "react-router": { "version": "2.0.1", - "from": "react-router@>=2.0.0 <3.0.0", + "from": "react-router@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-2.0.1.tgz" }, "react-router-redux": { @@ -4352,11 +4295,6 @@ "from": "request@>=2.65.0 <3.0.0", "resolved": "https://registry.npmjs.org/request/-/request-2.69.0.tgz" }, - "require-uncached": { - "version": "1.0.2", - "from": "require-uncached@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.2.tgz" - }, "requires-port": { "version": "1.0.0", "from": "requires-port@>=1.0.0 <2.0.0", @@ -4472,7 +4410,7 @@ }, "sass-loader": { "version": "3.2.0", - "from": "sass-loader@>=3.1.2 <4.0.0", + "from": "sass-loader@>=3.2.0 <4.0.0", "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-3.2.0.tgz" }, "sass-resources-loader": { @@ -4551,11 +4489,6 @@ "from": "shebang-regex@>=1.0.0 <2.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" }, - "shelljs": { - "version": "0.5.3", - "from": "shelljs@>=0.5.3 <0.6.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz" - }, "sigmund": { "version": "1.0.1", "from": "sigmund@>=1.0.0 <1.1.0", @@ -4787,11 +4720,6 @@ "from": "symbol-tree@>=3.1.0 <4.0.0", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.1.4.tgz" }, - "table": { - "version": "3.7.8", - "from": "table@>=3.7.8 <4.0.0", - "resolved": "https://registry.npmjs.org/table/-/table-3.7.8.tgz" - }, "tapable": { "version": "0.1.10", "from": "tapable@>=0.1.8 <0.2.0", @@ -4802,11 +4730,6 @@ "from": "tar@>=2.0.0 <3.0.0", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" }, - "text-table": { - "version": "0.2.0", - "from": "text-table@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - }, "through": { "version": "2.3.8", "from": "through@>=2.3.4 <2.4.0", @@ -4915,8 +4838,9 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.2.tgz" }, "turbolinks": { - "version": "0.0.2", - "from": "turbolinks@latest" + "version": "5.0.0-beta3", + "from": "turbolinks@5.0.0-beta3", + "resolved": "https://registry.npmjs.org/turbolinks/-/turbolinks-5.0.0-beta3.tgz" }, "tv4": { "version": "1.2.7", diff --git a/client/package.json b/client/package.json index cd9a9ddc..d90a29d7 100644 --- a/client/package.json +++ b/client/package.json @@ -70,7 +70,7 @@ "react-addons-pure-render-mixin": "^0.14.7", "react-bootstrap": "^0.28.3", "react-dom": "^0.14.7", - "react-on-rails": "^4.0.0", + "react-on-rails": "^5.0.0-rc.1", "react-redux": "^4.4.0", "react-router": "^2.0.0", "react-router-redux": "^4.0.0", @@ -81,7 +81,7 @@ "sass-loader": "^3.1.2", "sass-resources-loader": "1.0.2", "style-loader": "^0.13.0", - "turbolinks": "0.0.2", + "turbolinks": "^5.0.0-beta3", "url-loader": "^0.5.7", "webpack": "^1.12.14" }, diff --git a/package.json b/package.json index 844b9661..2d8d72b9 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,7 @@ }, "homepage": "https://github.com/shakacode/react-webpack-rails-tutorial", "dependencies": { - "babel-polyfill": "^6.6.1", - "estraverse": "^4.1.1", - "estraverse-fb": "^1.3.1" + }, + "devDependencies": { } }