Skip to content

Bump view_component from 3.23.2 to 4.0.2 #1255

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 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Aug 21, 2025

Bumps view_component from 3.23.2 to 4.0.2.

Release notes

Sourced from view_component's releases.

v4.0.2

What's Changed

Full Changelog: ViewComponent/view_component@v4.0.1...v4.0.2

4.0.1

  • Conditionally add the ViewComponent::Base#format method back for Rails 7.1 only.

  • Compute and check lockfiles into source control.

  • Constrain Rails versions in gemfiles to only allow the patch version to vary, eg. ~> 7.1.0 instead of ~> 7.1.

    Cameron Dutro

  • Setup Trusted Publishing to RubyGems to improve software supply chain safety.

    Hans Lemuet

4.0.0

Two years after releasing 3.0.0 and almost six years since 1.0.0, we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.

Please report any issues at https://github.com/ViewComponent/view_component/issues.

Breaking changes (production)

  • Remove dependency on ActionView::Base, eliminating the need for capture compatibility patch. In some edge cases, this change may require switching to use the helpers. proxy.

  • Require non-EOL Rails (>= 7.1.0) and Ruby (>= 3.2.0).

  • Remove render_component and render monkey patch configured with render_monkey_patch_enabled.

  • Remove deprecated use_helper(s). Use include MyHelper or helpers. proxy instead.

  • Support compatibility with Dry::Initializer. As a result, EmptyOrInvalidInitializerError will no longer be raised.

  • Remove default initializer from ViewComponent::Base. Previously, ViewComponent::Base defined a catch-all initializer that allowed components without an initializer defined to be passed arbitrary arguments.

  • Remove use_deprecated_instrumentation_name configuration option. Events will always use render.view_component name.

  • Remove unnecessary #format methods that returned nil.

  • Remove support for variant names containing . to be consistent with Rails.

  • Rename internal methods to have __vc_ prefix if they shouldn't be used by consumers. Make internal constants private. Make Collection#components, Slotable#register_polymorphic_slot private. Remove unused ComponentError class.

  • Use ActionView's lookup_context for picking templates instead of the request format.

    3.15 added support for using templates that match the request format, that is if /resource.csv is requested then ViewComponents would pick _component.csv.erb over _component.html.erb.

    With this release, the request format is no longer considered and instead ViewComponent will use the Rails logic for picking the most appropriate template type, that is the csv template will be used if it matches the Accept header or because the controller uses a respond_to block to pick the response format.

Breaking changes (dev/test)

  • Remove config.view_component.test_controller in favor of vc_test_controller_class test helper method.
  • config.view_component.component_parent_class is now config.view_component.generate.parent_class, moving the generator-specific option to the generator configuration namespace.
  • config.view_component.view_component_path is now config.view_component.generate.path, as components have long since been able to exist in any directory.
  • Move previews-related configuration (enabled, route, paths, default_layout, controller) to under previews namespace.
  • --inline generator option now generates inline template. Use --call to generate #call method.

... (truncated)

Changelog

Sourced from view_component's changelog.

4.0.2

  • Share the view context in tests to prevent out-of-order rendering issues for certain advanced use-cases, eg. testing instances of Rails' FormBuilder.

  • Fix double rendering issue for partials that yield.

    Cameron Dutro

4.0.1

  • Setup Trusted Publishing to RubyGems to improve software supply chain safety.

    Hans Lemuet

  • Conditionally add the ViewComponent::Base#format method back for Rails 7.1 only.

  • Compute and check lockfiles into source control.

  • Constrain Rails versions in gemfiles to only allow the patch version to vary, eg. ~> 7.1.0 instead of ~> 7.1.

    Cameron Dutro

4.0.0

Two years after releasing 3.0.0 and almost six years since 1.0.0, we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.

Please report any issues at https://github.com/ViewComponent/view_component/issues.

Breaking changes (production)

  • Remove dependency on ActionView::Base, eliminating the need for capture compatibility patch. In some edge cases, this change may require switching to use the helpers. proxy.

  • Require non-EOL Rails (>= 7.1.0) and Ruby (>= 3.2.0).

  • Remove render_component and render monkey patch configured with render_monkey_patch_enabled.

  • Remove deprecated use_helper(s). Use include MyHelper or helpers. proxy instead.

  • Support compatibility with Dry::Initializer. As a result, EmptyOrInvalidInitializerError will no longer be raised.

  • Remove default initializer from ViewComponent::Base. Previously, ViewComponent::Base defined a catch-all initializer that allowed components without an initializer defined to be passed arbitrary arguments.

  • Remove use_deprecated_instrumentation_name configuration option. Events will always use render.view_component name.

  • Remove unnecessary #format methods that returned nil.

  • Remove support for variant names containing . to be consistent with Rails.

  • Rename internal methods to have __vc_ prefix if they shouldn't be used by consumers. Make internal constants private. Make Collection#components, Slotable#register_polymorphic_slot private. Remove unused ComponentError class.

  • Use ActionView's lookup_context for picking templates instead of the request format.

    3.15 added support for using templates that match the request format, that is if /resource.csv is requested then ViewComponents would pick _component.csv.erb over _component.html.erb.

    With this release, the request format is no longer considered and instead ViewComponent will use the Rails logic for picking the most appropriate template type, that is the csv template will be used if it matches the Accept header or because the controller uses a respond_to block to pick the response format.

Breaking changes (dev/test)

  • Remove config.view_component.test_controller in favor of vc_test_controller_class test helper method.
  • config.view_component.component_parent_class is now config.view_component.generate.parent_class, moving the generator-specific option to the generator configuration namespace.
  • config.view_component.view_component_path is now config.view_component.generate.path, as components have long since been able to exist in any directory.
  • Move previews-related configuration (enabled, route, paths, default_layout, controller) to under previews namespace.

... (truncated)

Commits
  • 4bbea1c Merge pull request #2430 from ViewComponent/release-4-0-2
  • b1ab0d3 Update lockfiles
  • 408e8d3 release 4.0.2
  • 26c2798 Merge pull request #2410 from ViewComponent/shared_view_context_in_test_helpers
  • 851b096 Merge branch 'shared_view_context_in_test_helpers' of github.com:ViewComponen...
  • f3df765 Fix build for ruby HEAD
  • 69f3fd7 Merge branch 'main' into shared_view_context_in_test_helpers
  • a755f3c Merge pull request #2424 from ViewComponent/fix_partial_with_yield
  • bc7f8b4 Woops, fix changelog
  • e2cefa9 Woops, fix changelog
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Aug 21, 2025
Bumps [view_component](https://github.com/viewcomponent/view_component) from 3.23.2 to 4.0.2.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](ViewComponent/view_component@v3.23.2...v4.0.2)

---
updated-dependencies:
- dependency-name: view_component
  dependency-version: 4.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/bundler/view_component-4.0.2 branch from e4615cd to dfc0e26 Compare August 22, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants