js-message works with bundlers and without a bundler.
Bundlers resolve the bare js-message import normally. Native browser ESM resolves it through a standard import map, with no build or transpilation step.
Compatible coercion
| ID | Focused check |
|---|---|
REG-01 | Boxed JSON strings remain loadable. |
REG-02 | Typed views with JSON text coercion remain loadable. |
REG-03 | Custom toString() JSON inputs remain loadable. |
REG-04 | Symbol.toPrimitive JSON inputs remain loadable. |
REG-05 | Partial envelopes may still coerce to JSON text. |
Assignment and native coercion
| ID | Focused check |
|---|---|
REG-06 | null is rejected as an envelope. |
REG-07 | Array input keeps native JSON coercion failure behavior. |
REG-08 | Parsed numbers preserve missing message fields. |
REG-09 | Parsed booleans preserve missing message fields. |
REG-10 | Parsed string primitives preserve missing message fields. |
REG-11 | Empty objects preserve missing message fields. |
REG-12 | Object messages may omit data. |
REG-13 | JSON messages may omit data. |
Hostile errors and native failures
| ID | Focused check |
|---|---|
REG-14 | Primitive thrown values become Error details. |
REG-15 | Frozen thrown errors remain serializable. |
REG-16 | Locked error serializers cannot escape load(). |
REG-17 | Non-string error metadata falls back safely. |
REG-18 | Revoked proxies become unknown serializable errors. |
REG-19 | BigInt data keeps native JSON failure semantics. |
REG-20 | Circular data keeps native JSON failure semantics. |
REG-21 | Hostile console values cannot escape output serialization. |
REG-22 | Undefined custom JSON output receives a readable fallback. |
REG-23 | String-named imports cannot masquerade as module specifiers. |
REG-24 | Multiline import comments preserve text and preamble state. |
REG-25 | Object messages may omit type. |
REG-26 | JSON messages may omit type. |
REG-27 | Hostile Error accessors stay contained during serialization. |
Compatibility is explicit.
These cases run against both module and browser-global implementations where the historical behavior spans both entries.