Skip to content

Conversation

@onlyjackfrost
Copy link
Contributor

@onlyjackfrost onlyjackfrost commented Dec 11, 2025

fix https://github.com/Canner/WrenAI/security/dependabot/123

Summary by CodeRabbit

  • Chores
    • Updated Vega-Lite dependency to the latest version for improved performance and stability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Walkthrough

Version bump of vega-lite dependency from ^5.21.0 to ^6.2.0 in wren-ui/package.json. No code modifications introduced.

Changes

Cohort / File(s) Change Summary
Dependency version update
wren-ui/package.json
Bumped vega-lite from ^5.21.0 to ^6.2.0

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Verify that vega-lite v6.2.0 is compatible with current codebase usage patterns
  • Check if any API changes in vega-lite v6.x require code updates beyond the version bump

Suggested reviewers

  • wwwy3y3
  • fredalai

Poem

A rabbit hops through dependency land,
Where vega-lite charts now expand,
From five to six, a leap so bright, 📊
New versions bloom with graphing might,
Updates dance, the future's grand! 🐰✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: upgrading vega-lite version in wren-ui to align with a dependent library.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/vega

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 517f07f and f2f116d.

⛔ Files ignored due to path filters (1)
  • wren-ui/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • wren-ui/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (go)
🔇 Additional comments (1)
wren-ui/package.json (1)

95-95: Verify vega-lite v6 compatibility and breaking changes.

Vega-lite v6 updates to Vega 6, which is now ESM only. This is a major version bump with potential breaking changes. Ensure:

  1. All code using vega-lite has been updated for v6 API changes
  2. The application builds and renders charts correctly with v6.2.0
  3. No module format conflicts (ESM-only Vega v6 with your bundler setup)
  4. All tests pass, including visualization rendering tests

Please verify these items and share test results confirming compatibility before merging.

"vega": "^6.2.0",
"vega-embed": "^6.29.0",
"vega-lite": "^5.21.0"
"vega-lite": "^6.2.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

vega-lite v6 breaking changes migration from v5

💡 Result:

Here’s a concise migration checklist and the main breaking changes when moving Vega‑Lite v5 → v6, with links to the upstream notes.

Key breaking changes

  • Vega‑Lite now targets Vega 6 (you should update any direct Vega dependency and test specs against Vega 6). [1][2]
  • Package is ESM-only (no CommonJS build) — update imports (use ES import syntax / bundler config) if your environment relied on require()/CJS. [1]
  • Default continuous size behavior changed — check any specs that relied on previous continuous size defaults (you may need to set explicit size/scale settings). [2]
  • Minor/behavioral changes to handling of invalid data and scales — review mark.invalid / config.scale.invalid behavior in your specs (see docs on invalid-data modes). [3]

Migration steps (practical)

  1. Upgrade vega-lite to v6.x and vega to v6.x in your project and run your test/spec suite. [1][2]
  2. If your code used require('vega-lite') / require('vega'), convert to ES module imports (or configure your bundler to handle ESM). [1]
  3. Search your specs for any reliance on implicit continuous size defaults (e.g., point/bar sizing, rangeStep) and explicitly set size/scale or config if visuals changed. [2]
  4. Review invalid-data behavior in any line/area/trail or scale-dependent specs and add mark.invalid or config.scale.invalid explicitly if needed. Test path marks for breaks/filters. [3]
  5. Run full visual/regression tests and address any warnings/errors reported by the v6 schema validator.

References

  • vega‑lite v6.0.0 release notes (includes ESM-only, update to Vega 6, change default continuous size). [1][2]
  • Vega‑Lite docs: Modes for Handling Invalid Data (mark.invalid / config.scale.invalid). [3]

If you want, I can:

  • scan a sample of your v5 specs and point out exact fields likely to break, or
  • produce a one‑file checklist script/regexes to find risky encodings (invalid-data, size/rangeStep, require/import).

🏁 Script executed:

# Search for vega-lite usage in wren-ui
fd -e ts -e tsx -e js -e jsx . wren-ui/src | head -20

Repository: Canner/WrenAI

Length of output: 1101


🏁 Script executed:

# Check for vega-lite imports and usage
rg "vega-lite|from\s+['\"].*vega" wren-ui/src --type ts --type tsx --type js --type jsx -i -A 2

Repository: Canner/WrenAI

Length of output: 84


🏁 Script executed:

# Examine the package.json context more closely
head -100 wren-ui/package.json | tail -15

Repository: Canner/WrenAI

Length of output: 424


🏁 Script executed:

# Check if there are test files and build scripts
cat wren-ui/package.json | grep -A 50 '"scripts"'

Repository: Canner/WrenAI

Length of output: 1788


🏁 Script executed:

# Search for vega-lite and vega imports with correct syntax
rg "from\s+['\"].*vega|import.*vega" wren-ui/src -A 3 -B 1

Repository: Canner/WrenAI

Length of output: 1980


🏁 Script executed:

# Also search for require patterns with vega
rg "require\s*\(\s*['\"].*vega" wren-ui/src

Repository: Canner/WrenAI

Length of output: 39


🏁 Script executed:

# Look for files that might use vega specs or configurations
fd -e ts -e js wren-ui/src | xargs grep -l "vega\|spec\|mark\|encoding" | head -15

Repository: Canner/WrenAI

Length of output: 406


🏁 Script executed:

# Check for vega-related test files
fd "vega|chart|visualization" wren-ui/src -i

Repository: Canner/WrenAI

Length of output: 360


🏁 Script executed:

# Look at the actual imports more broadly
rg "^import.*vega|^from.*vega" wren-ui/src -B 1 -A 3

Repository: Canner/WrenAI

Length of output: 1980


🏁 Script executed:

# Examine vegaSpecUtils.ts - the main spec utility
cat wren-ui/src/utils/vegaSpecUtils.ts

Repository: Canner/WrenAI

Length of output: 7381


🏁 Script executed:

# Check chart handler for mark definitions and spec building
cat wren-ui/src/components/chart/handler.ts

Repository: Canner/WrenAI

Length of output: 14333


🏁 Script executed:

# Look at the test file to see what's being tested
cat wren-ui/src/utils/vegaSpecUtils.test.ts

Repository: Canner/WrenAI

Length of output: 8719


🏁 Script executed:

# Check for any size, rangeStep, or mark.invalid patterns in specs
rg "size|rangeStep|mark\.|invalid" wren-ui/src/utils/vegaSpecUtils.ts wren-ui/src/components/chart/handler.ts

Repository: Canner/WrenAI

Length of output: 1703


🏁 Script executed:

# Check if there are any other schema version references
rg "vega-lite/v5|vega-lite/v4|vega-lite/v6" wren-ui/src

Repository: Canner/WrenAI

Length of output: 379


🏁 Script executed:

# Verify the full chart index.tsx to see how specs are used
cat wren-ui/src/components/chart/index.tsx | head -100

Repository: Canner/WrenAI

Length of output: 2880


Update vega-lite schema version references to v6.

The upgrade to vega-lite v6.2.0 requires updating the hardcoded schema references. In wren-ui/src/utils/vegaSpecUtils.ts (line 46), the $schema property references https://vega.github.io/schema/vega-lite/v5.json and should be updated to https://vega.github.io/schema/vega-lite/v6.json. The same update should be made in wren-ui/src/utils/vegaSpecUtils.test.ts test fixtures.

The codebase is otherwise compatible with v6.2.0: ES module imports are already in use, related vega packages are at v6.x, and explicit sizing configuration (width: 'container', height: 'container') avoids reliance on changed default behaviors. No breaking API changes affect the current spec-building logic.

🤖 Prompt for AI Agents
In wren-ui/src/utils/vegaSpecUtils.ts around line 46 and in
wren-ui/src/utils/vegaSpecUtils.test.ts (test fixtures), the $schema hardcoded
URL references v5; update these to
"https://vega.github.io/schema/vega-lite/v6.json" in both the spec builder and
any test fixtures/expected specs so they match vega-lite v6.2.0, then run the
unit tests to ensure no other references to v5 remain.

@wwwy3y3 wwwy3y3 merged commit 2720c56 into main Dec 15, 2025
6 checks passed
@wwwy3y3 wwwy3y3 deleted the chore/vega branch December 15, 2025 04:29
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.

3 participants