Skip to content

v0.7.6

Choose a tag to compare

@github-actions github-actions released this 06 Oct 12:38
· 139 commits to main since this release

State keys that contain / or ~ now stay one key. JSON Pointer writes such a key as ~1 or ~0, and two places in the renderer did not: a key like "a/b" was split into a nested { "a": { "b": … } }, and validation could not find a field whose path used the escape.

What changes for your app

  • Seeding keeps the key you wrote. State from the state input or spec.state is written into the store key by key. A key containing / or ~ used to land at the wrong place, so { "links": { "a/b": "x" } } became { "links": { "a": { "b": "x" } } }, and { "$state": "/links/a~1b" } read nothing. It now stays "a/b".
  • createStoreSetState writes to the same key. It had the same split when it diffed a whole-state update into path writes.
  • Validation finds escaped paths. A field bound to /links/a~1b is now checked against the value at "a/b", the same way the state store reads it. Before, it was always checked against undefined, so required failed on a filled field.

State whose keys contain neither character behaves exactly as before.

Upgrading

npm i ngx-json-render@^0.7.6

No code changes are needed, and ngx-json-render-material@0.3.6 works with it as it is.

Full Changelog: v0.7.5...v0.7.6