kibana/test
Marco Vettorello 7260564f6a
[Vega] Fix highlight for HJSON (#208858)
## Summary

This PR fixes the missing highlight theme for HJSON specs in Vega.
The issue https://github.com/elastic/kibana/issues/205711 was caused by
https://github.com/elastic/kibana/pull/182348 that inadvertently
specified the code-editor package as sideEffect free. This cause the
compiler to exclude every import without exported and used methods.
This was the case for the code-editor that registered some language
highlighters in that way.

The solution adopted here is to mark the register_language.ts file as a
file with side effects, the alternative solution can be to register
these directly from within the code_editor component.
A third option is to move these registration within the monaco package
where other languages are also registered.
I'd like to leave to @elastic/appex-sharedux the preference to followup
with a better fix for the future.

I'd also like to have the opinion from @elastic/kibana-operations
because the misconfigured package issue can be seen only in production
and not in development mode. Is it possible that webpack doesn't apply
treeshaking when in development mode?

fix https://github.com/elastic/kibana/issues/205711
Should also fix the same issue but for TSVB Markdown

The fix was tested on CI by running at first only the CI FT with the
`sideEffects:false` to verify the failure (see
[build](https://buildkite.com/elastic/kibana-pull-request/builds/272375))
and then with the fix specifying the actual file that contains side
effects.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-03 14:18:35 +01:00
..
accessibility [Console] UX Improvements for phase 2 (#190698) 2024-09-17 16:35:20 +03:00
analytics Add filters option to ftr_helper api (#196886) 2024-10-23 19:18:05 +02:00
api_integration [Saved Queries] Rework saved query privileges (#202863) 2025-01-29 17:34:58 -04:00
common Additional prototype pollution protections (#206073) 2025-01-28 23:00:43 +01:00
examples Remove bfetch explorer example plugin (#204284) 2024-12-16 10:28:58 -07:00
functional [Vega] Fix highlight for HJSON (#208858) 2025-02-03 14:18:35 +01:00
harden Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
health_gateway Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
interactive_setup_api_integration fix(tests, interactive setup): switch interactive setup tests config to non-deprecated secure_password setting (#205208) 2024-12-27 17:51:43 +01:00
interactive_setup_functional fix(tests, interactive setup): switch interactive setup tests config to non-deprecated secure_password setting (#205208) 2024-12-27 17:51:43 +01:00
interpreter_functional Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
node_roles_functional Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
package [CI / FIPS] Convert smoke tests to use FIPS agent (#186858) 2024-06-26 12:55:51 -07:00
plugin_functional [Search][Configuration] Remove Enterprise Search node values (#208856) 2025-01-30 13:28:26 -06:00
scripts [ci] Remove jenkins config (#173745) 2023-12-21 12:09:43 -06:00
server_integration Set HTTP2 as default is SSL is enabled and add deprecation log if SSL is not enabled or protocol is set to HTTP1 (#204384) 2025-01-03 10:21:32 +01:00
ui_capabilities/newsfeed_err Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kibana.jsonc Sustainable Kibana Architecture: Categorise straightforward packages (#199630) 2024-11-22 10:33:25 +01:00
tsconfig.json [Discover] In-table search (#206454) 2025-01-29 19:52:07 -04:00