kibana/packages
Kibana Machine f2a5cb5f31
chore(NA): add missing browser targets on @kbn/security-solution packages (#110260) (#110323)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-26 21:24:34 +00:00
..
elastic-datemath [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
elastic-eslint-config-kibana chore(NA): moving @kbn/es-query to babel transpiler (#107281) (#107318) 2021-07-30 16:02:22 -04:00
elastic-safer-lodash-set [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-ace [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-alerts chore(NA): moving @kbn/alerts to babel transpiler (#109320) (#109563) 2021-08-20 21:15:09 -04:00
kbn-analytics [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-apm-config-loader [perf-testing] send detailed APM data from report generation (#107592) (#108257) 2021-08-11 17:12:00 -04:00
kbn-apm-utils [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-babel-code-parser chore(NA): moving @kbn/babel-code-parser to babel transpiler (#107574) (#107599) 2021-08-03 23:27:39 +00:00
kbn-babel-preset chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843) (#110157) 2021-08-25 20:34:56 -04:00
kbn-cli-dev-mode [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-config [7.x] chore(NA): moving @kbn/logging to babel transpiler (#108702) (#109412) 2021-08-20 17:19:02 +00:00
kbn-config-schema [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-crypto chore(NA): moving @kbn/crypto to babel transpiler (#108189) (#108313) 2021-08-12 00:34:02 -04:00
kbn-dev-utils [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-docs-utils chore(NA): moving @kbn/docs-utils to babel transpiler (#108190) (#108705) 2021-08-16 12:47:13 -04:00
kbn-es Enable Product check from @elastic/elasticsearch-js (#107663) (#110250) 2021-08-26 16:59:25 +00:00
kbn-es-archiver chore(NA): moving @kbn/es-archiver to babel transpiler (#108370) (#108575) 2021-08-13 16:02:12 -04:00
kbn-es-query [Data][Es Query] Use ES types in Filters (#108378) (#109793) 2021-08-24 07:56:17 -04:00
kbn-eslint-import-resolver-kibana chore(NA): moving @kbn/eslint-import-resolver-kibana into bazel (#98798) (#98972) 2021-04-30 17:15:19 -04:00
kbn-eslint-plugin-eslint Enable CSS-in-JS styling with emotion (#98157) (#105223) 2021-07-12 12:23:24 -04:00
kbn-expect [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-field-types [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-i18n [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-interpreter chore(NA): moving @kbn/interpreter to babel transpiler (#108512) (#109410) 2021-08-20 09:55:04 -04:00
kbn-io-ts-utils chore(NA): moving @kbn/io-ts-utils to babel transpiler (#108517) (#108576) 2021-08-13 20:04:48 +00:00
kbn-legacy-logging chore(NA): moving @kbn/legacy-logging to babel transpiler (#108703) (#109001) 2021-08-17 23:53:06 +00:00
kbn-logging [7.x] chore(NA): moving @kbn/logging to babel transpiler (#108702) (#109412) 2021-08-20 17:19:02 +00:00
kbn-mapbox-gl chore(NA): moving @kbn/mapbox-gl to babel transpiler (#109082) (#109164) 2021-08-18 18:15:20 -04:00
kbn-monaco [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-optimizer chore(NA): moving @kbn/securitysolution-io-ts-types to babel transpiler (#110097) (#110322) 2021-08-26 17:19:50 -04:00
kbn-plugin-generator chore(NA): moving @kbn/plugin-generator to babel transpiler (#109083) (#109230) 2021-08-19 09:52:50 -04:00
kbn-plugin-helpers chore(NA): moving @kbn/plugin-helpers to babel transpiler (#109085) (#109302) 2021-08-19 23:33:03 +00:00
kbn-pm chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843) (#110157) 2021-08-25 20:34:56 -04:00
kbn-rule-data-utils [RAC] Populate common rule fields in alert helpers (#108679) (#110232) 2021-08-26 15:50:24 +00:00
kbn-securitysolution-autocomplete chore(NA): moving @kbn/securitysolution-autocomplete to babel transpiler (#109423) (#109570) 2021-08-21 02:27:10 -04:00
kbn-securitysolution-es-utils chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler (#109426) (#109674) 2021-08-23 13:13:28 -04:00
kbn-securitysolution-hook-utils chore(NA): add missing browser targets on @kbn/security-solution packages (#110260) (#110323) 2021-08-26 21:24:34 +00:00
kbn-securitysolution-io-ts-alerting-types chore(NA): add missing browser targets on @kbn/security-solution packages (#110260) (#110323) 2021-08-26 21:24:34 +00:00
kbn-securitysolution-io-ts-list-types chore(NA): moving @kbn/securitysolution-io-ts-list-types to babel transpile (#109750) (#110296) 2021-08-26 15:29:07 -04:00
kbn-securitysolution-io-ts-types chore(NA): moving @kbn/securitysolution-io-ts-types to babel transpiler (#110097) (#110322) 2021-08-26 17:19:50 -04:00
kbn-securitysolution-io-ts-utils chore(NA): moving @kbn/securitysolution-io-ts-utils to babel transpiler (#110099) (#110301) 2021-08-26 19:52:29 +00:00
kbn-securitysolution-list-api [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-securitysolution-list-constants [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-securitysolution-list-hooks [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-securitysolution-list-utils [Data][Es Query] Use ES types in Filters (#108378) (#109793) 2021-08-24 07:56:17 -04:00
kbn-securitysolution-t-grid chore(NA): moving @kbn/securitysolution-t-grid to babel transpiler (#109442) (#109677) 2021-08-23 17:16:24 +00:00
kbn-securitysolution-utils chore(NA): moving @kbn/securitysolution-utils to babel transpiler (#109439) (#109550) 2021-08-20 19:25:22 -04:00
kbn-server-http-tools [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-server-route-repository [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-spec-to-console Console definitions for 7.14 (rework) (#103681) 2021-07-05 18:31:48 +02:00
kbn-std [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-storybook [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-telemetry-tools [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-test convert ftr runners into TS (#110057) (#110139) 2021-08-25 18:31:33 -04:00
kbn-test-subj-selector [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-tinymath [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-typed-react-router-config [APM] Support multiple route paths in useApmParams (#109370) (#109653) 2021-08-23 12:02:22 -04:00
kbn-ui-framework chore(NA): moving @kbn/ui-framework into bazel (#102908) (#102992) 2021-06-22 17:15:46 -04:00
kbn-ui-shared-deps chore(NA): moving @kbn/ui-shared-deps to babel transpiler (#109323) (#109509) 2021-08-20 14:45:32 -04:00
kbn-utility-types [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
kbn-utils [build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139) 2021-08-11 05:08:54 -04:00
BUILD.bazel [Security Solution] - Updating UI to work with new kibana privileges abstraction on alerts (#108961) (#109156) 2021-08-18 17:19:37 -04:00
README.md chore(NA): remove mocha junit ci integrations (#88129) (#88534) 2021-01-16 00:01:29 +00: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 or yarn grunt 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.