view_component 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc884d47517a4f27d0159acd6e744d31a51b29217e3c5e38d9db9594bc25bc79
4
- data.tar.gz: 0ca9efab88b736c678177eab1edd7165365519724c9efe4b7071391f605707b8
3
+ metadata.gz: 0cd32d6d38604882019810f1213145bafb749c66b57d4edcee32902092f436ab
4
+ data.tar.gz: c29d17a4f72223b7e342e5f224fc39505d3bc50cb1a8174db6371c6d6b8ded6b
5
5
  SHA512:
6
- metadata.gz: 23fee96c0259c1a245132a138edf4233fdc228aafb4807ce62f746796295a870548420cb73f99e5ff6705d536e4cfeb6128fe87135c122741a54e8235cba9a31
7
- data.tar.gz: ca9c6a5d1af51e689d8ec17d91aa06f8cfb25781eb6b77702ecb74639778d0b7d0842f14aaed51243bc4a373329f17bf66beb2efa9d0bb7fb7ced7880d4d8878
6
+ metadata.gz: aecaee657c788ae3395994d2234711101fc58f5439f9488993e9b928cb103abba5f5add66d53719259c4f6069a661b7e0a2c3a96ce3c990ca1191fa92b2933fd
7
+ data.tar.gz: 87688cbcfeb6a50be556a435b97e0ff6541fdb4383589b24971c7a6c0caee61d506acee766da36b76345d780cdb0877a6ebff3fb4965c1cb7d1b2878f65e4aab
data/docs/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@ nav_order: 6
10
10
 
11
11
  ## main
12
12
 
13
+ ## 4.8.0
14
+
15
+ * Add `compile.view_component` ActiveSupport::Notifications event for eager compilation at boot time.
16
+
17
+ *Joel Hawksley*, *GitHub Copilot*
18
+
13
19
  ## 4.7.0
14
20
 
15
21
  * Fix stale content cache when slots are accessed before `render_in`.
@@ -518,6 +518,7 @@ module ViewComponent
518
518
  # @param extensions [Array<String>] Extensions of which to return matching sidecar files.
519
519
  def sidecar_files(extensions)
520
520
  return [] unless identifier
521
+ return [] unless name
521
522
 
522
523
  extensions = extensions.join(",")
523
524
 
@@ -79,7 +79,11 @@ module ViewComponent
79
79
 
80
80
  initializer "view_component.eager_load_actions" do
81
81
  ActiveSupport.on_load(:after_initialize) do
82
- ViewComponent::Base.descendants.each(&:__vc_compile) if Rails.application.config.eager_load
82
+ if Rails.application.config.eager_load
83
+ ActiveSupport::Notifications.instrument("compile.view_component") do
84
+ ViewComponent::Base.descendants.each(&:__vc_compile)
85
+ end
86
+ end
83
87
  end
84
88
  end
85
89
 
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 4
6
- MINOR = 7
6
+ MINOR = 8
7
7
  PATCH = 0
8
8
  PRE = nil
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.0
4
+ version: 4.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ViewComponent Team