kibana/packages
Greg Thompson 6fdc7eb1fa
Upgrade EUI to v30.1.1 (#81499)
* eui to v30.0.0

* removed unused RecentLinks component

* update compressed -> display prop

* euiformrow compressed -> display

* euipopover remove withtitle

* euibuttongroup prop updates

* remove euibuttontoggle

* src snapshot updates

* tutorial euibuttongroup update

* x-pack snapshot updates

* euibuttongroup test updates

* TODO

* misc. js file updates

* remove euinavdrawer scss references

* translation removals

* more x-pack snapshot updates

* update data-test-subj lookup

* icons logoAMP -> logoObservability

* cypress selector updates

* update euibuttontoggle onchange, test interaction

* Fix auto-update toggle in Visualize

* some more change -> click test updates

* idtoselectedmap change

* Fix feature table button group

* Remove empty SASS file

* Fix feature table button group II

* Using `compressed` to also dictate dual range row

* Fix a few security labels

* An ML fix

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* remove unused translation

* update view_type_toggle snapshot

* more snapshot updates

* eui to 30.1.0

* undo temp ts-ignore

* more x-pack snapshot updates

* eui to 30.1.1

* update feature privilege text

* Update x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* reuse i18n token

* Adapt log entry action button to new `minWidth` prop

* clean up label

* Combine auto apply strings into one

* ternary fix

* cases status useCallback

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2020-10-30 16:18:27 -06:00
..
elastic-datemath
elastic-eslint-config-kibana [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
elastic-safer-lodash-set
kbn-ace [ES UI] Reintroduce import of brace/mode/json (#78571) 2020-10-01 12:20:33 +02:00
kbn-analytics
kbn-apm-config-loader [CI] Preparation for APM tracking on CI (#80399) 2020-10-26 15:42:38 -07:00
kbn-babel-preset [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-config Add script to identify plugin dependencies for TS project references migration (#80463) 2020-10-16 11:55:46 +02:00
kbn-config-schema Bump yargs-parser to v13.1.2+ (#77009) 2020-09-14 10:49:15 +02:00
kbn-dev-utils Add script to identify plugin dependencies for TS project references migration (#80463) 2020-10-16 11:55:46 +02:00
kbn-es bump elastic/elasticsearch-js version to 7.10.0-rc1 (#81288) 2020-10-21 21:36:19 +02:00
kbn-es-archiver [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-eslint-import-resolver-kibana [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-eslint-plugin-eslint [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-expect [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-i18n remove react-intl from kibana and keep it inside only i18n package (#78956) 2020-10-06 01:41:49 +03:00
kbn-interpreter [kbn/optimizer] implement more efficient auto transpilation for node (#79052) 2020-10-02 18:36:25 -07:00
kbn-logging Move core config service to kbn/config package (#76874) 2020-09-16 09:17:05 +02:00
kbn-monaco Move painless lang support to @kbn/monaco (#81010) 2020-10-22 08:28:03 -04:00
kbn-optimizer [Monitoring] Thread pool rejections alert (#79433) 2020-10-30 10:50:34 -04:00
kbn-plugin-generator [Plugin generator] Update readme (#81131) 2020-10-25 14:35:28 +02:00
kbn-plugin-helpers chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies (#81357) 2020-10-22 00:02:36 +01:00
kbn-pm [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-release-notes [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-spec-to-console chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies (#81357) 2020-10-22 00:02:36 +01:00
kbn-std [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-storybook Use Storybook Controls instead of Knobs (#80705) 2020-10-21 15:43:57 -05:00
kbn-telemetry-tools [Telemetry] [Schema] remove number type and support all es number types (#81774) 2020-10-30 04:34:20 +02:00
kbn-test [junit] make sure that report paths are unique (#81255) 2020-10-21 12:46:45 -07:00
kbn-test-subj-selector [kbn/bootstrap] validate that certain deps don't ship in production (#80549) 2020-10-15 09:56:10 -07:00
kbn-ui-framework Upgrade EUI to v30.1.1 (#81499) 2020-10-30 16:18:27 -06:00
kbn-ui-shared-deps Upgrade EUI to v30.1.1 (#81499) 2020-10-30 16:18:27 -06:00
kbn-utility-types Get rid of global types (#81739) 2020-10-28 11:03:04 +01:00
kbn-utils [kbn/optimizer] implement more efficient auto transpilation for node (#79052) 2020-10-02 18:36:25 -07:00
README.md

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 are two patterns used to test packages, one using Mocha and one using Jest. These patterns emerged out of convention and we'd like to make them more similar to each other in the near future.

1. Mocha

Today a package can follow the pattern of having a __tests__ directory in each source code directory of a package which contains the tests for that module. These are usually run by Mocha.

If a package's tests should be run with Mocha, you'll have to opt-in to run them by appending the package's test file pattern(s) to Kibana's src/dev/mocha/run_mocha_cli.js file. These will then be run by the unit test runner.

  • yarn test or yarn grunt test runs all unit tests.
  • node scripts/mocha runs all Mocha tests.

2. Jest

A package can also 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.
  • node scripts/jest runs all Jest tests in Kibana.

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.