@lutaml/lutaml-model 0.1.0 → 0.1.1

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.
package/README.md CHANGED
@@ -16,6 +16,20 @@ npm install @lutaml/lutaml-model
16
16
  | \`lutaml-model\` (default) | \`dist/lutaml-model.js\` | **Self-contained** — Opal runtime embedded. CDN-friendly. |
17
17
  | \`lutaml-model-no-opal\` | \`dist/lutaml-model-no-opal.js\` | **External** — references \`@lutaml/opal-runtime\` global. For bundler users who share runtime. |
18
18
 
19
+ ## XML adapters
20
+
21
+ Both pure-Ruby XML adapters from the Ruby gem ship in the bundle:
22
+
23
+ - **Oga** — default. Compiled from the vendored \`opal-oga\` fork, which
24
+ provides a pure-Ruby lexer under \`ext/pureruby/\` selected via
25
+ \`RUBY_PLATFORM == 'opal'\` in \`lib/oga.rb\`.
26
+ - **REXML** — opt-in via \`Lutaml::Model::Config.xml_adapter_type = :rexml\`.
27
+ Compiled from the bundled stdlib gem, with moxml's
28
+ \`lib/compat/opal/rexml/*\` shadows patching the parts Opal can't
29
+ follow natively.
30
+
31
+ Nokogiri and Ox are stubbed (C extensions, no Opal equivalent).
32
+
19
33
  ## Build note: OPAL_PREFORK_DISABLE=1
20
34
 
21
35
  Opal 1.8.x defaults to its \`Prefork\` scheduler, which deadlocks on
@@ -26,15 +40,21 @@ under Windows or when running inside Opal itself).
26
40
  Opal 2 master adds a \`Threaded\` scheduler as well. Once Opal 2
27
41
  ships, the env var becomes unnecessary.
28
42
 
29
- ## Runtime status
43
+ ## Sync model
30
44
 
31
- Compile succeeds (~1.5 MB bundle). Runtime has a known issue:
32
- \`lib/lutaml/model.rb:275\` and \`lib/lutaml/xml.rb:205\` both call
33
- \`Lutaml::Model::Serializable.prepend(...)\` for Opal's MRO workaround.
34
- Ruby forbids double-prepend → \`RuntimeError\`.
45
+ This package is rebuilt automatically whenever the Ruby source changes:
35
46
 
36
- Fix is documented in lutaml-model's \`TODO.opal/\` plan — needs
37
- upstream PR to deduplicate the prepend calls.
47
+ | Ruby event | Trigger | JS dist-tag |
48
+ |---|---|---|
49
+ | Tag push (stable release) | \`repository_dispatch(do-release)\` from lutaml-model's release chain | \`latest\` |
50
+ | Push to \`main\` | \`repository_dispatch(js-sync-main)\` from lutaml-model's \`.github/workflows/js-sync.yml\` | \`next\` |
51
+ | Pull request touching \`lib/\` | \`repository_dispatch(js-pr-check)\` from lutaml-model's \`.github/workflows/js-pr-check.yml\` | (no publish; smoke test only) |
52
+
53
+ Install the latest dev build with:
54
+
55
+ \`\`\`sh
56
+ npm install @lutaml/lutaml-model@next
57
+ \`\`\`
38
58
 
39
59
  ## Source
40
60
 
@@ -0,0 +1,3 @@
1
+ declare const Lutaml: any;
2
+ export = Lutaml;
3
+ export default Lutaml;