Skip to content

[8.19] [deps] Update vega to 6.x (#238618)#245389

Merged
markov00 merged 8 commits intoelastic:8.19from
markov00:backport/8.19/pr-238618
Dec 9, 2025
Merged

[8.19] [deps] Update vega to 6.x (#238618)#245389
markov00 merged 8 commits intoelastic:8.19from
markov00:backport/8.19/pr-238618

Conversation

@markov00
Copy link
Copy Markdown
Contributor

@markov00 markov00 commented Dec 5, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## 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.

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
(cherry picked from commit d8c23ae)

# Conflicts:
#	.github/CODEOWNERS
#	package.json
#	packages/kbn-babel-preset/common_preset.js
#	packages/kbn-optimizer/src/worker/webpack.config.ts
#	src/platform/packages/shared/kbn-test/jest-preset.js
#	src/platform/plugins/private/vis_types/vega/public/__snapshots__/vega_visualization.test.tsx.snap
@markov00 markov00 added the backport This PR is a backport of another PR label Dec 5, 2025
@markov00 markov00 enabled auto-merge (squash) December 5, 2025 13:57
@nickofthyme nickofthyme self-assigned this Dec 9, 2025
@markov00 markov00 merged commit 449ca9b into elastic:8.19 Dec 9, 2025
13 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
ml 2578 3956 +1378
visTypeVega 595 1788 +1193
total +2571

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 5.6MB 5.5MB -37.9KB
visTypeVega 2.1MB 2.1MB -53.5KB
total -91.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
visTypeVega 33.9KB 33.9KB -3.0B

History

cc @nickofthyme

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

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants