kibana/packages
2022-03-23 07:16:42 -05:00
..
elastic-apm-synthtrace APM Synthtrace: Introduce new DSL using generators (#123454) 2022-03-08 12:18:15 +01:00
elastic-datemath [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
elastic-eslint-config-kibana chore(NA): upgrade typescript-eslint packages to v5.14.0 (#127275) 2022-03-10 22:44:06 +00:00
elastic-safer-lodash-set chore(NA): splits types from code on @elastic/safer-lodash-set (#122697) 2022-01-12 19:10:36 +00:00
kbn-ace [type-summarizer] summarize types with source-maps for @kbn/ace (#127680) 2022-03-18 16:44:16 +01:00
kbn-alerts [type-summarizer] summarize @kbn/alerts types with source-maps (#128191) 2022-03-21 12:17:36 -07:00
kbn-analytics [type-summarizer] enable @kbn/analytics, @kbn/apm-config-loader and @kbn/apm-utils (#128206) 2022-03-22 16:28:49 -06:00
kbn-apm-config-loader [type-summarizer] enable @kbn/analytics, @kbn/apm-config-loader and @kbn/apm-utils (#128206) 2022-03-22 16:28:49 -06:00
kbn-apm-utils [type-summarizer] enable @kbn/analytics, @kbn/apm-config-loader and @kbn/apm-utils (#128206) 2022-03-22 16:28:49 -06:00
kbn-babel-code-parser [eslint] automatically determine dev packages (#127089) 2022-03-08 07:42:06 -06:00
kbn-babel-preset [emotion] Output meaningful classnames in dev mode (#127531) 2022-03-11 11:58:24 -06:00
kbn-bazel-packages [bazel/packages] make package discovery dirs easier to extend (#127836) 2022-03-16 08:57:29 -06:00
kbn-cli-dev-mode [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-config [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-config-schema [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-crypto [ts] enable sourcemaps in summarized types of @kbn/crypto (#126410) 2022-03-04 08:02:02 -06:00
kbn-dev-utils [vscode] automatically disable repo discovery (#127985) 2022-03-17 11:24:52 -07:00
kbn-doc-links [Workplace Search] Update UX for custom api source creation flow (#127155) 2022-03-22 12:26:29 -07:00
kbn-docs-utils [shared-ux] Migrate redirect app links component (#124197) 2022-03-14 10:26:15 -07:00
kbn-es Extend yarn es: plugin support + adding secure files to es keystore (#126938) 2022-03-09 11:11:34 +01:00
kbn-es-archiver [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-es-query Remove export * from kbn/es-query package (#126942) 2022-03-16 15:25:26 -07:00
kbn-eslint-import-resolver-kibana chore(NA): use internal pkg_npm on @kbn/eslint-import-resolver-kibana (#120786) 2021-12-08 10:48:49 -07:00
kbn-eslint-plugin-eslint chore(NA): use internal pkg_npm on @kbn/eslint-plugin-eslint (#120940) 2021-12-10 02:45:33 +00:00
kbn-expect chore(NA): use internal pkg_npm on @kbn/expect (#120941) 2021-12-10 02:45:49 +00:00
kbn-field-types [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-flot-charts Tweak Canvas plot renderer (#126862) 2022-03-04 10:00:03 -05:00
kbn-generate [generate/package] include react type for web packages (#128082) 2022-03-18 11:51:27 -07:00
kbn-i18n [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-i18n-react [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-interpreter [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-io-ts-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-logging [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-logging-mocks [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-mapbox-gl [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-monaco [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-optimizer hasData service (#127068) 2022-03-17 11:45:02 -07:00
kbn-plugin-generator [eslint] automatically determine dev packages (#127089) 2022-03-08 07:42:06 -06:00
kbn-plugin-helpers [plugin-helpers] Skip build.test.ts log matching on ci-stats service (#127560) 2022-03-14 09:06:26 -05:00
kbn-pm Bump minimist from v1.2.5 to v1.2.6 (#128348) 2022-03-23 07:16:42 -05:00
kbn-react-field [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-rule-data-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-autocomplete [Security Solution][Endpoint] Update warning text for event filter matches operator (#127958) 2022-03-17 13:10:28 -07:00
kbn-securitysolution-es-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-hook-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-io-ts-alerting-types [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-io-ts-list-types [Security Solution][Endpoint] Adds matches wildcard operator for file.path.text field for Event Filters (#125202) 2022-03-02 11:55:58 -07:00
kbn-securitysolution-io-ts-types [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-io-ts-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-list-api [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-list-constants [Security Solution] add blocklist list (#126390) 2022-03-01 09:46:13 -06:00
kbn-securitysolution-list-hooks [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-list-utils [Security Solution][Endpoint] Adds matches wildcard operator for file.path.text field for Event Filters (#125202) 2022-03-02 11:55:58 -07:00
kbn-securitysolution-rules [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-t-grid [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-securitysolution-utils [Security Solution][Endpoint] Update warning text for event filter matches operator (#127958) 2022-03-17 13:10:28 -07:00
kbn-server-http-tools [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-server-route-repository [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-shared-ux-components [shared-ux] Migrate add from library button to shared ux directory (#127605) 2022-03-22 12:47:05 -07:00
kbn-shared-ux-services [Telemetry] Move privacy statement URL to doc links (#126597) 2022-03-18 10:56:38 +01:00
kbn-shared-ux-storybook [sharedUX] Move to Package-based Architecture (#127546) 2022-03-16 17:13:58 -04:00
kbn-shared-ux-utility [sharedUX] Move to Package-based Architecture (#127546) 2022-03-16 17:13:58 -04:00
kbn-spec-to-console chore(NA): use internal pkg_npm on @kbn/spec-to-console (#121812) 2021-12-22 03:21:00 +00:00
kbn-std [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-storybook Fix Storybook background/grid selection (#125961) 2022-03-19 09:29:49 -05:00
kbn-telemetry-tools chore(NA): upgrade typescript-eslint packages to v5.14.0 (#127275) 2022-03-10 22:44:06 +00:00
kbn-test [reporting/upgrade/tests] rewrite waitForJobToFinish to handle errors (#128309) 2022-03-22 14:55:37 -07:00
kbn-test-jest-helpers [eslint] automatically determine dev packages (#127089) 2022-03-08 07:42:06 -06:00
kbn-test-subj-selector chore(NA): use internal pkg_npm on @kbn/test-subj-selector (#121839) 2021-12-22 14:00:50 -07:00
kbn-timelion-grammar chore(NA): use internal pkg_npm on @kbn/timelion-grammar (#121840) 2021-12-22 09:36:21 -07:00
kbn-tinymath chore(NA): use internal pkg_npm on @kbn/tinymath (#121920) 2021-12-23 02:53:20 +00:00
kbn-type-summarizer [type-summarizer] enable @kbn/analytics, @kbn/apm-config-loader and @kbn/apm-utils (#128206) 2022-03-22 16:28:49 -06:00
kbn-typed-react-router-config [APM] Improve error message for route matching (#126455) 2022-03-01 14:49:27 +01:00
kbn-ui-framework chore(NA): use internal pkg_npm on @kbn/ui-framework (#121922) 2021-12-23 02:53:36 +00:00
kbn-ui-shared-deps-npm [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-ui-shared-deps-src [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-ui-theme [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-utility-types [eslint] automatically determine dev packages (#127089) 2022-03-08 07:42:06 -06:00
kbn-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
BUILD.bazel [sharedUX] Move to Package-based Architecture (#127546) 2022-03-16 17:13:58 -04:00
README.md Remove grunt (#111882) 2021-09-16 15:24:42 -04: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"

How all of this works is described in more detail in the @kbn/pm docs.

Creating a new package

Create a new sub-folder. The name of the folder should mirror the name in the package's package.json. E.g. if the name is @kbn/i18n the folder name should be kbn-i18n.

All new packages should use the @kbn namespace, and should be marked with "private": true.

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.