Commit graph

65 commits

Author SHA1 Message Date
Pierre Gayvallet
36ea213f7d
migrate more core-owned plugins to tsproject ref (#89975) (#90018)
* migrate more plugins to tsproject ref

* revert changes for xpack_legacy

* fix IT
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/integration_tests/team_assignment.test.js
2021-02-02 19:57:38 +01:00
Christiane (Tina) Heiligers
04fcaba75b
Migrate indexPatternManagement to TS project ref (#89759) (#89914) 2021-02-01 14:45:23 -07:00
Pierre Gayvallet
43927b8707
migrate legacy_export plugin to tsproject ref (#89858) (#89872) 2021-02-01 17:51:23 +01:00
Clint Andrew Hall
80aae02a90
[7.x] [Presentation Team] Migrate to Typescript Project References (#86019) (#89824)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-31 11:14:28 -06:00
Joe Reuter
06e4a77b47
Add tsconfig ref to vis_type_vega (#89551) (#89696) 2021-01-29 13:13:00 +01:00
Nathan Reese
3f6e020005
[Maps] remove maps_oss TS project (#89502) (#89514) 2021-01-27 18:43:32 -07:00
Nathan Reese
55bfa4f648
Migrate maps_legacy, maps_oss, region_map, and tile_map plugions to TS projects (#89351) (#89429) 2021-01-27 10:40:20 -07:00
Stratoula Kalafateli
ddc205821a
[7.x] Cleanup OSS code from visualizations wizard (#89092) (#89409)
* Cleanup OSS code from visualizations wizard (#89092)

* Cleanup OSS code from visualizations wizard

* Remove unecessary translations

* Remove unused translation

* Fix functional test

* Disable the functional test for OSS

* Remove from oss correctly :D

* Fix ci
# Conflicts:
#	.github/CODEOWNERS
#	docs/developer/plugin-list.asciidoc
#	packages/kbn-optimizer/limits.yml

* fix plugin list docs

* Change plugins docs list
2021-01-27 16:01:23 +02:00
Mikhail Shustov
83b3510da8
[DX] SavedObjectsManagement to TS project (#88240) (#88283)
* som to ts project

* global_search_providers to ts projecvt
2021-01-14 08:44:10 +01:00
Mikhail Shustov
4b650e9f5e
[DX] move some ES UI plugins to TS project (#88050) (#88276)
* es_ui_shared to ts project

* console to ts project

* console_extensions to ts project

* searchprofiler to ts project

* update includes
2021-01-14 08:43:10 +01:00
Joe Reuter
0247619e51
Migrate most kibana app plugins to TS projects (#87636) (#88205)
# Conflicts:
#	x-pack/tsconfig.json
2021-01-13 22:01:31 +01:00
Christiane (Tina) Heiligers
9a12f16294
[7.x] Converts Telemetry Management Section to TS project refs (#88073) (#88191) 2021-01-13 10:50:03 -07:00
Joe Reuter
dfa0c67f3b
Kibana app and presentation ts projects (#87639) (#88035) 2021-01-13 11:53:40 +01:00
Joe Portner
a3d5721f16
Create Spaces OSS plugin (#87585) (#88065) 2021-01-12 17:28:21 -05:00
Christiane (Tina) Heiligers
d0ca49ce3f
[7.x] [DX] Management to TS projects (#87660) (#87847)
* Adds management to tsconfig refs

* removes preemptive script fix
2021-01-11 10:45:09 -07:00
Nathan L Smith
f480002133
TS project references for apmOss plugin (#87676) (#87722)
References #80508. References #81003.
2021-01-07 17:31:06 -06:00
Mikhail Shustov
1d4164000a
[DX] Home & SO tagging OSS to TS projects (#87610) (#87621)
* so tagging oss to ts project

* home to ts project
2021-01-07 16:19:58 +01:00
Mikhail Shustov
838c0ef754
Migrate App services plugins to TS projects (#87294) (#87604)
* migrate expressions to ts project refs

* bfetch to ts project

* ui_actions to ts project

* move fitures to data plugins

* add data ts project

* remove outdated ts-expect-error

* add data to x-pack tsconfigs

* navigation to ts project

* cleanup licensing tsconfig

* saved_objects to ts project

* embeddable to ts project

* ui_actions_enhanced to ts project

* embeddable_enhanced to ts project

* features to ts project

* data_enhanced to ts project refs

* fix i18n check

* fix find_plugins_ready_to_migrate_to_ts_refs script

* add a comment for bug ignoring json for composite projects

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-01-07 11:57:24 +01:00
Mikhail Shustov
4efd1d9493
Cleanup tsconfig files (#84396) (#84568)
* remove unused "paths" from tsconfig

* remove unused test utils, import get-url from kbn/test

* dont pollute globals with jest when importing getUrl

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-30 23:30:31 +01:00
Mikhail Shustov
eadb94b58c
list all the refs in tsconfig.json (#83678) (#83886) 2020-11-20 10:33:56 +01:00
Mikhail Shustov
616d582d1c
disable incremenetal build for legacy tsconfig.json (#82986) (#83711) 2020-11-19 09:52:10 +03:00
Nathan L Smith
3c7e80ed92
TS project references for securityOss plugin (#82135) (#82625) 2020-11-04 13:46:32 -06:00
CJ Cenizal
0e6caa06e7
Convert Dev Tools app to TS project. (#82197) (#82326)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-02 11:14:55 -08:00
Nathan L Smith
a4982cee8d
TS project references for share plugin (#82051) (#82134) 2020-10-30 10:46:39 -05:00
Nathan L Smith
036622ca0a
Add TS project references for inspector (#81792) (#81903) 2020-10-28 10:57:12 -05:00
Nathan L Smith
c9bd1a335b
Add tsconfig for url_forwarding (#81177) (#81854)
Also add missing pieces to kibana_react, as a follow-up to #80992.

References #80508
References #81003
2020-10-27 18:21:45 -05:00
Nathan L Smith
a8dd5b8b6c
Add TS config for kibana_legacy (#80992) (#81171)
To support project references.

References #80508.
2020-10-21 18:53:15 -05:00
Christiane (Tina) Heiligers
02ad93fe12
[7.x] Kibana usage collection to ts project refs (#81265) (#81363) 2020-10-21 12:06:44 -07:00
Christiane (Tina) Heiligers
6b6084b2dc
[7.x] Extracts newsfeed plugin to ts project refs (#81254) (#81341) 2020-10-21 10:33:10 -07:00
Christiane (Tina) Heiligers
0bdce6afc1
[7.x] Usage collection plugins to ts project refs (#81090) (#81201)
# Conflicts:
#	tsconfig.json
2020-10-20 11:15:43 -07:00
Mikhail Shustov
dac0dc8dd4
build all ts refs in single kbn:bootstrap (#79438) (#79614) 2020-10-06 10:38:48 +02:00
Mikhail Shustov
e8a05ae57b
Add TS projects for src/plugins & x-pack/plugins (#78440) (#78946)
* bump query-string version to remove manual type definitions

* remove manual type declaration

* add kibana_utils tsconfig

* add refs to kibana_utils tsconfig

* add kibana_utils to the project list

* add kibana_react project

* add support for x-pack/tsconfig.refs.json

* add ts project for x-pack licensing plugins

* add glob for ts projects in src/plugins & x-pack/plugins

* add refs to projects in examples

* fix ref paths in x-pack/test

* address mistic comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	src/plugins/kibana_utils/kibana.json
2020-09-30 17:10:04 +02:00
Mikhail Shustov
ee8bc62637
Extract src/core in a separate TS project (#76785) (#77509)
* break dependency on data plugin TS code

* move global typings to @kbn/utility-types

* import types from @kbn/utility-types

* remove type dependency on plugins

* add intermediate js files to break dependency on outter TS code

* temp type declaration for query-string

* declare src/core project

* export types to reference in the built d.ts files

* reference core project

* move jest types out of kbn/utility-types due to a clash with mocha types

* fix wrong es_kuery path and ts project paths

* reference core from packages consuming it

* x-pack & oss should use the same lodash version

* Revert "x-pack & oss should use the same lodash version"

This reverts commit 79cec5781e.

* use the same lodash version

* fix @types/lodash TS2300: Duplicate identifier error

* fix wrong imports

* update docs

* update docs

* add a comment why file is needed
# Conflicts:
#	packages/kbn-utility-types/index.ts
#	src/core/public/application/capabilities/capabilities_service.mock.ts
#	src/core/public/chrome/chrome_service.mock.ts
2020-09-16 07:51:42 +02:00
Mikhail Shustov
bd66fab861
Introduce TS incremental builds & move src/test_utils to TS project (#76082) (#76632)
* move test_helpers to the core

* create base tsconfig

* all tsconfigs use the base one

* use test_helpers exposed from the src/core

* move getFieldFormatsRegistry to data plugin

* add test_utils project

* compile types after checkout

* add a stub for platform tsconfig.json

* fix broken import

* fix broken path to the base config

* set tsBuildInfoFile for project without outDir

* do not commit tsbuildinfo file

* do not check output d.ts files

* fix type error

* use separate config to build types

* rollback changes to include paths

* mute import zone error

* rename files to avoid references to tsd

* do not use tsd for type tests

* include all ts files in project

* run buildRefs before type check to ensure the latest version

* store tsbuildinfo locally

* update paths to base config

* comment out core/tsconfig.json

* remove ui path

* fix wrong tsbuildinfo path
2020-09-03 23:02:05 +02:00
Pierre Gayvallet
b20030187c
[7.x] Delete src/legacy/ui/public folder (#76085) (#76351)
* Delete src/legacy/ui/public folder (#76085)

* delete src/legacy/ui/public folder

* remove jest.mock('ui/XXX'); from tests

* adapt stubbedLogstashIndexPatternService

* remove delete keys from translation files

* fix types import with Capabilities

* remove legacy test utils

* remove dead file referencing ui/newPlatform

* move saved-object-finder styles to timelion plugin
# Conflicts:
#	src/legacy/ui/public/new_platform/new_platform.test.mocks.ts
#	src/legacy/ui/public/new_platform/new_platform.ts
#	src/test_utils/public/no_digest_promises.js
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/home.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/policy_edit.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/repository_add.test.ts
#	x-pack/plugins/snapshot_restore/__jest__/client_integration/repository_edit.test.ts

* fix 7.x code

* restore legacy docLinks file
2020-09-01 15:53:31 +02:00
patrykkopycinski
a352b5acf0
[7.x] Bump jest related packages (#58095) (#69631)
* Bump jest related packages (#58095)

# Conflicts:
#	package.json
#	packages/kbn-pm/dist/index.js
#	packages/kbn-test/package.json
#	x-pack/plugins/upgrade_assistant/public/application/components/tabs/checkup/__snapshots__/checkup_tab.test.tsx.snap
#	x-pack/plugins/uptime/public/components/monitor/location_map/__tests__/location_map.test.tsx
#	yarn.lock

* Update AgentMarker.test.tsx.snap
2020-06-21 01:23:51 +02:00
Nick Partridge
dd8eaab229
[Metric] convert mocha tests to jest (#54054) (#55210)
* Add fixtures/* alias to tsconfig and jest config
* Convert metric tests to jest
* Convert remaining js files to ts
2020-01-17 13:33:46 -06:00
Maryia Lapata
bef43740c7
[Vis] Move Timelion Vis to vis_type_timelion (#52069) (#55174)
* Deangularize timelion vis

* Refactoring

* Fix path

* Update timelion_controller.ts

* Remove unused deps

* Create vis_type_timelion

* Create ChartComponent

* Render chart in react

* Reactify timelion editor

* Change translation ids

* Use hooks

* Add @types/pegjs into renovate.json5

* Add validation, add hover suggestions

* Style fixes

* Change plugin setup, use kibana context

* Update

* Fix ticks

* Fix plotselected listener

* Fix plothover handler

* Add TS for options

* Update TS

* Restructuring

* Change plugin start

* Remove vis from timelion plugin

* Rename class

* Mock services

* Fix other comments

* Remove duplicate files

* Convert test to jest

* Remove kibana_services from timelion

* Delete visualize_app.ts.~LOCAL

* Refactoring

* Fix TS

* Refactoring, TS

* Import eui variables

* Import styling constants

* Move react components to vis_type_timelion

* Fix TS

* Move ui imports to legacy_imports.ts

* Move chain.peg to vis_type_timelion

* Fix path

* Use KibanaContext instead kibana_services.ts

* Refactoring

* Refactoring

* Add @types/flot

* Fix issue with hovered series color

* Update renovate.json5

* Pass timelionPanels as dependencies

* Move common folder to vis_type_timelion

* Move back tick_formatters.ts

* Rename styles file

* Refactoring

* Update _index.scss

* Move to_milliseconds to common

* Revert yaxes formatting

* Refactoring

* Refactoring

* Use Panel directly

* Refactoring of to_milliseconds.ts

Co-authored-by: Daniil Suleiman <31325372+sulemanof@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Daniil Suleiman <31325372+sulemanof@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-17 17:38:56 +03:00
Sébastien Loix
5f8e60849d
Es ui shared updates (#46570) (#46716) 2019-10-29 11:25:50 +01:00
Spencer
31e7eec1ce
[7.x] Update babel related packages (#43595) (#43837)
* Update babel related packages (#43595)

* upgrade all babel related modules, and bump lodash minors

* update kbn-pm dist

* update fetch-mock, necessary to use core-js 3

* use regenerator transform in jest tests, as required by EUI

* disable useBuiltIns rather than using regenerator plugin

* remove extra regenerator-runtime import

* Update package.json

* update yarn.lock
2019-08-23 08:24:52 -07:00
Greg Thompson
4a4d29eee2
[7.x] Upgrade EUI to v10.0.1 (#35112) (#40533)
* Upgrade EUI to v10.0.1 (#35112)

* eui@10.0.0; tsconfig update

* limit key lookups to strings

* Search Profiler hightlight details flyout classes

* bump

* snapshot updates

* x-pack snapshot updates

* keyofstringsonly update
2019-07-08 16:41:44 -05:00
Liza Katz
6822f63264
Move search bar into data plugin (#35389) (#35937)
* Moved filter bar to data plugin (still not working)

* Moved filter options from search bar into filter bar
2019-05-02 17:51:44 +03:00
Liza Katz
8437811213
Moved query bar into data plugin (#35390) (#35797)
* moved query bar to data plugin
2019-05-01 14:56:14 +03:00
Rudolf Meijering
8945b56fe2
[7.x] Generate core API docs from TSDoc comments (#32148) (#34421)
* Generate core API docs from TSDoc comments (#32148)

* Generate core API docs from TSDoc comments

Uses api-extractor and api-documenter to generate documentation for
the Kibana core API from TSDoc comments in the source code.

Documentation can be generated using `npm run docs:api`.

I used --no-verify to ignore the following pre-commit hook errors:
1. Filenames MUST use snake_case - api-extractor.json
   It's possible to specify a different config file, but I prefer to keep the "standard" config file name.
2. UNHANDLED ERROR: Unable to find tsconfig.json file selecting "common/core_api_review/kibana.api.ts". Ensure one exists and it is listed in "src/dev/typescript/projects.ts"
   This is not a source file, so safe to ignore.

* Flesh out API docs a little bit

* Ignore snake_case check for api-extractor.json

* Ignore api-extractor's review file from pre-commit check

* Try to fix build failing by using masters yarn.lock

* I'm being stupid

* Found a better home for ignoring common/core_api_review/kibana.api.ts

* Node script for detecting core API changes

I initially wanted to include this as a precommit hook, but it takes
quite long to execute (~12s) so might be better suited as a test or
as part of the release process.

The script currently fails because api-extractor uses an older version
of typescript.

* Fix tslint precommit hook ignore condition

* Write tsdoc-metadata.json into ./build

* Add LogMeta and ElasticSearch to exported types & docs

* Suppress logging when running api-extractor from script

* Improve check_core_api_changes script and run as test

* Inline api-extractor.json config

* Fix check_core_api_changes --help flag

* LogMeta TSDoc comments

* check_core_api_changes: fail if api-extractor produces warnings or errors

And print more useful messages to the console

* Move ignored ts files list into dev/file

* Add back build:types since api-exporter cannot operate on source files

* Upgrade api-exporter/documenter

* api-extractor: independantly analyze core/public and core/server

Becasue of https://github.com/Microsoft/web-build-tools/issues/1029
api-extractor can't use core/index.ts as a single entry point for
analyzing the public and server API's as isolated namespaces.

Instead we analyze these projects separately. This introduces other
problems like the api review files and documentation always being
called "kibana." from the package.json filename.

* Build types as part of build task

* Include types in typescript browser compilation

* Force inclusion of core/public for building types

* Fix api review filename in api-exporter errors

* Update docs and API review files

* Fix api-extractor warnings

* Remove ts file ignored list since it's no longer necessary

* Rename exported api package name

* Review comments

* Export other missing types

* Upgrade api-documenter to latest beta

* Export more missing types

* Fix warnings and add api-exporter to Jenkins tests

* Correctly handle runBuildTypes() exceptions

* Fix another swallowed exception

* Fix api-extractor warnings after master merge

* Update yarn.lock

* Fix erraneous type

* Revert "Update yarn.lock"

This reverts commit 85a8093015.

* Revert "Fix erraneous type"

This reverts commit 7f0550c0ae.

* Backport https://github.com/elastic/kibana/pull/32440

* Update core api signature and docs
2019-04-04 20:59:09 +02:00
Spencer
883ea31bd2
[@kbn/expect] "fork" expect.js into repo (#33761) (#33794)
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
2019-03-25 13:13:21 -07:00
Rudolf Meijering
8c7d8469a8
Expose core api types in /public and /server (#32746) (#33477)
* Expose core api types in /public and /server

* Export CoreStart from core/public

* Export Server and Public from 'kibana'

* Cast frozen object type back to original

The exported type `InjectedMetadataStart` derives it's type from the returned values.
Since it's internal state is frozen the type changes to `ReadOnly<`. However, consumers
of the API shouldn't have to know or care about this type.

* Be more selective with what gets exported

* Fix type imports in tests

* Fix type errors

* Remove src/type_exports.ts

* More remove src/type_exports.ts

* Remove build:types

* Fix bootstrap import

* Expose internal API's at the top level

Exposing the internal API's at the top level of core/public and core/server
makes it obvious that these API's are consumed outside these modules. Marking
these @internal ensures they don't get exported as part of the documentation.

* Fix tests

* Put core/{public/server} in their own namespaces
2019-03-19 10:07:41 +01:00
Spencer
ba82d027cd
[ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948) (#32250)
In https://github.com/elastic/kibana/pull/31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from https://github.com/elastic/kibana/pull/30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
2019-02-28 14:26:32 -08:00
Matthew Kime
be69696a37
tests typescript migration (#31234) (#31803)
* add typescript support for functional tests
2019-02-22 09:28:44 -06:00
Court Ewing
146518cab7 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
2019-02-11 11:06:26 -05:00
Stacey Gammon
686676c38d
Typescript: stub browser typings (#26914)
* typings for stub browser

* Fix default import

* Address feedback

* update jest snapshot
2018-12-18 17:44:39 -05:00