kibana/packages
Kibana Machine 6f97f07cbc
[Security Solution] [Platform] Migrate pre-8.0 action connector ids in rule params on import to post-8.0 _id (#120975) (#122302)
Security Solution import route needed to find actions where the action SO id was the old, pre-8.0 _id so we find references to the _id and the originId to make sure the rule we are importing will not error out.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
2022-01-04 17:55:06 -07:00
..
elastic-apm-synthtrace [8.0] [APM] Display relevant anomalies (#119709) (#120112) 2021-12-02 08:32:40 +01:00
elastic-datemath chore(NA): creates pkg_npm_types bazel rule (#116465) (#118640) 2021-11-15 18:40:16 -07:00
elastic-eslint-config-kibana chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
elastic-safer-lodash-set Updates Github link references from master to main (#116789) (#116791) 2021-10-29 10:07:44 -07:00
kbn-ace chore(NA): splits types from code on @kbn/ace (#118950) (#119171) 2021-11-24 10:22:34 -07:00
kbn-alerts chore(NA): splits types from code on @kbn/alerts (#119855) (#119872) 2021-11-29 12:35:17 -07:00
kbn-analytics chore(NA): splits types from code on @kbn/analytics (#119869) (#119969) 2021-11-30 08:43:33 -07:00
kbn-apm-config-loader mock elastic-apm-node in @kbn/test jest preset (#120324) (#120574) 2021-12-07 01:37:19 -07:00
kbn-apm-utils chore(NA): splits types from code on @kbn/apm-utils (#119977) (#120002) 2021-11-30 12:33:29 -07:00
kbn-babel-code-parser chore(NA): use internal pkg_npm on @kbn/babel-code-parser (#120121) (#120138) 2021-12-01 11:47:16 -07:00
kbn-babel-preset chore(NA): use internal pkg_npm on @kbn/babel-preset (#120123) (#120191) 2021-12-01 20:58:24 -07:00
kbn-cli-dev-mode [Reporting] Decouple screenshotting plugin from the reporting (#120110) (#120937) 2021-12-09 09:49:57 -07:00
kbn-config @kbn/config: Clear empty-object properties after their props are unset (#120889) (#121161) 2021-12-14 03:40:01 -07:00
kbn-config-schema Fix ByteSizeValue parser to be consistent with Elasticsearch (#120653) (#120828) 2021-12-08 14:04:16 -07:00
kbn-crypto chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-dev-utils Surfacing deprecations with rich context from ES warning header (#120044) (#120800) 2021-12-08 11:53:17 -07:00
kbn-docs-utils chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-es [kbn-es] Allow ES snapshot version mismatch with Kibana (#120942) (#121339) 2021-12-15 12:38:11 -07:00
kbn-es-archiver Support system indices being hidden (#120985) (#121007) 2021-12-09 15:43:15 -07:00
kbn-es-query [8.0] chore(NA): splits types from code on @kbn/es-query (#120783) (#120861) 2021-12-08 21:34:54 -07:00
kbn-eslint-import-resolver-kibana chore(NA): use internal pkg_npm on @kbn/eslint-import-resolver-kibana (#120786) (#120805) 2021-12-08 12:09:15 -07:00
kbn-eslint-plugin-eslint chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-expect [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
kbn-field-types [8.0] [eslint] enable type-specific lint rules (#114184) (#117444) 2021-11-04 03:02:56 +00:00
kbn-i18n [8.0] chore(NA): splits types from code on @kbn/i18n (#119256) (#119649) 2021-11-24 12:19:43 -07:00
kbn-i18n-react [8.0] chore(NA): splits types from code on @kbn/i18n (#119256) (#119649) 2021-11-24 12:19:43 -07:00
kbn-interpreter [8.0] [eslint] enable type-specific lint rules (#114184) (#117444) 2021-11-04 03:02:56 +00:00
kbn-io-ts-utils chore(NA): splits types from code on @kbn/config-schema (#120385) (#120417) 2021-12-03 15:49:49 -07:00
kbn-logging Revert "Include tracing information in the Kibana logs (#112973) (#119567) 2021-11-24 13:03:37 +01:00
kbn-mapbox-gl chore(NA): replace babel config files by inline presets by default in the jsts_transpiler rule (#110620) 2021-09-03 21:17:46 +01:00
kbn-monaco [8.0] chore(NA): splits types from code on @kbn/i18n (#119256) (#119649) 2021-11-24 12:19:43 -07:00
kbn-optimizer [Reporting] Decouple screenshotting plugin from the reporting (#120110) (#120937) 2021-12-09 09:49:57 -07:00
kbn-plugin-generator chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-plugin-helpers chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-pm Surfacing deprecations with rich context from ES warning header (#120044) (#120800) 2021-12-08 11:53:17 -07:00
kbn-rule-data-utils [Security Solution] Remove extra rule fields from kibana.alert.rule (#121135) (#121571) 2021-12-17 16:28:41 -07:00
kbn-securitysolution-autocomplete [8.0] chore(NA): splits types from code on @kbn/es-query (#120783) (#120861) 2021-12-08 21:34:54 -07:00
kbn-securitysolution-es-utils [Security Solution] Only apply field aliases to legacy .siem-signals indices (#115290) (#116838) 2021-10-30 01:51:51 +01:00
kbn-securitysolution-hook-utils Increases the timeout for the test from default 1 second. (#117389) (#117533) 2021-11-04 16:34:23 +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) (#122302) 2022-01-04 17:55:06 -07:00
kbn-securitysolution-io-ts-list-types [8.0] [Security Solution][Platform] - Exceptions imports (#118816) (#120824) 2021-12-12 18:39:41 -08:00
kbn-securitysolution-io-ts-types [8.0] [Security Solution][Lists][Platform] - Fixes import rules modal to work with latest added exceptions import functionality (#120837) (#122175) 2021-12-30 16:43:11 -07:00
kbn-securitysolution-io-ts-utils chore(NA): creates pkg_npm_types bazel rule (#116465) (#118640) 2021-11-15 18:40:16 -07:00
kbn-securitysolution-list-api Fixing exceptions export format (#114920) 2021-10-13 23:32:43 -04:00
kbn-securitysolution-list-constants [8.0] [ci] Run Jest tests in parallel (#117188) (#118123) 2021-11-09 21:58:42 -05:00
kbn-securitysolution-list-hooks [Security Solutions] Fix host isolation exception list showing up on the exceptions list (#114987) 2021-10-15 15:30:42 -04:00
kbn-securitysolution-list-utils [8.0] chore(NA): splits types from code on @kbn/es-query (#120783) (#120861) 2021-12-08 21:34:54 -07:00
kbn-securitysolution-rules [8.0] [ci] Run Jest tests in parallel (#117188) (#118123) 2021-11-09 21:58:42 -05:00
kbn-securitysolution-t-grid [RAC][Observability] Use flattened type for rule params in Observability (#120758) (#121503) 2021-12-17 05:52:47 -07:00
kbn-securitysolution-utils Fixing exceptions export format (#114920) 2021-10-13 23:32:43 -04:00
kbn-server-http-tools chore(NA): splits types from code on @kbn/config-schema (#120385) (#120417) 2021-12-03 15:49:49 -07:00
kbn-server-route-repository chore(NA): splits types from code on @kbn/config-schema (#120385) (#120417) 2021-12-03 15:49:49 -07:00
kbn-spec-to-console Updates Github link references from master to main (#116789) (#116791) 2021-10-29 10:07:44 -07:00
kbn-std [8.0] [eslint] enable type-specific lint rules (#114184) (#117444) 2021-11-04 03:02:56 +00:00
kbn-storybook chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-telemetry-tools chore(NA): splits types from code on @kbn/dev-utils (#120531) (#120676) 2021-12-07 16:34:41 -07:00
kbn-test [8.0] [Fleet] Add installed_kibana_space_id to epm-packages saved objects (#120517) (#121553) 2021-12-20 04:13:47 -07:00
kbn-test-subj-selector [build_ts_refs] improve caches, allow building a subset of projects (#107981) 2021-08-10 22:12:45 -07:00
kbn-timelion-grammar [timelion] Move grammar to package (#111881) 2021-09-15 20:22:15 -04:00
kbn-tinymath [DX] Upgrade prettier to v2.4.0 (#112359) 2021-09-19 22:34:30 -07:00
kbn-typed-react-router-config [APM] Revert kbn/typed-react-router-config changes (#120581) (#120586) 2021-12-07 05:05:19 -07:00
kbn-ui-framework [jest] update config files to get coverage per plugin (#111299) 2021-09-09 08:14:56 +02:00
kbn-ui-shared-deps-npm [storybook] upgrade to 6.3.x (#119498) (#120047) 2021-11-30 18:43:28 -07:00
kbn-ui-shared-deps-src chore(NA): use internal pkg_npm on @kbn/babel-preset (#120123) (#120191) 2021-12-01 20:58:24 -07:00
kbn-utility-types [8.0] [eslint] enable type-specific lint rules (#114184) (#117444) 2021-11-04 03:02:56 +00:00
kbn-utils chore(NA): splits types from code on @kbn/config-schema (#120385) (#120417) 2021-12-03 15:49:49 -07:00
BUILD.bazel [8.0] chore(NA): splits types from code on @kbn/es-query (#120783) (#120861) 2021-12-08 21:34:54 -07: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.