Regression suite · 27 checks

Keep the difficult edges stable.

Regression checks name optional-field assignment, coercion, and failure behaviors most likely to change accidentally while keeping each historical guarantee in one place.

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

IDFocused check
REG-01Boxed JSON strings remain loadable.
REG-02Typed views with JSON text coercion remain loadable.
REG-03Custom toString() JSON inputs remain loadable.
REG-04Symbol.toPrimitive JSON inputs remain loadable.
REG-05Partial envelopes may still coerce to JSON text.

Assignment and native coercion

IDFocused check
REG-06null is rejected as an envelope.
REG-07Array input keeps native JSON coercion failure behavior.
REG-08Parsed numbers preserve missing message fields.
REG-09Parsed booleans preserve missing message fields.
REG-10Parsed string primitives preserve missing message fields.
REG-11Empty objects preserve missing message fields.
REG-12Object messages may omit data.
REG-13JSON messages may omit data.

Hostile errors and native failures

IDFocused check
REG-14Primitive thrown values become Error details.
REG-15Frozen thrown errors remain serializable.
REG-16Locked error serializers cannot escape load().
REG-17Non-string error metadata falls back safely.
REG-18Revoked proxies become unknown serializable errors.
REG-19BigInt data keeps native JSON failure semantics.
REG-20Circular data keeps native JSON failure semantics.
REG-21Hostile console values cannot escape output serialization.
REG-22Undefined custom JSON output receives a readable fallback.
REG-23String-named imports cannot masquerade as module specifiers.
REG-24Multiline import comments preserve text and preamble state.
REG-25Object messages may omit type.
REG-26JSON messages may omit type.
REG-27Hostile 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.