Skip to content

v4.0.0 #2085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open

v4.0.0 #2085

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
3cf84b1
add v4 changelog heading
joelhawksley Sep 3, 2024
081f5b2
Minimum Ruby version is non-EOL per https://www.ruby-lang.org/en/down…
joelhawksley Sep 4, 2024
aa7f44a
only support Rails 7+ (#2089)
joelhawksley Sep 6, 2024
bc4a193
[v4] Only support current Rails and Ruby (#2101)
joelhawksley Sep 26, 2024
a16e4fe
[v4] Remove code paths for unsupported versions of Rails (#2103)
joelhawksley Sep 26, 2024
5e6c1a8
[v4] Remove more Rails version references (#2104)
joelhawksley Sep 27, 2024
4f77aa8
Merge branch 'main' into v4
joelhawksley Oct 16, 2024
2506364
Merge branch 'main' into v4
joelhawksley Nov 4, 2024
71102dd
fix merge
joelhawksley Nov 4, 2024
0e226c4
Merge branch 'main' into v4
joelhawksley Nov 7, 2024
86b0149
Use ActionView::TemplateDetails for handling format and variant (#2156)
sfnelson Nov 7, 2024
ad6a494
Refactor compiler and template to use requested details (#2158)
sfnelson Jan 16, 2025
658fe4a
Merge branch 'main' into v4
joelhawksley Jan 24, 2025
e0a3235
Merge branch 'main' into v4
joelhawksley Feb 4, 2025
de6d968
fix allocations check
joelhawksley Feb 4, 2025
a17e540
update allocation counts (#2204)
joelhawksley Feb 4, 2025
e857482
Merge branch 'main' into v4
joelhawksley Mar 5, 2025
84f310d
Move generators into ViewComponent namespace (#2130)
paul Mar 10, 2025
3e343ac
Merge branch 'main' into v4
joelhawksley Mar 10, 2025
bab31a0
BREAKING: Use Nokogiri::HTML5 instead of Nokogiri::HTML4 (#2218)
joelhawksley Mar 10, 2025
13c5537
Remove respond_to? checks (#2219)
joelhawksley Mar 10, 2025
6ffb585
Remove unnecessary usage of ruby2_keywords. (#2220)
joelhawksley Mar 11, 2025
ac31ab0
Standardize how we format test skip logic (#2222)
joelhawksley Mar 11, 2025
55cbc46
Loosen dependencies in v4 (#2226)
joelhawksley Mar 13, 2025
7932644
bump turbo-rails to v2 (#2227)
joelhawksley Mar 13, 2025
5535d01
register driver with unique name (#2229)
joelhawksley Mar 13, 2025
38ab10f
use rspec-rails v7 (#2228)
joelhawksley Mar 17, 2025
fd3ddbc
Merge branch 'main' into v4
joelhawksley Mar 19, 2025
55d36f2
allocations
joelhawksley Mar 19, 2025
44f34c6
Remove unnecessary #format definitions, which returned nil (#2233)
joelhawksley Mar 20, 2025
9e9863b
Merge branch 'main' into v4
joelhawksley Mar 26, 2025
6d643c9
fix v4 ci (#2241)
joelhawksley Mar 26, 2025
0bcd3be
Remove unnecessary call to `view_renderer` (#2238)
joelhawksley Mar 26, 2025
a3e52b2
Cleanup references to old Rails versions (#2243)
joelhawksley Mar 27, 2025
2fa1879
BREAKING: Remove `preview_source` functionality (#2242)
joelhawksley Mar 27, 2025
56d5d3c
Merge branch 'main' into v4
joelhawksley Mar 27, 2025
4349274
bundle update
joelhawksley Mar 27, 2025
5be2918
remove unused code path in template.rb (#2247)
joelhawksley Mar 27, 2025
0e4c338
Merge branch 'main' into v4
joelhawksley Mar 27, 2025
c7f5dd9
remove unnecessary nocov (#2251)
joelhawksley Apr 1, 2025
08af878
No need to run test suite twice (#2252)
joelhawksley Apr 1, 2025
6a8ec4a
[v4] Remove final nocov (#2253)
joelhawksley Apr 1, 2025
d076f80
ViewComponentsSystemTestController only exists in test env (#2255)
joelhawksley Apr 1, 2025
9ef769e
Rename private and internal methods to indicate they are not part of …
joelhawksley Apr 3, 2025
aafe400
Merge branch 'main' into v4
joelhawksley Apr 3, 2025
1ee6f91
Add note about v4 being an LTS release (#2260)
joelhawksley Apr 3, 2025
2e1e220
--inline generator option now generates inline template (#2261)
joelhawksley Apr 4, 2025
d9a60d5
Update deprecation horizon and version # (#2263)
joelhawksley Apr 4, 2025
d3bdef0
Fix bug where request-aware helpers did not work outside of the reque…
joelhawksley Apr 9, 2025
82e4a2f
2269 system test class eager loading (#2277)
joelhawksley Apr 11, 2025
92a4371
Merge branch 'main' into v4
joelhawksley Apr 24, 2025
b88acf8
allocations
joelhawksley Apr 24, 2025
d4a403e
bundle update
joelhawksley Apr 24, 2025
4620e7d
lint
joelhawksley Apr 24, 2025
3c31183
Add #current_template accessor and Template#path (#2283)
joelhawksley Apr 25, 2025
df12595
tag for alpha2
joelhawksley Apr 25, 2025
1aa1e39
Merge branch 'main' into v4
joelhawksley Apr 29, 2025
ff93c53
Merge branch 'main' into v4
joelhawksley Apr 30, 2025
f3090b6
run against ruby head on v4 branch (#2289)
joelhawksley Apr 30, 2025
c145dc8
Remove dependency on ActionView::Base, eliminating the need for captu…
joelhawksley Apr 30, 2025
038d49c
release 4.0.0.alpha3
joelhawksley Apr 30, 2025
3ec795a
simplify rendering test (#2290)
joelhawksley May 1, 2025
fcf4a78
Graduate SlotableDefault to be included by default (#2291)
joelhawksley May 9, 2025
5ee6a1d
[v4] remove unnecessary initializer in Base (#2293)
joelhawksley May 12, 2025
307feaa
Merge branch 'main' into v4
joelhawksley May 13, 2025
e81f916
release 4.0.0.alpha4
joelhawksley May 14, 2025
a978811
[v4] BREAKING: Move config.view_component_path to config.generate.pat…
joelhawksley May 14, 2025
afbac9b
Pre-allocate instance variables for better compatibility with Object …
joelhawksley May 15, 2025
9908177
Merge branch 'main' into v4
joelhawksley May 15, 2025
44fc9f4
try pinning rack main to fix 3.5 rails main ci (#2297)
joelhawksley May 15, 2025
ca8ae8a
release 4.0.0.alpha5
joelhawksley May 15, 2025
36e7116
Do not cache classes in test env (#2298)
joelhawksley May 19, 2025
004274a
bundle update to resolve a few console warnings (#2300)
joelhawksley May 19, 2025
670ca17
Remove unnecessary filtering of inline templates, add test (#2302)
joelhawksley May 20, 2025
8239991
add template annotations for inline_call components (#2301)
joelhawksley May 20, 2025
ad26927
[V4] document active scaffold incompatibility (#2303)
joelhawksley May 20, 2025
ff8c406
Merge branch 'main' into v4
joelhawksley May 21, 2025
3b923b3
Move component_parent_class to generator configuration namespace (#2308)
joelhawksley May 21, 2025
bd5b0de
remove v4 TODO comment. will revisit when Rails < 8 is EOL (#2312)
joelhawksley May 21, 2025
24d0100
Merge branch 'main' into v4
joelhawksley May 21, 2025
c42806e
move dev dependencies to Gemfile (#2316)
joelhawksley May 21, 2025
76f425e
[v4] BREAKING: Move previews-related configuration to separate namesp…
joelhawksley May 22, 2025
ab0b926
Support for Turbo::StreamsHelper in ViewComponent::Base (#2310)
sfnelson May 22, 2025
9dbe441
fix changelog typo
joelhawksley May 22, 2025
c57e974
Add test case for component that only renders a variant (#2323)
joelhawksley May 22, 2025
dc98fb8
Merge branch 'main' into v4
joelhawksley Jun 2, 2025
1a06fe3
fix allocations
joelhawksley Jun 2, 2025
70cdb97
Remove .test_controller in favor of vc_test_controller_class (#2322)
joelhawksley Jun 3, 2025
4ddedab
Update benchmark to be more representative, update docs on performanc…
joelhawksley Jun 3, 2025
2554a01
release v4.0.0.alpha6
joelhawksley Jun 3, 2025
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
50 changes: 3 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,60 +23,20 @@ jobs:
bundle exec appraisal rails-8.0 rake partial_benchmark
bundle exec appraisal rails-8.0 rake translatable_benchmark
test:
name: test (${{ matrix.rails_version }}, ${{ matrix.ruby_version }}, ${{ matrix.mode }})
name: test (Rails ${{ matrix.rails_version }}, Ruby ${{ matrix.ruby_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby_version: "3.0"
rails_version: "6.1"
mode: "capture_patch_enabled"
- ruby_version: "3.0"
rails_version: "6.1"
mode: "capture_patch_disabled"
- ruby_version: "3.1"
rails_version: "7.0"
mode: "capture_patch_enabled"
- ruby_version: "3.1"
rails_version: "7.0"
mode: "capture_patch_disabled"
- ruby_version: "3.2"
rails_version: "7.1"
mode: "capture_patch_enabled"
- ruby_version: "3.2"
rails_version: "7.1"
mode: "capture_patch_disabled"
- ruby_version: "3.3"
rails_version: "7.2"
mode: "capture_patch_disabled"
- ruby_version: "3.3"
rails_version: "7.2"
mode: "capture_patch_enabled"
- ruby_version: "3.3"
rails_version: "8.0"
mode: "capture_patch_disabled"
- ruby_version: "3.3"
rails_version: "8.0"
mode: "capture_patch_enabled"
- ruby_version: "3.4"
rails_version: "8.0"
mode: "capture_patch_disabled"
- ruby_version: "3.4"
rails_version: "8.0"
mode: "capture_patch_enabled"
- ruby_version: "3.4"
- ruby_version: "head"
rails_version: "main"
mode: "capture_patch_disabled"
- ruby_version: "3.4"
rails_version: "main"
mode: "capture_patch_enabled"
- ruby_version: "3.5"
rails_version: "8.0"
mode: "capture_patch_disabled"
- ruby_version: "3.5"
rails_version: "8.0"
mode: "capture_patch_enabled"
env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails_version }}.gemfile
steps:
Expand All @@ -87,17 +47,13 @@ jobs:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Build and test with Rake
# Code-reloading isn't compatible with simplecov, so we need to run once
# to collect coverage, and again to test reloads.
run: |
bundle exec appraisal rails-${{ matrix.rails_version }} bundle
MEASURE_COVERAGE=true bundle exec appraisal rails-${{ matrix.rails_version }} rake
ENABLE_RELOADING=true bundle exec appraisal rails-${{ matrix.rails_version }} rake
env:
RAISE_ON_WARNING: 1
RAILS_VERSION: ${{ matrix.rails_version }}
RUBY_VERSION: ${{ matrix.ruby_version }}
CAPTURE_PATCH_ENABLED: ${{ matrix.mode == 'capture_patch_enabled' && 'true' || 'false' }}
- name: Upload coverage results
uses: actions/[email protected]
if: always()
Expand Down Expand Up @@ -135,7 +91,7 @@ jobs:
bundle && bundle exec rake
env:
VIEW_COMPONENT_PATH: ../view_component
RAILS_VERSION: '7.1.1'
RAILS_VERSION: '7.1.5'
PARALLEL_WORKERS: '1'
coverage:
needs: test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ jobs:
- uses: actions/cache@v4
with:
path: vendor/bundle
key: gems-build-rails-7.1-ruby-3.2-${{ hashFiles('**/Gemfile.lock') }}
key: gems-build-rails-8-ruby-3.2-${{ hashFiles('**/Gemfile.lock') }}
- name: Lint with Rubocop and ERB Lint
run: |
bundle config path vendor/bundle
bundle update
bundle exec standardrb -r "rubocop-md"
bundle exec erblint **/*.html.erb
env:
RAILS_VERSION: '~> 7.1.0'
RAILS_VERSION: '~> 8'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.gem
*.rbc
.ruby-version
.DS_Store
/.config
/coverage/assets
/coverage/index.html
Expand Down
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ruby_version: 2.5
require:
- standard
- "rubocop-md"
Expand Down
2 changes: 1 addition & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruby_version: 2.5
ruby_version: 3.2
ignore:
- 'docs/CHANGELOG.md' # Rubocop doesn't like our indenting of code examples
36 changes: 8 additions & 28 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,46 +1,26 @@
# frozen_string_literal: true

appraise "rails-6.1" do
gem "rails", "~> 6.1"
gem "tailwindcss-rails", "~> 2.0"
gem "sprockets-rails", "~> 3.4.2"
gem "concurrent-ruby", "1.3.4"

# Required for Ruby 3.1.0
gem "net-smtp", require: false
gem "net-imap", require: false
gem "net-pop", require: false
gem "turbo-rails", "~> 1"
end

appraise "rails-7.0" do
gem "rails", "~> 7.0"
gem "tailwindcss-rails", "~> 2.0"
gem "turbo-rails", "~> 1"
gem "sprockets-rails", "~> 3.4.2"
end

appraise "rails-7.1" do
gem "rails", "~> 7.1"
gem "tailwindcss-rails", "~> 2.0"
gem "tailwindcss-rails", "~> 2"
gem "turbo-rails", "~> 1"
gem "sprockets-rails", "~> 3.4.2"
end

appraise "rails-7.2" do
gem "rails", "~> 7.2"
gem "tailwindcss-rails", "~> 2.0"
gem "sprockets-rails", "~> 3.4.2"
gem "tailwindcss-rails", "~> 2"
gem "turbo-rails", "~> 2"
end

appraise "rails-8.0" do
gem "rails", "~> 8.0"
gem "tailwindcss-rails", "~> 2.0"
gem "propshaft", "~> 1.1.0"
gem "tailwindcss-rails", "~> 2"
gem "turbo-rails", "~> 2"
end

appraise "rails-main" do
gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd7817e4a8ed684f29b0"
gem "rails", github: "rails/rails", branch: "main"
gem "tailwindcss-rails", "~> 2.0"
gem "turbo-rails", "~> 1"
gem "tailwindcss-rails", "~> 2"
gem "turbo-rails", "~> 2"
end
33 changes: 33 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,40 @@ source "https://rubygems.org"
gemspec

rails_version = (ENV["RAILS_VERSION"] || "~> 8").to_s

gem "rails", (rails_version == "main") ? {git: "https://github.com/rails/rails", ref: "main"} : rails_version

ruby_version = (ENV["RUBY_VERSION"] || "~> 3.4").to_s
ruby ruby_version

group :development, :test do
gem "allocation_stats"
gem "appraisal", "~> 2"
gem "benchmark-ips", "~> 2"
gem "better_html"
gem "bundler", "~> 2"
gem "capybara", "~> 3"
gem "cuprite"
gem "erb_lint"
gem "haml", "~> 6"
gem "jbuilder", "~> 2"
gem "m", "~> 1"
gem "method_source", "~> 1"
gem "minitest", "~> 5"
gem "propshaft", "~> 1"
gem "puma", "~> 6"
gem "rake", "~> 13"
gem "rails-dom-testing", "~> 2.3.0"
gem "redis"
gem "rspec-rails", "~> 7"
gem "rubocop-md", "~> 2"
gem "selenium-webdriver", "~> 4"
gem "simplecov-console", "< 1"
gem "simplecov", "< 1"
gem "slim", "~> 5"
gem "sprockets-rails", "~> 3"
gem "standard", "~> 1"
gem "warning"
gem "yard-activesupport-concern", "< 1"
gem "yard", "< 1"
end
Loading
Loading