kibana/packages
Spencer 03f1a218c5
[core] remove root index.ts file (#137001)
* [core] remove root index.ts file

* remove support for `kibana/*` imports, replace instances in docs
2022-07-22 15:04:23 -07:00
..
analytics chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
core Upgrade EUI to v60.3.0 (#136405) 2022-07-21 08:28:37 -04:00
elastic-apm-synthtrace Top erroneous transactions (#134929) 2022-07-18 08:57:54 -07:00
elastic-safer-lodash-set chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
home/sample_data_cards [home] Create Sample Data Card package (#135472) 2022-06-30 15:53:08 -05:00
kbn-ace chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-alerts [core] remove root index.ts file (#137001) 2022-07-22 15:04:23 -07:00
kbn-ambient-storybook-types [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-ambient-ui-types Added a gif module to be able to import gif files (#136015) 2022-07-08 17:43:10 +02:00
kbn-analytics chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-apm-config-loader fix apm label isPr&prId (#136869) 2022-07-22 13:22:57 +02: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-axe-config [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-babel-plugin-synthetic-packages docs(NA): adds @kbn/babel-plugin-synthentic-packages into ops devdocs (#132512) 2022-05-19 19:28:05 -07:00
kbn-babel-preset Initialize ops documentation section (#132262) 2022-05-17 15:22:38 -05:00
kbn-bazel-packages [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-bazel-runner [bazel] on CI, log buffered log lines that start with INFO: (#136981) 2022-07-22 12:03:28 -07:00
kbn-ci-stats-core [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-ci-stats-performance-metrics [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-ci-stats-reporter [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-cli-dev-mode [cli-dev-mode/base-path-proxy] switch to integration tests (#136545) 2022-07-18 10:49:22 -05:00
kbn-coloring [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-config [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-config-mocks [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-config-schema [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-crypto Migrate types to packages: Client-side HTTP service (#135562) 2022-07-11 12:25:55 -07:00
kbn-crypto-browser Migrate types to packages: Client-side HTTP service (#135562) 2022-07-11 12:25:55 -07:00
kbn-datemath [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-dev-cli-errors [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-dev-cli-runner [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-dev-proc-runner [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-dev-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-doc-links [DOCS] Added keyword for the threat intel integration docs (#136851) 2022-07-21 12:46:53 -04:00
kbn-docs-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-es Replace npm zlib with native zlib (#136139) 2022-07-11 14:56:25 -05:00
kbn-es-archiver Replace npm zlib with native zlib (#136139) 2022-07-11 14:56:25 -05:00
kbn-es-errors Introduce the @kbn/es-errors package (#135613) 2022-07-04 10:33:37 +02:00
kbn-es-query chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-eslint-config chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-eslint-plugin-disable chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-eslint-plugin-eslint [eslint/module_migration] add exact option (#137000) 2022-07-22 14:59:14 -07:00
kbn-eslint-plugin-imports [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-expect chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-field-types [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-find-used-node-modules [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-flot-charts Remove/replace uses of "sanity" in comments and test code (#134541) 2022-06-30 19:21:23 -07:00
kbn-generate [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-handlebars [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-hapi-mocks Migrate server-side http types to @kbn/core-http-server (#135808) 2022-07-11 13:28:39 +02:00
kbn-i18n chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-i18n-react [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-import-resolver [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-interpreter [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-io-ts-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-jest-serializers [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-kibana-json-schema [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-logging [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-logging-mocks [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-mapbox-gl [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-monaco Bump webpack-dev-server, cli (#136352) 2022-07-21 08:58:30 +02:00
kbn-optimizer Bump cssnano to ^5 (#136864) 2022-07-22 12:15:07 -05:00
kbn-optimizer-webpack-helpers [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-performance-testing-dataset-extractor [kbn-performance-testing-dataset-extractor] update json structure, filter out static resources on ci (#136651) 2022-07-21 10:42:36 +02:00
kbn-plugin-discovery [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-plugin-generator [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-plugin-helpers [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-react-field [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-rule-data-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-scalability-simulation-generator [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-autocomplete [core] remove root index.ts file (#137001) 2022-07-22 15:04:23 -07:00
kbn-securitysolution-es-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-hook-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-io-ts-alerting-types [Security Solution][Alerts] New terms security rule type (#134526) 2022-07-22 10:11:27 -07:00
kbn-securitysolution-io-ts-list-types [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-io-ts-types [Security Solution][Alerts] New terms security rule type (#134526) 2022-07-22 10:11:27 -07:00
kbn-securitysolution-io-ts-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-list-api [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-list-constants [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-list-hooks [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-securitysolution-list-utils [Security Solution][Alerts] Detection engine wildcard exceptions (#136147) 2022-07-19 15:03:47 -07:00
kbn-securitysolution-rules [Security Solution][Alerts] New terms security rule type (#134526) 2022-07-22 10:11:27 -07:00
kbn-securitysolution-t-grid [Security Solution] Migrate to fields API (#136163) 2022-07-12 13:08:11 -07:00
kbn-securitysolution-utils [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-server-http-tools [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-server-route-repository [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-shared-ux-components [Shared UX] Move Page Template Solution Nav to package (#134974) 2022-07-12 08:34:27 -07:00
kbn-shared-ux-services [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-shared-ux-storybook [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-shared-ux-utility [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-some-dev-log [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-sort-package-json [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-spec-to-console fix all violations 2022-04-16 01:37:30 -05:00
kbn-std [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-stdio-dev-helpers [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-storybook Bump postcss to ^8 (#136303) 2022-07-19 14:06:20 -05:00
kbn-synthetic-package-map [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-telemetry-tools [checks] disable spinners in CI to cut-down on log sizes (#136341) 2022-07-13 23:37:39 -05:00
kbn-test [kbn-performance-testing-dataset-extractor] update json structure, filter out static resources on ci (#136651) 2022-07-21 10:42:36 +02:00
kbn-test-jest-helpers [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-test-subj-selector docs(NA): adds @kbn/test-subj-selector into ops devdocs (#132505) 2022-05-20 02:30:01 +01:00
kbn-timelion-grammar [eslint] ensure that all imports are resolvable (#129002) 2022-04-04 15:37:06 -04:00
kbn-tinymath chore(NA): eslint rule for disallowing naked eslint-disable (#136408) 2022-07-19 17:11:04 +01:00
kbn-tooling-log [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-type-summarizer [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-type-summarizer-cli [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-type-summarizer-core [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-typed-react-router-config [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05: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 Bump webpack-dev-server, cli (#136352) 2022-07-21 08:58:30 +02:00
kbn-ui-shared-deps-src Bump webpack-dev-server, cli (#136352) 2022-07-21 08:58:30 +02:00
kbn-ui-theme [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-utility-types Migrate server-side http types to @kbn/core-http-server (#135808) 2022-07-11 13:28:39 +02:00
kbn-utility-types-jest [type-summarizer] reimplement for broader support (#135163) 2022-07-06 13:48:45 -05:00
kbn-utils [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
kbn-yarn-lock-validator [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07:00
shared-ux [Shared UX] Move Page Template Solution Nav to package (#134974) 2022-07-12 08:34:27 -07:00
BUILD.bazel Migrate server-side ES domain to packages (#136297) 2022-07-20 10:07:48 +02:00
README.md [kbn/pm] rewrite to avoid needing a build process (#136207) 2022-07-18 08:46:13 -07: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"

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.