Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ jobs:
yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest' && '--frozen-lockfile' || '' }}
sudo yarn global add yalc
- name: yalc publish for react-on-rails
run: yalc publish
# Use yarn workspace script to publish all workspace packages to yalc
# Runs the "yalc:publish" script defined in each workspace's package.json
run: yarn yalc publish
- name: Install Ruby Gems for package
run: |
bundle lock --add-platform 'x86_64-linux'
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ After a release, please make sure to run `bundle exec rake update_changelog`. Th

Changes since the last non-beta release.

#### Changed

- **Generator Configuration Modernization**: Updated the generator to enable recommended configurations by default for new applications:

- `config.build_test_command` is now uncommented and set to `"RAILS_ENV=test bin/shakapacker"` by default, enabling automatic asset building during tests for better integration test reliability
- `config.auto_load_bundle = true` is now set by default, enabling automatic loading of component bundles
- `config.components_subdirectory = "ror_components"` is now set by default, organizing React components in a dedicated subdirectory

**Note:** These changes only affect newly generated applications. Existing applications are unaffected and do not need to make any changes. If you want to adopt these settings in an existing app, you can manually add them to your `config/initializers/react_on_rails.rb` file. [PR 2039](https://github.com/shakacode/react_on_rails/pull/2039) by [justin808](https://github.com/justin808).

### [16.2.0.beta.4] - 2025-11-12

#### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ ReactOnRails.configure do |config|
# - Requires adding ReactOnRails::TestHelper to spec/rails_helper.rb
# - See: https://github.com/shakacode/react_on_rails/blob/master/docs/guides/testing-configuration.md
#
# config.build_test_command = "RAILS_ENV=test bin/shakapacker"
config.build_test_command = "RAILS_ENV=test bin/shakapacker"

config.auto_load_bundle = true
config.components_subdirectory = "ror_components"
################################################################################
# Advanced Configuration
################################################################################
Expand Down
14 changes: 13 additions & 1 deletion rakelib/shakapacker_examples.rake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,20 @@ namespace :shakapacker_examples do # rubocop:disable Metrics/BlockLength
sh_in_dir(example_type.dir, "echo \"gem 'shakapacker', '>= 8.2.0'\" >> #{example_type.gemfile}")
bundle_install_in(example_type.dir)
sh_in_dir(example_type.dir, "rake shakapacker:install")
sh_in_dir(example_type.dir, example_type.generator_shell_commands)
# Skip validation when running generators on example apps during development.
# The generator validates that certain config options exist in the initializer,
# but during example generation, we're often testing against the current gem
# codebase which may have new config options not yet in the released version.
# This allows examples to be generated without validation errors while still
# testing the generator functionality.
generator_commands = example_type.generator_shell_commands.map do |cmd|
"REACT_ON_RAILS_SKIP_VALIDATION=true #{cmd}"
end
sh_in_dir(example_type.dir, generator_commands)
sh_in_dir(example_type.dir, "npm install")
# Generate the component packs after running the generator to ensure all
# auto-bundled components have corresponding pack files created
sh_in_dir(example_type.dir, "bundle exec rake react_on_rails:generate_packs")
end
end

Expand Down
Loading