Skip to content

Conversation

Justineo
Copy link
Member

Summary

  • Introduced the smart-update planner (src/smart-update.ts) and wired it into ECharts.ts so reactive updates automatically choose between merge, replaceMerge, or full rebuild; manual updates and explicit update-options bypass the planner.
  • Documented the strategy (English & Chinese README) directly under the option prop, explaining how manual mode and user-provided update-options behave
  • Added AGENTS.md to outline contributor workflows for coding agents.
  • Added Vitest infrastructure (pnpm test, config files) plus a tests/smart-update.test.ts suite covering signatures, planner heuristics, and real-world option transitions.
  • Updated CI and release workflows to run pnpm test alongside lint/typecheck/build.

Smart update details

  • We build a minimal signature (arrays, objects, scalars, options/media length) and compare it to the previous one.
  • Deletions of objects → inject null; deletions of arrays → inject [] and add replaceMerge.
  • ID or anonymous-item removal → replaceMerge; scalar removal or shrinking options/medianotMerge: true.
  • Manual setOption and explicit update-options bypass the planner.

@Justineo Justineo requested a review from a team as a code owner September 17, 2025 16:21
Copy link

vercel bot commented Sep 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
vue-echarts Ready Ready Preview Comment Sep 17, 2025 4:23pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant