diff --git a/.gitignore b/.gitignore index c0588d850062e4..4f77a6e450c4ba 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,9 @@ report.asciidoc # TS incremental build cache *.tsbuildinfo +# Automatically generated and user-modifiable +/tsconfig.refs.json + # Yarn local mirror content .yarn-local-mirror diff --git a/BUILD.bazel b/BUILD.bazel index 1f6e3030e5d0c8..e838d312d87626 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -3,7 +3,9 @@ exports_files( [ "tsconfig.base.json", + "tsconfig.bazel.json", "tsconfig.browser.json", + "tsconfig.browser_bazel.json", "tsconfig.json", "package.json" ], diff --git a/docs/developer/best-practices/typescript.asciidoc b/docs/developer/best-practices/typescript.asciidoc index f6db3fdffcb6ad..6058cb4945e11c 100644 --- a/docs/developer/best-practices/typescript.asciidoc +++ b/docs/developer/best-practices/typescript.asciidoc @@ -41,7 +41,6 @@ Additionally, in order to migrate into project refs, you also need to make sure { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/examples/bfetch_explorer/tsconfig.json b/examples/bfetch_explorer/tsconfig.json index 253fdd9ee6c89c..fe909968bd8e24 100644 --- a/examples/bfetch_explorer/tsconfig.json +++ b/examples/bfetch_explorer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types", }, "include": [ "index.ts", @@ -14,6 +13,8 @@ "exclude": [], "references": [ { "path": "../../src/core/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, + { "path": "../../src/plugins/bfetch/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/examples/dashboard_embeddable_examples/tsconfig.json b/examples/dashboard_embeddable_examples/tsconfig.json index 86b35c5e4943fd..1c10d59de561ff 100644 --- a/examples/dashboard_embeddable_examples/tsconfig.json +++ b/examples/dashboard_embeddable_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,11 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/dashboard/tsconfig.json" }, + { "path": "../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../src/plugins/es_ui_shared/tsconfig.json" }, + { "path": "../embeddable_examples/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/developer_examples/tsconfig.json b/examples/developer_examples/tsconfig.json index 86b35c5e4943fd..23b24a38d1aefd 100644 --- a/examples/developer_examples/tsconfig.json +++ b/examples/developer_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/examples/embeddable_examples/tsconfig.json b/examples/embeddable_examples/tsconfig.json index a922c6defcd4c6..34c7c8e04467e5 100644 --- a/examples/embeddable_examples/tsconfig.json +++ b/examples/embeddable_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -15,6 +14,12 @@ "exclude": [], "references": [ { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../src/plugins/dashboard/tsconfig.json" }, + { "path": "../../src/plugins/saved_objects/tsconfig.json" }, + { "path": "../../src/plugins/presentation_util/tsconfig.json" }, ] } diff --git a/examples/embeddable_explorer/tsconfig.json b/examples/embeddable_explorer/tsconfig.json index 4baebebcea42ee..e5b19e2c1457a6 100644 --- a/examples/embeddable_explorer/tsconfig.json +++ b/examples/embeddable_explorer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,6 +13,10 @@ "exclude": [], "references": [ { "path": "../../src/core/tsconfig.json" }, - { "path": "../../src/plugins/inspector/tsconfig.json" } + { "path": "../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../src/plugins/inspector/tsconfig.json" }, + { "path": "../embeddable_examples/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/expressions_explorer/tsconfig.json b/examples/expressions_explorer/tsconfig.json index b4449819b25a62..f3451b496caa0a 100644 --- a/examples/expressions_explorer/tsconfig.json +++ b/examples/expressions_explorer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,5 +13,9 @@ "references": [ { "path": "../../src/core/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/expressions/tsconfig.json" }, + { "path": "../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../src/plugins/inspector/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/hello_world/tsconfig.json b/examples/hello_world/tsconfig.json index 7fa03739119b43..06d3953e4a6bf4 100644 --- a/examples/hello_world/tsconfig.json +++ b/examples/hello_world/tsconfig.json @@ -12,5 +12,9 @@ "server/**/*.ts", "../../typings/**/*" ], - "exclude": [] + "exclude": [], + "references": [ + { "path": "../../src/core/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, + ] } diff --git a/examples/index_pattern_field_editor_example/tsconfig.json b/examples/index_pattern_field_editor_example/tsconfig.json index 1f6d52ed5260e4..f11ca18fc1a823 100644 --- a/examples/index_pattern_field_editor_example/tsconfig.json +++ b/examples/index_pattern_field_editor_example/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,5 +13,8 @@ "references": [ { "path": "../../src/core/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/data/tsconfig.json" }, + { "path": "../../src/plugins/index_pattern_field_editor/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] -} \ No newline at end of file +} diff --git a/examples/locator_examples/tsconfig.json b/examples/locator_examples/tsconfig.json index 8aef3328b42222..5010ad5a5fe0f2 100644 --- a/examples/locator_examples/tsconfig.json +++ b/examples/locator_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/share/tsconfig.json" }, ] } diff --git a/examples/locator_explorer/tsconfig.json b/examples/locator_explorer/tsconfig.json index 8aef3328b42222..2fa75fc163fdd8 100644 --- a/examples/locator_explorer/tsconfig.json +++ b/examples/locator_explorer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,9 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/share/tsconfig.json" }, + { "path": "../locator_examples/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/preboot_example/tsconfig.json b/examples/preboot_example/tsconfig.json index d18953eadf3307..e5b5eda0c6478c 100644 --- a/examples/preboot_example/tsconfig.json +++ b/examples/preboot_example/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/examples/routing_example/tsconfig.json b/examples/routing_example/tsconfig.json index 54ac800019f82c..e47bf1c9bedb8e 100644 --- a/examples/routing_example/tsconfig.json +++ b/examples/routing_example/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,6 +13,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/screenshot_mode_example/tsconfig.json b/examples/screenshot_mode_example/tsconfig.json index dfb436e7377ac1..ef35abc699c660 100644 --- a/examples/screenshot_mode_example/tsconfig.json +++ b/examples/screenshot_mode_example/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,5 +12,11 @@ "../../typings/**/*" ], "exclude": [], - "references": [{ "path": "../../src/core/tsconfig.json" }] + "references": [ + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../src/plugins/screenshot_mode/tsconfig.json" }, + { "path": "../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, + ] } diff --git a/examples/search_examples/tsconfig.json b/examples/search_examples/tsconfig.json index 2b7d86d76a8a52..547952b8dd3d84 100644 --- a/examples/search_examples/tsconfig.json +++ b/examples/search_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,6 +13,12 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" } + { "path": "../../src/core/tsconfig.json" }, + { "path": "../../src/plugins/data/tsconfig.json" }, + { "path": "../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../src/plugins/share/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/state_containers_examples/tsconfig.json b/examples/state_containers_examples/tsconfig.json index 442fa08022dc4a..fc266cbe2c83f8 100644 --- a/examples/state_containers_examples/tsconfig.json +++ b/examples/state_containers_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -17,5 +16,8 @@ { "path": "../../src/core/tsconfig.json" }, { "path": "../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../src/plugins/data/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/examples/ui_action_examples/tsconfig.json b/examples/ui_action_examples/tsconfig.json index 253fdd9ee6c89c..41d91ac4b9be6a 100644 --- a/examples/ui_action_examples/tsconfig.json +++ b/examples/ui_action_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,7 +12,7 @@ ], "exclude": [], "references": [ - { "path": "../../src/core/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/ui_actions/tsconfig.json" }, ] } diff --git a/examples/ui_actions_explorer/tsconfig.json b/examples/ui_actions_explorer/tsconfig.json index b4449819b25a62..6debf7c0c650ae 100644 --- a/examples/ui_actions_explorer/tsconfig.json +++ b/examples/ui_actions_explorer/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,5 +13,8 @@ "references": [ { "path": "../../src/core/tsconfig.json" }, { "path": "../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../ui_action_examples/tsconfig.json" }, + { "path": "../developer_examples/tsconfig.json" }, ] } diff --git a/packages/elastic-datemath/BUILD.bazel b/packages/elastic-datemath/BUILD.bazel index 9244705c01550f..04eb153bcc9e1e 100644 --- a/packages/elastic-datemath/BUILD.bazel +++ b/packages/elastic-datemath/BUILD.bazel @@ -39,6 +39,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -50,7 +51,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/elastic-datemath/tsconfig.json b/packages/elastic-datemath/tsconfig.json index dcfadbb7cf262c..02465bebe519ab 100644 --- a/packages/elastic-datemath/tsconfig.json +++ b/packages/elastic-datemath/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "target_types", "rootDir": "src", "sourceMap": true, diff --git a/packages/elastic-safer-lodash-set/tsconfig.json b/packages/elastic-safer-lodash-set/tsconfig.json index 5a29c6ff2dd881..48aa6ed341d61f 100644 --- a/packages/elastic-safer-lodash-set/tsconfig.json +++ b/packages/elastic-safer-lodash-set/tsconfig.json @@ -1,8 +1,6 @@ { - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "incremental": false, - }, + "extends": "../../tsconfig.bazel.json", + "compilerOptions": {}, "include": [ "**/*", ], diff --git a/packages/kbn-ace/BUILD.bazel b/packages/kbn-ace/BUILD.bazel index 49c9c6f7832591..5b9c38b16b53a9 100644 --- a/packages/kbn-ace/BUILD.bazel +++ b/packages/kbn-ace/BUILD.bazel @@ -55,6 +55,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -66,7 +67,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-ace/tsconfig.json b/packages/kbn-ace/tsconfig.json index 8fa6be6fb3fc30..4a132efa091184 100644 --- a/packages/kbn-ace/tsconfig.json +++ b/packages/kbn-ace/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-ace/src", diff --git a/packages/kbn-analytics/BUILD.bazel b/packages/kbn-analytics/BUILD.bazel index 9f78d99b78710b..ca8cdcbffbb52d 100644 --- a/packages/kbn-analytics/BUILD.bazel +++ b/packages/kbn-analytics/BUILD.bazel @@ -50,6 +50,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -59,6 +60,7 @@ ts_config( deps = [ "//:tsconfig.base.json", "//:tsconfig.browser.json", + "//:tsconfig.browser_bazel.json", ], ) @@ -70,7 +72,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", root_dir = "src", source_map = True, diff --git a/packages/kbn-analytics/tsconfig.json b/packages/kbn-analytics/tsconfig.json index b24ed9ea137a5e..dfae54ad91c8e4 100644 --- a/packages/kbn-analytics/tsconfig.json +++ b/packages/kbn-analytics/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "isolatedModules": true, "outDir": "./target_types", "sourceMap": true, diff --git a/packages/kbn-apm-config-loader/BUILD.bazel b/packages/kbn-apm-config-loader/BUILD.bazel index 2ace393bcc4a30..81189171412b6a 100644 --- a/packages/kbn-apm-config-loader/BUILD.bazel +++ b/packages/kbn-apm-config-loader/BUILD.bazel @@ -53,6 +53,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -64,7 +65,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-apm-config-loader/tsconfig.json b/packages/kbn-apm-config-loader/tsconfig.json index 314c7969b3f949..2f6da800d9dd20 100644 --- a/packages/kbn-apm-config-loader/tsconfig.json +++ b/packages/kbn-apm-config-loader/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "rootDir": "./src", "sourceMap": true, diff --git a/packages/kbn-apm-utils/BUILD.bazel b/packages/kbn-apm-utils/BUILD.bazel index c75ffb4207122b..fdfd593476fe78 100644 --- a/packages/kbn-apm-utils/BUILD.bazel +++ b/packages/kbn-apm-utils/BUILD.bazel @@ -40,6 +40,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -51,7 +52,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-apm-utils/tsconfig.json b/packages/kbn-apm-utils/tsconfig.json index 08fa0e8a45088f..d7056cda6d71ab 100644 --- a/packages/kbn-apm-utils/tsconfig.json +++ b/packages/kbn-apm-utils/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "target_types", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-cli-dev-mode/BUILD.bazel b/packages/kbn-cli-dev-mode/BUILD.bazel index 608c781017dd6a..e66a621781234b 100644 --- a/packages/kbn-cli-dev-mode/BUILD.bazel +++ b/packages/kbn-cli-dev-mode/BUILD.bazel @@ -82,6 +82,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -93,7 +94,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", root_dir = "src", source_map = True, diff --git a/packages/kbn-cli-dev-mode/tsconfig.json b/packages/kbn-cli-dev-mode/tsconfig.json index 18fda8b9789172..6ce2e21b846741 100644 --- a/packages/kbn-cli-dev-mode/tsconfig.json +++ b/packages/kbn-cli-dev-mode/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "rootDir": "./src", "sourceMap": true, diff --git a/packages/kbn-config-schema/BUILD.bazel b/packages/kbn-config-schema/BUILD.bazel index 2a4718b87df146..70de78b7617c9f 100644 --- a/packages/kbn-config-schema/BUILD.bazel +++ b/packages/kbn-config-schema/BUILD.bazel @@ -51,6 +51,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -62,7 +63,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-config-schema/tsconfig.json b/packages/kbn-config-schema/tsconfig.json index de9476bbbb35c1..79b652daf7ec1d 100644 --- a/packages/kbn-config-schema/tsconfig.json +++ b/packages/kbn-config-schema/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "target_types", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-config/BUILD.bazel b/packages/kbn-config/BUILD.bazel index b11306be969b04..75e4428ed2d701 100644 --- a/packages/kbn-config/BUILD.bazel +++ b/packages/kbn-config/BUILD.bazel @@ -68,6 +68,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -79,7 +80,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-config/tsconfig.json b/packages/kbn-config/tsconfig.json index 20855c6073073d..0971923a11a0f6 100644 --- a/packages/kbn-config/tsconfig.json +++ b/packages/kbn-config/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-crypto/BUILD.bazel b/packages/kbn-crypto/BUILD.bazel index 7419145f628887..36b61d0fb046ba 100644 --- a/packages/kbn-crypto/BUILD.bazel +++ b/packages/kbn-crypto/BUILD.bazel @@ -48,6 +48,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -58,7 +59,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-crypto/tsconfig.json b/packages/kbn-crypto/tsconfig.json index 8b7be5e8a3c9b6..af1a7c75c8e99c 100644 --- a/packages/kbn-crypto/tsconfig.json +++ b/packages/kbn-crypto/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "rootDir": "src", diff --git a/packages/kbn-dev-utils/BUILD.bazel b/packages/kbn-dev-utils/BUILD.bazel index 65935a0d738685..502bcd05b74f82 100644 --- a/packages/kbn-dev-utils/BUILD.bazel +++ b/packages/kbn-dev-utils/BUILD.bazel @@ -56,7 +56,6 @@ RUNTIME_DEPS = [ "@npm//globby", "@npm//load-json-file", "@npm//markdown-it", - "@npm//moment", "@npm//normalize-path", "@npm//rxjs", "@npm//tar", @@ -100,6 +99,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -111,7 +111,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-dev-utils/src/extract.ts b/packages/kbn-dev-utils/src/extract.ts index 05ad2b4bd99ec2..138e6bd67a50cf 100644 --- a/packages/kbn-dev-utils/src/extract.ts +++ b/packages/kbn-dev-utils/src/extract.ts @@ -12,12 +12,16 @@ import Path from 'path'; import { pipeline } from 'stream'; import { promisify } from 'util'; -import { lastValueFrom } from '@kbn/std'; import Tar from 'tar'; import Yauzl, { ZipFile, Entry } from 'yauzl'; import * as Rx from 'rxjs'; import { map, mergeMap, takeUntil } from 'rxjs/operators'; +const strComplete = (obs: Rx.Observable) => + new Promise((resolve, reject) => { + obs.subscribe({ complete: resolve, error: reject }); + }); + const asyncPipeline = promisify(pipeline); interface Options { @@ -36,6 +40,11 @@ interface Options { * Number of path segments to strip form paths in the archive, like --strip-components from tar */ stripComponents?: number; + + /** + * Write modified timestamps to extracted files + */ + setModifiedTimes?: Date; } /** @@ -43,7 +52,12 @@ interface Options { * for both archive types, only tested with familiar archives we create so might not * support some weird exotic zip features we don't use in our own snapshot/build tooling */ -export async function extract({ archivePath, targetDir, stripComponents = 0 }: Options) { +export async function extract({ + archivePath, + targetDir, + stripComponents = 0, + setModifiedTimes, +}: Options) { await Fs.mkdir(targetDir, { recursive: true }); if (archivePath.endsWith('.tar') || archivePath.endsWith('.tar.gz')) { @@ -98,7 +112,7 @@ export async function extract({ archivePath, targetDir, stripComponents = 0 }: O } // file entry - return openReadStream$(entry).pipe( + const writeFile$ = openReadStream$(entry).pipe( mergeMap(async (readStream) => { if (!readStream) { throw new Error('no readstream provided by yauzl'); @@ -106,15 +120,23 @@ export async function extract({ archivePath, targetDir, stripComponents = 0 }: O // write the file contents to disk await asyncPipeline(readStream, createWriteStream(fileName)); - // tell yauzl to read the next entry - zipFile.readEntry(); + + if (setModifiedTimes) { + // update the modified time of the file to match the zip entry + await Fs.utimes(fileName, setModifiedTimes, setModifiedTimes); + } }) ); + + // tell yauzl to read the next entry + zipFile.readEntry(); + + return writeFile$; }) ); // trigger the initial 'entry' event, happens async so the event will be delivered after the observable is subscribed zipFile.readEntry(); - await lastValueFrom(Rx.merge(entry$, error$)); + await strComplete(Rx.merge(entry$, error$)); } diff --git a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts index efe6d308755128..35c910c911105b 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts +++ b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import moment from 'moment'; import * as Rx from 'rxjs'; import { filter, first, catchError, map } from 'rxjs/operators'; import exitHook from 'exit-hook'; @@ -199,8 +198,12 @@ export class ProcRunner { // tie into proc outcome$, remove from _procs on compete proc.outcome$.subscribe({ next: (code) => { - const duration = moment.duration(Date.now() - startMs); - this.log.info('[%s] exited with %s after %s', name, code, duration.humanize()); + this.log.info( + '[%s] exited with %s after %s seconds', + name, + code, + ((Date.now() - startMs) / 1000).toFixed(1) + ); }, complete: () => { remove(); diff --git a/packages/kbn-dev-utils/tsconfig.json b/packages/kbn-dev-utils/tsconfig.json index 56843918d88b11..3c22642edfaa1e 100644 --- a/packages/kbn-dev-utils/tsconfig.json +++ b/packages/kbn-dev-utils/tsconfig.json @@ -1,16 +1,14 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "target_types", "rootDir": "src", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-dev-utils/src", "stripInternal": false, - "target": "ES2019", "types": [ "jest", "node" diff --git a/packages/kbn-docs-utils/BUILD.bazel b/packages/kbn-docs-utils/BUILD.bazel index cf609f126d7db7..498d2140b91fb6 100644 --- a/packages/kbn-docs-utils/BUILD.bazel +++ b/packages/kbn-docs-utils/BUILD.bazel @@ -47,6 +47,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -57,7 +58,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/tsconfig.json b/packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/tsconfig.json index 57353d8847ae13..e80808c6181fe9 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/tsconfig.json +++ b/packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/tsconfig.json @@ -4,4 +4,4 @@ "strictNullChecks": true, }, "include": ["./**/*"] -} \ No newline at end of file +} diff --git a/packages/kbn-docs-utils/tsconfig.json b/packages/kbn-docs-utils/tsconfig.json index 9868c8b3d2bb4a..9b1d6994c1b278 100644 --- a/packages/kbn-docs-utils/tsconfig.json +++ b/packages/kbn-docs-utils/tsconfig.json @@ -1,9 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", - "target": "ES2019", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "rootDir": "src", diff --git a/packages/kbn-es-archiver/BUILD.bazel b/packages/kbn-es-archiver/BUILD.bazel index 9b3db311afa248..b7040b584a3186 100644 --- a/packages/kbn-es-archiver/BUILD.bazel +++ b/packages/kbn-es-archiver/BUILD.bazel @@ -59,6 +59,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -69,7 +70,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-es-archiver/tsconfig.json b/packages/kbn-es-archiver/tsconfig.json index 1bc93908a993e4..dce71fd6cd4a11 100644 --- a/packages/kbn-es-archiver/tsconfig.json +++ b/packages/kbn-es-archiver/tsconfig.json @@ -1,9 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", - "target": "ES2019", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "sourceMap": true, diff --git a/packages/kbn-es-query/BUILD.bazel b/packages/kbn-es-query/BUILD.bazel index 1e40918e6b5096..d4a531d308f6ee 100644 --- a/packages/kbn-es-query/BUILD.bazel +++ b/packages/kbn-es-query/BUILD.bazel @@ -84,6 +84,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -95,7 +96,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-es-query/tsconfig.json b/packages/kbn-es-query/tsconfig.json index 78e722884594e3..5b1f3be263138b 100644 --- a/packages/kbn-es-query/tsconfig.json +++ b/packages/kbn-es-query/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-es-query/src", diff --git a/packages/kbn-es/tsconfig.json b/packages/kbn-es/tsconfig.json index 9487a282326845..83035b6315e65f 100644 --- a/packages/kbn-es/tsconfig.json +++ b/packages/kbn-es/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-es" + "outDir": "target/types" }, "include": [ "src/**/*" diff --git a/packages/kbn-expect/tsconfig.json b/packages/kbn-expect/tsconfig.json index 8c0d9f1e34bd0c..5ad392a7d8d5a5 100644 --- a/packages/kbn-expect/tsconfig.json +++ b/packages/kbn-expect/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": false, + "skipLibCheck": false }, "include": [ "expect.d.ts" diff --git a/packages/kbn-field-types/BUILD.bazel b/packages/kbn-field-types/BUILD.bazel index 829a1b11a0db76..1fb97a5914ee45 100644 --- a/packages/kbn-field-types/BUILD.bazel +++ b/packages/kbn-field-types/BUILD.bazel @@ -54,6 +54,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -65,7 +66,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-field-types/tsconfig.json b/packages/kbn-field-types/tsconfig.json index a7270134039be8..150854076bbf82 100644 --- a/packages/kbn-field-types/tsconfig.json +++ b/packages/kbn-field-types/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": false, "outDir": "./target_types", "declaration": true, "declarationMap": true, diff --git a/packages/kbn-i18n/BUILD.bazel b/packages/kbn-i18n/BUILD.bazel index 1b3410c9f25e74..62d5fb1d75a468 100644 --- a/packages/kbn-i18n/BUILD.bazel +++ b/packages/kbn-i18n/BUILD.bazel @@ -73,6 +73,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -84,7 +85,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-i18n/tsconfig.json b/packages/kbn-i18n/tsconfig.json index 68c02adf9aaea3..2ac0b081b76ddb 100644 --- a/packages/kbn-i18n/tsconfig.json +++ b/packages/kbn-i18n/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "sourceMap": true, "sourceRoot": "../../../../../packages/kbn-i18n/src", diff --git a/packages/kbn-interpreter/BUILD.bazel b/packages/kbn-interpreter/BUILD.bazel index c29faf65638ca2..903f892b64f3ff 100644 --- a/packages/kbn-interpreter/BUILD.bazel +++ b/packages/kbn-interpreter/BUILD.bazel @@ -57,6 +57,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -68,7 +69,6 @@ ts_project( allow_js = True, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-interpreter/tsconfig.json b/packages/kbn-interpreter/tsconfig.json index 011ed877146e83..74ec484ea63e99 100644 --- a/packages/kbn-interpreter/tsconfig.json +++ b/packages/kbn-interpreter/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "allowJs": true, - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "rootDir": "src", diff --git a/packages/kbn-io-ts-utils/BUILD.bazel b/packages/kbn-io-ts-utils/BUILD.bazel index 053030a6f11a93..0e5210bcc38a5f 100644 --- a/packages/kbn-io-ts-utils/BUILD.bazel +++ b/packages/kbn-io-ts-utils/BUILD.bazel @@ -45,6 +45,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -55,7 +56,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-io-ts-utils/tsconfig.json b/packages/kbn-io-ts-utils/tsconfig.json index 7b8f2552754992..3ee769739dfc70 100644 --- a/packages/kbn-io-ts-utils/tsconfig.json +++ b/packages/kbn-io-ts-utils/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "stripInternal": false, "declaration": true, "declarationMap": true, diff --git a/packages/kbn-legacy-logging/BUILD.bazel b/packages/kbn-legacy-logging/BUILD.bazel index 1fd04604dbd244..7a9b472ca9553b 100644 --- a/packages/kbn-legacy-logging/BUILD.bazel +++ b/packages/kbn-legacy-logging/BUILD.bazel @@ -52,6 +52,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -62,7 +63,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-legacy-logging/tsconfig.json b/packages/kbn-legacy-logging/tsconfig.json index e3bcedd3de014c..30a2e56602b6f6 100644 --- a/packages/kbn-legacy-logging/tsconfig.json +++ b/packages/kbn-legacy-logging/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, "outDir": "target", "stripInternal": false, "declaration": true, diff --git a/packages/kbn-logging/BUILD.bazel b/packages/kbn-logging/BUILD.bazel index a5ef1581f41ad5..1a3fa851a3957f 100644 --- a/packages/kbn-logging/BUILD.bazel +++ b/packages/kbn-logging/BUILD.bazel @@ -41,6 +41,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -51,7 +52,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-logging/tsconfig.json b/packages/kbn-logging/tsconfig.json index 78985b823dd95c..aaf79da229a86f 100644 --- a/packages/kbn-logging/tsconfig.json +++ b/packages/kbn-logging/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, "outDir": "target", "stripInternal": false, "declaration": true, diff --git a/packages/kbn-mapbox-gl/BUILD.bazel b/packages/kbn-mapbox-gl/BUILD.bazel index 7d7186068832ec..3cbf7c39421e28 100644 --- a/packages/kbn-mapbox-gl/BUILD.bazel +++ b/packages/kbn-mapbox-gl/BUILD.bazel @@ -43,6 +43,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -53,7 +54,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-mapbox-gl/tsconfig.json b/packages/kbn-mapbox-gl/tsconfig.json index cf1cca0f5a0fd1..159f40c6a7ca69 100644 --- a/packages/kbn-mapbox-gl/tsconfig.json +++ b/packages/kbn-mapbox-gl/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "rootDir": "src", diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 5f4351c89ff1fa..3656210cb6b1b7 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -81,6 +81,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -92,7 +93,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-monaco/tsconfig.json b/packages/kbn-monaco/tsconfig.json index 03b017428beb26..959051b17b782b 100644 --- a/packages/kbn-monaco/tsconfig.json +++ b/packages/kbn-monaco/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": false, "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, diff --git a/packages/kbn-optimizer/BUILD.bazel b/packages/kbn-optimizer/BUILD.bazel index 3809c2b33d5009..ddf2a055196821 100644 --- a/packages/kbn-optimizer/BUILD.bazel +++ b/packages/kbn-optimizer/BUILD.bazel @@ -79,6 +79,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -89,7 +90,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-optimizer/tsconfig.json b/packages/kbn-optimizer/tsconfig.json index e7471846beca20..047c98db8a8067 100644 --- a/packages/kbn-optimizer/tsconfig.json +++ b/packages/kbn-optimizer/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "rootDir": "./src", diff --git a/packages/kbn-plugin-generator/BUILD.bazel b/packages/kbn-plugin-generator/BUILD.bazel index cd18f5e14a736f..c16862ee4f3c21 100644 --- a/packages/kbn-plugin-generator/BUILD.bazel +++ b/packages/kbn-plugin-generator/BUILD.bazel @@ -65,6 +65,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -75,7 +76,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-plugin-generator/template/tsconfig.json.ejs b/packages/kbn-plugin-generator/template/tsconfig.json.ejs index 8a3ced743d0fa3..06ef420ae55e0d 100644 --- a/packages/kbn-plugin-generator/template/tsconfig.json.ejs +++ b/packages/kbn-plugin-generator/template/tsconfig.json.ejs @@ -1,8 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/packages/kbn-plugin-generator/tsconfig.json b/packages/kbn-plugin-generator/tsconfig.json index 9165fd21ebea0a..6a25803c83940e 100644 --- a/packages/kbn-plugin-generator/tsconfig.json +++ b/packages/kbn-plugin-generator/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, "outDir": "target", "target": "ES2019", "declaration": true, diff --git a/packages/kbn-plugin-helpers/BUILD.bazel b/packages/kbn-plugin-helpers/BUILD.bazel index 1a1f3453f768a0..9242701770a862 100644 --- a/packages/kbn-plugin-helpers/BUILD.bazel +++ b/packages/kbn-plugin-helpers/BUILD.bazel @@ -56,6 +56,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -66,7 +67,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-plugin-helpers/tsconfig.json b/packages/kbn-plugin-helpers/tsconfig.json index 4348f1e1a7516f..22adf020187ba8 100644 --- a/packages/kbn-plugin-helpers/tsconfig.json +++ b/packages/kbn-plugin-helpers/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, "outDir": "target", "target": "ES2018", "declaration": true, diff --git a/packages/kbn-pm/tsconfig.json b/packages/kbn-pm/tsconfig.json index 558cff6556ff6b..f12e49fe28d452 100644 --- a/packages/kbn-pm/tsconfig.json +++ b/packages/kbn-pm/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-pm", + "outDir": "target/types", "types": [ "jest", "node" diff --git a/packages/kbn-rule-data-utils/BUILD.bazel b/packages/kbn-rule-data-utils/BUILD.bazel index 62a48b66b4bcea..1268daf54cd47e 100644 --- a/packages/kbn-rule-data-utils/BUILD.bazel +++ b/packages/kbn-rule-data-utils/BUILD.bazel @@ -40,6 +40,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -50,7 +51,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-rule-data-utils/tsconfig.json b/packages/kbn-rule-data-utils/tsconfig.json index 852393f01e5941..1c568530306c70 100644 --- a/packages/kbn-rule-data-utils/tsconfig.json +++ b/packages/kbn-rule-data-utils/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "stripInternal": false, "declaration": true, "declarationMap": true, diff --git a/packages/kbn-securitysolution-autocomplete/BUILD.bazel b/packages/kbn-securitysolution-autocomplete/BUILD.bazel index c29f6d6badc6fe..18c3b8f3ae3bb5 100644 --- a/packages/kbn-securitysolution-autocomplete/BUILD.bazel +++ b/packages/kbn-securitysolution-autocomplete/BUILD.bazel @@ -60,6 +60,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -69,6 +70,7 @@ ts_config( deps = [ "//:tsconfig.base.json", "//:tsconfig.browser.json", + "//:tsconfig.browser_bazel.json", ], ) @@ -81,7 +83,6 @@ ts_project( declaration = True, declaration_dir = "target_types", declaration_map = True, - incremental = True, out_dir = "target_node", root_dir = "src", source_map = True, @@ -95,7 +96,6 @@ ts_project( deps = DEPS, allow_js = True, declaration = False, - incremental = True, out_dir = "target_web", source_map = True, root_dir = "src", diff --git a/packages/kbn-securitysolution-autocomplete/tsconfig.browser.json b/packages/kbn-securitysolution-autocomplete/tsconfig.browser.json index bab7b18c59cfde..404043569aa92f 100644 --- a/packages/kbn-securitysolution-autocomplete/tsconfig.browser.json +++ b/packages/kbn-securitysolution-autocomplete/tsconfig.browser.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.browser.json", + "extends": "../../tsconfig.browser_bazel.json", "compilerOptions": { "allowJs": true, - "incremental": true, "outDir": "./target_web", "declaration": false, "isolatedModules": true, diff --git a/packages/kbn-securitysolution-autocomplete/tsconfig.json b/packages/kbn-securitysolution-autocomplete/tsconfig.json index bf402e93ffd698..484b639f94332a 100644 --- a/packages/kbn-securitysolution-autocomplete/tsconfig.json +++ b/packages/kbn-securitysolution-autocomplete/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "allowJs": true, - "incremental": true, "declarationDir": "./target_types", "outDir": "target_node", "declaration": true, diff --git a/packages/kbn-securitysolution-es-utils/BUILD.bazel b/packages/kbn-securitysolution-es-utils/BUILD.bazel index b69aa3df8ecb50..97f2d9a41cd781 100644 --- a/packages/kbn-securitysolution-es-utils/BUILD.bazel +++ b/packages/kbn-securitysolution-es-utils/BUILD.bazel @@ -44,7 +44,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -54,7 +55,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-es-utils/tsconfig.json b/packages/kbn-securitysolution-es-utils/tsconfig.json index be8848d781caea..906b01c943ab77 100644 --- a/packages/kbn-securitysolution-es-utils/tsconfig.json +++ b/packages/kbn-securitysolution-es-utils/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-hook-utils/BUILD.bazel b/packages/kbn-securitysolution-hook-utils/BUILD.bazel index 5bfe3d86867f6d..b5f3e0df2e0a71 100644 --- a/packages/kbn-securitysolution-hook-utils/BUILD.bazel +++ b/packages/kbn-securitysolution-hook-utils/BUILD.bazel @@ -45,7 +45,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -55,7 +56,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-hook-utils/tsconfig.json b/packages/kbn-securitysolution-hook-utils/tsconfig.json index 352dc086fec30f..7e2cae223b14d0 100644 --- a/packages/kbn-securitysolution-hook-utils/tsconfig.json +++ b/packages/kbn-securitysolution-hook-utils/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/BUILD.bazel b/packages/kbn-securitysolution-io-ts-alerting-types/BUILD.bazel index 8e4a464783fc6f..3c9818a58408d4 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/BUILD.bazel +++ b/packages/kbn-securitysolution-io-ts-alerting-types/BUILD.bazel @@ -53,6 +53,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -63,7 +64,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json b/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json index 3411ce2c93d053..5f69f2bd0e2e4a 100644 --- a/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json +++ b/packages/kbn-securitysolution-io-ts-alerting-types/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel b/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel index 99df07c3d8ea8a..bfdde4363985ec 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel +++ b/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel @@ -54,6 +54,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -64,7 +65,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json b/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json index d926653a4230be..fb979c23df12b1 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json +++ b/packages/kbn-securitysolution-io-ts-list-types/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-io-ts-types/BUILD.bazel b/packages/kbn-securitysolution-io-ts-types/BUILD.bazel index d30eb913b1a57b..fdf3ef64460d9c 100644 --- a/packages/kbn-securitysolution-io-ts-types/BUILD.bazel +++ b/packages/kbn-securitysolution-io-ts-types/BUILD.bazel @@ -52,6 +52,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -62,7 +63,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-securitysolution-io-ts-types/tsconfig.json b/packages/kbn-securitysolution-io-ts-types/tsconfig.json index 42a059439ecb5b..12de4ed6ccb769 100644 --- a/packages/kbn-securitysolution-io-ts-types/tsconfig.json +++ b/packages/kbn-securitysolution-io-ts-types/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-io-ts-utils/BUILD.bazel b/packages/kbn-securitysolution-io-ts-utils/BUILD.bazel index b9326a50207173..f6c81a9adb9a3b 100644 --- a/packages/kbn-securitysolution-io-ts-utils/BUILD.bazel +++ b/packages/kbn-securitysolution-io-ts-utils/BUILD.bazel @@ -51,6 +51,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -61,7 +62,6 @@ ts_project( deps = DEPS, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-securitysolution-io-ts-utils/tsconfig.json b/packages/kbn-securitysolution-io-ts-utils/tsconfig.json index 22718276926f00..aa5aa4df550f26 100644 --- a/packages/kbn-securitysolution-io-ts-utils/tsconfig.json +++ b/packages/kbn-securitysolution-io-ts-utils/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-list-api/BUILD.bazel b/packages/kbn-securitysolution-list-api/BUILD.bazel index 9055cf0804e496..726d75d8c86b89 100644 --- a/packages/kbn-securitysolution-list-api/BUILD.bazel +++ b/packages/kbn-securitysolution-list-api/BUILD.bazel @@ -47,7 +47,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -57,7 +58,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-list-api/tsconfig.json b/packages/kbn-securitysolution-list-api/tsconfig.json index 4fad35e754f298..c2ac6d3d922869 100644 --- a/packages/kbn-securitysolution-list-api/tsconfig.json +++ b/packages/kbn-securitysolution-list-api/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-list-constants/BUILD.bazel b/packages/kbn-securitysolution-list-constants/BUILD.bazel index 8d6779bfa122e3..e56c96e0b5da91 100644 --- a/packages/kbn-securitysolution-list-constants/BUILD.bazel +++ b/packages/kbn-securitysolution-list-constants/BUILD.bazel @@ -42,7 +42,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -52,7 +53,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-list-constants/tsconfig.json b/packages/kbn-securitysolution-list-constants/tsconfig.json index 84edcdd1d5794d..769b5df990e6b5 100644 --- a/packages/kbn-securitysolution-list-constants/tsconfig.json +++ b/packages/kbn-securitysolution-list-constants/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-list-hooks/BUILD.bazel b/packages/kbn-securitysolution-list-hooks/BUILD.bazel index 631e57958d5faf..87075604a75c34 100644 --- a/packages/kbn-securitysolution-list-hooks/BUILD.bazel +++ b/packages/kbn-securitysolution-list-hooks/BUILD.bazel @@ -54,7 +54,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -64,7 +65,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-list-hooks/tsconfig.json b/packages/kbn-securitysolution-list-hooks/tsconfig.json index 9e99c22ea9a07f..9b09c02bd4aa18 100644 --- a/packages/kbn-securitysolution-list-hooks/tsconfig.json +++ b/packages/kbn-securitysolution-list-hooks/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-list-utils/BUILD.bazel b/packages/kbn-securitysolution-list-utils/BUILD.bazel index cb6ddbd7f91d51..b35b13004b1a86 100644 --- a/packages/kbn-securitysolution-list-utils/BUILD.bazel +++ b/packages/kbn-securitysolution-list-utils/BUILD.bazel @@ -49,7 +49,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -59,7 +60,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-list-utils/tsconfig.json b/packages/kbn-securitysolution-list-utils/tsconfig.json index c462159445894f..da48f4af29eadc 100644 --- a/packages/kbn-securitysolution-list-utils/tsconfig.json +++ b/packages/kbn-securitysolution-list-utils/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-t-grid/BUILD.bazel b/packages/kbn-securitysolution-t-grid/BUILD.bazel index 5cf1081bdd32e9..0c5ef200fc9654 100644 --- a/packages/kbn-securitysolution-t-grid/BUILD.bazel +++ b/packages/kbn-securitysolution-t-grid/BUILD.bazel @@ -59,7 +59,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -69,6 +70,7 @@ ts_config( deps = [ "//:tsconfig.base.json", "//:tsconfig.browser.json", + "//:tsconfig.browser_bazel.json", ], ) @@ -80,7 +82,6 @@ ts_project( declaration = True, declaration_dir = "target_types", declaration_map = True, - incremental = True, out_dir = "target_node", root_dir = "src", source_map = True, @@ -94,7 +95,6 @@ ts_project( deps = DEPS, allow_js = True, declaration = False, - incremental = True, out_dir = "target_web", source_map = True, root_dir = "src", diff --git a/packages/kbn-securitysolution-t-grid/tsconfig.browser.json b/packages/kbn-securitysolution-t-grid/tsconfig.browser.json index a5183ba4fd4576..e951765c4b991f 100644 --- a/packages/kbn-securitysolution-t-grid/tsconfig.browser.json +++ b/packages/kbn-securitysolution-t-grid/tsconfig.browser.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.browser.json", + "extends": "../../tsconfig.browser_bazel.json", "compilerOptions": { "allowJs": true, - "incremental": true, "outDir": "./target_web", "declaration": false, "isolatedModules": true, diff --git a/packages/kbn-securitysolution-t-grid/tsconfig.json b/packages/kbn-securitysolution-t-grid/tsconfig.json index 8cda578edede4c..1d5957e516e00c 100644 --- a/packages/kbn-securitysolution-t-grid/tsconfig.json +++ b/packages/kbn-securitysolution-t-grid/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-securitysolution-utils/BUILD.bazel b/packages/kbn-securitysolution-utils/BUILD.bazel index 6084480ef6a152..41fb97bc6079e0 100644 --- a/packages/kbn-securitysolution-utils/BUILD.bazel +++ b/packages/kbn-securitysolution-utils/BUILD.bazel @@ -44,7 +44,8 @@ ts_config( name = "tsconfig", src = "tsconfig.json", deps = [ - "//:tsconfig.base.json", + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -54,7 +55,6 @@ ts_project( args = ["--pretty"], declaration = True, declaration_map = True, - incremental = True, out_dir = "target", root_dir = "src", source_map = True, diff --git a/packages/kbn-securitysolution-utils/tsconfig.json b/packages/kbn-securitysolution-utils/tsconfig.json index 783e67666d8b80..3894b53d6cff31 100644 --- a/packages/kbn-securitysolution-utils/tsconfig.json +++ b/packages/kbn-securitysolution-utils/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, - "incremental": true, "outDir": "target", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-server-http-tools/BUILD.bazel b/packages/kbn-server-http-tools/BUILD.bazel index 2e1a33f6474303..609fe6d00f173a 100644 --- a/packages/kbn-server-http-tools/BUILD.bazel +++ b/packages/kbn-server-http-tools/BUILD.bazel @@ -61,6 +61,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -72,7 +73,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-server-http-tools/tsconfig.json b/packages/kbn-server-http-tools/tsconfig.json index 643b932073c9e0..e378e41c3828bf 100644 --- a/packages/kbn-server-http-tools/tsconfig.json +++ b/packages/kbn-server-http-tools/tsconfig.json @@ -1,11 +1,10 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, - "outDir": "./target", + "outDir": "./target/types", "rootDir": "src", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-server-http-tools/src", diff --git a/packages/kbn-server-route-repository/BUILD.bazel b/packages/kbn-server-route-repository/BUILD.bazel index 147b72c65f9543..9f8a9f34061d2d 100644 --- a/packages/kbn-server-route-repository/BUILD.bazel +++ b/packages/kbn-server-route-repository/BUILD.bazel @@ -57,6 +57,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -68,7 +69,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-server-route-repository/tsconfig.json b/packages/kbn-server-route-repository/tsconfig.json index 947744bc68d425..447a2084926c69 100644 --- a/packages/kbn-server-route-repository/tsconfig.json +++ b/packages/kbn-server-route-repository/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-std/BUILD.bazel b/packages/kbn-std/BUILD.bazel index bcc5a87a1e795d..571d3c061c138e 100644 --- a/packages/kbn-std/BUILD.bazel +++ b/packages/kbn-std/BUILD.bazel @@ -53,6 +53,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -64,7 +65,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-std/tsconfig.json b/packages/kbn-std/tsconfig.json index 3cff7fbd258a6d..2674ca26e96d52 100644 --- a/packages/kbn-std/tsconfig.json +++ b/packages/kbn-std/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "rootDir": "src", "sourceMap": true, diff --git a/packages/kbn-storybook/BUILD.bazel b/packages/kbn-storybook/BUILD.bazel index ae09d79d58331a..dce2a6b3010f3e 100644 --- a/packages/kbn-storybook/BUILD.bazel +++ b/packages/kbn-storybook/BUILD.bazel @@ -72,6 +72,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -83,7 +84,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", root_dir = "src", source_map = True, diff --git a/packages/kbn-storybook/tsconfig.json b/packages/kbn-storybook/tsconfig.json index 9e1ee54cd4899b..0ccf3e78c82880 100644 --- a/packages/kbn-storybook/tsconfig.json +++ b/packages/kbn-storybook/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, diff --git a/packages/kbn-telemetry-tools/BUILD.bazel b/packages/kbn-telemetry-tools/BUILD.bazel index f90ca9b22dc922..1183de25864249 100644 --- a/packages/kbn-telemetry-tools/BUILD.bazel +++ b/packages/kbn-telemetry-tools/BUILD.bazel @@ -59,6 +59,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -70,7 +71,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-telemetry-tools/tsconfig.json b/packages/kbn-telemetry-tools/tsconfig.json index 1f1b4aea5d5c6b..034d7c0c6e745a 100644 --- a/packages/kbn-telemetry-tools/tsconfig.json +++ b/packages/kbn-telemetry-tools/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "isolatedModules": true, "outDir": "./target_types", "rootDir": "src", diff --git a/packages/kbn-test-subj-selector/tsconfig.json b/packages/kbn-test-subj-selector/tsconfig.json index a1e1c1af372c69..a590073946162d 100644 --- a/packages/kbn-test-subj-selector/tsconfig.json +++ b/packages/kbn-test-subj-selector/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { - "tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-test-subj-selector" + "outDir": "target/types" }, "include": [ "index.d.ts" diff --git a/packages/kbn-test/BUILD.bazel b/packages/kbn-test/BUILD.bazel index 34497ca141c5e7..36e81df6d8c3c2 100644 --- a/packages/kbn-test/BUILD.bazel +++ b/packages/kbn-test/BUILD.bazel @@ -110,6 +110,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -121,7 +122,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-test/tsconfig.json b/packages/kbn-test/tsconfig.json index 374139d965e3ed..7ba83019b00756 100644 --- a/packages/kbn-test/tsconfig.json +++ b/packages/kbn-test/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "stripInternal": true, "rootDir": "src", diff --git a/packages/kbn-tinymath/tsconfig.json b/packages/kbn-tinymath/tsconfig.json index 73133b7318a0d6..748eb53a69e3d9 100644 --- a/packages/kbn-tinymath/tsconfig.json +++ b/packages/kbn-tinymath/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "include": ["index.d.ts"] } diff --git a/packages/kbn-typed-react-router-config/BUILD.bazel b/packages/kbn-typed-react-router-config/BUILD.bazel index fa89bc5029ccda..be346f8321fad3 100644 --- a/packages/kbn-typed-react-router-config/BUILD.bazel +++ b/packages/kbn-typed-react-router-config/BUILD.bazel @@ -64,6 +64,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -75,7 +76,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-typed-react-router-config/tsconfig.json b/packages/kbn-typed-react-router-config/tsconfig.json index bee43cac2df0e1..8e17781119ee9e 100644 --- a/packages/kbn-typed-react-router-config/tsconfig.json +++ b/packages/kbn-typed-react-router-config/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "isolatedModules": true, "outDir": "./target_types", "sourceMap": true, diff --git a/packages/kbn-ui-shared-deps/BUILD.bazel b/packages/kbn-ui-shared-deps/BUILD.bazel index 426f8d0b7485ad..352fd48907345d 100644 --- a/packages/kbn-ui-shared-deps/BUILD.bazel +++ b/packages/kbn-ui-shared-deps/BUILD.bazel @@ -81,6 +81,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -92,7 +93,6 @@ ts_project( allow_js = True, declaration = True, declaration_map = True, - incremental = True, out_dir = "target", source_map = True, root_dir = "src", diff --git a/packages/kbn-ui-shared-deps/tsconfig.json b/packages/kbn-ui-shared-deps/tsconfig.json index 0fd49ede218308..90a89ac580a40c 100644 --- a/packages/kbn-ui-shared-deps/tsconfig.json +++ b/packages/kbn-ui-shared-deps/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "allowJs": true, - "incremental": true, - "outDir": "./target", + "outDir": "./target/types", "declaration": true, "declarationMap": true, "rootDir": "src", diff --git a/packages/kbn-utility-types/BUILD.bazel b/packages/kbn-utility-types/BUILD.bazel index 70f814c30f415e..8b63eea537aa64 100644 --- a/packages/kbn-utility-types/BUILD.bazel +++ b/packages/kbn-utility-types/BUILD.bazel @@ -45,6 +45,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -56,7 +57,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-utility-types/tsconfig.json b/packages/kbn-utility-types/tsconfig.json index 92fd810b389c88..997bcf9e0c45bd 100644 --- a/packages/kbn-utility-types/tsconfig.json +++ b/packages/kbn-utility-types/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "./target_types", "rootDir": "./src", "sourceMap": true, diff --git a/packages/kbn-utils/BUILD.bazel b/packages/kbn-utils/BUILD.bazel index c4ded75eda6374..c2f82d65d33184 100644 --- a/packages/kbn-utils/BUILD.bazel +++ b/packages/kbn-utils/BUILD.bazel @@ -49,6 +49,7 @@ ts_config( src = "tsconfig.json", deps = [ "//:tsconfig.base.json", + "//:tsconfig.bazel.json", ], ) @@ -60,7 +61,6 @@ ts_project( declaration = True, declaration_map = True, emit_declaration_only = True, - incremental = False, out_dir = "target_types", source_map = True, root_dir = "src", diff --git a/packages/kbn-utils/src/package_json/index.test.ts b/packages/kbn-utils/src/package_json/index.test.ts index f6d7e1f2f611b6..f8d1b5d25fa1bf 100644 --- a/packages/kbn-utils/src/package_json/index.test.ts +++ b/packages/kbn-utils/src/package_json/index.test.ts @@ -6,15 +6,8 @@ * Side Public License, v 1. */ -import path from 'path'; -import { kibanaPackageJson } from './'; +import { kibanaPackageJson } from './index'; it('parses package.json', () => { expect(kibanaPackageJson.name).toEqual('kibana'); }); - -it('includes __dirname and __filename', () => { - const root = path.resolve(__dirname, '../../../../'); - expect(kibanaPackageJson.__filename).toEqual(path.resolve(root, 'package.json')); - expect(kibanaPackageJson.__dirname).toEqual(root); -}); diff --git a/packages/kbn-utils/src/package_json/index.ts b/packages/kbn-utils/src/package_json/index.ts index d9304cee2ca386..fbd554c8c2c04f 100644 --- a/packages/kbn-utils/src/package_json/index.ts +++ b/packages/kbn-utils/src/package_json/index.ts @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -import { dirname, resolve } from 'path'; +import Path from 'path'; import { REPO_ROOT } from '../repo_root'; export const kibanaPackageJson = { - __filename: resolve(REPO_ROOT, 'package.json'), - __dirname: dirname(resolve(REPO_ROOT, 'package.json')), - ...require(resolve(REPO_ROOT, 'package.json')), + ...require(Path.resolve(REPO_ROOT, 'package.json')), }; export const isKibanaDistributable = () => { diff --git a/packages/kbn-utils/tsconfig.json b/packages/kbn-utils/tsconfig.json index cf546e2a1395ef..85c26f42a695cd 100644 --- a/packages/kbn-utils/tsconfig.json +++ b/packages/kbn-utils/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.bazel.json", "compilerOptions": { "declaration": true, "declarationMap": true, "emitDeclarationOnly": true, - "incremental": false, "outDir": "target_types", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-utils/src", diff --git a/scripts/convert_ts_projects.js b/scripts/convert_ts_projects.js new file mode 100644 index 00000000000000..65053db0d0bd15 --- /dev/null +++ b/scripts/convert_ts_projects.js @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +require('../src/setup_node_env'); +require('../src/dev/typescript/convert_all_to_composite'); diff --git a/src/core/tsconfig.json b/src/core/tsconfig.json index 855962070457e7..9c042577cfe214 100644 --- a/src/core/tsconfig.json +++ b/src/core/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/dev/build/lib/config.test.ts b/src/dev/build/lib/config.test.ts index 8bae63629046cb..8bc5eb70c94373 100644 --- a/src/dev/build/lib/config.test.ts +++ b/src/dev/build/lib/config.test.ts @@ -8,10 +8,9 @@ import { resolve } from 'path'; -import { REPO_ROOT } from '@kbn/utils'; +import { REPO_ROOT, kibanaPackageJson } from '@kbn/utils'; import { createAbsolutePathSerializer } from '@kbn/dev-utils'; -import pkg from '../../../../package.json'; import { Config } from './config'; jest.mock('./version_info', () => ({ @@ -36,14 +35,14 @@ const setup = async ({ targetAllPlatforms = true }: { targetAllPlatforms?: boole describe('#getKibanaPkg()', () => { it('returns the parsed package.json from the Kibana repo', async () => { const config = await setup(); - expect(config.getKibanaPkg()).toEqual(pkg); + expect(config.getKibanaPkg()).toEqual(kibanaPackageJson); }); }); describe('#getNodeVersion()', () => { it('returns the node version from the kibana package.json', async () => { const config = await setup(); - expect(config.getNodeVersion()).toEqual(pkg.engines.node); + expect(config.getNodeVersion()).toEqual(kibanaPackageJson.engines.node); }); }); diff --git a/src/dev/build/tasks/os_packages/docker_generator/run.ts b/src/dev/build/tasks/os_packages/docker_generator/run.ts index 97fd7404097410..cac02cae20c42c 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/run.ts +++ b/src/dev/build/tasks/os_packages/docker_generator/run.ts @@ -10,9 +10,8 @@ import { access, link, unlink, chmod } from 'fs'; import { resolve } from 'path'; import { promisify } from 'util'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, kibanaPackageJson } from '@kbn/dev-utils'; -import { branch } from '../../../../../../package.json'; import { write, copyAll, mkdirp, exec, Config, Build } from '../../../lib'; import * as dockerTemplates from './templates'; import { TemplateContext } from './template_context'; @@ -64,7 +63,7 @@ export async function runDockerGenerator( artifactTarball, imageFlavor, version, - branch, + branch: kibanaPackageJson.branch, license, artifactsDir, imageTag, diff --git a/src/dev/typescript/build_ts_refs.ts b/src/dev/typescript/build_ts_refs.ts index 26425b7a3e61df..db51ff999ccc3d 100644 --- a/src/dev/typescript/build_ts_refs.ts +++ b/src/dev/typescript/build_ts_refs.ts @@ -8,25 +8,31 @@ import Path from 'path'; -import execa from 'execa'; -import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT, ProcRunner } from '@kbn/dev-utils'; -export const REF_CONFIG_PATHS = [Path.resolve(REPO_ROOT, 'tsconfig.refs.json')]; +import { ROOT_REFS_CONFIG_PATH } from './root_refs_config'; -export async function buildAllTsRefs(log: ToolingLog): Promise<{ failed: boolean }> { - for (const path of REF_CONFIG_PATHS) { - const relative = Path.relative(REPO_ROOT, path); - log.debug(`Building TypeScript projects refs for ${relative}...`); - const { failed, stdout } = await execa( - require.resolve('typescript/bin/tsc'), - ['-b', relative, '--pretty'], - { - cwd: REPO_ROOT, - reject: false, - } - ); - log.info(stdout); - if (failed) return { failed }; +export async function buildAllTsRefs({ + log, + procRunner, + verbose, +}: { + log: ToolingLog; + procRunner: ProcRunner; + verbose?: boolean; +}): Promise<{ failed: boolean }> { + const relative = Path.relative(REPO_ROOT, ROOT_REFS_CONFIG_PATH); + log.info(`Building TypeScript projects refs for ${relative}...`); + + try { + await procRunner.run('tsc', { + cmd: Path.relative(REPO_ROOT, require.resolve('typescript/bin/tsc')), + args: ['-b', relative, '--pretty', ...(verbose ? ['--verbose'] : [])], + cwd: REPO_ROOT, + wait: true, + }); + return { failed: false }; + } catch (error) { + return { failed: true }; } - return { failed: false }; } diff --git a/src/dev/typescript/build_ts_refs_cli.ts b/src/dev/typescript/build_ts_refs_cli.ts index ad7807eb87c66d..6b3cb89a7b0ea0 100644 --- a/src/dev/typescript/build_ts_refs_cli.ts +++ b/src/dev/typescript/build_ts_refs_cli.ts @@ -12,8 +12,10 @@ import { run, REPO_ROOT } from '@kbn/dev-utils'; import del from 'del'; import { RefOutputCache } from './ref_output_cache'; -import { buildAllTsRefs, REF_CONFIG_PATHS } from './build_ts_refs'; -import { getOutputsDeep } from './ts_configfile'; +import { buildAllTsRefs } from './build_ts_refs'; +import { updateRootRefsConfig, ROOT_REFS_CONFIG_PATH } from './root_refs_config'; +import { Project } from './project'; +import { PROJECT_CACHE } from './projects'; import { concurrentMap } from './concurrent_map'; const CACHE_WORKING_DIR = Path.resolve(REPO_ROOT, 'data/ts_refs_output_cache'); @@ -28,7 +30,7 @@ const isTypeFailure = (error: any) => export async function runBuildRefsCli() { run( - async ({ log, flags }) => { + async ({ log, flags, procRunner }) => { if (process.env.BUILD_TS_REFS_DISABLE === 'true' && !flags.force) { log.info( 'Building ts refs is disabled because the BUILD_TS_REFS_DISABLE environment variable is set to "true". Pass `--force` to run the build anyway.' @@ -36,7 +38,19 @@ export async function runBuildRefsCli() { return; } - const outDirs = getOutputsDeep(REF_CONFIG_PATHS); + // if the tsconfig.refs.json file is not self-managed then make sure it has + // a reference to every composite project in the repo + await updateRootRefsConfig(log); + + // load all the projects referenced from the root refs config deeply, so we know all + // the ts projects we are going to be cleaning or populating with caches + const projects = Project.load( + ROOT_REFS_CONFIG_PATH, + {}, + { + skipConfigValidation: true, + } + ).getProjectsDeep(PROJECT_CACHE); const cacheEnabled = process.env.BUILD_TS_REFS_CACHE_ENABLE !== 'false' && !!flags.cache; const doCapture = process.env.BUILD_TS_REFS_CACHE_CAPTURE === 'true'; @@ -44,15 +58,15 @@ export async function runBuildRefsCli() { const doInitCache = cacheEnabled && !doCapture; if (doClean) { - log.info('deleting', outDirs.length, 'ts output directories'); - await concurrentMap(100, outDirs, (outDir) => del(outDir)); + log.info('deleting', projects.outDirs.length, 'ts output directories'); + await concurrentMap(100, projects.outDirs, (outDir) => del(outDir)); } let outputCache; if (cacheEnabled) { outputCache = await RefOutputCache.create({ log, - outDirs, + projects, repoRoot: REPO_ROOT, workingDir: CACHE_WORKING_DIR, upstreamUrl: 'https://github.com/elastic/kibana.git', @@ -64,7 +78,7 @@ export async function runBuildRefsCli() { } try { - await buildAllTsRefs(log); + await buildAllTsRefs({ log, procRunner, verbose: !!flags.verbose }); log.success('ts refs build successfully'); } catch (error) { const typeFailure = isTypeFailure(error); @@ -97,7 +111,7 @@ export async function runBuildRefsCli() { --force Run the build even if the BUILD_TS_REFS_DISABLE is set to "true" --clean Delete outDirs for each ts project before building --no-cache Disable fetching/extracting outDir caches based on the mergeBase with upstream - --ignore-type-failures If tsc reports type errors, ignore them and just log a small warning. + --ignore-type-failures If tsc reports type errors, ignore them and just log a small warning `, }, log: { diff --git a/src/dev/typescript/concurrent_map.ts b/src/dev/typescript/concurrent_map.ts index 793630ab85a553..b40da14f4162bd 100644 --- a/src/dev/typescript/concurrent_map.ts +++ b/src/dev/typescript/concurrent_map.ts @@ -15,6 +15,10 @@ export async function concurrentMap( arr: T[], fn: (item: T, i: number) => Promise ): Promise { + if (!arr.length) { + return []; + } + return await lastValueFrom( Rx.from(arr).pipe( // execute items in parallel based on concurrency diff --git a/src/dev/typescript/convert_all_to_composite.ts b/src/dev/typescript/convert_all_to_composite.ts new file mode 100644 index 00000000000000..9b9dd3468747b8 --- /dev/null +++ b/src/dev/typescript/convert_all_to_composite.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { run } from '@kbn/dev-utils'; + +import { PROJECTS } from './projects'; + +run(async ({ log }) => { + for (const project of PROJECTS) { + if (!project.config.compilerOptions?.composite) { + log.info(project.tsConfigPath); + } + } +}); diff --git a/src/dev/typescript/exec_in_projects.ts b/src/dev/typescript/exec_in_projects.ts deleted file mode 100644 index ed87aec4ec1968..00000000000000 --- a/src/dev/typescript/exec_in_projects.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import os from 'os'; - -import { ToolingLog } from '@kbn/dev-utils'; -import chalk from 'chalk'; -import execa from 'execa'; -import Listr from 'listr'; - -import { Project } from './project'; - -class ProjectFailure { - constructor(public project: Project, public error: execa.ExecaError) {} -} - -export function execInProjects( - log: ToolingLog, - projects: Project[], - cmd: string, - getArgs: (project: Project) => string[] -) { - const list = new Listr( - projects.map((project) => ({ - task: () => - execa(cmd, getArgs(project), { - // execute in the current working directory so that relative paths in errors - // are relative from the right location - cwd: process.cwd(), - env: chalk.level > 0 ? { FORCE_COLOR: 'true' } : {}, - stdio: ['ignore', 'pipe', 'pipe'], - preferLocal: true, - }).catch((error) => { - throw new ProjectFailure(project, error); - }), - title: project.name, - })), - { - concurrent: Math.min(4, Math.round((os.cpus() || []).length / 2) || 1) || false, - exitOnError: false, - } - ); - - list.run().catch((error: any) => { - process.exitCode = 1; - - if (!error.errors) { - log.error('Unhandled exception!'); - log.error(error); - process.exit(); - } - - for (const e of error.errors) { - if (e instanceof ProjectFailure) { - log.write(''); - // stdout contains errors from tsc - // stderr conatins tsc crash report - log.error(`${e.project.name} failed\n${e.error.stdout || e.error.stderr}`); - } else { - log.error(e); - } - } - }); -} diff --git a/src/dev/typescript/index.ts b/src/dev/typescript/index.ts index 34ecd76a994db4..d9ccc3975b4eb6 100644 --- a/src/dev/typescript/index.ts +++ b/src/dev/typescript/index.ts @@ -7,8 +7,6 @@ */ export { Project } from './project'; -export { filterProjectsByFlag } from './projects'; export { getTsProjectForAbsolutePath } from './get_ts_project_for_absolute_path'; -export { execInProjects } from './exec_in_projects'; export { runTypeCheckCli } from './run_type_check_cli'; export * from './build_ts_refs_cli'; diff --git a/src/dev/typescript/project.ts b/src/dev/typescript/project.ts index 8d92284e496379..a0c196dd8e9192 100644 --- a/src/dev/typescript/project.ts +++ b/src/dev/typescript/project.ts @@ -6,17 +6,18 @@ * Side Public License, v 1. */ -import { basename, dirname, relative, resolve } from 'path'; +import Path from 'path'; import { IMinimatch, Minimatch } from 'minimatch'; import { REPO_ROOT } from '@kbn/utils'; import { parseTsConfig } from './ts_configfile'; +import { ProjectSet } from './project_set'; function makeMatchers(directory: string, patterns: string[]) { return patterns.map( (pattern) => - new Minimatch(resolve(directory, pattern), { + new Minimatch(Path.resolve(directory, pattern), { dot: true, }) ); @@ -26,41 +27,151 @@ function testMatchers(matchers: IMinimatch[], path: string) { return matchers.some((matcher) => matcher.match(path)); } +export interface ProjectOptions { + name?: string; + disableTypeCheck?: boolean; +} + +interface LoadOptions { + history?: string[]; + cache?: Map; + skipConfigValidation?: boolean; +} + export class Project { - public directory: string; - public name: string; - public config: any; - public disableTypeCheck: boolean; + static load( + tsConfigPath: string, + projectOptions?: ProjectOptions, + loadOptions: LoadOptions = {} + ): Project { + const cache = loadOptions.cache ?? new Map(); + const cached = cache.get(tsConfigPath); + if (cached) { + return cached; + } - private readonly include: IMinimatch[]; - private readonly exclude: IMinimatch[]; + const config = parseTsConfig(tsConfigPath); - constructor( - public tsConfigPath: string, - options: { name?: string; disableTypeCheck?: boolean } = {} - ) { - this.config = parseTsConfig(tsConfigPath); - - const { files, include, exclude = [] } = this.config as { - files?: string[]; - include?: string[]; - exclude?: string[]; - }; - - if (files || !include) { - throw new Error( - 'tsconfig.json files in the Kibana repo must use "include" keys and not "files"' + if (!loadOptions?.skipConfigValidation) { + if (config.files) { + throw new Error(`${tsConfigPath} must not use "files" key`); + } + + if (!config.include) { + throw new Error(`${tsConfigPath} must have an "include" key`); + } + } + + const directory = Path.dirname(tsConfigPath); + const disableTypeCheck = projectOptions?.disableTypeCheck || false; + const name = + projectOptions?.name || Path.relative(REPO_ROOT, directory) || Path.basename(directory); + const include = config.include ? makeMatchers(directory, config.include) : undefined; + const exclude = config.exclude ? makeMatchers(directory, config.exclude) : undefined; + + let baseProject; + if (config.extends) { + const baseConfigPath = Path.resolve(directory, config.extends); + + // prevent circular deps + if (loadOptions.history?.includes(baseConfigPath)) { + throw new Error( + `circular "extends" are not supported in tsconfig files: ${loadOptions.history} => ${baseConfigPath}` + ); + } + + baseProject = Project.load( + baseConfigPath, + {}, + { + skipConfigValidation: true, + history: [...(loadOptions.history ?? []), tsConfigPath], + cache, + } ); } - this.directory = dirname(this.tsConfigPath); - this.disableTypeCheck = options.disableTypeCheck || false; - this.name = options.name || relative(REPO_ROOT, this.directory) || basename(this.directory); - this.include = makeMatchers(this.directory, include); - this.exclude = makeMatchers(this.directory, exclude); + const project = new Project( + tsConfigPath, + directory, + name, + config, + disableTypeCheck, + baseProject, + include, + exclude + ); + cache.set(tsConfigPath, project); + return project; + } + + constructor( + public readonly tsConfigPath: string, + public readonly directory: string, + public readonly name: string, + public readonly config: any, + public readonly disableTypeCheck: boolean, + + public readonly baseProject?: Project, + private readonly include?: IMinimatch[], + private readonly exclude?: IMinimatch[] + ) {} + + private getInclude(): IMinimatch[] { + return this.include ? this.include : this.baseProject?.getInclude() ?? []; + } + + private getExclude(): IMinimatch[] { + return this.exclude ? this.exclude : this.baseProject?.getExclude() ?? []; } public isAbsolutePathSelected(path: string) { - return testMatchers(this.exclude, path) ? false : testMatchers(this.include, path); + return testMatchers(this.getExclude(), path) ? false : testMatchers(this.getInclude(), path); + } + + public isCompositeProject(): boolean { + const own = this.config.compilerOptions?.composite; + return !!(own === undefined ? this.baseProject?.isCompositeProject() : own); + } + + public getOutDir(): string | undefined { + if (this.config.compilerOptions?.outDir) { + return Path.resolve(this.directory, this.config.compilerOptions.outDir); + } + if (this.baseProject) { + return this.baseProject.getOutDir(); + } + return undefined; + } + + public getRefdPaths(): string[] { + if (this.config.references) { + return (this.config.references as Array<{ path: string }>).map(({ path }) => + Path.resolve(this.directory, path) + ); + } + + return this.baseProject ? this.baseProject.getRefdPaths() : []; + } + + public getProjectsDeep(cache?: Map) { + const projects = new Set(); + const queue = new Set([this.tsConfigPath]); + + for (const path of queue) { + const project = Project.load(path, {}, { skipConfigValidation: true, cache }); + projects.add(project); + for (const refPath of project.getRefdPaths()) { + queue.add(refPath); + } + } + + return new ProjectSet(projects); + } + + public getConfigPaths(): string[] { + return this.baseProject + ? [this.tsConfigPath, ...this.baseProject.getConfigPaths()] + : [this.tsConfigPath]; } } diff --git a/src/dev/typescript/project_set.ts b/src/dev/typescript/project_set.ts new file mode 100644 index 00000000000000..4ef3693cf6d021 --- /dev/null +++ b/src/dev/typescript/project_set.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Project } from './project'; + +export class ProjectSet { + public readonly outDirs: string[]; + private readonly projects: Project[]; + + constructor(projects: Iterable) { + this.projects = [...projects]; + this.outDirs = this.projects + .map((p) => p.getOutDir()) + .filter((p): p is string => typeof p === 'string'); + } + + filterByPaths(paths: string[]) { + return new ProjectSet( + this.projects.filter((p) => + paths.some((f) => p.isAbsolutePathSelected(f) || p.getConfigPaths().includes(f)) + ) + ); + } +} diff --git a/src/dev/typescript/projects.ts b/src/dev/typescript/projects.ts index 2c54bb8dba1794..419d4f0854ecc7 100644 --- a/src/dev/typescript/projects.ts +++ b/src/dev/typescript/projects.ts @@ -7,67 +7,57 @@ */ import glob from 'glob'; -import { resolve } from 'path'; +import Path from 'path'; import { REPO_ROOT } from '@kbn/utils'; -import { Project } from './project'; +import { Project, ProjectOptions } from './project'; + +/** + * Simple map of all projects defined in this file, to speed of some other operations + * which need to load files by path and to avoid re-parsing base config files hundreds of times + */ +export const PROJECT_CACHE = new Map(); + +const createProject = (rootRelativePath: string, options: ProjectOptions = {}) => + Project.load(Path.resolve(REPO_ROOT, rootRelativePath), options, { + cache: PROJECT_CACHE, + }); + +const findProjects = (pattern: string) => + // NOTE: using glob.sync rather than glob-all or globby + // because it takes less than 10 ms, while the other modules + // both took closer to 1000ms. + glob.sync(pattern, { cwd: REPO_ROOT }).map((path) => createProject(path)); export const PROJECTS = [ - new Project(resolve(REPO_ROOT, 'tsconfig.json')), - new Project(resolve(REPO_ROOT, 'test/tsconfig.json'), { name: 'kibana/test' }), - new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), { name: 'x-pack/test' }), - new Project(resolve(REPO_ROOT, 'src/core/tsconfig.json')), - new Project(resolve(REPO_ROOT, 'x-pack/plugins/drilldowns/url_drilldown/tsconfig.json'), { + createProject('tsconfig.json'), + createProject('test/tsconfig.json', { name: 'kibana/test' }), + createProject('x-pack/test/tsconfig.json', { name: 'x-pack/test' }), + createProject('src/core/tsconfig.json'), + + createProject('x-pack/plugins/drilldowns/url_drilldown/tsconfig.json', { name: 'security_solution/cypress', }), - new Project(resolve(REPO_ROOT, 'x-pack/plugins/security_solution/cypress/tsconfig.json'), { + createProject('x-pack/plugins/security_solution/cypress/tsconfig.json', { name: 'security_solution/cypress', }), - new Project(resolve(REPO_ROOT, 'x-pack/plugins/osquery/cypress/tsconfig.json'), { + createProject('x-pack/plugins/osquery/cypress/tsconfig.json', { name: 'osquery/cypress', }), - new Project(resolve(REPO_ROOT, 'x-pack/plugins/apm/e2e/tsconfig.json'), { + createProject('x-pack/plugins/apm/e2e/tsconfig.json', { name: 'apm/cypress', disableTypeCheck: true, }), - new Project(resolve(REPO_ROOT, 'x-pack/plugins/apm/ftr_e2e/tsconfig.json'), { + createProject('x-pack/plugins/apm/ftr_e2e/tsconfig.json', { name: 'apm/ftr_e2e', disableTypeCheck: true, }), - // NOTE: using glob.sync rather than glob-all or globby - // because it takes less than 10 ms, while the other modules - // both took closer to 1000ms. - ...glob - .sync('packages/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('src/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('x-pack/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('examples/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('x-pack/examples/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('test/plugin_functional/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('test/interpreter_functional/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), - ...glob - .sync('test/server_integration/__fixtures__/plugins/*/tsconfig.json', { cwd: REPO_ROOT }) - .map((path) => new Project(resolve(REPO_ROOT, path))), + ...findProjects('packages/*/tsconfig.json'), + ...findProjects('src/plugins/*/tsconfig.json'), + ...findProjects('x-pack/plugins/*/tsconfig.json'), + ...findProjects('examples/*/tsconfig.json'), + ...findProjects('x-pack/examples/*/tsconfig.json'), + ...findProjects('test/plugin_functional/plugins/*/tsconfig.json'), + ...findProjects('test/interpreter_functional/plugins/*/tsconfig.json'), + ...findProjects('test/server_integration/__fixtures__/plugins/*/tsconfig.json'), ]; - -export function filterProjectsByFlag(projectFlag?: string) { - if (!projectFlag) { - return PROJECTS; - } - - const tsConfigPath = resolve(projectFlag); - return PROJECTS.filter((project) => project.tsConfigPath === tsConfigPath); -} diff --git a/src/dev/typescript/ref_output_cache/integration_tests/ref_output_cache.test.ts b/src/dev/typescript/ref_output_cache/integration_tests/ref_output_cache.test.ts index 7347529239176e..370ef9d17a04e8 100644 --- a/src/dev/typescript/ref_output_cache/integration_tests/ref_output_cache.test.ts +++ b/src/dev/typescript/ref_output_cache/integration_tests/ref_output_cache.test.ts @@ -23,6 +23,8 @@ import { import { RefOutputCache, OUTDIR_MERGE_BASE_FILENAME } from '../ref_output_cache'; import { Archives } from '../archives'; import type { RepoInfo } from '../repo_info'; +import { Project } from '../../project'; +import { ProjectSet } from '../../project_set'; jest.mock('../repo_info'); const { RepoInfo: MockRepoInfo } = jest.requireMock('../repo_info'); @@ -48,25 +50,41 @@ afterEach(async () => { logWriter.messages.length = 0; }); -it('creates and extracts caches, ingoring dirs with matching merge-base file and placing merge-base files', async () => { +function makeMockProject(path: string) { + Fs.mkdirSync(Path.resolve(path, 'target/test-types'), { recursive: true }); + Fs.writeFileSync( + Path.resolve(path, 'tsconfig.json'), + JSON.stringify({ + compilerOptions: { + outDir: './target/test-types', + }, + include: ['**/*'], + exclude: ['test/target/**/*'], + }) + ); + + return Project.load(Path.resolve(path, 'tsconfig.json')); +} + +it('creates and extracts caches, ingoring dirs with matching merge-base file, placing merge-base files, and overriding modified time for updated inputs', async () => { // setup repo mock const HEAD = 'abcdefg'; repo.getHeadSha.mockResolvedValue(HEAD); repo.getRelative.mockImplementation((path) => Path.relative(TMP, path)); repo.getRecentShasFrom.mockResolvedValue(['5678', '1234']); + repo.getFilesChangesSinceSha.mockResolvedValue([]); // create two fake outDirs - const outDirs = [Path.resolve(TMP, 'out/foo'), Path.resolve(TMP, 'out/bar')]; - for (const dir of outDirs) { - Fs.mkdirSync(dir, { recursive: true }); - Fs.writeFileSync(Path.resolve(dir, 'test'), 'hello world'); - } + const projects = new ProjectSet([ + makeMockProject(Path.resolve(TMP, 'test1')), + makeMockProject(Path.resolve(TMP, 'test2')), + ]); // init an archives instance using tmp const archives = await Archives.create(log, TMP); // init the RefOutputCache with our mock data - const refOutputCache = new RefOutputCache(log, repo, archives, outDirs, HEAD); + const refOutputCache = new RefOutputCache(log, repo, archives, projects, HEAD); // create the new cache right in the archives dir await refOutputCache.captureCache(Path.resolve(TMP)); @@ -88,19 +106,21 @@ it('creates and extracts caches, ingoring dirs with matching merge-base file and }); // modify the files in the outDirs so we can see which ones are restored from the cache - for (const dir of outDirs) { - Fs.writeFileSync(Path.resolve(dir, 'test'), 'not cleared by cache init'); + for (const dir of projects.outDirs) { + Fs.writeFileSync(Path.resolve(dir, 'no-cleared.txt'), 'not cleared by cache init'); } - // add the mergeBase to the first outDir so that it is ignored - Fs.writeFileSync(Path.resolve(outDirs[0], OUTDIR_MERGE_BASE_FILENAME), HEAD); + + // add the mergeBase to test1 outDir so that it is not cleared + Fs.writeFileSync(Path.resolve(projects.outDirs[0], OUTDIR_MERGE_BASE_FILENAME), HEAD); // rebuild the outDir from the refOutputCache await refOutputCache.initCaches(); + // verify that "test1" outdir is untouched and that "test2" is cleared out const files = Object.fromEntries( globby .sync( - outDirs.map((p) => normalize(p)), + projects.outDirs.map((p) => normalize(p)), { dot: true } ) .map((path) => [Path.relative(TMP, path), Fs.readFileSync(path, 'utf-8')]) @@ -108,10 +128,9 @@ it('creates and extracts caches, ingoring dirs with matching merge-base file and expect(files).toMatchInlineSnapshot(` Object { - "out/bar/.ts-ref-cache-merge-base": "abcdefg", - "out/bar/test": "hello world", - "out/foo/.ts-ref-cache-merge-base": "abcdefg", - "out/foo/test": "not cleared by cache init", + "test1/target/test-types/.ts-ref-cache-merge-base": "abcdefg", + "test1/target/test-types/no-cleared.txt": "not cleared by cache init", + "test2/target/test-types/.ts-ref-cache-merge-base": "abcdefg", } `); expect(logWriter.messages).toMatchInlineSnapshot(` @@ -124,7 +143,7 @@ it('creates and extracts caches, ingoring dirs with matching merge-base file and " debg download complete, renaming tmp", " debg download of cache for abcdefg complete", " debg extracting archives/abcdefg.zip to rebuild caches in 1 outDirs", - " debg [out/bar] clearing outDir and replacing with cache", + " debg [test2/target/test-types] clearing outDir and replacing with cache", ] `); }); @@ -138,7 +157,7 @@ it('cleans up oldest archives when there are more than 10', async () => { } const archives = await Archives.create(log, TMP); - const cache = new RefOutputCache(log, repo, archives, [], '1234'); + const cache = new RefOutputCache(log, repo, archives, new ProjectSet([]), '1234'); expect(cache.archives.size()).toBe(102); await cache.cleanup(); expect(cache.archives.size()).toBe(10); diff --git a/src/dev/typescript/ref_output_cache/ref_output_cache.ts b/src/dev/typescript/ref_output_cache/ref_output_cache.ts index ca69236a706d25..b7e641ceb33d51 100644 --- a/src/dev/typescript/ref_output_cache/ref_output_cache.ts +++ b/src/dev/typescript/ref_output_cache/ref_output_cache.ts @@ -9,14 +9,15 @@ import Path from 'path'; import Fs from 'fs/promises'; -import { ToolingLog, kibanaPackageJson } from '@kbn/dev-utils'; +import { ToolingLog, kibanaPackageJson, extract } from '@kbn/dev-utils'; import del from 'del'; import tempy from 'tempy'; import { Archives } from './archives'; -import { unzip, zip } from './zip'; +import { zip } from './zip'; import { concurrentMap } from '../concurrent_map'; import { RepoInfo } from './repo_info'; +import { ProjectSet } from '../project_set'; export const OUTDIR_MERGE_BASE_FILENAME = '.ts-ref-cache-merge-base'; @@ -49,7 +50,7 @@ export class RefOutputCache { static async create(options: { log: ToolingLog; workingDir: string; - outDirs: string[]; + projects: ProjectSet; repoRoot: string; upstreamUrl: string; }) { @@ -59,14 +60,14 @@ export class RefOutputCache { const upstreamBranch: string = kibanaPackageJson.branch; const mergeBase = await repoInfo.getMergeBase('HEAD', upstreamBranch); - return new RefOutputCache(options.log, repoInfo, archives, options.outDirs, mergeBase); + return new RefOutputCache(options.log, repoInfo, archives, options.projects, mergeBase); } constructor( private readonly log: ToolingLog, private readonly repo: RepoInfo, public readonly archives: Archives, - private readonly outDirs: string[], + private readonly projects: ProjectSet, private readonly mergeBase: string ) {} @@ -77,7 +78,7 @@ export class RefOutputCache { */ async initCaches() { const outdatedOutDirs = ( - await concurrentMap(100, this.outDirs, async (outDir) => ({ + await concurrentMap(100, this.projects.outDirs, async (outDir) => ({ path: outDir, outdated: !(await matchMergeBase(outDir, this.mergeBase)), })) @@ -101,6 +102,9 @@ export class RefOutputCache { return; } + const changedFiles = await this.repo.getFilesChangesSinceSha(archive.sha); + const outDirsForcingExtraCacheCheck = this.projects.filterByPaths(changedFiles).outDirs; + const tmpDir = tempy.directory(); this.log.debug( 'extracting', @@ -109,9 +113,13 @@ export class RefOutputCache { outdatedOutDirs.length, 'outDirs' ); - await unzip(archive.path, tmpDir); + await extract({ + archivePath: archive.path, + targetDir: tmpDir, + }); const cacheNames = await Fs.readdir(tmpDir); + const beginningOfTime = new Date(0); await concurrentMap(50, outdatedOutDirs, async (outDir) => { const relative = this.repo.getRelative(outDir); @@ -129,9 +137,22 @@ export class RefOutputCache { return; } - this.log.debug(`[${relative}] clearing outDir and replacing with cache`); + const setModifiedTimes = outDirsForcingExtraCacheCheck.includes(outDir) + ? beginningOfTime + : undefined; + + if (setModifiedTimes) { + this.log.debug(`[${relative}] replacing outDir with cache (forcing revalidation)`); + } else { + this.log.debug(`[${relative}] clearing outDir and replacing with cache`); + } + await del(outDir); - await unzip(Path.resolve(tmpDir, cacheName), outDir); + await extract({ + archivePath: Path.resolve(tmpDir, cacheName), + targetDir: outDir, + setModifiedTimes, + }); await Fs.writeFile(Path.resolve(outDir, OUTDIR_MERGE_BASE_FILENAME), this.mergeBase); }); } @@ -154,7 +175,7 @@ export class RefOutputCache { const subZips: Array<[string, string]> = []; await Promise.all( - this.outDirs.map(async (absolute) => { + this.projects.outDirs.map(async (absolute) => { const relative = this.repo.getRelative(absolute); const subZipName = `${relative.split(Path.sep).join('__')}.zip`; const subZipPath = Path.resolve(tmpDir, subZipName); diff --git a/src/dev/typescript/ref_output_cache/repo_info.ts b/src/dev/typescript/ref_output_cache/repo_info.ts index 9a51f3f75182b1..0bba010bc185d6 100644 --- a/src/dev/typescript/ref_output_cache/repo_info.ts +++ b/src/dev/typescript/ref_output_cache/repo_info.ts @@ -52,4 +52,20 @@ export class RepoInfo { return proc.stdout.trim(); } + + async getFilesChangesSinceSha(sha: string) { + this.log.debug('determining files changes since sha', sha); + + const proc = await execa('git', ['diff', '--name-only', sha], { + cwd: this.dir, + }); + const files = proc.stdout + .trim() + .split('\n') + .map((p) => Path.resolve(this.dir, p)); + + this.log.verbose('found the following changes compared to', sha, `\n - ${files.join('\n - ')}`); + + return files; + } } diff --git a/src/dev/typescript/ref_output_cache/zip.ts b/src/dev/typescript/ref_output_cache/zip.ts index b1bd8f514bb95c..6b0ee053367de2 100644 --- a/src/dev/typescript/ref_output_cache/zip.ts +++ b/src/dev/typescript/ref_output_cache/zip.ts @@ -12,7 +12,6 @@ import Path from 'path'; import { pipeline } from 'stream'; import { promisify } from 'util'; -import extractZip from 'extract-zip'; import archiver from 'archiver'; const asyncPipeline = promisify(pipeline); @@ -44,9 +43,3 @@ export async function zip( // await the promise from the pipeline and archive.finalize() await Promise.all([asyncPipeline(archive, createWriteStream(outputPath)), archive.finalize()]); } - -export async function unzip(path: string, outputDir: string) { - await extractZip(path, { - dir: outputDir, - }); -} diff --git a/src/dev/typescript/root_refs_config.ts b/src/dev/typescript/root_refs_config.ts new file mode 100644 index 00000000000000..c297a9288ddd56 --- /dev/null +++ b/src/dev/typescript/root_refs_config.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs/promises'; + +import dedent from 'dedent'; +import { REPO_ROOT, ToolingLog } from '@kbn/dev-utils'; + +import { PROJECTS } from './projects'; + +export const ROOT_REFS_CONFIG_PATH = Path.resolve(REPO_ROOT, 'tsconfig.refs.json'); +export const REF_CONFIG_PATHS = [ROOT_REFS_CONFIG_PATH]; + +async function isRootRefsConfigSelfManaged() { + try { + const currentRefsFile = await Fs.readFile(ROOT_REFS_CONFIG_PATH, 'utf-8'); + return currentRefsFile.trim().startsWith('// SELF MANAGED'); + } catch (error) { + if (error.code === 'ENOENT') { + return false; + } + + throw error; + } +} + +function generateTsConfig(refs: string[]) { + return dedent` + // This file is automatically updated when you run \`node scripts/build_ts_refs\`. If you start this + // file with the text "// SELF MANAGED" then you can comment out any projects that you like and only + // build types for specific projects and their dependencies + { + "include": [], + "references": [ +${refs.map((p) => ` { "path": ${JSON.stringify(p)} },`).join('\n')} + ] + } + `; +} + +export async function updateRootRefsConfig(log: ToolingLog) { + if (await isRootRefsConfigSelfManaged()) { + log.warning( + 'tsconfig.refs.json starts with "// SELF MANAGED" so not updating to include all projects' + ); + return; + } + + const refs = PROJECTS.filter((p) => p.isCompositeProject()) + .map((p) => `./${Path.relative(REPO_ROOT, p.tsConfigPath)}`) + .sort((a, b) => a.localeCompare(b)); + + log.debug('updating', ROOT_REFS_CONFIG_PATH); + await Fs.writeFile(ROOT_REFS_CONFIG_PATH, generateTsConfig(refs) + '\n'); +} diff --git a/src/dev/typescript/run_type_check_cli.ts b/src/dev/typescript/run_type_check_cli.ts index d9e9eb036fe0f2..1bf31a6c5bac0d 100644 --- a/src/dev/typescript/run_type_check_cli.ts +++ b/src/dev/typescript/run_type_check_cli.ts @@ -6,96 +6,116 @@ * Side Public License, v 1. */ -import { ToolingLog } from '@kbn/dev-utils'; -import chalk from 'chalk'; -import dedent from 'dedent'; -import getopts from 'getopts'; +import Path from 'path'; +import Os from 'os'; -import { execInProjects } from './exec_in_projects'; -import { filterProjectsByFlag } from './projects'; +import * as Rx from 'rxjs'; +import { mergeMap, reduce } from 'rxjs/operators'; +import execa from 'execa'; +import { run, createFailError } from '@kbn/dev-utils'; +import { lastValueFrom } from '@kbn/std'; + +import { PROJECTS } from './projects'; import { buildAllTsRefs } from './build_ts_refs'; +import { updateRootRefsConfig } from './root_refs_config'; export async function runTypeCheckCli() { - const extraFlags: string[] = []; - const opts = getopts(process.argv.slice(2), { - boolean: ['skip-lib-check', 'help'], - default: { - project: undefined, - }, - unknown(name) { - extraFlags.push(name); - return false; + run( + async ({ log, flags, procRunner }) => { + // if the tsconfig.refs.json file is not self-managed then make sure it has + // a reference to every composite project in the repo + await updateRootRefsConfig(log); + + const { failed } = await buildAllTsRefs({ log, procRunner, verbose: !!flags.verbose }); + if (failed) { + throw createFailError('Unable to build TS project refs'); + } + + const projectFilter = + flags.project && typeof flags.project === 'string' + ? Path.resolve(flags.project) + : undefined; + + const projects = PROJECTS.filter((p) => { + return ( + !p.disableTypeCheck && + (!projectFilter || p.tsConfigPath === projectFilter) && + !p.isCompositeProject() + ); + }); + + if (!projects.length) { + throw createFailError(`Unable to find project at ${flags.project}`); + } + + const concurrency = Math.min(4, Math.round((Os.cpus() || []).length / 2) || 1) || 1; + log.info('running type check in', projects.length, 'non-composite projects'); + + const tscArgs = [ + ...['--emitDeclarationOnly', 'false'], + '--noEmit', + '--pretty', + ...(flags['skip-lib-check'] + ? ['--skipLibCheck', flags['skip-lib-check'] as string] + : ['--skipLibCheck', 'false']), + ]; + + const failureCount = await lastValueFrom( + Rx.from(projects).pipe( + mergeMap(async (p) => { + const relativePath = Path.relative(process.cwd(), p.tsConfigPath); + + const result = await execa( + process.execPath, + [ + '--max-old-space-size=5120', + require.resolve('typescript/bin/tsc'), + ...['--project', p.tsConfigPath, ...(flags.verbose ? ['--verbose'] : [])], + ...tscArgs, + ], + { + reject: false, + all: true, + } + ); + + if (result.failed) { + log.error(`Type check failed in ${relativePath}:`); + log.error(result.all ?? ' - tsc produced no output - '); + return 1; + } else { + log.success(relativePath); + return 0; + } + }, concurrency), + reduce((acc, f) => acc + f, 0) + ) + ); + + if (failureCount > 0) { + throw createFailError(`${failureCount} type checks failed`); + } }, - }); - - const log = new ToolingLog({ - level: 'info', - writeTo: process.stdout, - }); - - if (extraFlags.length) { - for (const flag of extraFlags) { - log.error(`Unknown flag: ${flag}`); - } - - process.exitCode = 1; - opts.help = true; - } - - if (opts.help) { - process.stdout.write( - dedent(chalk` - {dim usage:} node scripts/type_check [...options] - - Run the TypeScript compiler without emitting files so that it can check - types during development. + { + description: ` + Run the TypeScript compiler without emitting files so that it can check types during development. Examples: - - {dim # check types in all projects} - {dim $} node scripts/type_check - - {dim # check types in a single project} - {dim $} node scripts/type_check --project packages/kbn-pm/tsconfig.json - - Options: - - --project [path] {dim Path to a tsconfig.json file determines the project to check} - --skip-lib-check {dim Skip type checking of all declaration files (*.d.ts). Default is false} - --help {dim Show this message} - `) - ); - process.stdout.write('\n'); - process.exit(); - } - - const { failed } = await buildAllTsRefs(log); - if (failed) { - log.error('Unable to build TS project refs'); - process.exit(1); - } - - const tscArgs = [ - // composite project cannot be used with --noEmit - ...['--composite', 'false'], - ...['--emitDeclarationOnly', 'false'], - '--noEmit', - '--pretty', - ...(opts['skip-lib-check'] - ? ['--skipLibCheck', opts['skip-lib-check']] - : ['--skipLibCheck', 'false']), - ]; - const projects = filterProjectsByFlag(opts.project).filter((p) => !p.disableTypeCheck); - - if (!projects.length) { - log.error(`Unable to find project at ${opts.project}`); - process.exit(1); - } - - execInProjects(log, projects, process.execPath, (project) => [ - '--max-old-space-size=5120', - require.resolve('typescript/bin/tsc'), - ...['--project', project.tsConfigPath], - ...tscArgs, - ]); + # check types in all projects + node scripts/type_check + + # check types in a single project + node scripts/type_check --project packages/kbn-pm/tsconfig.json + `, + flags: { + string: ['project'], + boolean: ['skip-lib-check'], + help: ` + --project [path] Path to a tsconfig.json file determines the project to check + --skip-lib-check Skip type checking of all declaration files (*.d.ts). Default is false + --help Show this message + `, + }, + } + ); } diff --git a/src/plugins/advanced_settings/tsconfig.json b/src/plugins/advanced_settings/tsconfig.json index 4d62e410326b69..b207f600cbd4e9 100644 --- a/src/plugins/advanced_settings/tsconfig.json +++ b/src/plugins/advanced_settings/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/apm_oss/tsconfig.json b/src/plugins/apm_oss/tsconfig.json index aeb6837c69a998..08ed86d5da0a89 100644 --- a/src/plugins/apm_oss/tsconfig.json +++ b/src/plugins/apm_oss/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/bfetch/tsconfig.json b/src/plugins/bfetch/tsconfig.json index 173ff725d07d02..8fceb7d815ee91 100644 --- a/src/plugins/bfetch/tsconfig.json +++ b/src/plugins/bfetch/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/charts/tsconfig.json b/src/plugins/charts/tsconfig.json index a4f65d5937204c..fc05a260686540 100644 --- a/src/plugins/charts/tsconfig.json +++ b/src/plugins/charts/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/console/tsconfig.json b/src/plugins/console/tsconfig.json index 34aca5021bac4e..ee6fbfebc77a26 100644 --- a/src/plugins/console/tsconfig.json +++ b/src/plugins/console/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json index 12820fc08310d6..4febb8b5555cfe 100644 --- a/src/plugins/dashboard/tsconfig.json +++ b/src/plugins/dashboard/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/data/tsconfig.json b/src/plugins/data/tsconfig.json index 6e4e89f7538fd7..3687604e05e2b1 100644 --- a/src/plugins/data/tsconfig.json +++ b/src/plugins/data/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/dev_tools/tsconfig.json b/src/plugins/dev_tools/tsconfig.json index c17b2341fd42f8..bbb33ac5b2f99d 100644 --- a/src/plugins/dev_tools/tsconfig.json +++ b/src/plugins/dev_tools/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/discover/tsconfig.json b/src/plugins/discover/tsconfig.json index 8c71091e3ecf26..b3f1ad5d0bc1e8 100644 --- a/src/plugins/discover/tsconfig.json +++ b/src/plugins/discover/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/embeddable/tsconfig.json b/src/plugins/embeddable/tsconfig.json index 27a887500fb68e..b7a6ff3252d6a9 100644 --- a/src/plugins/embeddable/tsconfig.json +++ b/src/plugins/embeddable/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/es_ui_shared/tsconfig.json b/src/plugins/es_ui_shared/tsconfig.json index 5f136d09b2ce45..38e6cf78f8f60f 100644 --- a/src/plugins/es_ui_shared/tsconfig.json +++ b/src/plugins/es_ui_shared/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expression_error/tsconfig.json b/src/plugins/expression_error/tsconfig.json index aa4562ec735765..111ff58935a35f 100644 --- a/src/plugins/expression_error/tsconfig.json +++ b/src/plugins/expression_error/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expression_image/tsconfig.json b/src/plugins/expression_image/tsconfig.json index 5fab51496c97e7..9a7175a8d767be 100644 --- a/src/plugins/expression_image/tsconfig.json +++ b/src/plugins/expression_image/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expression_metric/tsconfig.json b/src/plugins/expression_metric/tsconfig.json index 5fab51496c97e7..9a7175a8d767be 100644 --- a/src/plugins/expression_metric/tsconfig.json +++ b/src/plugins/expression_metric/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expression_repeat_image/tsconfig.json b/src/plugins/expression_repeat_image/tsconfig.json index aa4562ec735765..111ff58935a35f 100644 --- a/src/plugins/expression_repeat_image/tsconfig.json +++ b/src/plugins/expression_repeat_image/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expression_reveal_image/tsconfig.json b/src/plugins/expression_reveal_image/tsconfig.json index aa4562ec735765..111ff58935a35f 100644 --- a/src/plugins/expression_reveal_image/tsconfig.json +++ b/src/plugins/expression_reveal_image/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expression_shape/tsconfig.json b/src/plugins/expression_shape/tsconfig.json index 5fab51496c97e7..9a7175a8d767be 100644 --- a/src/plugins/expression_shape/tsconfig.json +++ b/src/plugins/expression_shape/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/expressions/tsconfig.json b/src/plugins/expressions/tsconfig.json index cce71013cefa55..6716149d6b9c7e 100644 --- a/src/plugins/expressions/tsconfig.json +++ b/src/plugins/expressions/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/field_formats/tsconfig.json b/src/plugins/field_formats/tsconfig.json index 4382ab1051c1d6..9fb87bc5dd9704 100644 --- a/src/plugins/field_formats/tsconfig.json +++ b/src/plugins/field_formats/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/home/tsconfig.json b/src/plugins/home/tsconfig.json index b15e1fc011b926..9324978b227d51 100644 --- a/src/plugins/home/tsconfig.json +++ b/src/plugins/home/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/index_pattern_field_editor/tsconfig.json b/src/plugins/index_pattern_field_editor/tsconfig.json index 5450ae74a91a05..e5caf463835d0a 100644 --- a/src/plugins/index_pattern_field_editor/tsconfig.json +++ b/src/plugins/index_pattern_field_editor/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/index_pattern_management/tsconfig.json b/src/plugins/index_pattern_management/tsconfig.json index 16afcb3599fece..2a719e98bea319 100644 --- a/src/plugins/index_pattern_management/tsconfig.json +++ b/src/plugins/index_pattern_management/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/input_control_vis/public/input_control_vis_renderer.tsx b/src/plugins/input_control_vis/public/input_control_vis_renderer.tsx index 867fe13aee08f2..81ff7a5aa47f1e 100644 --- a/src/plugins/input_control_vis/public/input_control_vis_renderer.tsx +++ b/src/plugins/input_control_vis/public/input_control_vis_renderer.tsx @@ -24,8 +24,7 @@ export const getInputControlVisRenderer: ( if (!registeredController) { const { createInputControlVisController } = await import('./vis_controller'); - const Controller = createInputControlVisController(deps, handlers); - registeredController = new Controller(domNode); + registeredController = createInputControlVisController(deps, handlers, domNode); inputControlVisRegistry.set(domNode, registeredController); handlers.onDestroy(() => { diff --git a/src/plugins/input_control_vis/public/vis_controller.tsx b/src/plugins/input_control_vis/public/vis_controller.tsx index 566f9035fe77e0..bb09a90bb9dd66 100644 --- a/src/plugins/input_control_vis/public/vis_controller.tsx +++ b/src/plugins/input_control_vis/public/vis_controller.tsx @@ -24,18 +24,17 @@ import { ListControl } from './control/list_control_factory'; import { InputControlVisDependencies } from './plugin'; import { InputControlVisParams } from './types'; -export type InputControlVisControllerType = InstanceType< - ReturnType ->; +export type InputControlVisControllerType = ReturnType; export const createInputControlVisController = ( deps: InputControlVisDependencies, - handlers: IInterpreterRenderHandlers + handlers: IInterpreterRenderHandlers, + el: Element ) => { - return class InputControlVisController { - private I18nContext?: I18nStart['Context']; - private _isLoaded = false; + let I18nContext: I18nStart['Context'] | undefined; + let isLoaded = false; + return new (class InputControlVisController { controls: Array; queryBarUpdateHandler: () => void; filterManager: FilterManager; @@ -43,7 +42,7 @@ export const createInputControlVisController = ( timeFilterSubscription: Subscription; visParams?: InputControlVisParams; - constructor(public el: Element) { + constructor() { this.controls = []; this.queryBarUpdateHandler = this.updateControlsFromKbn.bind(this); @@ -56,21 +55,21 @@ export const createInputControlVisController = ( .getTimeUpdate$() .subscribe(() => { if (this.visParams?.useTimeFilter) { - this._isLoaded = false; + isLoaded = false; } }); } async render(visParams: InputControlVisParams) { - if (!this.I18nContext) { + if (!I18nContext) { const [{ i18n }] = await deps.core.getStartServices(); - this.I18nContext = i18n.Context; + I18nContext = i18n.Context; } - if (!this._isLoaded || !isEqual(visParams, this.visParams)) { + if (!isLoaded || !isEqual(visParams, this.visParams)) { this.visParams = visParams; this.controls = []; this.controls = await this.initControls(visParams); - this._isLoaded = true; + isLoaded = true; } this.drawVis(); } @@ -78,17 +77,17 @@ export const createInputControlVisController = ( destroy() { this.updateSubsciption.unsubscribe(); this.timeFilterSubscription.unsubscribe(); - unmountComponentAtNode(this.el); + unmountComponentAtNode(el); this.controls.forEach((control) => control.destroy()); } drawVis = () => { - if (!this.I18nContext) { + if (!I18nContext) { throw new Error('no i18n context found'); } render( - + - , - this.el + , + el ); }; @@ -235,5 +234,5 @@ export const createInputControlVisController = ( await this.controls[controlIndex].fetch(query); this.drawVis(); }; - }; + })(); }; diff --git a/src/plugins/input_control_vis/tsconfig.json b/src/plugins/input_control_vis/tsconfig.json index bef7bc394a6ccd..5e53199bb1e6e8 100644 --- a/src/plugins/input_control_vis/tsconfig.json +++ b/src/plugins/input_control_vis/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/inspector/tsconfig.json b/src/plugins/inspector/tsconfig.json index 2a9c41464532c3..4554a90821d483 100644 --- a/src/plugins/inspector/tsconfig.json +++ b/src/plugins/inspector/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/interactive_setup/tsconfig.json b/src/plugins/interactive_setup/tsconfig.json index 530e01a034b00a..6ebeff836f69b6 100644 --- a/src/plugins/interactive_setup/tsconfig.json +++ b/src/plugins/interactive_setup/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/kibana_legacy/tsconfig.json b/src/plugins/kibana_legacy/tsconfig.json index 709036c9e82f43..17f1a70838fd78 100644 --- a/src/plugins/kibana_legacy/tsconfig.json +++ b/src/plugins/kibana_legacy/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/kibana_overview/tsconfig.json b/src/plugins/kibana_overview/tsconfig.json index ac3ac109cb35f0..fd9002d39ee8cb 100644 --- a/src/plugins/kibana_overview/tsconfig.json +++ b/src/plugins/kibana_overview/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/kibana_react/tsconfig.json b/src/plugins/kibana_react/tsconfig.json index eb9a24ca141f6e..3f6dd8fd280b63 100644 --- a/src/plugins/kibana_react/tsconfig.json +++ b/src/plugins/kibana_react/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/kibana_usage_collection/tsconfig.json b/src/plugins/kibana_usage_collection/tsconfig.json index ee07dfe589e4a5..e57d6e25db8cd4 100644 --- a/src/plugins/kibana_usage_collection/tsconfig.json +++ b/src/plugins/kibana_usage_collection/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/kibana_utils/tsconfig.json b/src/plugins/kibana_utils/tsconfig.json index ae5e9b90af8077..0538b145a5d62f 100644 --- a/src/plugins/kibana_utils/tsconfig.json +++ b/src/plugins/kibana_utils/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/legacy_export/tsconfig.json b/src/plugins/legacy_export/tsconfig.json index ec006d492499ea..2f071b5ba6c56c 100644 --- a/src/plugins/legacy_export/tsconfig.json +++ b/src/plugins/legacy_export/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/management/tsconfig.json b/src/plugins/management/tsconfig.json index ba3661666631ab..beef79c9affd04 100644 --- a/src/plugins/management/tsconfig.json +++ b/src/plugins/management/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/maps_ems/tsconfig.json b/src/plugins/maps_ems/tsconfig.json index b85c3da66b83a0..dd579b47f3109b 100644 --- a/src/plugins/maps_ems/tsconfig.json +++ b/src/plugins/maps_ems/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/maps_legacy/tsconfig.json b/src/plugins/maps_legacy/tsconfig.json index f757e35f785af5..b6fcb9345b1ce8 100644 --- a/src/plugins/maps_legacy/tsconfig.json +++ b/src/plugins/maps_legacy/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/navigation/tsconfig.json b/src/plugins/navigation/tsconfig.json index 07cfe10d7d81f9..1b7e87aaba41af 100644 --- a/src/plugins/navigation/tsconfig.json +++ b/src/plugins/navigation/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/newsfeed/tsconfig.json b/src/plugins/newsfeed/tsconfig.json index 18e6f2de1bc6fb..1388e110872541 100644 --- a/src/plugins/newsfeed/tsconfig.json +++ b/src/plugins/newsfeed/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/presentation_util/tsconfig.json b/src/plugins/presentation_util/tsconfig.json index e0b9bbeb4917dc..caff10a90e84c7 100644 --- a/src/plugins/presentation_util/tsconfig.json +++ b/src/plugins/presentation_util/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/region_map/tsconfig.json b/src/plugins/region_map/tsconfig.json index 899611d0274657..fec191402f2ab3 100644 --- a/src/plugins/region_map/tsconfig.json +++ b/src/plugins/region_map/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/saved_objects/tsconfig.json b/src/plugins/saved_objects/tsconfig.json index d9045b91b9dfae..b8761ab81fa781 100644 --- a/src/plugins/saved_objects/tsconfig.json +++ b/src/plugins/saved_objects/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/saved_objects_management/tsconfig.json b/src/plugins/saved_objects_management/tsconfig.json index 99849dea386181..0f26da69acd178 100644 --- a/src/plugins/saved_objects_management/tsconfig.json +++ b/src/plugins/saved_objects_management/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/saved_objects_tagging_oss/tsconfig.json b/src/plugins/saved_objects_tagging_oss/tsconfig.json index b0059c71424bf5..5a3f642a9d6eac 100644 --- a/src/plugins/saved_objects_tagging_oss/tsconfig.json +++ b/src/plugins/saved_objects_tagging_oss/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/screenshot_mode/tsconfig.json b/src/plugins/screenshot_mode/tsconfig.json index 58194b385448ba..832972ae0baa0e 100644 --- a/src/plugins/screenshot_mode/tsconfig.json +++ b/src/plugins/screenshot_mode/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/security_oss/tsconfig.json b/src/plugins/security_oss/tsconfig.json index 530e01a034b00a..6ebeff836f69b6 100644 --- a/src/plugins/security_oss/tsconfig.json +++ b/src/plugins/security_oss/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/share/tsconfig.json b/src/plugins/share/tsconfig.json index 985066915f1ddc..c6afc06bc61c2d 100644 --- a/src/plugins/share/tsconfig.json +++ b/src/plugins/share/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/spaces_oss/tsconfig.json b/src/plugins/spaces_oss/tsconfig.json index 0cc82d7e5d1245..35942863c1f1bd 100644 --- a/src/plugins/spaces_oss/tsconfig.json +++ b/src/plugins/spaces_oss/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/telemetry/tsconfig.json b/src/plugins/telemetry/tsconfig.json index 710e209537b8e3..d50ccd563fe5ac 100644 --- a/src/plugins/telemetry/tsconfig.json +++ b/src/plugins/telemetry/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/telemetry_collection_manager/tsconfig.json b/src/plugins/telemetry_collection_manager/tsconfig.json index 13299798606031..adfe3bba079633 100644 --- a/src/plugins/telemetry_collection_manager/tsconfig.json +++ b/src/plugins/telemetry_collection_manager/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/telemetry_management_section/tsconfig.json b/src/plugins/telemetry_management_section/tsconfig.json index 2daee868ac200c..0f00f12e71c20e 100644 --- a/src/plugins/telemetry_management_section/tsconfig.json +++ b/src/plugins/telemetry_management_section/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/tile_map/tsconfig.json b/src/plugins/tile_map/tsconfig.json index 899611d0274657..fec191402f2ab3 100644 --- a/src/plugins/tile_map/tsconfig.json +++ b/src/plugins/tile_map/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/timelion/tsconfig.json b/src/plugins/timelion/tsconfig.json index 5b96d69a878ea6..594901c3cc1ed0 100644 --- a/src/plugins/timelion/tsconfig.json +++ b/src/plugins/timelion/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/ui_actions/tsconfig.json b/src/plugins/ui_actions/tsconfig.json index a871d7215cdc52..d53d60ec73cd4e 100644 --- a/src/plugins/ui_actions/tsconfig.json +++ b/src/plugins/ui_actions/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/url_forwarding/tsconfig.json b/src/plugins/url_forwarding/tsconfig.json index 8e867a6bad14f6..c6ef2a0286da19 100644 --- a/src/plugins/url_forwarding/tsconfig.json +++ b/src/plugins/url_forwarding/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/usage_collection/tsconfig.json b/src/plugins/usage_collection/tsconfig.json index 68a0853994e80d..7fac30a8048ea2 100644 --- a/src/plugins/usage_collection/tsconfig.json +++ b/src/plugins/usage_collection/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_default_editor/tsconfig.json b/src/plugins/vis_default_editor/tsconfig.json index 34003bced5ad03..3d8fb6778c85e7 100644 --- a/src/plugins/vis_default_editor/tsconfig.json +++ b/src/plugins/vis_default_editor/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_markdown/tsconfig.json b/src/plugins/vis_type_markdown/tsconfig.json index d5ab89b98081b1..7c32f449351957 100644 --- a/src/plugins/vis_type_markdown/tsconfig.json +++ b/src/plugins/vis_type_markdown/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_metric/tsconfig.json b/src/plugins/vis_type_metric/tsconfig.json index bee666a5906cd4..e430ec24607969 100644 --- a/src/plugins/vis_type_metric/tsconfig.json +++ b/src/plugins/vis_type_metric/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_pie/tsconfig.json b/src/plugins/vis_type_pie/tsconfig.json index 69bd2855b9843f..9640447b35d986 100644 --- a/src/plugins/vis_type_pie/tsconfig.json +++ b/src/plugins/vis_type_pie/tsconfig.json @@ -1,25 +1,24 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*" - ], - "references": [ - { "path": "../../core/tsconfig.json" }, - { "path": "../charts/tsconfig.json" }, - { "path": "../data/tsconfig.json" }, - { "path": "../expressions/tsconfig.json" }, - { "path": "../visualizations/tsconfig.json" }, - { "path": "../usage_collection/tsconfig.json" }, - { "path": "../vis_default_editor/tsconfig.json" }, - { "path": "../field_formats/tsconfig.json" } - ] - } \ No newline at end of file + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*" + ], + "references": [ + { "path": "../../core/tsconfig.json" }, + { "path": "../charts/tsconfig.json" }, + { "path": "../data/tsconfig.json" }, + { "path": "../expressions/tsconfig.json" }, + { "path": "../visualizations/tsconfig.json" }, + { "path": "../usage_collection/tsconfig.json" }, + { "path": "../vis_default_editor/tsconfig.json" }, + { "path": "../field_formats/tsconfig.json" } + ] +} diff --git a/src/plugins/vis_type_table/tsconfig.json b/src/plugins/vis_type_table/tsconfig.json index 50277d51e8748d..16f2f809bde384 100644 --- a/src/plugins/vis_type_table/tsconfig.json +++ b/src/plugins/vis_type_table/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_tagcloud/tsconfig.json b/src/plugins/vis_type_tagcloud/tsconfig.json index 18bbad2257466c..021237dd7ad5bf 100644 --- a/src/plugins/vis_type_tagcloud/tsconfig.json +++ b/src/plugins/vis_type_tagcloud/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_timelion/tsconfig.json b/src/plugins/vis_type_timelion/tsconfig.json index 77f97de28366d0..efeab8d73db1e7 100644 --- a/src/plugins/vis_type_timelion/tsconfig.json +++ b/src/plugins/vis_type_timelion/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_timeseries/tsconfig.json b/src/plugins/vis_type_timeseries/tsconfig.json index 7b2dd4b608c1c4..68097d8cff786f 100644 --- a/src/plugins/vis_type_timeseries/tsconfig.json +++ b/src/plugins/vis_type_timeseries/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_vega/tsconfig.json b/src/plugins/vis_type_vega/tsconfig.json index 4091dafcbe3572..e1b8b5d9d4bac8 100644 --- a/src/plugins/vis_type_vega/tsconfig.json +++ b/src/plugins/vis_type_vega/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_vislib/tsconfig.json b/src/plugins/vis_type_vislib/tsconfig.json index 5bf1af9ba75fea..0d2a4094f04be3 100644 --- a/src/plugins/vis_type_vislib/tsconfig.json +++ b/src/plugins/vis_type_vislib/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/vis_type_xy/tsconfig.json b/src/plugins/vis_type_xy/tsconfig.json index 5cb0bc8d0bc8ed..0e4e41c286bd22 100644 --- a/src/plugins/vis_type_xy/tsconfig.json +++ b/src/plugins/vis_type_xy/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/visualizations/tsconfig.json b/src/plugins/visualizations/tsconfig.json index 356448aa59771e..65ab83d5e0bae1 100644 --- a/src/plugins/visualizations/tsconfig.json +++ b/src/plugins/visualizations/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/src/plugins/visualize/tsconfig.json b/src/plugins/visualize/tsconfig.json index bc0891f3917466..4dcf43dadf8ba4 100644 --- a/src/plugins/visualize/tsconfig.json +++ b/src/plugins/visualize/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json index 3d9d8ca9451d41..86170d35614088 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,10 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/expressions/tsconfig.json" }, + { "path": "../../../../src/plugins/inspector/tsconfig.json" }, + { "path": "../../../../src/plugins/data/tsconfig.json" }, + { "path": "../../../../src/plugins/kibana_utils/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/app_link_test/tsconfig.json b/test/plugin_functional/plugins/app_link_test/tsconfig.json index f77a5eaffc3018..b53fafd70cf5da 100644 --- a/test/plugin_functional/plugins/app_link_test/tsconfig.json +++ b/test/plugin_functional/plugins/app_link_test/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -12,6 +11,6 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/plugins/kibana_react/tsconfig.json" } ] } diff --git a/test/plugin_functional/plugins/core_app_status/tsconfig.json b/test/plugin_functional/plugins/core_app_status/tsconfig.json index 0f0e7caf2b486a..f380bcc8e8b369 100644 --- a/test/plugin_functional/plugins/core_app_status/tsconfig.json +++ b/test/plugin_functional/plugins/core_app_status/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./target", + "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, "declarationMap": true diff --git a/test/plugin_functional/plugins/core_history_block/tsconfig.json b/test/plugin_functional/plugins/core_history_block/tsconfig.json index ffd2cd261ab23b..a6882ecb3d1e00 100644 --- a/test/plugin_functional/plugins/core_history_block/tsconfig.json +++ b/test/plugin_functional/plugins/core_history_block/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": ["index.ts", "public/**/*.ts", "public/**/*.tsx", "../../../../typings/**/*"], "exclude": [], diff --git a/test/plugin_functional/plugins/core_http/tsconfig.json b/test/plugin_functional/plugins/core_http/tsconfig.json index 3d9d8ca9451d41..eab76d901e4272 100644 --- a/test/plugin_functional/plugins/core_http/tsconfig.json +++ b/test/plugin_functional/plugins/core_http/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_a/tsconfig.json b/test/plugin_functional/plugins/core_plugin_a/tsconfig.json index 3d9d8ca9451d41..eab76d901e4272 100644 --- a/test/plugin_functional/plugins/core_plugin_a/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_a/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json b/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json index f77a5eaffc3018..87e51c3eab37ae 100644 --- a/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_b/tsconfig.json b/test/plugin_functional/plugins/core_plugin_b/tsconfig.json index 3d9d8ca9451d41..78476ce6697e12 100644 --- a/test/plugin_functional/plugins/core_plugin_b/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_b/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../core_plugin_a/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json b/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json index f77a5eaffc3018..010574f0c3be09 100644 --- a/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -12,6 +11,6 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json b/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json index f77a5eaffc3018..87e51c3eab37ae 100644 --- a/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json b/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json index 3d9d8ca9451d41..eab76d901e4272 100644 --- a/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json b/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json index 21662b2b64a18a..4c00a35a3db777 100644 --- a/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json b/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json index f9b0443e0a8bfa..d346449e67c42d 100644 --- a/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json b/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json index 72793a327d97e5..b0e6d4f5d84ce8 100644 --- a/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "server/**/*.ts", diff --git a/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json b/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json index f9b0443e0a8bfa..d346449e67c42d 100644 --- a/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json +++ b/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json b/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json index d0d1f2d99295ab..d18f6a63263bf2 100644 --- a/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json +++ b/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "composite": true, - "outDir": "./target", + "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, "declarationMap": true diff --git a/test/plugin_functional/plugins/data_search/tsconfig.json b/test/plugin_functional/plugins/data_search/tsconfig.json index 72793a327d97e5..e82f3fca8fb3c8 100644 --- a/test/plugin_functional/plugins/data_search/tsconfig.json +++ b/test/plugin_functional/plugins/data_search/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "server/**/*.ts", @@ -10,6 +9,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/data/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/doc_views_plugin/tsconfig.json b/test/plugin_functional/plugins/doc_views_plugin/tsconfig.json index f9b0443e0a8bfa..45babe3228965e 100644 --- a/test/plugin_functional/plugins/doc_views_plugin/tsconfig.json +++ b/test/plugin_functional/plugins/doc_views_plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -12,6 +11,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/discover/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json b/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json index 72793a327d97e5..b0e6d4f5d84ce8 100644 --- a/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json +++ b/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "server/**/*.ts", diff --git a/test/plugin_functional/plugins/index_patterns/tsconfig.json b/test/plugin_functional/plugins/index_patterns/tsconfig.json index 9d11a9850f1512..9ac0d7726c3797 100644 --- a/test/plugin_functional/plugins/index_patterns/tsconfig.json +++ b/test/plugin_functional/plugins/index_patterns/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -12,6 +11,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/data/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json b/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json index f77a5eaffc3018..043ace6ce064db 100644 --- a/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -12,6 +11,9 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../../src/plugins/kibana_react/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json b/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json index 3d9d8ca9451d41..adf3815905d1de 100644 --- a/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json +++ b/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/navigation/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json index e92dc717ae25ed..8cbb8696409b68 100644 --- a/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json +++ b/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json @@ -1,14 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true, - "types": [ - "node", - "jest", - "react", - "@emotion/react/types/css-prop" - ] + "outDir": "./target/types" }, "include": [ "index.ts", @@ -18,6 +11,9 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/data/tsconfig.json" }, + { "path": "../../../../src/plugins/visualizations/tsconfig.json" }, + { "path": "../../../../src/plugins/expressions/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/management_test_plugin/tsconfig.json b/test/plugin_functional/plugins/management_test_plugin/tsconfig.json index f77a5eaffc3018..8222b8f0110058 100644 --- a/test/plugin_functional/plugins/management_test_plugin/tsconfig.json +++ b/test/plugin_functional/plugins/management_test_plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -12,6 +11,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/management/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/rendering_plugin/tsconfig.json b/test/plugin_functional/plugins/rendering_plugin/tsconfig.json index 3d9d8ca9451d41..eab76d901e4272 100644 --- a/test/plugin_functional/plugins/rendering_plugin/tsconfig.json +++ b/test/plugin_functional/plugins/rendering_plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json b/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json index da457c9ba32fcc..f148b232e21fb0 100644 --- a/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json +++ b/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json b/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json index 3d9d8ca9451d41..eab76d901e4272 100644 --- a/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json +++ b/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json b/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json index da457c9ba32fcc..f148b232e21fb0 100644 --- a/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json +++ b/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/plugin_functional/plugins/session_notifications/tsconfig.json b/test/plugin_functional/plugins/session_notifications/tsconfig.json index 3d9d8ca9451d41..c50f2e3f119c89 100644 --- a/test/plugin_functional/plugins/session_notifications/tsconfig.json +++ b/test/plugin_functional/plugins/session_notifications/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,8 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../../../src/plugins/data/tsconfig.json" }, ] } diff --git a/test/plugin_functional/plugins/telemetry/tsconfig.json b/test/plugin_functional/plugins/telemetry/tsconfig.json index 947eb49a61b3a5..b32ac67279f40c 100644 --- a/test/plugin_functional/plugins/telemetry/tsconfig.json +++ b/test/plugin_functional/plugins/telemetry/tsconfig.json @@ -1,10 +1,12 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": ["public/**/*.ts", "types.ts", "../../../../typings/**/*"], "exclude": [], - "references": [{ "path": "../../../../src/core/tsconfig.json" }] + "references": [ + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/telemetry/tsconfig.json" }, + ] } diff --git a/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json b/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json index 05b1c2c11da03c..6551c1496164f5 100644 --- a/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json +++ b/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types", }, "include": [ "server/**/*.ts", diff --git a/test/plugin_functional/plugins/usage_collection/tsconfig.json b/test/plugin_functional/plugins/usage_collection/tsconfig.json index 3d9d8ca9451d41..d6f7d08f18589d 100644 --- a/test/plugin_functional/plugins/usage_collection/tsconfig.json +++ b/test/plugin_functional/plugins/usage_collection/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +12,7 @@ ], "exclude": [], "references": [ - { "path": "../../../../src/core/tsconfig.json" } + { "path": "../../../../src/core/tsconfig.json" }, + { "path": "../../../../src/plugins/usage_collection/tsconfig.json" }, ] } diff --git a/test/scripts/checks/type_check_plugin_public_api_docs.sh b/test/scripts/checks/type_check_plugin_public_api_docs.sh index 8acacb696c5764..77fa76038f7c4b 100755 --- a/test/scripts/checks/type_check_plugin_public_api_docs.sh +++ b/test/scripts/checks/type_check_plugin_public_api_docs.sh @@ -4,7 +4,6 @@ source src/dev/ci_setup/setup_env.sh checks-reporter-with-killswitch "Build TS Refs" \ node scripts/build_ts_refs \ - --ignore-type-failures \ --clean \ --no-cache \ --force diff --git a/test/server_integration/__fixtures__/plugins/status_plugin_a/tsconfig.json b/test/server_integration/__fixtures__/plugins/status_plugin_a/tsconfig.json index 5069db62589c7d..14ebb2e7d00c47 100644 --- a/test/server_integration/__fixtures__/plugins/status_plugin_a/tsconfig.json +++ b/test/server_integration/__fixtures__/plugins/status_plugin_a/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true, - "composite": true + "outDir": "./target/types", }, "include": [ "index.ts", diff --git a/test/server_integration/__fixtures__/plugins/status_plugin_b/tsconfig.json b/test/server_integration/__fixtures__/plugins/status_plugin_b/tsconfig.json index 224aa42ef68d23..6b27e9b4b7a6cc 100644 --- a/test/server_integration/__fixtures__/plugins/status_plugin_b/tsconfig.json +++ b/test/server_integration/__fixtures__/plugins/status_plugin_b/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true, - "composite": true + "outDir": "./target/types" }, "include": [ "index.ts", diff --git a/test/tsconfig.json b/test/tsconfig.json index dccbe8d715c513..c94d4445dd2465 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/tsconfig.base.json b/tsconfig.base.json index 0c8fec7c88cda8..9de81f68110c16 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,6 +21,8 @@ "jsx": "react", // Enables all strict type checking options. "strict": true, + // All TS projects should be composite and only include the files they select, and ref the files outside of the project + "composite": true, // save information about the project graph on disk "incremental": true, // Do not check d.ts files by default diff --git a/tsconfig.bazel.json b/tsconfig.bazel.json new file mode 100644 index 00000000000000..892c727ef588e6 --- /dev/null +++ b/tsconfig.bazel.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "incremental": false, + "composite": false + } +} diff --git a/tsconfig.browser_bazel.json b/tsconfig.browser_bazel.json new file mode 100644 index 00000000000000..3a950a756dd084 --- /dev/null +++ b/tsconfig.browser_bazel.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.browser.json", + "compilerOptions": { + "incremental": false, + "composite": false + } +} diff --git a/tsconfig.json b/tsconfig.json index 3d6c29875c9020..769dd5ecb6a55c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "incremental": false + "outDir": "target/root_types" }, "include": [ "kibana.d.ts", @@ -16,122 +16,7 @@ "exclude": [], "references": [ { "path": "./src/core/tsconfig.json" }, - { "path": "./src/plugins/telemetry_management_section/tsconfig.json" }, - { "path": "./src/plugins/advanced_settings/tsconfig.json" }, - { "path": "./src/plugins/apm_oss/tsconfig.json" }, - { "path": "./src/plugins/bfetch/tsconfig.json" }, - { "path": "./src/plugins/charts/tsconfig.json" }, - { "path": "./src/plugins/console/tsconfig.json" }, - { "path": "./src/plugins/dashboard/tsconfig.json" }, - { "path": "./src/plugins/discover/tsconfig.json" }, - { "path": "./src/plugins/data/tsconfig.json" }, - { "path": "./src/plugins/dev_tools/tsconfig.json" }, - { "path": "./src/plugins/embeddable/tsconfig.json" }, - { "path": "./src/plugins/es_ui_shared/tsconfig.json" }, - { "path": "./src/plugins/expressions/tsconfig.json" }, - { "path": "./src/plugins/home/tsconfig.json" }, - { "path": "./src/plugins/inspector/tsconfig.json" }, - { "path": "./src/plugins/interactive_setup/tsconfig.json" }, - { "path": "./src/plugins/kibana_legacy/tsconfig.json" }, - { "path": "./src/plugins/kibana_overview/tsconfig.json" }, - { "path": "./src/plugins/kibana_react/tsconfig.json" }, - { "path": "./src/plugins/kibana_usage_collection/tsconfig.json" }, - { "path": "./src/plugins/kibana_utils/tsconfig.json" }, - { "path": "./src/plugins/legacy_export/tsconfig.json" }, - { "path": "./src/plugins/management/tsconfig.json" }, - { "path": "./src/plugins/maps_legacy/tsconfig.json" }, - { "path": "./src/plugins/navigation/tsconfig.json" }, - { "path": "./src/plugins/newsfeed/tsconfig.json" }, - { "path": "./src/plugins/region_map/tsconfig.json" }, - { "path": "./src/plugins/saved_objects/tsconfig.json" }, - { "path": "./src/plugins/saved_objects_management/tsconfig.json" }, - { "path": "./src/plugins/saved_objects_tagging_oss/tsconfig.json" }, - { "path": "./src/plugins/security_oss/tsconfig.json" }, - { "path": "./src/plugins/share/tsconfig.json" }, - { "path": "./src/plugins/spaces_oss/tsconfig.json" }, - { "path": "./src/plugins/telemetry/tsconfig.json" }, - { "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" }, - { "path": "./src/plugins/tile_map/tsconfig.json" }, - { "path": "./src/plugins/timelion/tsconfig.json" }, - { "path": "./src/plugins/ui_actions/tsconfig.json" }, - { "path": "./src/plugins/url_forwarding/tsconfig.json" }, { "path": "./src/plugins/usage_collection/tsconfig.json" }, - { "path": "./src/plugins/vis_default_editor/tsconfig.json" }, - { "path": "./src/plugins/vis_type_markdown/tsconfig.json" }, - { "path": "./src/plugins/vis_type_metric/tsconfig.json" }, - { "path": "./src/plugins/vis_type_table/tsconfig.json" }, - { "path": "./src/plugins/vis_type_tagcloud/tsconfig.json" }, - { "path": "./src/plugins/vis_type_timelion/tsconfig.json" }, - { "path": "./src/plugins/vis_type_timeseries/tsconfig.json" }, - { "path": "./src/plugins/vis_type_vislib/tsconfig.json" }, - { "path": "./src/plugins/vis_type_vega/tsconfig.json" }, - { "path": "./src/plugins/vis_type_xy/tsconfig.json" }, - { "path": "./src/plugins/vis_type_pie/tsconfig.json" }, - { "path": "./src/plugins/visualizations/tsconfig.json" }, - { "path": "./src/plugins/visualize/tsconfig.json" }, - { "path": "./src/plugins/index_pattern_management/tsconfig.json" }, - { "path": "./src/plugins/index_pattern_field_editor/tsconfig.json" }, - { "path": "./src/plugins/index_pattern_editor/tsconfig.json" }, - { "path": "./x-pack/plugins/actions/tsconfig.json" }, - { "path": "./x-pack/plugins/alerting/tsconfig.json" }, - { "path": "./x-pack/plugins/apm/tsconfig.json" }, - { "path": "./x-pack/plugins/canvas/tsconfig.json" }, - { "path": "./x-pack/plugins/cases/tsconfig.json" }, - { "path": "./x-pack/plugins/cloud/tsconfig.json" }, - { "path": "./x-pack/plugins/data_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/dashboard_mode/tsconfig.json" }, - { "path": "./x-pack/plugins/discover_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/drilldowns/url_drilldown/tsconfig.json" }, - { "path": "./x-pack/plugins/embeddable_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/encrypted_saved_objects/tsconfig.json" }, - { "path": "./x-pack/plugins/enterprise_search/tsconfig.json" }, - { "path": "./x-pack/plugins/event_log/tsconfig.json" }, - { "path": "./x-pack/plugins/features/tsconfig.json" }, - { "path": "./x-pack/plugins/file_upload/tsconfig.json" }, - { "path": "./x-pack/plugins/fleet/tsconfig.json" }, - { "path": "./x-pack/plugins/global_search_bar/tsconfig.json" }, - { "path": "./x-pack/plugins/global_search_providers/tsconfig.json" }, - { "path": "./x-pack/plugins/global_search/tsconfig.json" }, - { "path": "./x-pack/plugins/graph/tsconfig.json" }, - { "path": "./x-pack/plugins/grokdebugger/tsconfig.json" }, - { "path": "./x-pack/plugins/infra/tsconfig.json" }, - { "path": "./x-pack/plugins/ingest_pipelines/tsconfig.json" }, - { "path": "./x-pack/plugins/lens/tsconfig.json" }, - { "path": "./x-pack/plugins/license_api_guard/tsconfig.json" }, - { "path": "./x-pack/plugins/license_management/tsconfig.json" }, - { "path": "./x-pack/plugins/licensing/tsconfig.json" }, - { "path": "./x-pack/plugins/lists/tsconfig.json" }, - { "path": "./x-pack/plugins/logstash/tsconfig.json" }, - { "path": "./x-pack/plugins/maps/tsconfig.json" }, - { "path": "./x-pack/plugins/metrics_entities/tsconfig.json" }, - { "path": "./x-pack/plugins/ml/tsconfig.json" }, - { "path": "./x-pack/plugins/monitoring/tsconfig.json" }, - { "path": "./x-pack/plugins/observability/tsconfig.json" }, - { "path": "./x-pack/plugins/osquery/tsconfig.json" }, - { "path": "./x-pack/plugins/painless_lab/tsconfig.json" }, - { "path": "./x-pack/plugins/saved_objects_tagging/tsconfig.json" }, - { "path": "./x-pack/plugins/searchprofiler/tsconfig.json" }, - { "path": "./x-pack/plugins/security/tsconfig.json" }, - { "path": "./x-pack/plugins/security_solution/tsconfig.json" }, - { "path": "./x-pack/plugins/snapshot_restore/tsconfig.json" }, - { "path": "./x-pack/plugins/spaces/tsconfig.json" }, - { "path": "./x-pack/plugins/stack_alerts/tsconfig.json" }, - { "path": "./x-pack/plugins/task_manager/tsconfig.json" }, - { "path": "./x-pack/plugins/telemetry_collection_xpack/tsconfig.json" }, - { "path": "./x-pack/plugins/timelines/tsconfig.json" }, - { "path": "./x-pack/plugins/transform/tsconfig.json" }, - { "path": "./x-pack/plugins/translations/tsconfig.json" }, - { "path": "./x-pack/plugins/triggers_actions_ui/tsconfig.json" }, - { "path": "./x-pack/plugins/ui_actions_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/upgrade_assistant/tsconfig.json" }, - { "path": "./x-pack/plugins/runtime_fields/tsconfig.json" }, - { "path": "./x-pack/plugins/index_management/tsconfig.json" }, - { "path": "./x-pack/plugins/watcher/tsconfig.json" }, - { "path": "./x-pack/plugins/rollup/tsconfig.json" }, - { "path": "./x-pack/plugins/remote_clusters/tsconfig.json" }, - { "path": "./x-pack/plugins/cross_cluster_replication/tsconfig.json"}, - { "path": "./x-pack/plugins/index_lifecycle_management/tsconfig.json"}, - { "path": "./x-pack/plugins/uptime/tsconfig.json" }, - { "path": "./x-pack/plugins/xpack_legacy/tsconfig.json" } + { "path": "./x-pack/plugins/reporting/tsconfig.json" }, ] } diff --git a/tsconfig.refs.json b/tsconfig.refs.json deleted file mode 100644 index 1807a7014e3895..00000000000000 --- a/tsconfig.refs.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "include": [], - "references": [ - { "path": "./src/core/tsconfig.json" }, - { "path": "./src/plugins/advanced_settings/tsconfig.json" }, - { "path": "./src/plugins/apm_oss/tsconfig.json" }, - { "path": "./src/plugins/bfetch/tsconfig.json" }, - { "path": "./src/plugins/charts/tsconfig.json" }, - { "path": "./src/plugins/console/tsconfig.json" }, - { "path": "./src/plugins/dashboard/tsconfig.json" }, - { "path": "./src/plugins/data/tsconfig.json" }, - { "path": "./src/plugins/dev_tools/tsconfig.json" }, - { "path": "./src/plugins/discover/tsconfig.json" }, - { "path": "./src/plugins/embeddable/tsconfig.json" }, - { "path": "./src/plugins/es_ui_shared/tsconfig.json" }, - { "path": "./src/plugins/expressions/tsconfig.json" }, - { "path": "./src/plugins/home/tsconfig.json" }, - { "path": "./src/plugins/inspector/tsconfig.json" }, - { "path": "./src/plugins/interactive_setup/tsconfig.json" }, - { "path": "./src/plugins/kibana_legacy/tsconfig.json" }, - { "path": "./src/plugins/kibana_overview/tsconfig.json" }, - { "path": "./src/plugins/kibana_react/tsconfig.json" }, - { "path": "./src/plugins/kibana_usage_collection/tsconfig.json" }, - { "path": "./src/plugins/kibana_utils/tsconfig.json" }, - { "path": "./src/plugins/legacy_export/tsconfig.json" }, - { "path": "./src/plugins/management/tsconfig.json" }, - { "path": "./src/plugins/maps_legacy/tsconfig.json" }, - { "path": "./src/plugins/navigation/tsconfig.json" }, - { "path": "./src/plugins/newsfeed/tsconfig.json" }, - { "path": "./src/plugins/presentation_util/tsconfig.json" }, - { "path": "./src/plugins/region_map/tsconfig.json" }, - { "path": "./src/plugins/saved_objects_management/tsconfig.json" }, - { "path": "./src/plugins/saved_objects_tagging_oss/tsconfig.json" }, - { "path": "./src/plugins/saved_objects/tsconfig.json" }, - { "path": "./src/plugins/security_oss/tsconfig.json" }, - { "path": "./src/plugins/share/tsconfig.json" }, - { "path": "./src/plugins/spaces_oss/tsconfig.json" }, - { "path": "./src/plugins/telemetry_collection_manager/tsconfig.json" }, - { "path": "./src/plugins/telemetry_management_section/tsconfig.json" }, - { "path": "./src/plugins/telemetry/tsconfig.json" }, - { "path": "./src/plugins/tile_map/tsconfig.json" }, - { "path": "./src/plugins/timelion/tsconfig.json" }, - { "path": "./src/plugins/ui_actions/tsconfig.json" }, - { "path": "./src/plugins/url_forwarding/tsconfig.json" }, - { "path": "./src/plugins/usage_collection/tsconfig.json" }, - { "path": "./src/plugins/vis_default_editor/tsconfig.json" }, - { "path": "./src/plugins/vis_type_markdown/tsconfig.json" }, - { "path": "./src/plugins/vis_type_metric/tsconfig.json" }, - { "path": "./src/plugins/vis_type_table/tsconfig.json" }, - { "path": "./src/plugins/vis_type_tagcloud/tsconfig.json" }, - { "path": "./src/plugins/vis_type_timelion/tsconfig.json" }, - { "path": "./src/plugins/vis_type_timeseries/tsconfig.json" }, - { "path": "./src/plugins/vis_type_vislib/tsconfig.json" }, - { "path": "./src/plugins/vis_type_vega/tsconfig.json" }, - { "path": "./src/plugins/vis_type_xy/tsconfig.json" }, - { "path": "./src/plugins/vis_type_pie/tsconfig.json" }, - { "path": "./src/plugins/visualizations/tsconfig.json" }, - { "path": "./src/plugins/visualize/tsconfig.json" }, - { "path": "./src/plugins/index_pattern_management/tsconfig.json" }, - { "path": "./src/plugins/index_pattern_editor/tsconfig.json" }, - { "path": "./test/tsconfig.json" }, - { "path": "./x-pack/plugins/actions/tsconfig.json" }, - { "path": "./x-pack/plugins/alerting/tsconfig.json" }, - { "path": "./x-pack/plugins/apm/tsconfig.json" }, - { "path": "./x-pack/plugins/canvas/tsconfig.json" }, - { "path": "./x-pack/plugins/cases/tsconfig.json" }, - { "path": "./x-pack/plugins/cloud/tsconfig.json" }, - { "path": "./x-pack/plugins/dashboard_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/data_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/dashboard_mode/tsconfig.json" }, - { "path": "./x-pack/plugins/discover_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/drilldowns/url_drilldown/tsconfig.json" }, - { "path": "./x-pack/plugins/embeddable_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/encrypted_saved_objects/tsconfig.json" }, - { "path": "./x-pack/plugins/enterprise_search/tsconfig.json" }, - { "path": "./x-pack/plugins/event_log/tsconfig.json" }, - { "path": "./x-pack/plugins/features/tsconfig.json" }, - { "path": "./x-pack/plugins/file_upload/tsconfig.json" }, - { "path": "./x-pack/plugins/fleet/tsconfig.json" }, - { "path": "./x-pack/plugins/global_search_bar/tsconfig.json" }, - { "path": "./x-pack/plugins/global_search_providers/tsconfig.json" }, - { "path": "./x-pack/plugins/global_search/tsconfig.json" }, - { "path": "./x-pack/plugins/graph/tsconfig.json" }, - { "path": "./x-pack/plugins/grokdebugger/tsconfig.json" }, - { "path": "./x-pack/plugins/infra/tsconfig.json" }, - { "path": "./x-pack/plugins/ingest_pipelines/tsconfig.json" }, - { "path": "./x-pack/plugins/lens/tsconfig.json" }, - { "path": "./x-pack/plugins/license_management/tsconfig.json" }, - { "path": "./x-pack/plugins/licensing/tsconfig.json" }, - { "path": "./x-pack/plugins/lists/tsconfig.json" }, - { "path": "./x-pack/plugins/logstash/tsconfig.json" }, - { "path": "./x-pack/plugins/maps/tsconfig.json" }, - { "path": "./x-pack/plugins/metrics_entities/tsconfig.json" }, - { "path": "./x-pack/plugins/ml/tsconfig.json" }, - { "path": "./x-pack/plugins/monitoring/tsconfig.json" }, - { "path": "./x-pack/plugins/observability/tsconfig.json" }, - { "path": "./x-pack/plugins/osquery/tsconfig.json" }, - { "path": "./x-pack/plugins/painless_lab/tsconfig.json" }, - { "path": "./x-pack/plugins/reporting/tsconfig.json" }, - { "path": "./x-pack/plugins/saved_objects_tagging/tsconfig.json" }, - { "path": "./x-pack/plugins/searchprofiler/tsconfig.json" }, - { "path": "./x-pack/plugins/security/tsconfig.json" }, - { "path": "./x-pack/plugins/security_solution/tsconfig.json" }, - { "path": "./x-pack/plugins/snapshot_restore/tsconfig.json" }, - { "path": "./x-pack/plugins/spaces/tsconfig.json" }, - { "path": "./x-pack/plugins/stack_alerts/tsconfig.json" }, - { "path": "./x-pack/plugins/task_manager/tsconfig.json" }, - { "path": "./x-pack/plugins/telemetry_collection_xpack/tsconfig.json" }, - { "path": "./x-pack/plugins/timelines/tsconfig.json" }, - { "path": "./x-pack/plugins/transform/tsconfig.json" }, - { "path": "./x-pack/plugins/translations/tsconfig.json" }, - { "path": "./x-pack/plugins/triggers_actions_ui/tsconfig.json" }, - { "path": "./x-pack/plugins/ui_actions_enhanced/tsconfig.json" }, - { "path": "./x-pack/plugins/upgrade_assistant/tsconfig.json" }, - { "path": "./x-pack/plugins/runtime_fields/tsconfig.json" }, - { "path": "./x-pack/plugins/index_management/tsconfig.json" }, - { "path": "./x-pack/plugins/watcher/tsconfig.json" }, - { "path": "./x-pack/plugins/rollup/tsconfig.json" }, - { "path": "./x-pack/plugins/remote_clusters/tsconfig.json" }, - { "path": "./x-pack/plugins/cross_cluster_replication/tsconfig.json" }, - { "path": "./x-pack/plugins/index_lifecycle_management/tsconfig.json" }, - { "path": "./x-pack/plugins/uptime/tsconfig.json" }, - { "path": "./x-pack/plugins/xpack_legacy/tsconfig.json" }, - { "path": "./x-pack/test/tsconfig.json" }, - ] -} diff --git a/tsconfig.types.json b/tsconfig.types.json index 86a45f6db16977..54a26b6aca404e 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -1,12 +1,12 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "incremental": false, - "declaration": true, + "composite": false, "outDir": "./target/types", "stripInternal": false, + "declaration": true, "emitDeclarationOnly": true, - "declarationMap": true + "declarationMap": true, }, "include": [ "src/core/server/index.ts", diff --git a/x-pack/examples/alerting_example/tsconfig.json b/x-pack/examples/alerting_example/tsconfig.json index 95d42d40aceb3f..881c48029031de 100644 --- a/x-pack/examples/alerting_example/tsconfig.json +++ b/x-pack/examples/alerting_example/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target" + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,6 +13,13 @@ ], "exclude": [], "references": [ - { "path": "../../../src/core/tsconfig.json" } + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../../src/plugins/charts/tsconfig.json" }, + { "path": "../../../src/plugins/data/tsconfig.json" }, + { "path": "../../plugins/alerting/tsconfig.json" }, + { "path": "../../plugins/triggers_actions_ui/tsconfig.json" }, + { "path": "../../plugins/features/tsconfig.json" }, + { "path": "../../../examples/developer_examples/tsconfig.json" }, ] } diff --git a/x-pack/examples/embedded_lens_example/tsconfig.json b/x-pack/examples/embedded_lens_example/tsconfig.json index 195db6effc5e6e..e1016a6c011a19 100644 --- a/x-pack/examples/embedded_lens_example/tsconfig.json +++ b/x-pack/examples/embedded_lens_example/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -14,9 +13,9 @@ "exclude": [], "references": [ { "path": "../../../src/core/tsconfig.json" }, - { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, - { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, - { "path": "../../../src/plugins/share/tsconfig.json" }, - { "path": "../../../src/plugins/data/tsconfig.json" } + { "path": "../../../src/plugins/data/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../plugins/lens/tsconfig.json" }, + { "path": "../../../examples/developer_examples/tsconfig.json" }, ] } diff --git a/x-pack/examples/reporting_example/tsconfig.json b/x-pack/examples/reporting_example/tsconfig.json index ef727b3368b12b..4c4016911e0c55 100644 --- a/x-pack/examples/reporting_example/tsconfig.json +++ b/x-pack/examples/reporting_example/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target" + "outDir": "./target/types" }, "include": [ "index.ts", @@ -13,7 +13,11 @@ ], "exclude": [], "references": [ - { "path": "../../../src/core/tsconfig.json" } + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../../src/plugins/screenshot_mode/tsconfig.json" }, + { "path": "../../../examples/developer_examples/tsconfig.json" }, + { "path": "../../plugins/reporting/tsconfig.json" }, ] } diff --git a/x-pack/examples/ui_actions_enhanced_examples/tsconfig.json b/x-pack/examples/ui_actions_enhanced_examples/tsconfig.json index 567baca039d765..0282ecbdd173a1 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/tsconfig.json +++ b/x-pack/examples/ui_actions_enhanced_examples/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "index.ts", @@ -16,6 +15,12 @@ { "path": "../../../src/core/tsconfig.json" }, { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, - { "path": "../../../src/plugins/share/tsconfig.json" } + { "path": "../../../src/plugins/share/tsconfig.json" }, + { "path": "../../../src/plugins/discover/tsconfig.json" }, + { "path": "../../../src/plugins/dashboard/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../examples/developer_examples/tsconfig.json" }, + { "path": "../../plugins/dashboard_enhanced/tsconfig.json" }, + { "path": "../../plugins/ui_actions_enhanced/tsconfig.json" }, ] } diff --git a/x-pack/plugins/actions/tsconfig.json b/x-pack/plugins/actions/tsconfig.json index d5c1105c99ad0d..b2526d84a3ce41 100644 --- a/x-pack/plugins/actions/tsconfig.json +++ b/x-pack/plugins/actions/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/alerting/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json index 86ab00faeb5ade..a822bd776134b3 100644 --- a/x-pack/plugins/alerting/tsconfig.json +++ b/x-pack/plugins/alerting/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/apm/e2e/tsconfig.json b/x-pack/plugins/apm/e2e/tsconfig.json index c4587349c7ad77..2560a15df92241 100644 --- a/x-pack/plugins/apm/e2e/tsconfig.json +++ b/x-pack/plugins/apm/e2e/tsconfig.json @@ -1,8 +1,9 @@ { "extends": "../../../../tsconfig.base.json", - "exclude": ["tmp"], - "include": ["./**/*"], + "include": ["**/*"], + "exclude": ["tmp", "target/**/*"], "compilerOptions": { + "outDir": "target/types", "types": ["cypress", "node"] } } diff --git a/x-pack/plugins/apm/ftr_e2e/config.ts b/x-pack/plugins/apm/ftr_e2e/config.ts index 38c196fbe70c23..4cb218fd24755c 100644 --- a/x-pack/plugins/apm/ftr_e2e/config.ts +++ b/x-pack/plugins/apm/ftr_e2e/config.ts @@ -5,8 +5,6 @@ * 2.0. */ -import { resolve } from 'path'; - import { FtrConfigProviderContext } from '@kbn/test'; import { CA_CERT_PATH } from '@kbn/dev-utils'; diff --git a/x-pack/plugins/apm/ftr_e2e/tsconfig.json b/x-pack/plugins/apm/ftr_e2e/tsconfig.json index 94b2b024ca4ccd..84a66afe4588db 100644 --- a/x-pack/plugins/apm/ftr_e2e/tsconfig.json +++ b/x-pack/plugins/apm/ftr_e2e/tsconfig.json @@ -1,16 +1,22 @@ { "extends": "../../../../tsconfig.base.json", - "exclude": [ - "tmp" - ], "include": [ - "./**/*" + "**/*" + ], + "exclude": [ + "tmp", + "target/**/*" ], "compilerOptions": { + "outDir": "target/types", "types": [ "cypress", "node", "cypress-real-events" ] - } -} \ No newline at end of file + }, + "references": [ + { "path": "../../../test/tsconfig.json" }, + { "path": "../../../../test/tsconfig.json" }, + ] +} diff --git a/x-pack/plugins/apm/tsconfig.json b/x-pack/plugins/apm/tsconfig.json index 192b7f4fe8c2ee..6eaf1a3bf18334 100644 --- a/x-pack/plugins/apm/tsconfig.json +++ b/x-pack/plugins/apm/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/banners/tsconfig.json b/x-pack/plugins/banners/tsconfig.json index 85608a8a78ad52..48767fb4525f50 100644 --- a/x-pack/plugins/banners/tsconfig.json +++ b/x-pack/plugins/banners/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/canvas/tsconfig.json b/x-pack/plugins/canvas/tsconfig.json index 384a7716657f5d..87fabe2730c169 100644 --- a/x-pack/plugins/canvas/tsconfig.json +++ b/x-pack/plugins/canvas/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/cases/tsconfig.json b/x-pack/plugins/cases/tsconfig.json index 493fe6430efa7a..99622df805ced0 100644 --- a/x-pack/plugins/cases/tsconfig.json +++ b/x-pack/plugins/cases/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/cloud/tsconfig.json b/x-pack/plugins/cloud/tsconfig.json index 46e81aa7fa0868..d1ff8c63e84cbe 100644 --- a/x-pack/plugins/cloud/tsconfig.json +++ b/x-pack/plugins/cloud/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/cross_cluster_replication/tsconfig.json b/x-pack/plugins/cross_cluster_replication/tsconfig.json index e0923553beadc3..4c1f3b20fa23e8 100644 --- a/x-pack/plugins/cross_cluster_replication/tsconfig.json +++ b/x-pack/plugins/cross_cluster_replication/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/dashboard_enhanced/tsconfig.json b/x-pack/plugins/dashboard_enhanced/tsconfig.json index 567c390edfa5af..cebf306003aba8 100644 --- a/x-pack/plugins/dashboard_enhanced/tsconfig.json +++ b/x-pack/plugins/dashboard_enhanced/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/dashboard_mode/tsconfig.json b/x-pack/plugins/dashboard_mode/tsconfig.json index 6e4ed11ffa7ff4..8094e70e96b602 100644 --- a/x-pack/plugins/dashboard_mode/tsconfig.json +++ b/x-pack/plugins/dashboard_mode/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/data_enhanced/tsconfig.json b/x-pack/plugins/data_enhanced/tsconfig.json index 047b9b06516bad..544b50c21224f8 100644 --- a/x-pack/plugins/data_enhanced/tsconfig.json +++ b/x-pack/plugins/data_enhanced/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json index 7c60002c3c6307..ee5f894305d5a6 100644 --- a/x-pack/plugins/data_visualizer/tsconfig.json +++ b/x-pack/plugins/data_visualizer/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/discover_enhanced/tsconfig.json b/x-pack/plugins/discover_enhanced/tsconfig.json index 38a55e557909b6..f372b7a7539ac8 100644 --- a/x-pack/plugins/discover_enhanced/tsconfig.json +++ b/x-pack/plugins/discover_enhanced/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json b/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json index 50fe41c49b0c88..85a215254bb77e 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json +++ b/x-pack/plugins/drilldowns/url_drilldown/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/embeddable_enhanced/tsconfig.json b/x-pack/plugins/embeddable_enhanced/tsconfig.json index 6e9eb69585cbc1..f9ac369587473f 100644 --- a/x-pack/plugins/embeddable_enhanced/tsconfig.json +++ b/x-pack/plugins/embeddable_enhanced/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/encrypted_saved_objects/tsconfig.json b/x-pack/plugins/encrypted_saved_objects/tsconfig.json index 2b51b313d34fcb..4b06756a9cf2f2 100644 --- a/x-pack/plugins/encrypted_saved_objects/tsconfig.json +++ b/x-pack/plugins/encrypted_saved_objects/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/enterprise_search/tsconfig.json b/x-pack/plugins/enterprise_search/tsconfig.json index 976cdfadca4b71..481c4527d59777 100644 --- a/x-pack/plugins/enterprise_search/tsconfig.json +++ b/x-pack/plugins/enterprise_search/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/event_log/tsconfig.json b/x-pack/plugins/event_log/tsconfig.json index 9b7cde10da3d60..e0e72fdbf6581d 100644 --- a/x-pack/plugins/event_log/tsconfig.json +++ b/x-pack/plugins/event_log/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/features/tsconfig.json b/x-pack/plugins/features/tsconfig.json index 1260af55fbff61..b16d7b47bba5b5 100644 --- a/x-pack/plugins/features/tsconfig.json +++ b/x-pack/plugins/features/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/file_upload/tsconfig.json b/x-pack/plugins/file_upload/tsconfig.json index 3e146d76fbb902..efea61e38b3e83 100644 --- a/x-pack/plugins/file_upload/tsconfig.json +++ b/x-pack/plugins/file_upload/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/fleet/tsconfig.json b/x-pack/plugins/fleet/tsconfig.json index a20d82de3c859c..5002bf2893872f 100644 --- a/x-pack/plugins/fleet/tsconfig.json +++ b/x-pack/plugins/fleet/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/global_search/tsconfig.json b/x-pack/plugins/global_search/tsconfig.json index 2d05328f445dfc..6a0385e5c080b6 100644 --- a/x-pack/plugins/global_search/tsconfig.json +++ b/x-pack/plugins/global_search/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/global_search_bar/tsconfig.json b/x-pack/plugins/global_search_bar/tsconfig.json index 266eecc35c84bd..04464a3c082003 100644 --- a/x-pack/plugins/global_search_bar/tsconfig.json +++ b/x-pack/plugins/global_search_bar/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/global_search_providers/tsconfig.json b/x-pack/plugins/global_search_providers/tsconfig.json index f2759954a68452..4ce15f6d44683e 100644 --- a/x-pack/plugins/global_search_providers/tsconfig.json +++ b/x-pack/plugins/global_search_providers/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/graph/tsconfig.json b/x-pack/plugins/graph/tsconfig.json index 741c603e3aae4a..d655f28c4e46eb 100644 --- a/x-pack/plugins/graph/tsconfig.json +++ b/x-pack/plugins/graph/tsconfig.json @@ -1,30 +1,29 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "*.ts", - "common/**/*", - "public/**/*", - "server/**/*", - "../../../typings/**/*", - ], - "references": [ - { "path": "../../../src/core/tsconfig.json" }, - { "path": "../licensing/tsconfig.json" }, - { "path": "../features/tsconfig.json"}, - { "path": "../../../src/plugins/data/tsconfig.json"}, - { "path": "../../../src/plugins/navigation/tsconfig.json" }, - { "path": "../../../src/plugins/saved_objects/tsconfig.json"}, - { "path": "../../../src/plugins/kibana_legacy/tsconfig.json"}, - { "path": "../../../src/plugins/home/tsconfig.json"}, - { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, - { "path": "../../../src/plugins/kibana_react/tsconfig.json" } - ] - } \ No newline at end of file + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "*.ts", + "common/**/*", + "public/**/*", + "server/**/*", + "../../../typings/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + { "path": "../features/tsconfig.json"}, + { "path": "../../../src/plugins/data/tsconfig.json"}, + { "path": "../../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../../src/plugins/saved_objects/tsconfig.json"}, + { "path": "../../../src/plugins/kibana_legacy/tsconfig.json"}, + { "path": "../../../src/plugins/home/tsconfig.json"}, + { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/grokdebugger/tsconfig.json b/x-pack/plugins/grokdebugger/tsconfig.json index 51d2d0b6db0eac..aefb15f74c7b64 100644 --- a/x-pack/plugins/grokdebugger/tsconfig.json +++ b/x-pack/plugins/grokdebugger/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/index_lifecycle_management/tsconfig.json b/x-pack/plugins/index_lifecycle_management/tsconfig.json index 75bd775a367497..d3a342e1102119 100644 --- a/x-pack/plugins/index_lifecycle_management/tsconfig.json +++ b/x-pack/plugins/index_lifecycle_management/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/index_management/tsconfig.json b/x-pack/plugins/index_management/tsconfig.json index 81a96a77cef832..120e58c2850c55 100644 --- a/x-pack/plugins/index_management/tsconfig.json +++ b/x-pack/plugins/index_management/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/infra/tsconfig.json b/x-pack/plugins/infra/tsconfig.json index 765af7974a2f13..a9739bdfdedc73 100644 --- a/x-pack/plugins/infra/tsconfig.json +++ b/x-pack/plugins/infra/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/ingest_pipelines/tsconfig.json b/x-pack/plugins/ingest_pipelines/tsconfig.json index a248bc9f337fe3..de9a8362e8c6b7 100644 --- a/x-pack/plugins/ingest_pipelines/tsconfig.json +++ b/x-pack/plugins/ingest_pipelines/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/lens/tsconfig.json b/x-pack/plugins/lens/tsconfig.json index 6c4d3631a12f37..04d3838df20633 100644 --- a/x-pack/plugins/lens/tsconfig.json +++ b/x-pack/plugins/lens/tsconfig.json @@ -1,42 +1,41 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "*.ts", - "common/**/*", - "public/**/*", - "server/**/*", - "../../../typings/**/*" - ], - "references": [ - { "path": "../../../src/core/tsconfig.json" }, - { "path": "../task_manager/tsconfig.json" }, - { "path": "../global_search/tsconfig.json"}, - { "path": "../saved_objects_tagging/tsconfig.json"}, - { "path": "../../../src/plugins/data/tsconfig.json"}, - { "path": "../../../src/plugins/index_pattern_field_editor/tsconfig.json"}, - { "path": "../../../src/plugins/charts/tsconfig.json"}, - { "path": "../../../src/plugins/expressions/tsconfig.json"}, - { "path": "../../../src/plugins/navigation/tsconfig.json" }, - { "path": "../../../src/plugins/url_forwarding/tsconfig.json" }, - { "path": "../../../src/plugins/visualizations/tsconfig.json" }, - { "path": "../../../src/plugins/dashboard/tsconfig.json" }, - { "path": "../../../src/plugins/ui_actions/tsconfig.json" }, - { "path": "../../../src/plugins/embeddable/tsconfig.json" }, - { "path": "../../../src/plugins/share/tsconfig.json" }, - { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, - { "path": "../../../src/plugins/saved_objects/tsconfig.json"}, - { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, - { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, - { "path": "../../../src/plugins/embeddable/tsconfig.json"}, - { "path": "../../../src/plugins/presentation_util/tsconfig.json"}, - { "path": "../../../src/plugins/field_formats/tsconfig.json"} - ] - } + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "*.ts", + "common/**/*", + "public/**/*", + "server/**/*", + "../../../typings/**/*" + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../task_manager/tsconfig.json" }, + { "path": "../global_search/tsconfig.json"}, + { "path": "../saved_objects_tagging/tsconfig.json"}, + { "path": "../../../src/plugins/data/tsconfig.json"}, + { "path": "../../../src/plugins/index_pattern_field_editor/tsconfig.json"}, + { "path": "../../../src/plugins/charts/tsconfig.json"}, + { "path": "../../../src/plugins/expressions/tsconfig.json"}, + { "path": "../../../src/plugins/navigation/tsconfig.json" }, + { "path": "../../../src/plugins/url_forwarding/tsconfig.json" }, + { "path": "../../../src/plugins/visualizations/tsconfig.json" }, + { "path": "../../../src/plugins/dashboard/tsconfig.json" }, + { "path": "../../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../src/plugins/share/tsconfig.json" }, + { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../../../src/plugins/saved_objects/tsconfig.json"}, + { "path": "../../../src/plugins/kibana_utils/tsconfig.json" }, + { "path": "../../../src/plugins/kibana_react/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json"}, + { "path": "../../../src/plugins/presentation_util/tsconfig.json"}, + { "path": "../../../src/plugins/field_formats/tsconfig.json"} + ] +} diff --git a/x-pack/plugins/license_api_guard/tsconfig.json b/x-pack/plugins/license_api_guard/tsconfig.json index 1b6ea789760d56..123e73a9e8163b 100644 --- a/x-pack/plugins/license_api_guard/tsconfig.json +++ b/x-pack/plugins/license_api_guard/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/license_management/tsconfig.json b/x-pack/plugins/license_management/tsconfig.json index e6cb0101ee838b..4384a9a0efd98d 100644 --- a/x-pack/plugins/license_management/tsconfig.json +++ b/x-pack/plugins/license_management/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/licensing/tsconfig.json b/x-pack/plugins/licensing/tsconfig.json index 6118bcd81d342c..d8855fcd65912d 100644 --- a/x-pack/plugins/licensing/tsconfig.json +++ b/x-pack/plugins/licensing/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/lists/tsconfig.json b/x-pack/plugins/lists/tsconfig.json index 9025a1640f8bf1..691c5243d9db83 100644 --- a/x-pack/plugins/lists/tsconfig.json +++ b/x-pack/plugins/lists/tsconfig.json @@ -1,23 +1,22 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 - "server/**/*.json", - ], - "references": [ - { "path": "../../../src/core/tsconfig.json" }, - { "path": "../spaces/tsconfig.json" }, - { "path": "../security/tsconfig.json"}, - ] - } + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 + "server/**/*.json", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../spaces/tsconfig.json" }, + { "path": "../security/tsconfig.json"}, + ] +} diff --git a/x-pack/plugins/logstash/tsconfig.json b/x-pack/plugins/logstash/tsconfig.json index 6f21cfdb0b1919..5a13e8ca715999 100644 --- a/x-pack/plugins/logstash/tsconfig.json +++ b/x-pack/plugins/logstash/tsconfig.json @@ -1,26 +1,25 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - ], - "references": [ - { "path": "../../../src/core/tsconfig.json" }, - { "path": "../../../src/plugins/home/tsconfig.json"}, - { "path": "../../../src/plugins/management/tsconfig.json"}, + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/home/tsconfig.json"}, + { "path": "../../../src/plugins/management/tsconfig.json"}, - { "path": "../features/tsconfig.json" }, - { "path": "../licensing/tsconfig.json"}, - { "path": "../monitoring/tsconfig.json"}, - { "path": "../security/tsconfig.json"}, - ] - } + { "path": "../features/tsconfig.json" }, + { "path": "../licensing/tsconfig.json"}, + { "path": "../monitoring/tsconfig.json"}, + { "path": "../security/tsconfig.json"}, + ] +} diff --git a/x-pack/plugins/maps/tsconfig.json b/x-pack/plugins/maps/tsconfig.json index 1b74b7ee7566a8..5245b374b9fecf 100644 --- a/x-pack/plugins/maps/tsconfig.json +++ b/x-pack/plugins/maps/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/metrics_entities/tsconfig.json b/x-pack/plugins/metrics_entities/tsconfig.json index 15e6aa1601627d..402b327a2dbf22 100644 --- a/x-pack/plugins/metrics_entities/tsconfig.json +++ b/x-pack/plugins/metrics_entities/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/ml/server/routes/apidoc_scripts/tsconfig.json b/x-pack/plugins/ml/server/routes/apidoc_scripts/tsconfig.json index 6d01a853698b8e..4748911105e8c6 100644 --- a/x-pack/plugins/ml/server/routes/apidoc_scripts/tsconfig.json +++ b/x-pack/plugins/ml/server/routes/apidoc_scripts/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../../../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "target": "es6", - "moduleResolution": "node" + "outDir": "./target/types" }, "include": [ "schema_worker.ts", diff --git a/x-pack/plugins/ml/tsconfig.json b/x-pack/plugins/ml/tsconfig.json index 8e859c35e3f853..db8fc463b05508 100644 --- a/x-pack/plugins/ml/tsconfig.json +++ b/x-pack/plugins/ml/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/monitoring/tsconfig.json b/x-pack/plugins/monitoring/tsconfig.json index d0fb7e1a88dcfe..756b8528865ce5 100644 --- a/x-pack/plugins/monitoring/tsconfig.json +++ b/x-pack/plugins/monitoring/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/observability/tsconfig.json b/x-pack/plugins/observability/tsconfig.json index 8aa184bca913f0..4e912ee4535b83 100644 --- a/x-pack/plugins/observability/tsconfig.json +++ b/x-pack/plugins/observability/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/osquery/cypress/tsconfig.json b/x-pack/plugins/osquery/cypress/tsconfig.json index 467ea13fc48695..1adb067fe682e6 100644 --- a/x-pack/plugins/osquery/cypress/tsconfig.json +++ b/x-pack/plugins/osquery/cypress/tsconfig.json @@ -1,11 +1,13 @@ { "extends": "../../../../tsconfig.base.json", - "exclude": [], "include": [ - "./**/*" + "**/*" + ], + "exclude": [ + "target/**/*" ], "compilerOptions": { - "tsBuildInfoFile": "../../../../build/tsbuildinfo/osquery/cypress", + "outDir": "target/types", "types": [ "cypress", "node" diff --git a/x-pack/plugins/osquery/tsconfig.json b/x-pack/plugins/osquery/tsconfig.json index 76e26c770cfe02..50b98076709547 100644 --- a/x-pack/plugins/osquery/tsconfig.json +++ b/x-pack/plugins/osquery/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/painless_lab/tsconfig.json b/x-pack/plugins/painless_lab/tsconfig.json index a869b21e06d4d5..e0cf386193bb4b 100644 --- a/x-pack/plugins/painless_lab/tsconfig.json +++ b/x-pack/plugins/painless_lab/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/remote_clusters/tsconfig.json b/x-pack/plugins/remote_clusters/tsconfig.json index 9dc7926bd62ea7..006c3c53c1be44 100644 --- a/x-pack/plugins/remote_clusters/tsconfig.json +++ b/x-pack/plugins/remote_clusters/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/reporting/tsconfig.json b/x-pack/plugins/reporting/tsconfig.json index 406fe9965b8a03..3e584505657203 100644 --- a/x-pack/plugins/reporting/tsconfig.json +++ b/x-pack/plugins/reporting/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/rollup/tsconfig.json b/x-pack/plugins/rollup/tsconfig.json index 6885081ce4bdd1..fbe323b2549ea1 100644 --- a/x-pack/plugins/rollup/tsconfig.json +++ b/x-pack/plugins/rollup/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/rule_registry/tsconfig.json b/x-pack/plugins/rule_registry/tsconfig.json index f6253e441da312..769c9f81f8ce99 100644 --- a/x-pack/plugins/rule_registry/tsconfig.json +++ b/x-pack/plugins/rule_registry/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/runtime_fields/tsconfig.json b/x-pack/plugins/runtime_fields/tsconfig.json index a1efe4c9cf2dd6..5dc704ec57693e 100644 --- a/x-pack/plugins/runtime_fields/tsconfig.json +++ b/x-pack/plugins/runtime_fields/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/saved_objects_tagging/tsconfig.json b/x-pack/plugins/saved_objects_tagging/tsconfig.json index d00156ad1277ca..608cdb2c793cde 100644 --- a/x-pack/plugins/saved_objects_tagging/tsconfig.json +++ b/x-pack/plugins/saved_objects_tagging/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/searchprofiler/tsconfig.json b/x-pack/plugins/searchprofiler/tsconfig.json index f8ac3a61f7812a..c53c65b812a446 100644 --- a/x-pack/plugins/searchprofiler/tsconfig.json +++ b/x-pack/plugins/searchprofiler/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/security/tsconfig.json b/x-pack/plugins/security/tsconfig.json index 6c3fd1851a8cbe..ea03b9dbb6471d 100644 --- a/x-pack/plugins/security/tsconfig.json +++ b/x-pack/plugins/security/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/security_solution/cypress/tsconfig.json b/x-pack/plugins/security_solution/cypress/tsconfig.json index 270d877a362a6d..f762e63c899acf 100644 --- a/x-pack/plugins/security_solution/cypress/tsconfig.json +++ b/x-pack/plugins/security_solution/cypress/tsconfig.json @@ -1,11 +1,14 @@ { "extends": "../../../../tsconfig.base.json", - "exclude": [], "include": [ - "./**/*" + "**/*", + "fixtures/**/*.json" + ], + "exclude": [ + "target/**/*" ], "compilerOptions": { - "tsBuildInfoFile": "../../../../build/tsbuildinfo/security_solution/cypress", + "outDir": "target/types", "types": [ "cypress", "cypress-pipe", @@ -13,4 +16,7 @@ ], "resolveJsonModule": true, }, + "references": [ + { "path": "../tsconfig.json" } + ] } diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index 0df41b9f988b72..5c87d58199df4e 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -1,47 +1,46 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - "scripts/**/*", - // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 - "server/**/*.json", - "public/**/*.json", - "../../../typings/**/*" - ], - "references": [ - { "path": "../../../src/core/tsconfig.json" }, - { "path": "../../../src/plugins/data/tsconfig.json" }, - { "path": "../../../src/plugins/embeddable/tsconfig.json" }, - { "path": "../../../src/plugins/home/tsconfig.json" }, - { "path": "../../../src/plugins/inspector/tsconfig.json" }, - { "path": "../../../src/plugins/ui_actions/tsconfig.json" }, - { "path": "../../../src/plugins/newsfeed/tsconfig.json" }, - { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, - { "path": "../../../src/plugins/telemetry/tsconfig.json" }, - { "path": "../../../src/plugins/telemetry_management_section/tsconfig.json" }, - { "path": "../actions/tsconfig.json" }, - { "path": "../alerting/tsconfig.json" }, - { "path": "../cases/tsconfig.json" }, - { "path": "../data_enhanced/tsconfig.json" }, - { "path": "../encrypted_saved_objects/tsconfig.json" }, - { "path": "../features/tsconfig.json" }, - { "path": "../fleet/tsconfig.json" }, - { "path": "../licensing/tsconfig.json" }, - { "path": "../lists/tsconfig.json" }, - { "path": "../maps/tsconfig.json" }, - { "path": "../ml/tsconfig.json" }, - { "path": "../spaces/tsconfig.json" }, - { "path": "../security/tsconfig.json"}, - { "path": "../timelines/tsconfig.json"}, - ] - } + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "scripts/**/*", + // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 + "server/**/*.json", + "public/**/*.json", + "../../../typings/**/*" + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/data/tsconfig.json" }, + { "path": "../../../src/plugins/embeddable/tsconfig.json" }, + { "path": "../../../src/plugins/home/tsconfig.json" }, + { "path": "../../../src/plugins/inspector/tsconfig.json" }, + { "path": "../../../src/plugins/ui_actions/tsconfig.json" }, + { "path": "../../../src/plugins/newsfeed/tsconfig.json" }, + { "path": "../../../src/plugins/usage_collection/tsconfig.json" }, + { "path": "../../../src/plugins/telemetry/tsconfig.json" }, + { "path": "../../../src/plugins/telemetry_management_section/tsconfig.json" }, + { "path": "../actions/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" }, + { "path": "../cases/tsconfig.json" }, + { "path": "../data_enhanced/tsconfig.json" }, + { "path": "../encrypted_saved_objects/tsconfig.json" }, + { "path": "../features/tsconfig.json" }, + { "path": "../fleet/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + { "path": "../lists/tsconfig.json" }, + { "path": "../maps/tsconfig.json" }, + { "path": "../ml/tsconfig.json" }, + { "path": "../spaces/tsconfig.json" }, + { "path": "../security/tsconfig.json"}, + { "path": "../timelines/tsconfig.json"}, + ] +} diff --git a/x-pack/plugins/snapshot_restore/tsconfig.json b/x-pack/plugins/snapshot_restore/tsconfig.json index 39beda02977e1d..82f0e86df36838 100644 --- a/x-pack/plugins/snapshot_restore/tsconfig.json +++ b/x-pack/plugins/snapshot_restore/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/spaces/tsconfig.json b/x-pack/plugins/spaces/tsconfig.json index 3888519555d226..4cc95504a158e9 100644 --- a/x-pack/plugins/spaces/tsconfig.json +++ b/x-pack/plugins/spaces/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/stack_alerts/tsconfig.json b/x-pack/plugins/stack_alerts/tsconfig.json index c83935945c67b4..f3ae4509f35be8 100644 --- a/x-pack/plugins/stack_alerts/tsconfig.json +++ b/x-pack/plugins/stack_alerts/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/task_manager/tsconfig.json b/x-pack/plugins/task_manager/tsconfig.json index 4b53dcac72c8ee..42ebd42b4f7a53 100644 --- a/x-pack/plugins/task_manager/tsconfig.json +++ b/x-pack/plugins/task_manager/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/telemetry_collection_xpack/tsconfig.json b/x-pack/plugins/telemetry_collection_xpack/tsconfig.json index f4c17c4317a9f0..03ca7efad22a40 100644 --- a/x-pack/plugins/telemetry_collection_xpack/tsconfig.json +++ b/x-pack/plugins/telemetry_collection_xpack/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/timelines/tsconfig.json b/x-pack/plugins/timelines/tsconfig.json index 17a2a9b612ab14..9677c0e64dd88f 100644 --- a/x-pack/plugins/timelines/tsconfig.json +++ b/x-pack/plugins/timelines/tsconfig.json @@ -1,31 +1,30 @@ { - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "composite": true, - "outDir": "./target/types", - "emitDeclarationOnly": true, - "declaration": true, - "declarationMap": true - }, - "include": [ - "common/**/*", - "public/**/*", - "server/**/*", - // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 - "server/**/*.json", - "public/**/*.json", - "../../../typings/**/*" - ], - "references": [ - { "path": "../../../src/core/tsconfig.json" }, - { "path": "../../../src/plugins/data/tsconfig.json" }, - { "path": "../../../src/plugins/home/tsconfig.json" }, - { "path": "../data_enhanced/tsconfig.json" }, - { "path": "../features/tsconfig.json" }, - { "path": "../cases/tsconfig.json" }, - { "path": "../licensing/tsconfig.json" }, - { "path": "../spaces/tsconfig.json" }, - { "path": "../alerting/tsconfig.json" } - ] - } + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + // have to declare *.json explicitly due to https://github.com/microsoft/TypeScript/issues/25636 + "server/**/*.json", + "public/**/*.json", + "../../../typings/**/*" + ], + "references": [ + { "path": "../../../src/core/tsconfig.json" }, + { "path": "../../../src/plugins/data/tsconfig.json" }, + { "path": "../../../src/plugins/home/tsconfig.json" }, + { "path": "../data_enhanced/tsconfig.json" }, + { "path": "../features/tsconfig.json" }, + { "path": "../cases/tsconfig.json" }, + { "path": "../licensing/tsconfig.json" }, + { "path": "../spaces/tsconfig.json" }, + { "path": "../alerting/tsconfig.json" } + ] +} diff --git a/x-pack/plugins/transform/tsconfig.json b/x-pack/plugins/transform/tsconfig.json index 2717f92c7a4df1..99e8baf3f92fc2 100644 --- a/x-pack/plugins/transform/tsconfig.json +++ b/x-pack/plugins/transform/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/translations/tsconfig.json b/x-pack/plugins/translations/tsconfig.json index e48512742ed688..6b09de638f3f9f 100644 --- a/x-pack/plugins/translations/tsconfig.json +++ b/x-pack/plugins/translations/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/triggers_actions_ui/tsconfig.json b/x-pack/plugins/triggers_actions_ui/tsconfig.json index 8202449b222987..6536206acf3695 100644 --- a/x-pack/plugins/triggers_actions_ui/tsconfig.json +++ b/x-pack/plugins/triggers_actions_ui/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/ui_actions_enhanced/tsconfig.json b/x-pack/plugins/ui_actions_enhanced/tsconfig.json index 39318770126e58..100a1decd94274 100644 --- a/x-pack/plugins/ui_actions_enhanced/tsconfig.json +++ b/x-pack/plugins/ui_actions_enhanced/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/upgrade_assistant/tsconfig.json b/x-pack/plugins/upgrade_assistant/tsconfig.json index 750bea75c6656d..33a1421fbb0c18 100644 --- a/x-pack/plugins/upgrade_assistant/tsconfig.json +++ b/x-pack/plugins/upgrade_assistant/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/uptime/tsconfig.json b/x-pack/plugins/uptime/tsconfig.json index 88099b57f0898b..a41da4837f4530 100644 --- a/x-pack/plugins/uptime/tsconfig.json +++ b/x-pack/plugins/uptime/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, @@ -32,4 +31,4 @@ "path": "../fleet/tsconfig.json" } ] -} \ No newline at end of file +} diff --git a/x-pack/plugins/watcher/tsconfig.json b/x-pack/plugins/watcher/tsconfig.json index 15a28d498f2bdd..e17e7e753592aa 100644 --- a/x-pack/plugins/watcher/tsconfig.json +++ b/x-pack/plugins/watcher/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/plugins/xpack_legacy/tsconfig.json b/x-pack/plugins/xpack_legacy/tsconfig.json index 3bfc78b72cb3ef..57fccc031a0cf2 100644 --- a/x-pack/plugins/xpack_legacy/tsconfig.json +++ b/x-pack/plugins/xpack_legacy/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index cd43e7108b06df..1bfd24d6ad29db 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "composite": true, "outDir": "./target/types", "emitDeclarationOnly": true, "declaration": true, diff --git a/x-pack/test/usage_collection/plugins/application_usage_test/tsconfig.json b/x-pack/test/usage_collection/plugins/application_usage_test/tsconfig.json index f1bf94a38de8fd..e625acbc569cf5 100644 --- a/x-pack/test/usage_collection/plugins/application_usage_test/tsconfig.json +++ b/x-pack/test/usage_collection/plugins/application_usage_test/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "public/**/*.ts", diff --git a/x-pack/test/usage_collection/plugins/stack_management_usage_test/tsconfig.json b/x-pack/test/usage_collection/plugins/stack_management_usage_test/tsconfig.json index f1bf94a38de8fd..e625acbc569cf5 100644 --- a/x-pack/test/usage_collection/plugins/stack_management_usage_test/tsconfig.json +++ b/x-pack/test/usage_collection/plugins/stack_management_usage_test/tsconfig.json @@ -1,8 +1,7 @@ { "extends": "../../../../../tsconfig.base.json", "compilerOptions": { - "outDir": "./target", - "skipLibCheck": true + "outDir": "./target/types" }, "include": [ "public/**/*.ts",