Skip to content

Conversation

@markov00
Copy link
Member

@markov00 markov00 commented Oct 13, 2025

Summary

Update Vega dependencies to 6.x.

This pull request updates the project's Vega and Vega-Lite dependencies to their latest major versions.

Dependency Upgrades and Import Handling

  • Upgraded vega, vega-lite, vega-interpreter, vega-tooltip, and related libraries to their latest major versions in package.json, and updated their import paths throughout the codebase.

  • Removed legacy Webpack and Storybook configuration for the old vega build, including noParse rules and aliases, and updated the import resolver to point to the new vega-lite and vega-tooltip build directories.

Testing and TypeScript Support

  • Added a Jest setup mock for vega and vega-lite to ensure tests run correctly with the new versions, and updated Jest transform ignore patterns to support new Vega-related packages.
  • Updated tsconfig.base.json to include type definitions for vega-lite and vega-tooltip.

Babel and Build Tools

  • Added @babel/plugin-syntax-import-attributes to dependencies and Babel preset to enable the new import attributes syntax.

Test Snapshots

  • Updated Vega visualization test snapshots to reflect the new rendering/output from upgraded dependencies.

### Dependency added @babel/plugin-syntax-import-attributes

- [x] Purpose: This plugin allows Babel to parse the JavaScript Import Attributes syntax without transforming it.
- [x] Justification: Vega 6 and Vega-Lite uses this import attribute syntax in multiple places, for example
https://github.com/vega/vega/blob/b89378d5b8ac3af85a2c2f51112345a1ba50db99/packages/vega/index.js#L24

- [x] Alternatives explored: I was trying using @babel/generator's as suggested here but wasn't able to properly make it working.
- [x] Existing dependencies: As described above, it can probably be possible to use babel generators for that but it was not working.

The initial use of @babel/plugin-syntax-import-attributes was replace with the use of @babel/generator as suggested here

@elastic elastic deleted a comment from elasticmachine Oct 14, 2025
mistic and others added 13 commits October 14, 2025 03:23
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --include-path /api/agent_builder --update'
@markov00 markov00 force-pushed the 2025_10_13-update_vega_6 branch from dd9445b to fd08d83 Compare November 27, 2025 15:30
@markov00 markov00 changed the title update vega to 6.x [deps] Update vega to 6.x Dec 1, 2025
@markov00 markov00 self-assigned this Dec 1, 2025
@elastic elastic deleted a comment from elasticmachine Dec 1, 2025
@markov00 markov00 marked this pull request as ready for review December 1, 2025 23:20
@markov00 markov00 requested review from a team as code owners December 1, 2025 23:20
@markov00 markov00 added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes dependencies Pull requests that update a dependency file backport:version Backport to applied version labels v8.19.8 v9.2.2 v9.1.8 labels Dec 1, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for this. The new dep has a good health score, but for posterity's sake, could you include the answers to all of the check list questions in the description?

@markov00
Copy link
Member Author

markov00 commented Dec 2, 2025

LGTM! Thank you for this. The new dep has a good health score, but for posterity's sake, could you include the answers to all of the check list questions in the description?

@jeramysoucy
I've added a section, but I'm also trying to run it with an alternative connfiguration (as described in the PR desc)
0a85a94

This dependency is actually not a new one, it was already available as dependency of @babel/preset-env

@jeramysoucy
Copy link
Contributor

I've added a section, but I'm also trying to run it with an alternative connfiguration (as described in the PR desc)
0a85a94
This dependency is actually not a new one, it was already available as dependency of @babel/preset-env

@markov00 Ah, ok. Thanks for clarifying that. I have no concern at all to keep it in, especially if the alternative is unfavorable. I just wanted to make sure we documented any alternatives and the reason for picking this one.

Copy link
Contributor

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Amazing! ❤️

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

Tested and ML changes LGTM ⚡

Copy link
Contributor

@csr csr left a comment

Choose a reason for hiding this comment

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

Codeowner changes LGTM

@markov00 markov00 enabled auto-merge (squash) December 3, 2025 16:59
@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

History

cc @markov00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels dependencies Pull requests that update a dependency file Feature:Vega Vega visualizations release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.19.8 v9.1.8 v9.2.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants