diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index a6ae7a86..48bc4521 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - ruby: ['2.7', '3.0'] + ruby: ['2.7', '3.0', '3.1', '3.2', '3.3'] env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/LintingGemfile diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index eb44e6eb..8b8280a6 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: true matrix: - ruby: [2.7] + ruby: ['2.7'] runs-on: ubuntu-latest env: PACKAGE_JSON_FALLBACK_MANAGER: yarn_classic @@ -41,13 +41,13 @@ jobs: with: bundler: 2.4.9 ruby-version: ${{ matrix.ruby }} - - name: Save dummy app ruby gems to cache + - name: Save ruby gems to cache uses: actions/cache@v3 with: path: vendor/bundle - key: root-gem-cache-${{ hashFiles('Gemfile.lock') }} + key: root-gem-cache-${{ matrix.ruby }}-${{ hashFiles('Gemfile.lock') }} - name: Install Ruby Gems - run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.4.9_ install --path=vendor/bundle --jobs=4 --retry=3 + run: bundle check --path=vendor/bundle || bundle _2.4.9_ install --path=vendor/bundle --jobs=4 --retry=3 - run: yarn - run: bundle exec rake react:update - run: bundle exec rake ujs:update @@ -67,7 +67,7 @@ jobs: installer: pnpm - name: bun installer: bun - ruby: [2.7] + ruby: ['2.7'] gemfile: # These have shakapacker: - base @@ -112,7 +112,7 @@ jobs: uses: actions/cache@v3 with: path: test/dummy/vendor/bundle - key: dummy-app-gem-cache-${{ hashFiles(format('{0}/gemfiles/{1}.gemfile.lock', github.workspace, matrix.gemfile)) }} + key: dummy-app-gem-cache-${{ matrix.ruby }}-${{ hashFiles(format('{0}/gemfiles/{1}.gemfile.lock', github.workspace, matrix.gemfile)) }} - name: Install Ruby Gems for dummy app run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=test/dummy/vendor/bundle || bundle _2.4.9_ install --frozen --path=test/dummy/vendor/bundle --jobs=4 --retry=3 - run: cd test/dummy && yalc add react_ujs && ${{ matrix.js_package_manager.installer }} install diff --git a/.gitignore b/.gitignore index 640cb8fa..0b4c5f2e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ coverage/ yalc.lock /vendor/bundle .bundle/config +gemfiles/.bundle/ diff --git a/CHANGELOG.md b/CHANGELOG.md index c887c808..07d33166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ Changes since the last non-beta release. _Please add entries here for your pull requests that have not yet been released. Include LINKS for PRs and committers._ +## [3.3.0] - 2024-11-22 + +#### Added - Support for Propshaft server rendering. [PR 1345](https://github.com/reactjs/react-rails/pull/1345) by [elektronaut](https://github.com/elektronaut) #### Fixed @@ -594,8 +597,9 @@ _Please add entries here for your pull requests that have not yet been released. - Server rendering with `prerender: true` - Transform `.jsx` in the asset pipeline -[Unreleased]: https://github.com/reactjs/react-rails/compare/v3.2.1...main -[3.2.1]: https://github.com/reactjs/react-rails/compare/v3.2.1...v3.2.1 +[Unreleased]: https://github.com/reactjs/react-rails/compare/v3.3.0...main +[3.3.0]: https://github.com/reactjs/react-rails/compare/v3.2.1...v3.3.0 +[3.2.1]: https://github.com/reactjs/react-rails/compare/v3.2.0...v3.2.1 [3.2.0]: https://github.com/reactjs/react-rails/compare/v3.1.1...v3.2.0 [3.1.1]: https://github.com/reactjs/react-rails/compare/v3.1.0...v3.1.1 [3.1.0]: https://github.com/reactjs/react-rails/compare/v3.0.0...v3.1.0 diff --git a/Gemfile.lock b/Gemfile.lock index 08618670..268bc299 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -274,7 +274,7 @@ DEPENDENCIES listen (~> 3.0.0) minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.7, >= 7.0.7.2) react-rails! selenium-webdriver diff --git a/README.md b/README.md index 276cab40..87bf3f6f 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ React-Rails is a flexible tool to use [React](http://facebook.github.io/react/) While ShakaCode will continue to support this gem, you might consider migrating to [React on Rails](https://github.com/shakacode/react_on_rails) or [React on Rails Pro with proper Node rendering](https://www.shakacode.com/react-on-rails-pro/). -Why? React on Rails code receives much more active development and testing. For example, consider the [ReactRailsUJS](https://github.com/reactjs/react-rails/blob/master/react_ujs/index.js) implementation compared to the [ReactOnRails Node package](https://github.com/shakacode/react_on_rails/tree/master/node_package) which is written in TypeScript. For another example, React on Rails has work underway to support the latest React features, such as [React Server Components](https://react.dev/reference/rsc/server-components). +Why? React on Rails code receives much more active development and testing. For example, consider the [ReactRailsUJS](https://github.com/reactjs/react-rails/blob/main/react_ujs/index.js) implementation compared to the [ReactOnRails Node package](https://github.com/shakacode/react_on_rails/tree/master/node_package) which is written in TypeScript. For another example, React on Rails has work underway to support the latest React features, such as [React Server Components](https://react.dev/reference/rsc/server-components). -You can find [migration to React on Rails steps here](https://github.com/reactjs/react-rails/blob/master/docs/migrating-from-react-rails-to-react_on_rails.md). +You can find [migration to React on Rails steps here](https://github.com/reactjs/react-rails/blob/main/docs/migrating-from-react-rails-to-react_on_rails.md). --- ## ShakaCode Support diff --git a/VERSIONS.md b/VERSIONS.md index 28a57d18..621ab9c1 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -9,7 +9,7 @@ You can control what version of React.js (and JSXTransformer) is used by `react- | Gem | React.js | | | -------- | -------- | -------------- | -| master | 16.14.0 | +| main | 16.14.0 | | 2.6.2 | 16.14.0 | | 2.6.1 | 16.9.0 | | 2.6.0 | 16.8.6 | diff --git a/docs/get-started.md b/docs/get-started.md index 7e844a89..3d34a279 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -335,4 +335,4 @@ MyApp::Application.configure do end ``` -Be sure to restart your Rails server after changing these files. See [VERSIONS.md](https://github.com/reactjs/react-rails/blob/master/VERSIONS.md) to learn which version of React.js is included with your `react-rails` version. In some edge cases you may need to bust the sprockets cache with `rake tmp:clear` +Be sure to restart your Rails server after changing these files. See [VERSIONS.md](https://github.com/reactjs/react-rails/blob/main/VERSIONS.md) to learn which version of React.js is included with your `react-rails` version. In some edge cases you may need to bust the sprockets cache with `rake tmp:clear` diff --git a/gemfiles/base.gemfile.lock b/gemfiles/base.gemfile.lock index d2f56557..095c2042 100644 --- a/gemfiles/base.gemfile.lock +++ b/gemfiles/base.gemfile.lock @@ -265,7 +265,7 @@ DEPENDENCIES listen (~> 3.0.0) minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.x) react-rails! selenium-webdriver diff --git a/gemfiles/connection_pool_3.gemfile.lock b/gemfiles/connection_pool_3.gemfile.lock index 06f667bf..709735cf 100644 --- a/gemfiles/connection_pool_3.gemfile.lock +++ b/gemfiles/connection_pool_3.gemfile.lock @@ -267,7 +267,7 @@ DEPENDENCIES listen (~> 3.0.0) minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.7, >= 7.0.7.2) react-rails! selenium-webdriver diff --git a/gemfiles/propshaft.gemfile.lock b/gemfiles/propshaft.gemfile.lock index 140b15df..852f48cd 100644 --- a/gemfiles/propshaft.gemfile.lock +++ b/gemfiles/propshaft.gemfile.lock @@ -277,7 +277,7 @@ DEPENDENCIES listen (~> 3.0.0) minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.7, >= 7.0.7.2) react-rails! selenium-webdriver diff --git a/gemfiles/shakapacker.gemfile.lock b/gemfiles/shakapacker.gemfile.lock index bfada423..97f85bbd 100644 --- a/gemfiles/shakapacker.gemfile.lock +++ b/gemfiles/shakapacker.gemfile.lock @@ -278,7 +278,7 @@ DEPENDENCIES listen (~> 3.0.0) minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.7, >= 7.0.7.2) react-rails! selenium-webdriver diff --git a/gemfiles/sprockets_3.gemfile.lock b/gemfiles/sprockets_3.gemfile.lock index 5199577a..8ee6f17d 100644 --- a/gemfiles/sprockets_3.gemfile.lock +++ b/gemfiles/sprockets_3.gemfile.lock @@ -281,7 +281,7 @@ DEPENDENCIES mini_racer minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.7, >= 7.0.7.2) react-rails! selenium-webdriver diff --git a/gemfiles/sprockets_4.gemfile.lock b/gemfiles/sprockets_4.gemfile.lock index de4452e0..58f940ca 100644 --- a/gemfiles/sprockets_4.gemfile.lock +++ b/gemfiles/sprockets_4.gemfile.lock @@ -281,7 +281,7 @@ DEPENDENCIES mini_racer minitest-retry package_json - pry-byebug + pry-byebug (~> 3.8.0) rails (~> 7.0.7, >= 7.0.7.2) react-rails! selenium-webdriver diff --git a/react-rails.gemspec b/react-rails.gemspec index b977bfad..2aac7464 100644 --- a/react-rails.gemspec +++ b/react-rails.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'capybara' s.add_development_dependency 'selenium-webdriver' s.add_development_dependency 'test-unit', '~> 2.5' - s.add_development_dependency 'pry-byebug' + s.add_development_dependency 'pry-byebug', '~> 3.8.0' s.add_development_dependency 'package_json' s.add_development_dependency 'rails', '~> 7.0.7', '>= 7.0.7.2' s.add_development_dependency 'turbo-rails'