Add --no-typecheck option for runtests/runtests-parallel/min/local (#51460)

This commit is contained in:
Jake Bailey 2022-11-08 15:39:04 -08:00 committed by GitHub
parent 1b35985f4f
commit d237468cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 8 deletions

View File

@ -354,7 +354,7 @@ function entrypointBuildTask(options) {
}
const { main: tsc, watch: watchTsc } = entrypointBuildTask({
const { main: tsc, build: buildTsc, watch: watchTsc } = entrypointBuildTask({
name: "tsc",
description: "Builds the command-line compiler",
buildDeps: [generateDiagnostics],
@ -392,7 +392,7 @@ export const dtsServices = task({
});
const { main: tsserver, watch: watchTsserver } = entrypointBuildTask({
const { main: tsserver, build: buildTsserver, watch: watchTsserver } = entrypointBuildTask({
name: "tsserver",
description: "Builds the language server",
buildDeps: [generateDiagnostics],
@ -410,10 +410,15 @@ const { main: tsserver, watch: watchTsserver } = entrypointBuildTask({
export { tsserver, watchTsserver };
const buildMin = task({
name: "build-min",
dependencies: [buildTsc, buildTsserver],
});
export const min = task({
name: "min",
description: "Builds only tsc and tsserver",
dependencies: [tsc, tsserver],
dependencies: [tsc, tsserver].concat(cmdLineOptions.typecheck ? [buildMin] : []),
});
export const watchMin = task({
@ -577,10 +582,15 @@ export const watchOtherOutputs = task({
dependencies: [watchCancellationToken, watchTypingsInstaller, watchWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
});
const buildLocal = task({
name: "build-local",
dependencies: [buildTsc, buildTsserver, buildServices, buildLssl]
});
export const local = task({
name: "local",
description: "Builds the full compiler and services",
dependencies: [localize, tsc, tsserver, services, lssl, otherOutputs, dts, buildSrc],
dependencies: [localize, tsc, tsserver, services, lssl, otherOutputs, dts].concat(cmdLineOptions.typecheck ? [buildLocal] : []),
});
export default local;
@ -591,11 +601,12 @@ export const watchLocal = task({
dependencies: [localize, watchTsc, watchTsserver, watchServices, watchLssl, watchOtherOutputs, dts, watchSrc],
});
const runtestsDeps = [tests, generateLibs].concat(cmdLineOptions.typecheck ? [dts, buildSrc] : []);
export const runTests = task({
name: "runtests",
description: "Runs the tests using the built run.js file.",
dependencies: [tests, generateLibs, dts, buildSrc],
dependencies: runtestsDeps,
run: () => runConsoleTests(testRunner, "mocha-fivemat-progress-reporter", /*runInParallel*/ false),
});
// task("runtests").flags = {
@ -617,7 +628,7 @@ export const runTests = task({
export const runTestsParallel = task({
name: "runtests-parallel",
description: "Runs all the tests in parallel using the built run.js file.",
dependencies: [tests, generateLibs, dts, buildSrc],
dependencies: runtestsDeps,
run: () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1),
});
// task("runtests-parallel").flags = {

View File

@ -4,7 +4,7 @@ import os from "os";
const ci = ["1", "true"].includes(process.env.CI ?? "");
const parsed = minimist(process.argv.slice(2), {
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle"],
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck"],
string: ["browser", "tests", "break", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
alias: {
/* eslint-disable quote-props */
@ -39,7 +39,8 @@ const parsed = minimist(process.argv.slice(2), {
dirty: false,
built: false,
ci,
bundle: true
bundle: true,
typecheck: true,
}
});
@ -80,5 +81,6 @@ export default options;
* @property {string} shardId
* @property {string} break
* @property {boolean} bundle
* @property {boolean} typecheck
*/
void 0;