homura-runtime 0.3.20 → 0.3.22

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: c5f55310be45f2c74447186bb11ed970247925dd5c826b417f815d580f6d8da0
4
+ data.tar.gz: 568c1cad017678edc3f81c8adc49b92f183ff29f7e8db0ec585e53e4d34adcf0
5
5
  SHA512:
6
- metadata.gz: eb860d3119cbbbeef4961e7c78d46d60464813b049cd27a7cff408b153ed143afc2a7d0d1e02ea0217717ab74d3b268f52f04b333ff178047257640f9a0bbeec
7
- data.tar.gz: 4f75550dd89c458efb49b08ca5044c53b9750857453038538b2a98dfb79c8444453affba70c7f36643ea4a581ba93e2dc2eba5704eda7a013ed86fe1b4ebee7c
6
+ metadata.gz: 6c897c968ea643fa895aa977d6c0a72ed480796cc74d93853716e1828f8174deda6bc9bdc4e3618b3aa39df5805ab6e0225c4b7f8dac4b7a4a72256a9ab388a2
7
+ data.tar.gz: 0124e0b823f5b38c508934f42127d034fa0d1c2ebdb487ecb7f2095112b953992ac7f49925386fdaf084324257982d915b95d26892d9626b2eb7548936787028
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.22 (2026-06-25)
4
+
5
+ - Define the Phlex namespace before preloading Phlex FIFO. The FIFO file uses
6
+ `class Phlex::FIFO`, so the namespace must exist before the root file runs.
7
+
8
+ ## 0.3.21 (2026-06-25)
9
+
10
+ - Preload Phlex's FIFO dependency before Phlex root setup and explicitly load
11
+ the SGML/HTML/SVG files in the Opal compatibility layer. This replaces the
12
+ Zeitwerk autoload work that cannot run against a filesystem inside Workers.
13
+
3
14
  ## 0.3.20 (2026-06-25)
4
15
 
5
16
  - 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,11 @@ module HomuraRuntime
263
266
  root_file = lib.join("#{spec.name}.rb")
264
267
  next unless root_file.file?
265
268
 
269
+ lines << "module Phlex; end unless defined?(Phlex)" if spec.name == "phlex"
270
+ OPAL_ENTRY_PRELOAD_REQUIRES.fetch(spec.name, []).each do |require_path|
271
+ lines << "require #{require_path.inspect}"
272
+ end
273
+
266
274
  lines << "Zeitwerk.__homura_next_gem_root = #{root_file.to_s.inspect}"
267
275
  lines << "require #{("#{spec.name}.rb").inspect}"
268
276
  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.22"
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.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuhiro Homma