Skip to content

v2.0.2

Choose a tag to compare

@github-actions github-actions released this 03 Sep 13:24
· 294 commits to main since this release
3d3efc0

Version 2.0.2 – Refactor, bug fixes, and hardening of array editing

  • Refactor – The array‑item editing engine has been moved from the panel component into src/utils/ast/items.ts.

    • New pure string‑in/string‑out utilities (updateArrayItemProperty, updateArrayItemValue, moveArrayItem, moveArrayItems, removeArrayItems, duplicateArrayItems, appendArrayItem, parseItems) are now exported from @jbpark/live-editor/utils/ast.
    • The placeholder round‑trip logic is removed; Babel now prints JSX inside object literals correctly, and raw JSX values parse straight into nodes.
    • Values containing $& or $$ are no longer mangled by the old substitution step.
  • Bug fixes –

    • Fixed a coercion bug where an object/array property was converted to a JS value, stringified, and parsed again, turning [1, 2] into "1,2" and parsing as a sequence expression. Serialized source text is now parsed directly; real JS values are rebuilt only when the property contains only literals, otherwise the edit is refused.
    • Fixed silent dropping of primitives when editing arrays that mix objects and primitives; all functions now address items by their position in the array.
  • Hardening –

    • InnerHTML values containing backticks, ${, backslashes, or carriage returns no longer throw Invalid raw or lose line endings; they are written verbatim.
    • The guard that prevented deleting the last item now counts items of the kind being edited, so the object panel can no longer delete its last object just because a primitive keeps the array non‑empty.
  • API changes –

    • moveSelectedIndices and removeIndices have been moved from components/dnd/panel/selection to utils/selection; they are not part of the public API.

What's Changed

  • ♻️ refactor(ast): move the array-item editing engine out of the panel component by @pjb0811 in #273
  • 🐛 fix: extract nvidia-chat.mjs with model fallback and think-block strip by @pjb0811 in #275
  • 🔧 chore: modernize CI action versions to Node 24 majors by @pjb0811 in #276
  • 🔖 chore: version packages by @github-actions[bot] in #274

Full Changelog: v2.0.1...v2.0.2