-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[deps] Update vega to 6.x #238618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
markov00
wants to merge
28
commits into
elastic:main
Choose a base branch
from
markov00:2025_10_13-update_vega_6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[deps] Update vega to 6.x #238618
Changes from 22 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9fafaab
update vega to 6.x
markov00 237e51a
[CI] Auto-commit changed files from 'node scripts/notice'
kibanamachine 6404ed3
Merge remote-tracking branch 'upstream/main' into markov-2025_10_13-u…
mistic 54dfc99
chore(NA): update yarn lock
mistic 5ec7890
chore(NA): update typecheck setup
mistic 87e4a61
[CI] Auto-commit changed files from 'ts-node .buildkite/pipeline-reso…
kibanamachine 6a8538e
chore(NA): more changes to support workaround support
mistic c5000fa
Merge branch 'main' into 2025_10_13-update_vega_6
mistic 943237b
[CI] Auto-commit changed files from 'node scripts/capture_oas_snapsho…
kibanamachine de28eb5
fix(NA): workarounds vega-lite validation tests by using a vm env
mistic 9d30471
[CI] Auto-commit changed files from 'security: 3rd-party dependencies'
kibanamachine ca75827
Merge branch '2025_10_13-update_vega_6' of github.com:markov00/kibana…
mistic 0c4f560
fix(NA): lint errors
mistic bfbfefe
fix(NA): restore removed type on base config
mistic d1e794b
chore(NA): setup correct vega jest setup for pre esm
mistic 1395acb
chore(NA): remove old code
mistic cf24c76
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine 5039541
Merge branch 'main' into 2025_10_13-update_vega_6
markov00 9a464e5
removed resolutions in package.json
markov00 fd08d83
Fix yarn lock
kibanamachine 4d8ec44
Update snapshot, different error message
markov00 4b352b7
Improved
markov00 0a85a94
Use babel generators instead of @babel/plugin-syntax-import-attribute
markov00 b1bc6da
cleanup typo
markov00 1648843
add code owners
markov00 844317d
Add import attributes parser options for eslint
markov00 a120fae
re-bootstrap
jeramysoucy 04c3583
Merge branch 'main' into 2025_10_13-update_vega_6
markov00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/platform/packages/shared/kbn-test/src/jest/setup/mocks.vega.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| /* eslint-env jest */ | ||
|
|
||
| const fs = require('fs'); | ||
| const vm = require('vm'); | ||
| const path = require('path'); | ||
|
|
||
| let cached = null; | ||
|
|
||
| const loadVegaAndLite = () => { | ||
| if (cached) return cached; | ||
|
|
||
| const sandbox = { | ||
| window: {}, | ||
| globalThis: {}, | ||
| structuredClone: (obj) => JSON.parse(JSON.stringify(obj)), | ||
| }; | ||
|
|
||
| // vega | ||
| const vegaPath = path.resolve('node_modules/vega/build/vega.min.js'); | ||
| const vegaCode = fs.readFileSync(vegaPath, 'utf8'); | ||
| vm.createContext(sandbox); | ||
| vm.runInContext(vegaCode, sandbox); | ||
|
|
||
| sandbox.window.vega = sandbox.globalThis.vega = sandbox.window.vega || sandbox.globalThis.vega; | ||
|
|
||
| // vega-lite | ||
| const litePath = path.resolve('node_modules/vega-lite/build/vega-lite.min.js'); | ||
| const liteCode = fs.readFileSync(litePath, 'utf8'); | ||
| vm.runInContext(liteCode, sandbox); | ||
|
|
||
| cached = { | ||
| vega: sandbox.window.vega || sandbox.globalThis.vega, | ||
| vegaLite: sandbox.window.vegaLite || sandbox.globalThis.vegaLite, | ||
| }; | ||
|
|
||
| // both vega nad vega-lite | ||
| return cached; | ||
| }; | ||
|
|
||
| jest.mock('vega', () => { | ||
| const { vega } = loadVegaAndLite(); | ||
| return { ...vega }; | ||
| }); | ||
|
|
||
| jest.mock('vega-lite', () => { | ||
| const { vegaLite } = loadVegaAndLite(); | ||
| return { ...vegaLite }; | ||
| }); | ||
4 changes: 2 additions & 2 deletions
4
...form/plugins/private/vis_types/vega/public/__snapshots__/vega_visualization.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
markov00 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| declare module 'vega-lite' { | ||
| export * from 'vega-lite/build'; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| declare module 'vega-tooltip' { | ||
| export * from 'vega-tooltip/build'; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.