Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX] Management to TS projects #87660

Merged
merged 3 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/dev/run_find_plugins_without_ts_refs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import Path from 'path';
import Fs from 'fs';
import { get } from 'lodash';
import JSON5 from 'json5';
import { run } from '@kbn/dev-utils';
import { getPluginDeps, findPlugins } from './plugin_discovery';

Expand Down Expand Up @@ -88,7 +89,7 @@ function isMigratedToTsProjectRefs(dir: string): boolean {
try {
const path = Path.join(dir, 'tsconfig.json');
const content = Fs.readFileSync(path, { encoding: 'utf8' });
return get(JSON.parse(content), 'compilerOptions.composite', false);
return get(JSON5.parse(content), 'compilerOptions.composite', false);
tylersmalley marked this conversation as resolved.
Show resolved Hide resolved
} catch (e) {
return false;
}
Expand Down
22 changes: 22 additions & 0 deletions src/plugins/management/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": [
"common/**/*",
"public/**/*",
"server/**/*",
"../../../typings/**/*"
],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../home/tsconfig.json"},
{ "path": "../kibana_react/tsconfig.json"},
{ "path": "../kibana_utils/tsconfig.json"}
]
}
1 change: 1 addition & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"exclude": ["plugin_functional/plugins/**/*", "interpreter_functional/plugins/**/*"],
"references": [
{ "path": "../src/core/tsconfig.json" },
{ "path": "../src/plugins/management/tsconfig.json" },
{ "path": "../src/plugins/bfetch/tsconfig.json" },
{ "path": "../src/plugins/embeddable/tsconfig.json" },
{ "path": "../src/plugins/expressions/tsconfig.json" },
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"exclude": [
"src/**/__fixtures__/**/*",
"src/core/**/*",
"src/plugins/management/**/*",
"src/plugins/bfetch/**/*",
"src/plugins/data/**/*",
"src/plugins/dev_tools/**/*",
Expand Down Expand Up @@ -37,6 +38,7 @@
],
"references": [
{ "path": "./src/core/tsconfig.json" },
{ "path": "./src/plugins/management/tsconfig.json"},
{ "path": "./src/plugins/bfetch/tsconfig.json" },
{ "path": "./src/plugins/data/tsconfig.json" },
{ "path": "./src/plugins/dev_tools/tsconfig.json" },
Expand Down
1 change: 1 addition & 0 deletions tsconfig.refs.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@
{ "path": "./src/plugins/ui_actions/tsconfig.json" },
{ "path": "./src/plugins/url_forwarding/tsconfig.json" },
{ "path": "./src/plugins/usage_collection/tsconfig.json" },
{ "path": "./src/plugins/management/tsconfig.json" },
]
}
1 change: 1 addition & 0 deletions x-pack/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"exclude": ["../typings/jest.d.ts"],
"references": [
{ "path": "../../src/core/tsconfig.json" },
{ "path": "../../src/plugins/management/tsconfig.json" },
{ "path": "../../src/plugins/bfetch/tsconfig.json" },
{ "path": "../../src/plugins/data/tsconfig.json" },
{ "path": "../../src/plugins/embeddable/tsconfig.json" },
Expand Down
1 change: 1 addition & 0 deletions x-pack/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"references": [
{ "path": "../src/core/tsconfig.json" },
{ "path": "../src/plugins/management/tsconfig.json" },
{ "path": "../src/plugins/bfetch/tsconfig.json" },
{ "path": "../src/plugins/data/tsconfig.json" },
{ "path": "../src/plugins/dev_tools/tsconfig.json" },
Expand Down