Skip to content

Commit c6b963b

Browse files
committed
Merge branch 'main' into module-resolution/ts-extensions
2 parents fa188b1 + b4024a5 commit c6b963b

File tree

412 files changed

+18279
-3602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

412 files changed

+18279
-3602
lines changed

Diff for: .eslintrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"@typescript-eslint", "no-null", "import", "eslint-plugin-local"
1414
],
1515
"rules": {
16+
"sort-imports": ["error", {
17+
"ignoreCase": true,
18+
"ignoreDeclarationSort": true,
19+
"allowSeparatedGroups": true
20+
}],
21+
1622
"@typescript-eslint/adjacent-overload-signatures": "error",
1723
"@typescript-eslint/array-type": "error",
1824
"@typescript-eslint/no-array-constructor": "error",

Diff for: .vscode/tasks.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// https://github.com/microsoft/vscode/issues/93001
1515
"label": "gulp: tests",
1616
"type": "npm",
17-
"script": "build:tests",
17+
"script": "build:tests -- --no-typecheck",
1818
"group": "build",
1919
"hide": true,
2020
"problemMatcher": [
@@ -44,7 +44,7 @@
4444
{
4545
"label": "npm: build:tests",
4646
"type": "npm",
47-
"script": "build:tests",
47+
"script": "build:tests -- --no-typecheck",
4848
"group": "build",
4949
"problemMatcher": [
5050
"$tsc"

Diff for: Herebyfile.mjs

+20-19
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { task } from "hereby";
66
import _glob from "glob";
77
import util from "util";
88
import chalk from "chalk";
9-
import { exec, readJson, getDiffTool, getDirSize, memoize, needsUpdate, Debouncer, Deferred } from "./scripts/build/utils.mjs";
10-
import { runConsoleTests, refBaseline, localBaseline, refRwcBaseline, localRwcBaseline, cleanTestDirs } from "./scripts/build/tests.mjs";
11-
import { buildProject as realBuildProject, cleanProject, watchProject } from "./scripts/build/projects.mjs";
9+
import { Debouncer, Deferred, exec, getDiffTool, getDirSize, memoize, needsUpdate, readJson } from "./scripts/build/utils.mjs";
10+
import { cleanTestDirs, localBaseline, localRwcBaseline, refBaseline, refRwcBaseline, runConsoleTests } from "./scripts/build/tests.mjs";
11+
import { cleanProject, buildProject as realBuildProject, watchProject } from "./scripts/build/projects.mjs";
1212
import { localizationDirectories } from "./scripts/build/localization.mjs";
1313
import cmdLineOptions from "./scripts/build/options.mjs";
1414
import esbuild from "esbuild";
@@ -328,10 +328,21 @@ function entrypointBuildTask(options) {
328328
},
329329
});
330330

331+
const mainDeps = options.mainDeps?.slice(0) ?? [];
332+
if (cmdLineOptions.bundle) {
333+
mainDeps.push(bundle);
334+
if (cmdLineOptions.typecheck) {
335+
mainDeps.push(build);
336+
}
337+
}
338+
else {
339+
mainDeps.push(build, shim);
340+
}
341+
331342
const main = task({
332343
name: options.name,
333344
description: options.description,
334-
dependencies: (options.mainDeps ?? []).concat(cmdLineOptions.bundle ? [bundle] : [build, shim]),
345+
dependencies: mainDeps,
335346
});
336347

337348
const watch = task({
@@ -358,7 +369,7 @@ function entrypointBuildTask(options) {
358369
}
359370

360371

361-
const { main: tsc, build: buildTsc, watch: watchTsc } = entrypointBuildTask({
372+
const { main: tsc, watch: watchTsc } = entrypointBuildTask({
362373
name: "tsc",
363374
description: "Builds the command-line compiler",
364375
buildDeps: [generateDiagnostics],
@@ -396,7 +407,7 @@ export const dtsServices = task({
396407
});
397408

398409

399-
const { main: tsserver, build: buildTsserver, watch: watchTsserver } = entrypointBuildTask({
410+
const { main: tsserver, watch: watchTsserver } = entrypointBuildTask({
400411
name: "tsserver",
401412
description: "Builds the language server",
402413
buildDeps: [generateDiagnostics],
@@ -414,15 +425,10 @@ const { main: tsserver, build: buildTsserver, watch: watchTsserver } = entrypoin
414425
export { tsserver, watchTsserver };
415426

416427

417-
const buildMin = task({
418-
name: "build-min",
419-
dependencies: [buildTsc, buildTsserver],
420-
});
421-
422428
export const min = task({
423429
name: "min",
424430
description: "Builds only tsc and tsserver",
425-
dependencies: [tsc, tsserver].concat(cmdLineOptions.typecheck ? [buildMin] : []),
431+
dependencies: [tsc, tsserver],
426432
});
427433

428434
export const watchMin = task({
@@ -591,15 +597,10 @@ export const watchOtherOutputs = task({
591597
dependencies: [watchCancellationToken, watchTypingsInstaller, watchWatchGuard, generateTypesMap, copyBuiltLocalDiagnosticMessages],
592598
});
593599

594-
const buildLocal = task({
595-
name: "build-local",
596-
dependencies: [buildTsc, buildTsserver, buildServices, buildLssl]
597-
});
598-
599600
export const local = task({
600601
name: "local",
601602
description: "Builds the full compiler and services",
602-
dependencies: [localize, tsc, tsserver, services, lssl, otherOutputs, dts].concat(cmdLineOptions.typecheck ? [buildLocal] : []),
603+
dependencies: [localize, tsc, tsserver, services, lssl, otherOutputs, dts],
603604
});
604605
export default local;
605606

@@ -610,7 +611,7 @@ export const watchLocal = task({
610611
dependencies: [localize, watchTsc, watchTsserver, watchServices, watchLssl, watchOtherOutputs, dts, watchSrc],
611612
});
612613

613-
const runtestsDeps = [tests, generateLibs].concat(cmdLineOptions.typecheck ? [dts, buildSrc] : []);
614+
const runtestsDeps = [tests, generateLibs].concat(cmdLineOptions.typecheck ? [dts] : []);
614615

615616
export const runTests = task({
616617
name: "runtests",

Diff for: package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: scripts/build/findUpDir.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { join, resolve, dirname } from "path";
1+
import { dirname, join, resolve } from "path";
22
import { existsSync } from "fs";
33
import url from "url";
44

Diff for: scripts/build/options.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ if (options.built) {
5151
options.lkg = false;
5252
}
5353

54+
if (!options.bundle && !options.typecheck) {
55+
throw new Error("--no-typecheck cannot be passed when bundling is disabled");
56+
}
57+
5458
export default options;
5559

5660

Diff for: scripts/build/projects.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { exec, Debouncer } from "./utils.mjs";
1+
import { Debouncer, exec } from "./utils.mjs";
22
import { resolve } from "path";
33
import { findUpRoot } from "./findUpDir.mjs";
44
import cmdLineOptions from "./options.mjs";

0 commit comments

Comments
 (0)