[APM] Disable incremental builds for APM-only type check (#77581)

This commit is contained in:
Dario Gieselaar 2020-09-16 16:50:45 +02:00 committed by GitHub
parent 5511f0f977
commit 78774e4925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -11,6 +11,7 @@ const { promisify } = require('util');
const path = require('path');
const json5 = require('json5');
const execa = require('execa');
const { omit } = require('lodash');
const readFile = promisify(fs.readFile);
const writeFile = promisify(fs.writeFile);
@ -27,6 +28,7 @@ function prepareParentTsConfigs() {
return Promise.all(
[
path.resolve(xpackRoot, 'tsconfig.json'),
path.resolve(kibanaRoot, 'tsconfig.base.json'),
path.resolve(kibanaRoot, 'tsconfig.json'),
].map(async (filename) => {
const config = json5.parse(await readFile(filename, 'utf-8'));
@ -35,7 +37,11 @@ function prepareParentTsConfigs() {
filename,
JSON.stringify(
{
...config,
...omit(config, 'references'),
compilerOptions: {
...config.compilerOptions,
incremental: false,
},
include: [],
},
null,

View file

@ -13,6 +13,7 @@ const tsconfigTpl = path.resolve(__dirname, './tsconfig.json');
const filesToIgnore = [
path.resolve(xpackRoot, 'tsconfig.json'),
path.resolve(kibanaRoot, 'tsconfig.json'),
path.resolve(kibanaRoot, 'tsconfig.base.json'),
];
module.exports = {

View file

@ -88,7 +88,7 @@ export async function getTraceItems(
// explicit intermediary types to avoid TS "excessively deep" error
PromiseValueType<typeof errorResponsePromise>,
PromiseValueType<typeof traceResponsePromise>
] = await Promise.all([errorResponsePromise, traceResponsePromise]);
] = (await Promise.all([errorResponsePromise, traceResponsePromise])) as any;
const exceedsMax = traceResponse.hits.total.value > maxTraceItems;