kibana/packages
Stacey Gammon 2d982c0070
Update api docs (#123839)
* Support the docs scripts knowing which json files are specifically for dev docs.

* Update jest snapshot docs

* Update api docs
2022-01-27 09:48:49 -05:00
..
elastic-apm-synthtrace [APM] Add scenario options for synthtrace (#121034) 2022-01-17 11:36:04 +01:00
elastic-datemath chore(NA): creates pkg_npm_types bazel rule (#116465) 2021-11-16 00:07:49 +00:00
elastic-eslint-config-kibana chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313) 2022-01-20 22:04:19 +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 chore(NA): splits types from code on @kbn/ace (#118950) 2021-11-19 14:30:33 +00:00
kbn-alerts Upgrade Typescript to 4.3.5 (#104470) 2021-12-02 16:27:41 -08:00
kbn-analytics chore(NA): splits types from code on @kbn/analytics (#119869) 2021-11-30 14:24:12 +00:00
kbn-apm-config-loader chore(NA): splits types from code on @elastic/safer-lodash-set (#122697) 2022-01-12 19:10:36 +00:00
kbn-apm-utils chore(NA): splits types from code on @kbn/apm-utils (#119977) 2021-11-30 18:14:05 +00:00
kbn-babel-code-parser chore(NA): use internal pkg_npm on @kbn/babel-code-parser (#120121) 2021-12-01 17:28:38 +00:00
kbn-babel-preset chore(NA): use internal pkg_npm on @kbn/babel-preset (#120123) 2021-12-02 02:34:59 +00:00
kbn-cli-dev-mode chore(NA): splits types from code on @kbn/utils (#121924) 2021-12-23 03:18:10 +00:00
kbn-config Remove default value for deprecation level (#123411) 2022-01-26 08:02:33 +01:00
kbn-config-schema Fix ByteSizeValue parser to be consistent with Elasticsearch (#120653) 2021-12-08 20:46:29 +01:00
kbn-crypto chore(NA): splits types from code on @kbn/dev-utils (#120531) 2021-12-07 20:12:18 +00:00
kbn-dev-utils [ftr] support filtering tests by es version (#123289) 2022-01-19 15:46:32 -07:00
kbn-docs-utils Update api docs (#123839) 2022-01-27 09:48:49 -05:00
kbn-es Resolves errors preventing ES snapshot promotion (#123649) 2022-01-26 10:11:36 -06:00
kbn-es-archiver [ftr] support filtering tests by es version (#123289) 2022-01-19 15:46:32 -07:00
kbn-es-query [Canvas] Remove filters function (#119044) 2022-01-14 10:23:27 -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 chore(NA): splits types from code on @kbn/field-types (#121077) 2021-12-13 21:18:16 +00:00
kbn-flot-charts chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313) 2022-01-20 22:04:19 +00:00
kbn-i18n chore(NA): splits types from code on @kbn/i18n (#119256) 2021-11-24 17:18:03 +00:00
kbn-i18n-react chore(NA): splits types from code on @kbn/i18n (#119256) 2021-11-24 17:18:03 +00:00
kbn-interpreter Note the author in some packages so "owner" attribute is filled in for ci stats. (#123867) 2022-01-26 16:00:42 -05:00
kbn-io-ts-utils chore(NA): splits types from code on @kbn/io-ts-utils (#123431) 2022-01-21 00:17:38 +00:00
kbn-logging chore(NA): splits types from code on @kbn/std (#121815) 2021-12-22 09:45:10 +01:00
kbn-mapbox-gl chore(NA): splits types from code on @kbn/mapbox-gl (#121078) 2021-12-14 09:29:52 -05:00
kbn-monaco chore(NA): splits types from code on @kbn/monaco (#121423) 2021-12-17 03:16:20 +00:00
kbn-optimizer chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313) 2022-01-20 22:04:19 +00:00
kbn-plugin-generator chore(NA): splits types from code on @kbn/utils (#121924) 2021-12-23 03:18:10 +00:00
kbn-plugin-helpers [plugin-helpers/tests] filter out ci-stats warnings (#123510) 2022-01-20 15:19:13 -07:00
kbn-pm Move bazel remote cache token to a space that more employees have access to (#123402) 2022-01-19 13:40:07 -07:00
kbn-react-field chore(NA): splits types from code on @kbn/react-field (#121516) 2021-12-20 18:43:53 +00:00
kbn-rule-data-utils [RAC][Alerting][Security Solution] Adds Rule Execution UUID (#113058) 2022-01-20 18:47:36 -07:00
kbn-securitysolution-autocomplete [dataViews] no more IndexPatternBase, IndexPatternFieldBase (#121836) 2021-12-22 08:46:21 -06:00
kbn-securitysolution-es-utils chore(NA): splits types from code on @kbn/securitysolution-es-utils (#121664) 2021-12-21 02:05:23 +00:00
kbn-securitysolution-hook-utils chore(NA): splits types from code on @kbn/securitysolution-hook-utils (#121669) 2021-12-21 02:10:29 +00:00
kbn-securitysolution-io-ts-alerting-types [Security Solution] [Platform] Migrate pre-8.0 action connector ids in rule params on import to post-8.0 _id (#120975) 2022-01-04 18:12:22 -05:00
kbn-securitysolution-io-ts-list-types [Security Solution][Endpoint] Update list api summary endpoint to use filter (#123476) 2022-01-26 12:58:53 -07:00
kbn-securitysolution-io-ts-types [Security Solution][Lists][Platform] - Fixes import rules modal to work with latest added exceptions import functionality (#120837) 2021-12-22 13:04:36 -07:00
kbn-securitysolution-io-ts-utils chore(NA): splits types from code on @kbn/securitysolution-io-ts-utils (#121677) 2021-12-21 17:24:58 -07:00
kbn-securitysolution-list-api chore(NA): splits types from code on @kbn/securitysolution-io-ts-utils (#121677) 2021-12-21 17:24:58 -07:00
kbn-securitysolution-list-constants chore(NA): splits types from code on @kbn/securitysolution-list-constants (#121683) 2021-12-21 04:00:46 +00:00
kbn-securitysolution-list-hooks chore(NA): splits types from code on @kbn/securitysolution-io-ts-utils (#121677) 2021-12-21 17:24:58 -07:00
kbn-securitysolution-list-utils [dataViews] no more IndexPatternBase, IndexPatternFieldBase (#121836) 2021-12-22 08:46:21 -06:00
kbn-securitysolution-rules chore(NA): splits types from code on @kbn/securitysolution-rules (#121692) 2021-12-21 04:25:19 +00:00
kbn-securitysolution-t-grid chore(NA): splits types from code on @kbn/securitysolution-t-grid (#121693) 2021-12-21 04:29:31 +00:00
kbn-securitysolution-utils [Security Solution][Detections] Rule execution logging overhaul (#121644) 2022-01-21 00:17:26 +03:00
kbn-server-http-tools chore(NA): splits types from code on @kbn/server-http-tools (#121807) 2021-12-22 02:37:29 +00:00
kbn-server-route-repository [APM] Explicit return types for routes (#123266) 2022-01-25 03:28:56 -07: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 chore(NA): splits types from code on @kbn/utility-types (#121923) 2021-12-23 02:55:13 +00:00
kbn-storybook Note the author in some packages so "owner" attribute is filled in for ci stats. (#123867) 2022-01-26 16:00:42 -05:00
kbn-telemetry-tools chore(NA): splits types from code on @kbn/utility-types (#121923) 2021-12-23 02:55:13 +00:00
kbn-test Note the author in some packages so "owner" attribute is filled in for ci stats. (#123867) 2022-01-26 16:00:42 -05: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-typed-react-router-config [APM] Simplify browser router types (#123549) 2022-01-24 13:02:47 +00: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 chore(NA): splits types from code on @kbn/ui-shared-deps-npm (#122788) 2022-01-13 02:23:18 +00:00
kbn-ui-shared-deps-src chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313) 2022-01-20 22:04:19 +00:00
kbn-ui-theme chore(NA): splits types from code on @kbn/ui-shared-deps-src (#123313) 2022-01-20 22:04:19 +00:00
kbn-utility-types use native Awaited instead of manually unwrapping types (#121781) 2021-12-23 14:55:39 +02:00
kbn-utils chore(NA): splits types from code on @kbn/utils (#121924) 2021-12-23 03:18:10 +00:00
BUILD.bazel chore(NA): splits types from code on @kbn/io-ts-utils (#123431) 2022-01-21 00:17:38 +00: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.