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

Introduce TS incremental builds & move src/test_utils to TS project #76082

Merged
merged 32 commits into from
Sep 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d2d080a
move test_helpers to the core
mshustov Aug 25, 2020
7acf469
create base tsconfig
mshustov Aug 25, 2020
30afc81
all tsconfigs use the base one
mshustov Aug 25, 2020
6ee998b
use test_helpers exposed from the src/core
mshustov Aug 25, 2020
5b431f7
move getFieldFormatsRegistry to data plugin
mshustov Aug 25, 2020
3e13833
add test_utils project
mshustov Aug 25, 2020
3438519
compile types after checkout
mshustov Aug 25, 2020
12a0424
add a stub for platform tsconfig.json
mshustov Aug 25, 2020
eac95c9
fix broken import
mshustov Aug 27, 2020
d27a9f2
fix broken path to the base config
mshustov Aug 27, 2020
c36f09e
set tsBuildInfoFile for project without outDir
mshustov Aug 27, 2020
341a0bf
do not commit tsbuildinfo file
mshustov Aug 27, 2020
533ef62
do not check output d.ts files
mshustov Aug 27, 2020
db0acda
fix type error
mshustov Aug 28, 2020
e6c887a
use separate config to build types
mshustov Aug 28, 2020
1e265fc
rollback changes to include paths
mshustov Aug 28, 2020
05d4061
mute import zone error
mshustov Aug 28, 2020
86cfdd2
rename files to avoid references to tsd
mshustov Aug 31, 2020
bf773bc
do not use tsd for type tests
mshustov Aug 31, 2020
3aab007
include all ts files in project
mshustov Aug 31, 2020
50bdcd8
Merge branch 'master' into test-utils-ts-project
mshustov Aug 31, 2020
3279a2b
run buildRefs before type check to ensure the latest version
mshustov Aug 31, 2020
afdbfd4
store tsbuildinfo locally
mshustov Sep 1, 2020
d490fe6
update paths to base config
mshustov Sep 1, 2020
57922ee
comment out core/tsconfig.json
mshustov Sep 1, 2020
ca990c8
Merge branch 'master' into test-utils-ts-project
mshustov Sep 1, 2020
7646f19
remove ui path
mshustov Sep 1, 2020
6d351b1
Merge branch 'master' into test-utils-ts-project
mshustov Sep 2, 2020
fb19a68
Merge branch 'master' into test-utils-ts-project
mshustov Sep 3, 2020
7796510
Merge branch 'master' into test-utils-ts-project
mshustov Sep 3, 2020
dbab2ec
fix wrong tsbuildinfo path
mshustov Sep 3, 2020
9e5af02
Merge branch 'master' into test-utils-ts-project
mshustov Sep 3, 2020
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: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ apm.tsconfig.json
# release notes script output
report.csv
report.asciidoc

# TS incremental build cache
*.tsbuildinfo
2 changes: 1 addition & 1 deletion examples/alerting_example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/bfetch_explorer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/dashboard_embeddable_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/developer_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/embeddable_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/embeddable_explorer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/routing_example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/search_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/state_containers_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/ui_action_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/ui_actions_explorer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/url_generators_examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion examples/url_generators_explorer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"kbn:watch": "node scripts/kibana --dev --logging.json=false",
"build:types": "tsc --p tsconfig.types.json",
"docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept",
"kbn:bootstrap": "node scripts/register_git_hook",
"kbn:bootstrap": "node scripts/build_ts_refs && node scripts/register_git_hook",
"spec_to_console": "node scripts/spec_to_console",
"backport-skip-ci": "backport --prDescription \"[skip-ci]\"",
"storybook": "node scripts/storybook",
Expand Down
7 changes: 5 additions & 2 deletions packages/elastic-datemath/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/elastic-datemath"
},
"include": [
"index.d.ts"
],
]
}
5 changes: 1 addition & 4 deletions packages/elastic-safer-lodash-set/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"lint": "dependency-check --no-dev package.json set.js setWith.js fp/*.js",
"test": "npm run lint && tape test/*.js && npm run test:types",
"test:types": "./scripts/tsd.sh",
"test:types": "tsc --noEmit",
"update": "./scripts/update.sh",
"save_state": "./scripts/save_state.sh"
},
Expand All @@ -42,8 +42,5 @@
"ignore": [
"/lodash/"
]
},
"tsd": {
"directory": "test"
}
}
17 changes: 0 additions & 17 deletions packages/elastic-safer-lodash-set/scripts/tsd.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { expectType } from 'tsd';
import { set, setWith } from '../';
import { set, setWith } from '..';

const someObj: object = {};
const anyValue: any = 'any value';
Expand Down
10 changes: 5 additions & 5 deletions packages/elastic-safer-lodash-set/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/elastic-safer-lodash-set"
},
"include": [
"**/*"
"**/*",
],
"exclude": [
"**/*.test-d.ts"
]
}
1 change: 0 additions & 1 deletion packages/kbn-analytics/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ run(
proc.run(padRight(10, 'tsc'), {
cmd: 'tsc',
args: [
'--emitDeclarationOnly',
...(flags.watch ? ['--watch', '--preserveWatchOutput', 'true'] : []),
...(flags['source-maps'] ? ['--declarationMap', 'true'] : []),
],
Expand Down
7 changes: 4 additions & 3 deletions packages/kbn-analytics/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"emitDeclarationOnly": true,
"outDir": "./target/types",
"stripInternal": true,
"declarationMap": true,
"types": [
Expand All @@ -11,7 +12,7 @@
]
},
"include": [
"./src/**/*.ts"
"src/**/*"
],
"exclude": [
"target"
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-config-schema/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-dev-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target",
"target": "ES2019",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-es-archiver/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"declaration": true,
Expand Down
7 changes: 5 additions & 2 deletions packages/kbn-es/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-es"
},
"include": [
"src/**/*.ts"
"src/**/*"
]
}
5 changes: 4 additions & 1 deletion packages/kbn-expect/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-expect"
},
"include": [
"expect.js.d.ts"
]
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-i18n/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ run(
proc.run(padRight(10, 'tsc'), {
cmd: 'tsc',
args: [
'--emitDeclarationOnly',
...(flags.watch ? ['--watch', '--preserveWatchOutput', 'true'] : []),
...(flags['source-maps'] ? ['--declarationMap', 'true'] : []),
],
Expand Down
5 changes: 3 additions & 2 deletions packages/kbn-i18n/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"include": [
"src/**/*.ts",
"src/**/*.tsx",
Expand All @@ -11,7 +11,8 @@
],
"compilerOptions": {
"declaration": true,
"declarationDir": "./target/types",
"emitDeclarationOnly": true,
"outDir": "./target/types",
"types": [
"jest",
"node"
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-interpreter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-interpreter"
},
"include": ["index.d.ts", "src/**/*.d.ts"]
}
2 changes: 1 addition & 1 deletion packages/kbn-monaco/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"declaration": true,
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-optimizer/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-optimizer"
},
"include": [
"index.d.ts",
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-plugin-generator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target",
"target": "ES2019",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-plugin-helpers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target",
"declaration": true,
Expand Down
5 changes: 3 additions & 2 deletions packages/kbn-pm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"include": [
"./index.d.ts",
"./src/**/*.ts",
"./dist/*.d.ts",
"./dist/*.d.ts"
],
"exclude": [],
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-pm",
"types": [
"jest",
"node"
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-release-notes/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./target",
"declaration": true,
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-telemetry-tools/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-telemetry-tools"
},
"include": [
"src/**/*",
]
Expand Down
7 changes: 5 additions & 2 deletions packages/kbn-test-subj-selector/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-test-subj-selector"
},
"include": [
"index.d.ts"
],
]
}
5 changes: 4 additions & 1 deletion packages/kbn-test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-test"
},
"include": [
"types/**/*",
"src/**/*",
Expand Down
5 changes: 4 additions & 1 deletion packages/kbn-ui-shared-deps/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"tsBuildInfoFile": "../../build/tsbuildinfo/packages/kbn-ui-shared-deps"
},
"include": [
"index.d.ts",
"theme.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-utility-types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./target",
Expand Down
Loading