Skip to content

3.3.0

Choose a tag to compare

@gfazioli gfazioli released this 18 Aug 13:19
· 11 commits to master since this release

πŸ› Bug Fixes

  • Circular references no longer crash the component. convertToTreeData recursed with no cycle detection, so obj.self = obj β€” routine in debug panels, parent/child graphs and cached entities β€” blew the stack with a RangeError. And it did not just break the tree: a single cycle anywhere in the data took down the whole page. Repeats now render as [Circular]. A value referenced from two sibling branches is shared, not circular, and still expands in both places.
  • Plain data is no longer mistaken for React elements. Detection fell back to a structural type + props check, so { type: 'text', props: { label: 'Name' } } β€” an everyday shape in form-builder and low-code JSON β€” collapsed into <Component /> and took its whole subtree with it, unreachable and uncopyable. Elements are now identified by their $$typeof marker alone. Real React elements are unaffected.
  • Ctrl+C / Cmd+C copies the focused node, not the root. The lookup could only ever resolve to the root node, so the shortcut ignored the actual selection. It also no longer intercepts the shortcut while a form control inside the component holds focus β€” selecting text in the search input and copying it used to put the JSON root on the clipboard instead.
  • Copying a value JSON cannot express now works. JSON.stringify returns undefined for functions, symbols and undefined β€” putting the literal text undefined on the clipboard β€” and throws on BigInt and on anything holding a cycle, which the copy handlers swallowed as a silent no-op. All three copy paths now fall back to the rendered form, so what you copy matches what you see.

⚑ Improvements

  • New circular value type with its own --json-tree-color-circular CSS variable, themeable like every other type.
  • New Circular References documentation section with a live demo.

πŸ“ Summary

If your data contains { type, props } objects, they now render as regular expandable objects rather than as <Component />. That is the point of the fix β€” those subtrees were previously hidden β€” but it is a visible change to what the tree shows, so it is called out here rather than left to be discovered.


What's Changed

  • chore(lint): adopt oxc-config-mantine for the oxlint ruleset by @gfazioli in #31
  • chore(security): patch vulnerable transitive dependencies by @gfazioli in #32
  • chore(release): derive the repo slug from the git remote by @gfazioli in #33
  • chore(lint): bump stylelint to 17 without rewriting published CSS by @gfazioli in #34
  • fix: three correctness bugs in value handling and keyboard copy by @gfazioli in #35

Full Changelog: 3.2.9...3.3.0