diff --git a/.audition-baseline.json b/.audition-baseline.json index 46c266441..f168a599e 100644 --- a/.audition-baseline.json +++ b/.audition-baseline.json @@ -124,7 +124,6 @@ "runtime-unshareable-constant|/Users/joelhawksley/.local/share/mise/installs/ruby/4.0.5/lib/ruby/gems/4.0.0/gems/i18n-1.14.8/lib/i18n/interpolate/ruby.rb": 1, "runtime-unshareable-constant|/Users/joelhawksley/.local/share/mise/installs/ruby/4.0.5/lib/ruby/gems/4.0.0/gems/logger-1.7.0/lib/logger.rb": 1, "runtime-unshareable-constant|/Users/joelhawksley/github/view_component/lib/view_component/deprecation.rb": 1, - "runtime-unshareable-constant|/Users/joelhawksley/github/view_component/lib/view_component/version.rb": 1, "unsafe-calls|lib/view_component/base.rb": 1, "unsafe-calls|lib/view_component/compile_cache.rb": 1, "unsafe-calls|lib/view_component/compiler.rb": 3, diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index b619b2c88..1d5b1e301 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,10 @@ nav_order: 6 ## main +* Freeze `ViewComponent::VERSION::STRING` so the version constant is immutable and Ractor-shareable. + + *Joel Hawksley* + * Add [audition](https://github.com/yaroslav/audition) Ractor-readiness checks to CI. Applied safe `.freeze` auto-fixes to string constants in `ViewComponent::Errors` and baselined existing findings so the gate fails only on new Ractor-isolation violations. *Joel Hawksley* diff --git a/lib/view_component/version.rb b/lib/view_component/version.rb index 11bbbc2ad..911bc7536 100644 --- a/lib/view_component/version.rb +++ b/lib/view_component/version.rb @@ -7,7 +7,7 @@ module VERSION PATCH = 0 PRE = nil - STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".") + STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".").freeze end end