kibana/packages
Kibana Machine 81a3a29f7a
[8.2] Removes perlGuide from doc link service (#148803) (#148812)
# Backport

This will backport the following commits from `main` to `8.2`:
- [Removes perlGuide from doc link service
(#148803)](https://github.com/elastic/kibana/pull/148803)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"István Zoltán
Szabó","email":"szabosteve@gmail.com"},"sourceCommit":{"committedDate":"2023-01-12T15:13:14Z","message":"Removes
perlGuide from doc link service
(#148803)","sha":"a82e62f0cd29497a8dbbb5f2f7eff07ed14fbf2e","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","docs","v8.0.2","v8.1.4","v8.2.4","v8.3.4","v8.4.4","v8.7.0","v8.6.1","v8.5.4"],"number":148803,"url":"https://github.com/elastic/kibana/pull/148803","mergeCommit":{"message":"Removes
perlGuide from doc link service
(#148803)","sha":"a82e62f0cd29497a8dbbb5f2f7eff07ed14fbf2e"}},"sourceBranch":"main","suggestedTargetBranches":["8.0","8.1","8.2","8.3","8.4","8.6","8.5"],"targetPullRequestStates":[{"branch":"8.0","label":"v8.0.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.1","label":"v8.1.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.2","label":"v8.2.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.3","label":"v8.3.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.4","label":"v8.4.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/148803","number":148803,"mergeCommit":{"message":"Removes
perlGuide from doc link service
(#148803)","sha":"a82e62f0cd29497a8dbbb5f2f7eff07ed14fbf2e"}},{"branch":"8.6","label":"v8.6.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.5","label":"v8.5.4","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: István Zoltán Szabó <szabosteve@gmail.com>
2023-01-13 13:19:07 +00:00
..
elastic-apm-synthtrace chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -07:00
elastic-safer-lodash-set Move contribution declarations to the bottom of LICENSE files (#133502) (#133754) 2022-06-07 07:07:16 -07: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-axe-config [axe-config] extract module to it's own package (#128815) 2022-03-29 15:12:14 -07:00
kbn-babel-code-parser [eslint] automatically determine dev packages (#127089) 2022-03-08 07:42:06 -06:00
kbn-babel-preset [8.2] chore(NA): rename @elastic/eslint-config-kibana as @kbn/eslint-config (#132278) (#132285) 2022-05-16 14:49:35 -07: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-datemath chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -07:00
kbn-dev-utils [8.2] [ftr] handle unexpected Kibana/ES shutdowns better (#131767) (#131812) 2022-05-09 09:41:13 -07:00
kbn-doc-links [8.2] Removes perlGuide from doc link service (#148803) (#148812) 2023-01-13 13:19:07 +00:00
kbn-docs-utils chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -07:00
kbn-es [8.2] [ftr] handle unexpected Kibana/ES shutdowns better (#131767) (#131812) 2022-05-09 09:41:13 -07:00
kbn-es-archiver [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-es-query Fix unhandled alias search errors (#128289) 2022-03-24 11:52:21 -07:00
kbn-eslint-config [8.2] chore(NA): remove @kbn/utility-types/jest subpackage (#133448) (#133572) 2022-06-03 16:18:37 -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 fix(NA): do not declare @types packages as prod dependencies when generating the pkg.json (#128805) 2022-03-29 14:12:19 -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 [8.2] [Controls] Collect Telemetry (#130498) (#130832) 2022-04-25 13:20:04 -07:00
kbn-plugin-discovery [8.2] Avoid loading all plugins on anonymous pages (#129555) (#129740) 2022-04-07 08:24:19 -07:00
kbn-plugin-generator [8.2] chore(NA): rename @elastic/eslint-config-kibana as @kbn/eslint-config (#132278) (#132285) 2022-05-16 14:49:35 -07:00
kbn-plugin-helpers [plugin-discovery] move logic to a package (#128684) 2022-03-29 13:19:58 -06:00
kbn-pm Bump chromedriver to 102 (#134058) (#134103) 2022-06-09 14:04:29 -07:00
kbn-react-field [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-rule-data-utils [Security Solution][Alerts] Replace schemas derived from FieldMaps with versioned alert schema (#127218) 2022-03-29 20:11:55 -07:00
kbn-securitysolution-autocomplete chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -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 Create generic get filter method to be used with an array of list id's (#127983) 2022-03-24 08:23:21 +01: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 chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -07:00
kbn-securitysolution-list-api Set filter to undefined when it's empty on findExceptionLists method (#128455) 2022-03-29 12:44:31 +02:00
kbn-securitysolution-list-constants [Security Solution] add blocklist list (#126390) 2022-03-01 09:46:13 -06:00
kbn-securitysolution-list-hooks [Security Solution] Consider exceptions when loading threshold alert timelines (#128495) 2022-03-29 15:09:55 -04:00
kbn-securitysolution-list-utils [Security Solution] Consider exceptions when loading threshold alert timelines (#128495) 2022-03-29 15:09:55 -04:00
kbn-securitysolution-rules [Security Solution][Detections] Adds rule execution log table (#126215) 2022-03-28 16:42:46 -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] fix blocklist path validation (#129124) (#129141) 2022-03-31 14:48:34 -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 [SharedUX] Add url-loader to BAZEL.build (#128650) 2022-03-29 22:41:00 +02: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 [kbn/es] capture es debug files (#132355) (#132381) 2022-05-17 18:25:45 -07:00
kbn-test-jest-helpers [axe-config] extract module to it's own package (#128815) 2022-03-29 15:12:14 -07: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 chore(NA): downgrades rules nodejs into v4.7.0 (#130347) (#130354) 2022-04-14 21:39:51 -07: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 chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -07:00
kbn-ui-shared-deps-src chore(NA): upgrades bazel rules nodejs to v5 (#129522) (#129852) 2022-04-08 16:30:53 -07:00
kbn-ui-theme [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
kbn-utility-types [8.2] chore(NA): remove @kbn/utility-types/jest subpackage (#133448) (#133572) 2022-06-03 16:18:37 -07:00
kbn-utility-types-jest [8.2] chore(NA): remove @kbn/utility-types/jest subpackage (#133448) (#133572) 2022-06-03 16:18:37 -07:00
kbn-utils [bazel] avoid a little boilerplate in packages (#126309) 2022-02-24 12:43:12 -06:00
BUILD.bazel [8.2] chore(NA): remove @kbn/utility-types/jest subpackage (#133448) (#133572) 2022-06-03 16:18:37 -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.