* TS Incremental build exclude test files (#95610) * add base config for all the TS projects * all the project use new tsconfig.project.json * compile test files in the high-level tsconfig.json * fix TS error in maps plugin * fix TS error in infra plugin * exclude mote test and test until folders * uptime. do not import test code within prod code * expressions. do not import test code within prod code * data: export mocks from high level folder * task_manager: comply with es client typings * infra: remove unused enzyme_helpers * check_ts_project requires "include" key * ts_check should handle parent configs * all ts configs should extend base one * exclude test folders from plugins * update patterns to fix ts_check errors * Apply suggestions from code review Co-authored-by: Constance <constancecchen@users.noreply.github.com> * uptime: MountWithReduxProvider to test helpers Co-authored-by: Constance <constancecchen@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> * fix code plugin tsconfig Co-authored-by: Constance <constancecchen@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
c5b75522d3
commit
ebdcd92b05
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"outDir": "target",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"extends": "../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import { basename, dirname, relative, resolve } from 'path';
|
||||
|
||||
import { memoize } from 'lodash';
|
||||
import { IMinimatch, Minimatch } from 'minimatch';
|
||||
import { REPO_ROOT } from '@kbn/utils';
|
||||
|
||||
|
@ -26,6 +26,10 @@ function testMatchers(matchers: IMinimatch[], path: string) {
|
|||
return matchers.some((matcher) => matcher.match(path));
|
||||
}
|
||||
|
||||
const parentProjectFactory = memoize(function (parentConfigPath: string) {
|
||||
return new Project(parentConfigPath);
|
||||
});
|
||||
|
||||
export class Project {
|
||||
public directory: string;
|
||||
public name: string;
|
||||
|
@ -34,6 +38,7 @@ export class Project {
|
|||
|
||||
private readonly include: IMinimatch[];
|
||||
private readonly exclude: IMinimatch[];
|
||||
private readonly parent?: Project;
|
||||
|
||||
constructor(
|
||||
public tsConfigPath: string,
|
||||
|
@ -41,15 +46,16 @@ export class Project {
|
|||
) {
|
||||
this.config = parseTsConfig(tsConfigPath);
|
||||
|
||||
const { files, include, exclude = [] } = this.config as {
|
||||
const { files, include, exclude = [], extends: extendsPath } = this.config as {
|
||||
files?: string[];
|
||||
include?: string[];
|
||||
exclude?: string[];
|
||||
extends?: string;
|
||||
};
|
||||
|
||||
if (files || !include) {
|
||||
throw new Error(
|
||||
'tsconfig.json files in the Kibana repo must use "include" keys and not "files"'
|
||||
`[${tsConfigPath}]: tsconfig.json files in the Kibana repo must use "include" keys and not "files"`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -58,9 +64,30 @@ export class Project {
|
|||
this.name = options.name || relative(REPO_ROOT, this.directory) || basename(this.directory);
|
||||
this.include = makeMatchers(this.directory, include);
|
||||
this.exclude = makeMatchers(this.directory, exclude);
|
||||
|
||||
if (extendsPath !== undefined) {
|
||||
const parentConfigPath = resolve(this.directory, extendsPath);
|
||||
this.parent = parentProjectFactory(parentConfigPath);
|
||||
}
|
||||
}
|
||||
|
||||
public isAbsolutePathSelected(path: string) {
|
||||
return testMatchers(this.exclude, path) ? false : testMatchers(this.include, path);
|
||||
public isAbsolutePathSelected(path: string): boolean {
|
||||
return this.isExcluded(path) ? false : this.isIncluded(path);
|
||||
}
|
||||
|
||||
public isExcluded(path: string): boolean {
|
||||
if (testMatchers(this.exclude, path)) return true;
|
||||
if (this.parent) {
|
||||
return this.parent.isExcluded(path);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public isIncluded(path: string): boolean {
|
||||
if (testMatchers(this.include, path)) return true;
|
||||
if (this.parent) {
|
||||
return this.parent.isIncluded(path);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { createMockContext } from '../../../../expressions/common';
|
||||
import { createMockContext } from '../../../../expressions/common/mocks';
|
||||
import { functionWrapper } from './utils';
|
||||
import { existsFilterFunction } from './exists_filter';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { createMockContext } from '../../../../expressions/common';
|
||||
import { createMockContext } from '../../../../expressions/common/mocks';
|
||||
import { functionWrapper } from './utils';
|
||||
import { kibanaFilterFunction } from './kibana_filter';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { createMockContext } from '../../../../expressions/common';
|
||||
import { createMockContext } from '../../../../expressions/common/mocks';
|
||||
import { functionWrapper } from './utils';
|
||||
import { phraseFilterFunction } from './phrase_filter';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { createMockContext } from '../../../../expressions/common';
|
||||
import { createMockContext } from '../../../../expressions/common/mocks';
|
||||
import { functionWrapper } from './utils';
|
||||
import { rangeFilterFunction } from './range_filter';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -34,3 +34,5 @@ export const createMockExecutionContext = <ExtraContext extends object = object>
|
|||
...extraContext,
|
||||
};
|
||||
};
|
||||
|
||||
export { createMockContext } from './util/test_utils';
|
||||
|
|
|
@ -10,4 +10,3 @@ export * from './create_error';
|
|||
export * from './get_by_alias';
|
||||
export * from './tables_adapter';
|
||||
export * from './expressions_inspector_adapter';
|
||||
export * from './test_utils';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -56,5 +56,6 @@
|
|||
"jest-styled-components",
|
||||
"@testing-library/jest-dom"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": []
|
||||
}
|
||||
|
|
|
@ -19,6 +19,78 @@
|
|||
"x-pack/plugins/cases/**/*",
|
||||
"x-pack/plugins/lists/**/*",
|
||||
"x-pack/plugins/security_solution/**/*",
|
||||
|
||||
// tests
|
||||
"src/**/*.test.ts",
|
||||
"src/**/*.test.tsx",
|
||||
"src/**/integration_tests/*",
|
||||
"src/**/tests/*",
|
||||
// mocks
|
||||
"src/**/__mocks__/*",
|
||||
"src/**/mock/*",
|
||||
"src/**/mocks/*",
|
||||
"src/**/*/mock.ts",
|
||||
"src/**/*/mocks.ts",
|
||||
"src/**/*/mocks.tsx",
|
||||
"src/**/*.mock.ts",
|
||||
"src/**/*.mock.tsx",
|
||||
"src/**/*.mocks.ts",
|
||||
"src/**/*.mocks.tsx",
|
||||
|
||||
// test helpers
|
||||
"src/**/test_helpers/*",
|
||||
"src/**/test_utils/*",
|
||||
"src/**/*/test_utils.ts",
|
||||
"src/**/*/test_helpers.ts",
|
||||
"src/**/*/test_helper.tsx",
|
||||
|
||||
// stubs
|
||||
"src/**/*/stubs.ts",
|
||||
"src/**/*.stub.ts",
|
||||
"src/**/*.stories.tsx",
|
||||
"src/**/*/_mock_handler_arguments.ts",
|
||||
|
||||
// tests
|
||||
"x-pack/plugins/**/*.test.ts",
|
||||
"x-pack/plugins/**/*.test.tsx",
|
||||
"x-pack/plugins/**/test/**/*",
|
||||
"x-pack/plugins/**/tests/*",
|
||||
"x-pack/plugins/**/integration_tests/*",
|
||||
"x-pack/plugins/**/tests_client_integration/*",
|
||||
"x-pack/plugins/**/__fixtures__/*",
|
||||
"x-pack/plugins/**/__stories__/*",
|
||||
"x-pack/plugins/**/__jest__/**/*",
|
||||
|
||||
// mocks
|
||||
"x-pack/plugins/**/__mocks__/*",
|
||||
"x-pack/plugins/**/mock/*",
|
||||
"x-pack/plugins/**/mocks/*",
|
||||
"x-pack/plugins/**/*/mock.ts",
|
||||
"x-pack/plugins/**/*/mocks.ts",
|
||||
"x-pack/plugins/**/*/mocks.tsx",
|
||||
"x-pack/plugins/**/*.mock.ts",
|
||||
"x-pack/plugins/**/*.mock.tsx",
|
||||
"x-pack/plugins/**/*.mocks.ts",
|
||||
"x-pack/plugins/**/*.mocks.tsx",
|
||||
|
||||
// test helpers
|
||||
"x-pack/plugins/**/test_helpers/*",
|
||||
"x-pack/plugins/**/test_utils/*",
|
||||
"x-pack/plugins/**/*/test_utils.ts",
|
||||
"x-pack/plugins/**/*/test_helper.tsx",
|
||||
"x-pack/plugins/**/*/test_helpers.ts",
|
||||
"x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx",
|
||||
"x-pack/plugins/uptime/server/lib/requests/helper.ts",
|
||||
"x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx",
|
||||
"x-pack/plugins/uptime/public/lib/helper/enzyme_helpers.tsx",
|
||||
"x-pack/plugins/apm/server/utils/test_helpers.tsx",
|
||||
"x-pack/plugins/apm/public/utils/testHelpers.tsx",
|
||||
|
||||
// stubs
|
||||
"x-pack/plugins/**/*/stubs.ts",
|
||||
"x-pack/plugins/**/*.stub.ts",
|
||||
"x-pack/plugins/**/*.stories.tsx",
|
||||
"x-pack/plugins/**/*/_mock_handler_arguments.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"x-pack/plugins/security_solution/cypress/**/*"
|
||||
|
|
65
tsconfig.project.json
Normal file
65
tsconfig.project.json
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"emitDeclarationOnly": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true
|
||||
},
|
||||
"exclude": [
|
||||
// tests
|
||||
"**/*.test.ts",
|
||||
"**/*.test.tsx",
|
||||
"**/integration_tests/*",
|
||||
"**/test/**/*",
|
||||
"**/test/*",
|
||||
"**/tests/*",
|
||||
"**/tests_client_integration/*",
|
||||
"**/__fixtures__/*",
|
||||
"**/__stories__/*",
|
||||
"**/__jest__/**",
|
||||
|
||||
// mocks
|
||||
"**/__mocks__/*",
|
||||
"**/mock/*",
|
||||
"**/mocks/*",
|
||||
"**/*/mock.ts",
|
||||
"**/*/mocks.ts",
|
||||
"**/*/mocks.tsx",
|
||||
"**/*.mock.ts",
|
||||
"**/*.mock.tsx",
|
||||
"**/*.mocks.ts",
|
||||
"**/*.mocks.tsx",
|
||||
|
||||
// test helpers
|
||||
"**/test_helpers/*",
|
||||
"**/test_utils/*",
|
||||
"**/*/test_utils.ts",
|
||||
"**/*/test_helper.tsx",
|
||||
"**/*/test_helpers.ts",
|
||||
// x-pack/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx
|
||||
"**/*/test_data.tsx",
|
||||
"**/*/shared_columns_tests.tsx",
|
||||
// x-pack/plugins/uptime/server/lib/requests/helper.ts
|
||||
"**/*/requests/helper.ts",
|
||||
// x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx
|
||||
"**/*/rtl_helpers.tsx",
|
||||
// x-pack/plugins/uptime/public/lib/helper/enzyme_helpers.tsx
|
||||
"**/*/enzyme_helpers.tsx",
|
||||
// x-pack/plugins/apm/server/utils/test_helpers.tsx
|
||||
"**/*/test_helpers.tsx",
|
||||
// x-pack/plugins/apm/public/utils/testHelpers.tsx
|
||||
"**/*/testHelpers.tsx",
|
||||
|
||||
// stubs
|
||||
"**/*/stubs.ts",
|
||||
"**/*.stub.ts",
|
||||
"**/*.stories.tsx",
|
||||
"**/*/_mock_handler_arguments.ts"
|
||||
],
|
||||
"include": [],
|
||||
"types": [
|
||||
"node",
|
||||
"flot"
|
||||
]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"extends": "../../../../tsconfig.project.json",
|
||||
"exclude": ["tmp"],
|
||||
"include": ["./**/*"],
|
||||
"compilerOptions": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"extends": "../../../../tsconfig.project.json",
|
||||
"exclude": [
|
||||
"tmp"
|
||||
],
|
||||
|
@ -12,4 +12,4 @@
|
|||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ const { kibanaRoot, tsconfigTpl, filesToIgnore } = require('./paths');
|
|||
const { unoptimizeTsConfig } = require('./unoptimize');
|
||||
|
||||
async function prepareBaseTsConfig() {
|
||||
const baseConfigFilename = path.resolve(kibanaRoot, 'tsconfig.base.json');
|
||||
const baseConfigFilename = path.resolve(kibanaRoot, 'tsconfig.project.json');
|
||||
const config = json5.parse(await readFile(baseConfigFilename, 'utf-8'));
|
||||
|
||||
await writeFile(
|
||||
|
|
|
@ -12,7 +12,7 @@ const tsconfigTpl = path.resolve(__dirname, './tsconfig.json');
|
|||
|
||||
const filesToIgnore = [
|
||||
path.resolve(kibanaRoot, 'tsconfig.json'),
|
||||
path.resolve(kibanaRoot, 'tsconfig.base.json'),
|
||||
path.resolve(kibanaRoot, 'tsconfig.project.json'),
|
||||
path.resolve(kibanaRoot, 'x-pack/plugins/apm', 'tsconfig.json'),
|
||||
];
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../../../tsconfig.base.json",
|
||||
"extends": "../../../../../tsconfig.project.json",
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"extends": "../../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
@ -27,4 +27,4 @@
|
|||
{ "path": "../../../src/plugins/kibana_utils/tsconfig.json" },
|
||||
{ "path": "../../../src/plugins/kibana_react/tsconfig.json" }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"extends": "../../../tsconfig.project.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "./target/types",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue