Commit graph

10 commits

Author SHA1 Message Date
Spencer c0395c9ef6
[build_ts_refs] improve caches, allow building a subset of projects (#107981)
* [build_ts_refs] improve caches, allow building a subset of projects

* cleanup project def script and update refs in type check script

* rename browser_bazel config to avoid kebab-case

* remove execInProjects() helper

* list references for tsconfig.types.json for api-extractor workload

* disable composite features of tsconfig.types.json for api-extractor

* set declaration: true to avoid weird debug error

* fix jest tests

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-10 22:12:45 -07:00
Mikhail Shustov e457f212c4
Revert "TS Incremental build exclude test files (#95610)" (#96223)
This reverts commit b6e582c53e.
2021-04-05 11:59:26 -07:00
Mikhail Shustov b6e582c53e
TS Incremental build exclude test files (#95610)
* add base config for all the TS projects

* all the project use new tsconfig.project.json

* compile test files in the high-level tsconfig.json

* fix TS error in maps plugin

* fix TS error in infra plugin

* exclude mote test and test until folders

* uptime. do not import test code within prod code

* expressions. do not import test code within prod code

* data: export mocks from high level folder

* task_manager: comply with es client typings

* infra: remove unused enzyme_helpers

* check_ts_project requires "include" key

* ts_check should handle parent configs

* all ts configs should extend base one

* exclude test folders from plugins

* update patterns to fix ts_check errors

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* uptime: MountWithReduxProvider to test helpers

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 14:40:47 +02:00
Mikhail Shustov f5e8b108da
Attempt to reduce Core bundle size with type exports. (#92221)
* compile core files as isolated modules

* fix export problems for isolated modules

* apply changes to kbn-test as core imports from it

* fix some exports

* fix lint errors

* update new exports

* fix eslint error

* expand export * where it is possible

* update docs

* update docs

* fix eslint error
2021-03-03 17:21:49 +01:00
Mikhail Shustov 1ec2f1d078
Cleanup tsconfig files (#84396)
* 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>
2020-11-30 19:12:00 +01:00
Mikhail Shustov 2782204cc1
Get rid of global types (#81739)
* move global typings to packages/kbn-utility-types

* update all imports

* add tests

* mute error

* update docs

* ok

* rename kbn-utility-types/test --> kbn-utility-types/jest
2020-10-28 11:03:04 +01:00
Mikhail Shustov a8fe02a3c7
store public types and code in separate folders (#77988) 2020-09-21 20:50:15 +02:00
Mikhail Shustov e7d8ea3927
Extract src/core in a separate TS project (#76785)
* 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
2020-09-15 12:41:27 +02:00
Mikhail Shustov b3a85c546d
Remove commented src/core/tsconfig file (#76792)
VSCode pick it up and reports problems, however `tsc` ignores it and doesn't show any errors
2020-09-04 20:05:29 +02:00
Mikhail Shustov e9e0ca3782
Introduce TS incremental builds & move src/test_utils to TS project (#76082)
* 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 14:20:04 +02:00