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 20, 2025 2:34pm

Copy link
Member

@kingyue737 kingyue737 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM👍

Copy link
Member

@kingyue737 kingyue737 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vitest has supported rolldown-vite since v3.2.2.

Would it make sense to also use rolldown-vite in tests for consistency with dev and build?

{
  "devDependencies": {
    "vite": "npm:rolldown-vite@latest",
  },
  "pnpm": {
    "overrides": {
      "vite": "npm:rolldown-vite@latest"
    }
  }
}

This would let us dedupe many devDependencies.
Image

@Justineo
Copy link
Member Author

We can do it in a separate PR.

@Justineo Justineo merged commit 52938f4 into main Sep 20, 2025
9 checks passed
@Justineo Justineo deleted the feat/update-options branch September 20, 2025 14:35
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.

2 participants