diff --git a/CHANGELOG.md b/CHANGELOG.md index d42288da2..3833a86dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,21 +4,21 @@ All notable changes to this project's source code will be documented in this fil Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version. ## [Unreleased] -### [8.0.6] -#### fixed -- The package.json file created by the generator now creates minified javascript production builds by default. This was done by adding the -p flag to webpack on the build:production script. - Changes since last non-beta release. *Please add entries here for your pull requests.* -- Fixes GitUtils.uncommitted_changes? throwing an error when called in an environment without Git, and allows install generator to be run successfully with `--ignore-warnings` [#878](https://github.com/shakacode/react_on_rails/pull/878) by [jasonblalock](https://github.com/jasonblalock) +### [8.0.6] +#### fixed +- Fixes server rendering when using a CDN. Server rendering would try to fetch a file with the "asset_host". This change updates the webpacker_lite dependency to 2.1.0 which has a new helper `pack_path`. [#901](https://github.com/shakacode/react_on_rails/pull/901) by [justin808](https://github.com/justin808). Be sure to update webpacker_lite to 2.1.0. +- The package.json file created by the generator now creates minified javascript production builds by default. This was done by adding the -p flag to webpack on the build:production script. [#895](https://github.com/shakacode/react_on_rails/pull/895) by [serodriguez68 ](https://github.com/serodriguez68) +- Fixes GitUtils.uncommitted_changes? throwing an error when called in an environment without Git, and allows install generator to be run successfully with `--ignore-warnings` [#878](https://github.com/shakacode/react_on_rails/pull/878) by [jasonblalock](https://github.com/jasonblalock). ## [8.0.5] ### fixed - Corrects `devBuild` value for webpack production build from webpackConfigLoader. [#877](https://github.com/shakacode/react_on_rails/pull/877) by [chenqingspring](https://github.com/chenqingspring). - Remove contentBase deprecation warning message. [#878](https://github.com/shakacode/react_on_rails/pull/878) by [ened ](https://github.com/ened). - - Removes invalid reference to _railsContext in the generated files. [#886](https://github.com/shakacode/react_on_rails/pull/8876) by [justin808](https://github.com/justin808) + - Removes invalid reference to _railsContext in the generated files. [#886](https://github.com/shakacode/react_on_rails/pull/886) by [justin808](https://github.com/justin808). - All tests run against Rails 5.1.2 *Note: 8.0.4 skipped.* diff --git a/Gemfile b/Gemfile index 31b2531b6..367024241 100644 --- a/Gemfile +++ b/Gemfile @@ -38,6 +38,6 @@ gem "chromedriver-helper" gem "launchy" gem "poltergeist" gem "selenium-webdriver" -gem "webpacker_lite" +gem "webpacker_lite", "~> 2.1" gem "rainbow" diff --git a/lib/react_on_rails/utils.rb b/lib/react_on_rails/utils.rb index 7fc029733..b54d3c1c0 100644 --- a/lib/react_on_rails/utils.rb +++ b/lib/react_on_rails/utils.rb @@ -72,7 +72,8 @@ def self.bundle_js_file_path(bundle_name) if using_webpacker_lite? && WebpackerLite::Manifest.lookup(bundle_name) # If using webpacker_lite gem - public_subdir_hashed_file_name = ActionController::Base.helpers.asset_pack_path(bundle_name) + # Per https://github.com/rails/webpacker/issues/571, this path might + public_subdir_hashed_file_name = ActionController::Base.helpers.pack_path(bundle_name) return File.join("public", public_subdir_hashed_file_name) end diff --git a/lib/react_on_rails/version.rb b/lib/react_on_rails/version.rb index 0f96e30b6..8a6ddcb25 100644 --- a/lib/react_on_rails/version.rb +++ b/lib/react_on_rails/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ReactOnRails - VERSION = "8.0.5" + VERSION = "8.0.6.rc.1" end diff --git a/lib/react_on_rails/version_checker.rb b/lib/react_on_rails/version_checker.rb index ee10011d0..ef74dfbd1 100644 --- a/lib/react_on_rails/version_checker.rb +++ b/lib/react_on_rails/version_checker.rb @@ -36,7 +36,8 @@ def raise_differing_versions_warning " gem: #{gem_version}\n" \ " node package: #{node_package_version.raw}\n" \ "Ensure the installed version of the gem is the same as the version of \n"\ - "your installed node package." + "your installed node package.\n"\ + "Run `cd client && yarn add react-on-rails`" raise msg end diff --git a/package.json b/package.json index 6ad8f642f..5628f3fb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-on-rails", - "version": "8.0.5", + "version": "8.0.6-rc.1", "description": "react-on-rails JavaScript for react_on_rails Ruby gem", "main": "node_package/lib/ReactOnRails.js", "directories": { diff --git a/spec/dummy/Gemfile b/spec/dummy/Gemfile index 1452d84d8..0a4c32fb8 100644 --- a/spec/dummy/Gemfile +++ b/spec/dummy/Gemfile @@ -41,7 +41,7 @@ gem "sdoc", group: :doc gem "react_on_rails", path: "../.." -gem "webpacker_lite", "2.0.4" +gem "webpacker_lite", "2.1.0" gem "mini_racer" diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index 6476d8e9f..bba4657dc 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: ../.. specs: - react_on_rails (8.0.5) + react_on_rails (8.0.6.rc.0) addressable connection_pool execjs (~> 2.5) @@ -276,7 +276,7 @@ GEM uglifier (3.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (1.2.1) - webpacker_lite (2.0.4) + webpacker_lite (2.1.0) activesupport (>= 4.2) multi_json (~> 1.2) railties (>= 4.2) @@ -326,7 +326,7 @@ DEPENDENCIES sqlite3 turbolinks (~> 5.0) uglifier - webpacker_lite (= 2.0.4) + webpacker_lite (= 2.1.0) BUNDLED WITH 1.15.1 diff --git a/spec/dummy/client/package.json b/spec/dummy/client/package.json index e1a41eee4..594a748ec 100644 --- a/spec/dummy/client/package.json +++ b/spec/dummy/client/package.json @@ -35,7 +35,7 @@ "react-dom": "^15.5.4", "react-helmet": "^5.0.3", "react-hot-loader": "^3.0.0-beta.6", - "react-on-rails": "8.0.5", + "react-on-rails": "8.0.6-rc.1", "react-proptypes": "^0.0.1", "react-redux": "^5.0.4", "react-router": "3.0.5", diff --git a/spec/dummy/client/yarn.lock b/spec/dummy/client/yarn.lock index 58f51580f..ac6b09424 100644 --- a/spec/dummy/client/yarn.lock +++ b/spec/dummy/client/yarn.lock @@ -4281,9 +4281,9 @@ react-hot-loader@^3.0.0-beta.6: redbox-react "^1.3.6" source-map "^0.4.4" -react-on-rails@8.0.5: - version "8.0.5" - resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-8.0.5.tgz#144b1c0be41df2ac810981a4876720fc0630cde7" +react-on-rails@8.0.6-rc.1: + version "8.0.6-rc.1" + resolved "https://registry.yarnpkg.com/react-on-rails/-/react-on-rails-8.0.6-rc.1.tgz#6326e2b431351f9a9976bbf6a59b5e5b2fabd91d" react-proptypes@^0.0.1: version "0.0.1"