homura-runtime 0.3.20 → 0.3.21

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: 7d2c5985c2d93790c2db2d7330e357fac34c995357dc2ea101b9e55253eba9b6
4
- data.tar.gz: 8b90cb2b8e31453272740def626d0428eb7b26cedcd2c8757698951a84a59217
3
+ metadata.gz: c727de4d506e1d4f3f850fcf02a24471670bb003451910db9d5043c88f481df6
4
+ data.tar.gz: 89e23c95e901eb6232687e9da34d0a4aa402c03418617a1828b933a6eb840499
5
5
  SHA512:
6
- metadata.gz: eb860d3119cbbbeef4961e7c78d46d60464813b049cd27a7cff408b153ed143afc2a7d0d1e02ea0217717ab74d3b268f52f04b333ff178047257640f9a0bbeec
7
- data.tar.gz: 4f75550dd89c458efb49b08ca5044c53b9750857453038538b2a98dfb79c8444453affba70c7f36643ea4a581ba93e2dc2eba5704eda7a013ed86fe1b4ebee7c
6
+ metadata.gz: '096b5e42136d862cbd3d66a8c16a194e26df0d54e508b06072753563558f63bd2e1c85a3c16bca23407ae4d3479776199e8d122b1af6d86adce85abe32b26fe1'
7
+ data.tar.gz: dff29ea05788f0e8b7bcf3d4a9ba92594d43dc5deb2dc5318a2699045d268e08c94b0e16e409237b179092a9545956539f97ac52b83a5acf9d4ca2c6cd4e6799
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.21 (2026-06-25)
4
+
5
+ - Preload Phlex's FIFO dependency before Phlex root setup and explicitly load
6
+ the SGML/HTML/SVG files in the Opal compatibility layer. This replaces the
7
+ Zeitwerk autoload work that cannot run against a filesystem inside Workers.
8
+
3
9
  ## 0.3.20 (2026-06-25)
4
10
 
5
11
  - Define the Opal `ERB::Escape` shim under `class ERB`, matching Opal and
@@ -13,6 +13,9 @@ module HomuraRuntime
13
13
  "phlex" => "phlex/opal_compat",
14
14
  "literal" => "literal/opal_compat"
15
15
  }.freeze
16
+ OPAL_ENTRY_PRELOAD_REQUIRES = {
17
+ "phlex" => %w[monitor json phlex/fifo]
18
+ }.freeze
16
19
 
17
20
  class << self
18
21
  def loaded_spec(name, loaded_specs: Gem.loaded_specs)
@@ -263,6 +266,10 @@ module HomuraRuntime
263
266
  root_file = lib.join("#{spec.name}.rb")
264
267
  next unless root_file.file?
265
268
 
269
+ OPAL_ENTRY_PRELOAD_REQUIRES.fetch(spec.name, []).each do |require_path|
270
+ lines << "require #{require_path.inspect}"
271
+ end
272
+
266
273
  lines << "Zeitwerk.__homura_next_gem_root = #{root_file.to_s.inspect}"
267
274
  lines << "require #{("#{spec.name}.rb").inspect}"
268
275
  lines << "`Opal.loaded([#{spec.name.inspect}])`"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HomuraRuntime
4
- VERSION = "0.3.20"
4
+ VERSION = "0.3.21"
5
5
  end
@@ -3,6 +3,23 @@
3
3
  require "corelib/pattern_matching"
4
4
  require "zeitwerk/opal_compat"
5
5
  require "phlex" unless defined?(Phlex)
6
+ require "phlex/error"
7
+ require "phlex/errors/argument_error"
8
+ require "phlex/errors/double_render_error"
9
+ require "phlex/errors/name_error"
10
+ require "phlex/errors/runtime_error"
11
+ require "phlex/helpers"
12
+ require "phlex/sgml/safe_object"
13
+ require "phlex/sgml/safe_value"
14
+ require "phlex/sgml/state"
15
+ require "phlex/sgml/attributes"
16
+ require "phlex/sgml/elements"
17
+ require "phlex/sgml"
18
+ require "phlex/html/void_elements"
19
+ require "phlex/html/standard_elements"
20
+ require "phlex/html"
21
+ require "phlex/svg/standard_elements"
22
+ require "phlex/svg"
6
23
 
7
24
  Phlex::SGML
8
25
  Phlex::SGML::State
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homura-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.20
4
+ version: 0.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuhiro Homma