Skip to content

Commit d5ff1df

Browse files
Merge branch 'master' into kertal-pr-2020-09-28-fix-advanced-settings-array-input
2 parents 65c3d0e + 1ba706c commit d5ff1df

File tree

33 files changed

+363
-57
lines changed

33 files changed

+363
-57
lines changed

examples/bfetch_explorer/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
],
1414
"exclude": [],
1515
"references": [
16-
{ "path": "../../src/core/tsconfig.json" }
16+
{ "path": "../../src/core/tsconfig.json" },
17+
{ "path": "../../src/plugins/kibana_react/tsconfig.json" },
1718
]
1819
}

examples/embeddable_examples/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
],
1515
"exclude": [],
1616
"references": [
17-
{ "path": "../../src/core/tsconfig.json" }
17+
{ "path": "../../src/core/tsconfig.json" },
18+
{ "path": "../../src/plugins/kibana_react/tsconfig.json" },
1819
]
1920
}

examples/state_containers_examples/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
],
1515
"exclude": [],
1616
"references": [
17-
{ "path": "../../src/core/tsconfig.json" }
17+
{ "path": "../../src/core/tsconfig.json" },
18+
{ "path": "../../src/plugins/kibana_utils/tsconfig.json" },
19+
{ "path": "../../src/plugins/kibana_react/tsconfig.json" },
1820
]
1921
}

examples/ui_action_examples/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
],
1414
"exclude": [],
1515
"references": [
16-
{ "path": "../../src/core/tsconfig.json" }
16+
{ "path": "../../src/core/tsconfig.json" },
17+
{ "path": "../../src/plugins/kibana_react/tsconfig.json" },
1718
]
1819
}

examples/ui_actions_explorer/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
],
1313
"exclude": [],
1414
"references": [
15-
{ "path": "../../src/core/tsconfig.json" }
15+
{ "path": "../../src/core/tsconfig.json" },
16+
{ "path": "../../src/plugins/kibana_react/tsconfig.json" },
1617
]
1718
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"kbn:watch": "node scripts/kibana --dev --logging.json=false",
6666
"build:types": "rm -rf ./target/types && tsc --p tsconfig.types.json",
6767
"docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept",
68-
"kbn:bootstrap": "node scripts/build_ts_refs && node scripts/register_git_hook",
68+
"kbn:bootstrap": "node scripts/build_ts_refs --project tsconfig.refs.json && node scripts/register_git_hook",
6969
"spec_to_console": "node scripts/spec_to_console",
7070
"backport-skip-ci": "backport --prDescription \"[skip-ci]\"",
7171
"storybook": "node scripts/storybook",

src/dev/typescript/build_refs.ts

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,37 @@
1818
*/
1919

2020
import execa from 'execa';
21+
import Path from 'path';
2122
import { run, ToolingLog } from '@kbn/dev-utils';
2223

23-
export async function buildRefs(log: ToolingLog) {
24+
export async function buildAllRefs(log: ToolingLog) {
25+
await buildRefs(log, 'tsconfig.refs.json');
26+
await buildRefs(log, Path.join('x-pack', 'tsconfig.refs.json'));
27+
}
28+
29+
async function buildRefs(log: ToolingLog, projectPath: string) {
2430
try {
25-
log.info('Building TypeScript projects refs...');
26-
await execa(require.resolve('typescript/bin/tsc'), ['-b', 'tsconfig.refs.json']);
31+
log.debug(`Building TypeScript projects refs for ${projectPath}...`);
32+
await execa(require.resolve('typescript/bin/tsc'), ['-b', projectPath]);
2733
} catch (e) {
2834
log.error(e);
2935
process.exit(1);
3036
}
3137
}
3238

3339
export async function runBuildRefs() {
34-
run(async ({ log }) => {
35-
await buildRefs(log);
36-
});
40+
run(
41+
async ({ log, flags }) => {
42+
await buildRefs(log, flags.project as string);
43+
},
44+
{
45+
description: 'Build TypeScript projects',
46+
flags: {
47+
string: ['project'],
48+
help: `
49+
--project Required, path to the tsconfig.refs.file
50+
`,
51+
},
52+
}
53+
);
3754
}

src/dev/typescript/projects.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import { Project } from './project';
2424

2525
export const PROJECTS = [
2626
new Project(resolve(REPO_ROOT, 'tsconfig.json')),
27-
new Project(resolve(REPO_ROOT, 'src/test_utils/tsconfig.json')),
28-
new Project(resolve(REPO_ROOT, 'src/core/tsconfig.json')),
2927
new Project(resolve(REPO_ROOT, 'test/tsconfig.json'), { name: 'kibana/test' }),
3028
new Project(resolve(REPO_ROOT, 'x-pack/tsconfig.json')),
3129
new Project(resolve(REPO_ROOT, 'x-pack/test/tsconfig.json'), { name: 'x-pack/test' }),
30+
new Project(resolve(REPO_ROOT, 'src/test_utils/tsconfig.json')),
31+
new Project(resolve(REPO_ROOT, 'src/core/tsconfig.json')),
3232
new Project(resolve(REPO_ROOT, 'x-pack/plugins/security_solution/cypress/tsconfig.json'), {
3333
name: 'security_solution/cypress',
3434
}),
@@ -47,6 +47,12 @@ export const PROJECTS = [
4747
...glob
4848
.sync('packages/*/tsconfig.json', { cwd: REPO_ROOT })
4949
.map((path) => new Project(resolve(REPO_ROOT, path))),
50+
...glob
51+
.sync('src/plugins/*/tsconfig.json', { cwd: REPO_ROOT })
52+
.map((path) => new Project(resolve(REPO_ROOT, path))),
53+
...glob
54+
.sync('x-pack/plugins/*/tsconfig.json', { cwd: REPO_ROOT })
55+
.map((path) => new Project(resolve(REPO_ROOT, path))),
5056
...glob
5157
.sync('examples/*/tsconfig.json', { cwd: REPO_ROOT })
5258
.map((path) => new Project(resolve(REPO_ROOT, path))),

src/dev/typescript/run_type_check_cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import getopts from 'getopts';
2424

2525
import { execInProjects } from './exec_in_projects';
2626
import { filterProjectsByFlag } from './projects';
27-
import { buildRefs } from './build_refs';
27+
import { buildAllRefs } from './build_refs';
2828

2929
export async function runTypeCheckCli() {
3030
const extraFlags: string[] = [];
@@ -80,7 +80,7 @@ export async function runTypeCheckCli() {
8080
process.exit();
8181
}
8282

83-
await buildRefs(log);
83+
await buildAllRefs(log);
8484

8585
const tscArgs = [
8686
// composite project cannot be used with --noEmit

src/plugins/data/public/ui/filter_bar/filter_editor/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ class FilterEditorUI extends Component<Props, State> {
106106
</EuiFlexItem>
107107
<EuiFlexItem grow={false} className="filterEditor__hiddenItem" />
108108
<EuiFlexItem grow={false}>
109-
<EuiButtonEmpty size="xs" onClick={this.toggleCustomEditor}>
109+
<EuiButtonEmpty
110+
size="xs"
111+
data-test-subj="editQueryDSL"
112+
onClick={this.toggleCustomEditor}
113+
>
110114
{this.state.isCustomEditorOpen ? (
111115
<FormattedMessage
112116
id="data.filter.filterEditor.editFilterValuesButtonLabel"
@@ -133,6 +137,7 @@ class FilterEditorUI extends Component<Props, State> {
133137

134138
<EuiSwitch
135139
id="filterEditorCustomLabelSwitch"
140+
data-test-subj="createCustomLabel"
136141
label={this.props.intl.formatMessage({
137142
id: 'data.filter.filterEditor.createCustomLabelSwitchLabel',
138143
defaultMessage: 'Create custom label?',

0 commit comments

Comments
 (0)