kibana/packages
Jean-Louis Leysens e90c2098f2
[Http] Replace buildNr with buildSha in static asset paths (#175898)
## Summary

Follow up of [first CDN
PR](https://github.com/elastic/kibana/pull/169408). Primary focus is
replacing our build nr with SHA that allows cache busting and maintains
anti-collision properties.

## How to test

Start Kibana as usual navigating around the app with the network tab
open in your browser of choice. Keep an eye out for any asset loading
errors. It's tricky to test every possible asset since there are many
permutations, but generally navigating around Kibana should work exactly
as it did before regarding loading bundles and assets.

## Notes
* did a high-level audit of usages of `buildNum` in `packages`, `src`
and `x-pack` adding comments where appropriate.
* In non-distributable builds (like dev) static asset paths will be
prefixed with `XXXXXXXXXXXX` instead of Node's `Number.MAX_SAFE_INTEGER`
* Added some validation to ensure the CDN url is of the expected form:
nothing trailing the pathname

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### Risk Matrix

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| We break some first or third party dependencies on existing asset
routes | Med | High | Attempting to mitgate by serving static assets
from both old and new paths where paths have updated to include the
build SHA. Additioanlly: it is very bad practice to rely on the values
of the static paths, but someone might be |
| Cache-busting is more aggressive | High | Low | Unlikely to be a big
problem, but we are not scoping more static assets to a SHA and so every
new Kibana release will require clients to, for example, download fonts
again. |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-07 09:54:41 +01:00
..
analytics [Http] Replace buildNr with buildSha in static asset paths (#175898) 2024-02-07 09:54:41 +01:00
cloud [Cloud] Rename "Endpoints" to "Connection details" (#171982) 2023-11-27 15:58:42 +00:00
content-management [shared-ux] no-data analytics page package code cleanup (#172416) 2023-12-04 13:07:59 -07:00
core [Http] Replace buildNr with buildSha in static asset paths (#175898) 2024-02-07 09:54:41 +01:00
deeplinks [ES|QL] Bypass no data views screen (#174316) 2024-02-05 15:09:27 +01:00
default-nav [ML] Add support for ES|QL in Data visualizer (#174188) 2024-01-31 12:52:31 -06:00
home flag more packages without side effects (#173602) 2023-12-20 13:17:18 +01:00
kbn-ace Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-actions-types [RAM][Maintenance Window] Maintenance window scoped query frontend changes (#171949) 2023-12-04 15:18:33 -08:00
kbn-alerting-types [RAM] Add fields table to rule details page alert flyout (#172830) 2024-01-08 16:52:04 +01:00
kbn-alerts-as-data-utils Add criticality fields and risk score fields to alert schema (#174626) 2024-01-31 18:07:18 +01:00
kbn-alerts-ui-shared [RAM][Observability] Add alert fields table to Observability flyout (#174685) 2024-01-24 18:18:27 +01:00
kbn-ambient-common-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ambient-ftr-types [codeowners] add appex-qa for ftr-related packages (#155230) 2023-05-24 08:53:09 +02:00
kbn-ambient-storybook-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ambient-ui-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-analytics flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-apm-config-loader Remove outdated code comment (#173711) 2023-12-20 12:41:48 +01:00
kbn-apm-synthtrace [APM] Add table search to services, transactions and errors (#174490) 2024-01-30 15:07:46 +00:00
kbn-apm-synthtrace-client [APM] Add table search to services, transactions and errors (#174490) 2024-01-30 15:07:46 +00:00
kbn-apm-utils Update new codeowners for Obs team changes (#170182) 2023-11-08 14:30:17 +00:00
kbn-axe-config Removing component exceptions from axe-core validation config (#145059) 2023-11-28 18:29:12 -05:00
kbn-babel-preset Update Kibana code editor dependencies (#171720) 2024-01-25 10:30:02 +01:00
kbn-babel-register [kbn/babel-register] improve cache performance (#150261) 2023-02-06 19:50:42 -07:00
kbn-babel-transform [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-bazel-runner chore(NA): remove a small change to trigger risk-free backport (#160810) 2023-06-28 21:08:33 +01:00
kbn-bfetch-error @kbn/search-errors package (#171563) 2023-12-07 10:39:19 -07:00
kbn-calculate-auto feat(slo): add events chart (#170896) 2023-11-16 15:19:57 -05:00
kbn-calculate-width-from-char-count [Lens][Unified search] Auto expand comboboxes and popovers based on the content (#171573) 2023-11-28 13:13:43 +01:00
kbn-cases-components [Cases] Version cases and comment domain and apis (#161954) 2023-07-26 06:09:10 -07:00
kbn-cell-actions [Security Solution][Lens] Check filter action type to hide default filter actions in visualizations (#171284) 2023-11-20 15:33:31 +01:00
kbn-chart-icons [Lens] fix inconsistent annotation icon styles (#159542) 2023-06-21 09:18:48 +02:00
kbn-check-mappings-update-cli [Cloud Security] Add is_internal flag to fleet server hosts configuration (#175983) 2024-02-02 17:09:22 +01:00
kbn-ci-stats-core Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ci-stats-performance-metrics Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ci-stats-reporter [Ops] Upgrade to axios 1.4 (#163732) 2023-08-22 11:47:48 +02:00
kbn-ci-stats-shipper-cli [ci-stats] move shipper to a package, validate limits in on-merge job (#149474) 2023-01-25 08:20:40 -07:00
kbn-cli-dev-mode Enables preventing access to internal APIs (#156935) 2023-05-10 04:25:15 -07:00
kbn-code-owners Add script to check test file code ownership (#173411) 2023-12-18 17:41:39 +01:00
kbn-coloring [Lens] Fixes mispelled complementary palette (#176136) 2024-02-06 15:39:30 +02:00
kbn-config [Http] Replace buildNr with buildSha in static asset paths (#175898) 2024-02-07 09:54:41 +01:00
kbn-config-mocks [On-Week] Hot update of APM/EBT labels (#157093) 2023-08-31 14:36:20 +02:00
kbn-config-schema [config-schema] Add min and max options for Duration (#173494) 2023-12-19 13:36:54 +01:00
kbn-content-management-utils Migrate visualization, annotation, graph to saved_object_content_storage (#168520) 2023-10-13 21:57:26 -05:00
kbn-crypto [osquery] Setup E2E against Serverless ES, Kibana, Fleet server standalone and Elastic agents in Docker (#165415) 2023-09-29 03:33:06 -07:00
kbn-crypto-browser flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-custom-icons [Logs Explorer] Add resource column with tooltip (#175287) 2024-01-26 02:36:36 -07:00
kbn-custom-integrations flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-cypress-config Revert "Upgrade EUI to v88.3.0 (#166292)" 2023-09-18 18:37:13 -05:00
kbn-data-service [UnifiedFieldList] Convert from a plugin into a package (#158718) 2023-06-23 14:28:12 +02:00
kbn-data-stream-adapter [Security Solution] Data quality dashboard persistence (#173185) 2024-01-24 10:20:49 -07:00
kbn-datemath [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-dev-cli-errors Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-dev-cli-runner [Ops] Snapshot saved object migrations (#167983) 2023-10-11 09:47:15 +02:00
kbn-dev-proc-runner Fix typecheck foundations (#167060) 2023-09-25 16:28:56 -07:00
kbn-dev-utils [osquery] Setup E2E against Serverless ES, Kibana, Fleet server standalone and Elastic agents in Docker (#165415) 2023-09-29 03:33:06 -07:00
kbn-discover-utils [data views] Stored fields are always requested, we don't need logic around it (#171815) 2023-11-30 14:29:12 -06:00
kbn-doc-links Override main help URL for serverless (#176089) 2024-02-05 15:02:19 -08:00
kbn-docs-utils [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
kbn-dom-drag-drop Replace deprecated node-sass with sass #2 (#173942) 2023-12-28 10:35:17 -06:00
kbn-ebt-tools Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ecs [Logs Explorer] Display flyout field description (#173144) 2023-12-13 14:34:10 +01:00
kbn-elastic-agent-utils [Telemetry] Add opentelemetry/android as a valid APM agent name (#172898) 2023-12-11 12:02:08 -07:00
kbn-es [kbn-es] add required flag projectType for serverless script (#175549) 2024-02-02 16:42:02 +01:00
kbn-es-archiver [ES Archiver][Load Action] Add perf option override to cli (#175781) 2024-02-02 14:24:04 +00:00
kbn-es-errors Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-es-query [ES|QL] Bypass no data views screen (#174316) 2024-02-05 15:09:27 +01:00
kbn-es-types Make the drop_null_columns configurable in ES|QL search strategies (#176236) 2024-02-06 16:28:08 +02:00
kbn-eslint-config Add ESLint rule for Translations (#168001) 2023-10-16 18:34:50 +02:00
kbn-eslint-plugin-disable Clean up imports of ESLint types (#162436) 2023-07-25 10:09:55 +02:00
kbn-eslint-plugin-eslint Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-eslint-plugin-i18n [i18n ESLint Rule] Better cleaning of string values (#174360) 2024-01-08 05:01:58 -07:00
kbn-eslint-plugin-imports [Obs AI Assistant] Use Mocha & Synthtrace (#173993) 2023-12-28 16:13:24 +01:00
kbn-eslint-plugin-telemetry Update new codeowners for Obs team changes (#170182) 2023-11-08 14:30:17 +00:00
kbn-esql/src/antlr/.antlr [ES|QL] Update grammar based on ES changes (#172789) 2023-12-20 14:28:34 +01:00
kbn-esql-utils [ES|QL] Bypass no data views screen (#174316) 2024-02-05 15:09:27 +01:00
kbn-event-annotation-common [shared-ux] no-data analytics page package code cleanup (#172416) 2023-12-04 13:07:59 -07:00
kbn-event-annotation-components [Lens] fix annotation controls bug (#174951) 2024-01-26 08:22:47 -06:00
kbn-expandable-flyout [Security Solution][Flyout] Use kbn url storage provider, housekeeping (#175882) 2024-02-01 12:58:14 -07:00
kbn-expect [codeowners] add appex-qa for ftr-related packages (#155230) 2023-05-24 08:53:09 +02:00
kbn-failed-test-reporter-cli [Security Solution] JSON diff view for prebuilt rule upgrade flow (#172535) 2023-12-08 16:16:42 +01:00
kbn-field-types [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00
kbn-field-utils [ES|QL] Distinguish among empty and available fields (#174585) 2024-02-02 18:30:24 +02:00
kbn-find-used-node-modules [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-flot-charts Fix useless regex escapes (#150043) 2023-02-07 09:58:47 -07:00
kbn-ftr-common-functional-services [Security Solution] Unskip flaky tests in Prebuilt Rules FTR Integration tests (#173998) 2024-01-11 13:35:55 +01:00
kbn-ftr-common-functional-ui-services Upgrade selenium-webdriver to 4.17.0 (#175746) 2024-01-29 11:56:22 -07:00
kbn-ftr-screenshot-filename [codeowners] add appex-qa for ftr-related packages (#155230) 2023-05-24 08:53:09 +02:00
kbn-generate Remove kibana-design from the ultimate rule for scss files. (#157493) 2023-05-12 10:01:47 -05:00
kbn-generate-console-definitions [Console] Generate autocomplete definitions from ES specification (#163301) 2023-08-15 11:30:39 +02:00
kbn-generate-csv [Reporting] Support 'auto' value for csv scroll duration config (#175005) 2024-02-06 15:14:45 +01:00
kbn-get-repo-files [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-guided-onboarding Use theme instead of UISettings for darkMode access (#173639) 2023-12-21 10:50:36 -07:00
kbn-handlebars Adding check to escape pushes to output in kbn-handlebars (#175490) 2024-01-29 12:02:20 -05:00
kbn-hapi-mocks [HTTP] Allow for internal requests to also specify special query param elasticInternalOrigin (#163796) 2023-08-21 11:55:33 +02:00
kbn-health-gateway-server Clean up full errors being logged (#174440) 2024-01-09 11:35:12 +01:00
kbn-i18n [Lens] Move formula docs into separate package (#173770) 2024-01-02 16:02:46 +02:00
kbn-i18n-react Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-import-locator [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-import-resolver Fix @kbn/import-resolver detection of nested node_modules (#162391) 2023-07-25 10:09:05 +02:00
kbn-interpreter Fix eslint rule for restricting certain lodash imports (#151023) 2023-02-16 08:35:09 -07:00
kbn-io-ts-utils flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-jest-serializers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-journeys [kbn/journeys] fix hanging on telemetry call & improve logging (#175194) 2024-01-22 18:18:10 +01:00
kbn-json-ast [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-kibana-manifest-schema implement "plugin" package type (#149370) 2023-01-30 10:47:53 -07:00
kbn-language-documentation-popover flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-lens-embeddable-utils [Custom threshold rule] Use lens chart with annotations in alert details page (#175513) 2024-02-02 16:02:27 -07:00
kbn-lens-formula-docs [Lens] Move formula docs into separate package (#173770) 2024-01-02 16:02:46 +02:00
kbn-lint-packages-cli [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-lint-ts-projects-cli [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-logging flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-logging-mocks Limit download concurrency for files within Kibana (#168601) 2023-10-30 12:28:11 +01:00
kbn-managed-content-badge [Lens] Prevent overwriting managed content from editor (#175062) 2024-01-24 09:06:05 -06:00
kbn-managed-vscode-config Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-managed-vscode-config-cli Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-management [Infra] Add Host Details Dashboard advanced setting (#176143) 2024-02-05 11:28:42 -08:00
kbn-mapbox-gl [maps] fix layer shows no data instead of error (#170084) 2023-11-06 17:00:15 -07:00
kbn-mock-idp-plugin [mock-idp-plugin] add end-point to fetch roles from yml (#175439) 2024-01-26 13:37:16 -07:00
kbn-mock-idp-utils [mock-idp-plugin] add end-point to fetch roles from yml (#175439) 2024-01-26 13:37:16 -07:00
kbn-monaco [ES|QL] Added more tests for various scenarios (#176160) 2024-02-05 12:04:05 +01:00
kbn-object-versioning [Content Management] Server side client (#175968) 2024-02-05 04:37:32 -07:00
kbn-openapi-bundler [Security Solution] OpenAPI docs bundler (#171526) 2023-11-29 14:07:31 +01:00
kbn-openapi-generator [Security Solution] Write additional metadata when generating types using kbn-openapi-generator (#174718) 2024-01-18 09:36:51 -07:00
kbn-optimizer Rename log_explorer and observability_log_explorer plugins (#175510) 2024-01-26 16:10:27 +00:00
kbn-optimizer-webpack-helpers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-osquery-io-ts-types [EDR Workflows] Osquery Timeout (#169925) 2023-11-15 05:37:11 -07:00
kbn-panel-loader [Embeddable Refactor] Create Decoupled Presentation Panel (#172017) 2024-01-17 17:13:02 -05:00
kbn-peggy Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-peggy-loader Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-performance-testing-dataset-extractor [performance] use journey own ftr config to run scalability test (#152596) 2023-03-07 13:20:21 +01:00
kbn-picomatcher Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-plugin-check [dx] Dependency check script for plugins (#171483) 2024-01-17 17:19:41 -05:00
kbn-plugin-generator async-import plugins in the server side (#170856) 2023-11-15 00:55:56 -07:00
kbn-plugin-helpers fix(NA): skip plugin-helpers assets optimization when no ui (#173703) 2023-12-20 14:44:33 +00:00
kbn-profiling-utils [Profiling] Remove unused fields from stackframe metadata (#171151) 2024-01-16 21:38:35 -08:00
kbn-react-field [UnifiedFieldList] Fix item line breaks (#172954) 2023-12-09 10:01:06 +01:00
kbn-repo-file-maps [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-repo-info Add build_date to kbn:api/status (#157905) 2023-05-25 10:21:47 -07:00
kbn-repo-linter Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-repo-packages [Core plugin system] Add dynamic contract resolving (#167113) 2023-10-24 02:32:09 -07:00
kbn-repo-path [packages] prevent and remove basename collisions for js/ts code (#148835) 2023-01-12 12:29:30 -07:00
kbn-repo-source-classifier fix(NA): source classifier to indentify xml as static files (#164109) 2023-08-17 00:53:59 +01:00
kbn-repo-source-classifier-cli [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-reporting [Reporting] Support 'auto' value for csv scroll duration config (#175005) 2024-02-06 15:14:45 +01:00
kbn-resizable-layout [ResizableLayout] Remove onResizeEnd stable callback workaround (#176030) 2024-02-01 09:46:26 -04:00
kbn-rison [Security Solution] Global query string functionality improvements (#147218) 2023-01-05 18:02:12 +01:00
kbn-router-utils [Dataset quality] Open in Log explorer action (#173272) 2023-12-18 18:08:54 +01:00
kbn-rrule [RAM] Remove third party RRule library, replace with own timezone-compliant lib (#152873) 2023-07-02 17:03:45 -04:00
kbn-rule-data-utils [Response Ops][Alerting] AAD for alerting example rules (#174032) 2024-01-09 11:23:49 -05:00
kbn-safer-lodash-set Fix eslint rule for restricting certain lodash imports (#151023) 2023-02-16 08:35:09 -07:00
kbn-saved-objects-settings [Content Management] Remove dep from content_management -> saved_object_finder (#155013) 2023-04-17 16:25:58 +02:00
kbn-search-api-panels [Search] Fix issues with search hub and header (#173265) 2023-12-14 17:10:31 +01:00
kbn-search-connectors [Search] Fix connector config resetting without changes (#176235) 2024-02-06 15:08:19 +01:00
kbn-search-errors [lens] show 'View details' UI action to open clusters inspector tab when request fails (#172971) 2023-12-20 15:12:54 -07:00
kbn-search-index-documents [Search] Typography fixes to get consistency within Web Crawlers and Connectors sections (#175554) 2024-01-26 11:14:07 +01:00
kbn-search-response-warnings flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-autocomplete flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-ecs flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-es-utils flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-exception-list-components flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-grouping [Cloud Security] [Grouping] Add URL Params support to the grouping components (#175749) 2024-02-06 19:40:11 -08:00
kbn-securitysolution-hook-utils flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-io-ts-alerting-types flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-io-ts-list-types [Security Solution][Endpoint] script to load data into an environment for testing or development (#175132) 2024-01-30 16:14:09 +02:00
kbn-securitysolution-io-ts-types flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-io-ts-utils flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-list-api [Security Solution][Endpoint] Adapt exception list api calls to versioned router (#165658) 2023-09-07 17:35:15 +02:00
kbn-securitysolution-list-constants [Security Solution][Detection Engine] move lists to data stream (#162508) 2023-08-23 19:42:57 +01:00
kbn-securitysolution-list-hooks flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-list-utils flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-securitysolution-rules [Security Solution][Detection Engine] adds ES|QL rule type to Security Detections rules (#165450) 2023-09-30 09:45:34 +01:00
kbn-securitysolution-t-grid Upgrade EUI to v86.0.0 (#163088) 2023-08-14 15:45:09 -05:00
kbn-securitysolution-utils [ES|QL] Move helper functions to the esql-utils-package (#176055) 2024-02-02 11:23:22 +02:00
kbn-server-http-tools [HTTP Server] support TLS config hot reload via SIGHUP (#171823) 2023-11-24 10:05:27 +01:00
kbn-server-route-repository [Obs AI Assistant] E2E tests for conversation view (#173485) 2023-12-19 01:49:58 -07:00
kbn-set-map [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-shared-svg Update new codeowners for Obs team changes (#170182) 2023-11-08 14:30:17 +00:00
kbn-shared-ux-utility [Shared UX] Extract dynamic utility for lazy loading only (#175422) 2024-01-29 10:56:21 +01:00
kbn-some-dev-log Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-sort-package-json [sort-package-json] always ensure 2-space indent is used 2023-01-10 10:39:48 -07:00
kbn-sort-predicates [Lens] Datatable improvements (#174994) 2024-01-23 14:28:27 +01:00
kbn-spec-to-console [Console] Update dynamic parameters for the new script (#162917) 2023-08-04 06:42:41 -07:00
kbn-std flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-stdio-dev-helpers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-storybook Replace deprecated node-sass with sass #2 (#173942) 2023-12-28 10:35:17 -06:00
kbn-telemetry-tools [Telemetry Tools] Add support for ExportSpecifier in constrains (#171111) 2023-11-13 11:35:39 -07:00
kbn-test [kbn-es] add required flag projectType for serverless script (#175549) 2024-02-02 16:42:02 +01:00
kbn-test-eui-helpers Move EuiSuperDatePicker harness to test-eui-helpers (#174543) 2024-01-10 09:24:08 -06:00
kbn-test-jest-helpers [Lens] Add custom formatter within the Lens editor (#158468) 2023-06-13 13:08:07 +02:00
kbn-test-subj-selector [codeowners] add appex-qa for ftr-related packages (#155230) 2023-05-24 08:53:09 +02:00
kbn-text-based-editor [ResponseOps] Pass in the timefield for ES|QL test query (#176111) 2024-02-05 08:51:03 -08:00
kbn-timelion-grammar Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-tinymath Remove eslint-plugin-prefer-object-spread dependency (#162439) 2023-07-25 10:04:44 +02:00
kbn-tooling-log Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-triggers-actions-ui-types [RAM][Maintenance Window] Maintenance window scoped query frontend changes (#171949) 2023-12-04 15:18:33 -08:00
kbn-ts-projects [Synthetics/Uptime] Separate e2e tests by app (#152197) 2023-06-07 17:33:56 +02:00
kbn-ts-type-check-cli Fix typecheck foundations (#167060) 2023-09-25 16:28:56 -07:00
kbn-typed-react-router-config [APM] Add memoization to hooks consumed on service inventory page (#173973) 2024-01-12 09:57:03 -07:00
kbn-ui-actions-browser decouple url drilldown action from Embeddable framework (#175930) 2024-02-05 09:33:41 -07:00
kbn-ui-shared-deps-npm Update babel runtime helpers (#171745) 2024-01-02 22:22:22 -07:00
kbn-ui-shared-deps-src Update Kibana code editor dependencies (#171720) 2024-01-25 10:30:02 +01:00
kbn-ui-theme Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-unified-data-table [ES|QL] Distinguish among empty and available fields (#174585) 2024-02-02 18:30:24 +02:00
kbn-unified-doc-viewer [Log Explorer][Discover] Use DocViewsRegistry to add flyout Overview tab (#172364) 2023-12-18 09:59:48 +01:00
kbn-unified-field-list [ES|QL] Distinguish among empty and available fields (#174585) 2024-02-02 18:30:24 +02:00
kbn-unsaved-changes-badge Upgrade EUI to v91.0.0 (with backports) (#170716) 2023-12-18 11:15:15 -06:00
kbn-use-tracked-promise Update new codeowners for Obs team changes (#170182) 2023-11-08 14:30:17 +00:00
kbn-user-profile-components flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
kbn-utility-types [Serverless][Security Solution][Endpoint] Restrict endpoint exceptions on serverless via plugin sub-features (#164107) 2023-08-31 13:35:42 +02:00
kbn-utility-types-jest [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-utils Revert "fix/142865/path.data config unused (#158426)" (#172951) 2023-12-08 10:22:21 -06:00
kbn-validate-next-docs-cli [validate-next-docs] declare how github urls are determined 2023-02-10 10:54:20 -06:00
kbn-visualization-ui-components [Lens] fix annotation controls bug (#174951) 2024-01-26 08:22:47 -06:00
kbn-visualization-utils [Obs ai assistant][ESQL] Visualizes a query (#174677) 2024-02-05 17:55:13 +02:00
kbn-web-worker-stub Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-whereis-pkg-cli [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-xstate-utils [Logs+] Refactor state and URL persistence of Log Explorer (#170200) 2023-12-11 14:56:44 +01:00
kbn-yarn-lock-validator [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
kbn-zod-helpers flag packages without side effects (#173351) 2023-12-19 02:46:39 -07:00
presentation [Embeddables rebuild] Add new registry (#176018) 2024-02-02 15:10:19 -05:00
react Consolidate shared ux team dev docs (#172966) 2023-12-11 15:20:23 +01:00
serverless [Infra] Add Host Details Dashboard advanced setting (#176143) 2024-02-05 11:28:42 -08:00
shared-ux [CodeEditor/UrlDrilldown] Add fitToContent support, autoresize the url template editor (#175561) 2024-02-06 15:38:50 +01:00
README.md create @kbn/ui-actions-browser package (#149202) 2023-01-19 18:28:07 +01:00

Kibana-related packages

This folder contains packages that are intended for use in Kibana and Kibana plugins.

tl;dr:

  • Don't publish to npm registry
  • Always use the @kbn namespace
  • Always set "private": true in package.json

Using these packages

We no longer publish these packages to the npm registry. Now, instead of specifying a version when including these packages, we rely on yarn workspaces, which sets up a symlink to the package.

For example if you want to use the @kbn/i18n package in Kibana itself, you can specify the dependency like this:

"@kbn/i18n": "1.0.0"

However, if you want to use this from a Kibana plugin, you need to use a link: dependency and account for the relative location of the Kibana repo, so it would instead be:

"@kbn/i18n": "link:../../kibana/packages/kbn-i18n"

then run yarn kbn bootstrap from the plugin directory.

Creating a new package

Run the following command from the root of the Kibana repo:

node scripts/generate package @kbn/<PACKAGE_NAME> --web --owner @elastic/<TEAM_NAME>

Unit tests for a package

Currently there is only one tool being used in order to test packages which is Jest. Below we will explain how it should be done.

Jest

A package should follow the pattern of having .test.js files as siblings of the source code files, and these run by Jest.

A package using the .test.js naming convention will have those tests automatically picked up by Jest and run by the unit test runner, currently mapped to the Kibana test script in the root package.json.

  • yarn test runs all unit tests.
  • yarn jest runs all Jest tests in Kibana.

In order for the plugin or package to use Jest, a jest.config.js file must be present in it's root. However, there are safeguards for this in CI should a test file be added without a corresponding config file.


Each package can also specify its own test script in the package's package.json, for cases where you'd prefer to run the tests from the local package directory.